hello again, chuckists -

I'd like to alter signal flow in response to input from HID devices.  In this small example, i want mouse down to result in reverb, and mouse up to result in dry signal.  The problem is that the reverb persists after the first mouse down - i tried unchucking in the mouse up "else if" statement, but that didn't work...

thanks, all,

j

----code----


adc => dac;
NRev rev;

Hid hi;
HidMsg msg;

if( !hi.openMouse( 0 ) ) me.exit();
<<< "mouse '" + hi.name() + "' ready...", "" >>>;

while( true )
{
        // wait on event
        hi => now;
        // loop over messages
        while( hi.recv( msg ) )
        {
                if( msg.isButtonDown() )
                {
                        <<<"down">>>;
                        adc => rev => dac;
                }

                

                else if( msg.isButtonUp() )
                {
                        <<<"up">>>;
                        adc => dac;
                }
        }
}