[chuck-users] mouse up/down controlling signal path

Loscha loscha at gmail.com
Sun Nov 11 03:37:50 EST 2007


You need to have your control signal modifying the Gain of a few units;
Turning the gain off the output of the reverb will do what you want,
if I'm understanding your requirements.
dry => g1 => dac;
rev => g2 => dac;

desired_reverb_amount => g1
1 - g1 => g2

-ErJ

On Nov 11, 2007 7:20 PM, Jascha Narveson <jnarveson at wesleyan.edu> wrote:
>
>
> 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;
>                 }
>         }
> }
>
>
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>



-- 
www.loscha.com


More information about the chuck-users mailing list