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

    Jan 25 2013 | 3:49 pm
    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.
    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.
    PS: I'm sure there is an easier way to do what I am doing, but I wanted to try this way.

    • Jan 25 2013 | 4:55 pm
      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!