[transport]-driven logic outputs a superfluous bang – can't find source!

Jan 25, 2013 at 3:49pm

[transport]-driven logic outputs a superfluous bang – can't find source!

Hi everyone,

so this bug in my patch is driving me insane. In short, part of my patch is supposed to output values from 0. to 1. synchronized to Live’s transport. It does so, except one bang message that is too much – and it’s really annoying. I can’t figure out what is happening.

Comment:
I am sending [line 0. 5] a “0., 1. $1″ message whenever a new bar starts. The variable value comes from [f], where I store the needed period continuously (computed from values that come from [transport]) and output it whenever a new bar begins. Judging from everything I know about message ordering, whatever happens, [f] should in any situation always store a real value. But this is not what is the case. Apparently, the first bang, the very first time the transport is started, somehow reaches [f] before it has a chance to store the needed value for the period – this is what I was able to find out.

As a result, before the [line] begins to fire the useful values, it outputs “.0, 1.0″, which (to give some background) causes a MIDI note to be output in the larger context of the patch.

I’ve tried using [buddy] to sync value and bang, but had no luck.

What follows is the relevant excerpt from the patch.

Any ideas? I’m sure I’m just missing something really obvious here.

– Pasted Max Patch, click to expand. –

PS: I’m sure there is an easier way to do what I am doing, but I wanted to try this way.

#66218
Jan 25, 2013 at 4:55pm

Please delete post – I suspected the bug in the wrong place! I misinterpreted the outputs of the [print]s I had used. The bug, in the end, has turned out to have been due to a) a mistakenly made connection in the part that I posted and b) a different part of the patch altogether. Sorry to be wasting everyone’s time!

#238351

You must be logged in to reply to this topic.