[chuck-users] MIDI tutorial problem

plutek plutek at infinity.net
Mon Aug 6 22:16:40 EDT 2012

From: Peter Lutek <plutek at infinity.net>
Date: Mon, 6 Aug 2012 21:06:27 -0400

>  greetings!
>  a chuck novice here, so likely some silly user error!....  ;-)
>  working through the tutorials in the pdf manual, when following the
> Getting MIDI section, if i do this...
>  MidiIn min;
>  if( !min.open(1) ) { me.exit(); }
>  while(true){
>      min => now;
>      while( min.recv(msg) ){
>          ;
>      }
>  }
>  ...chuck throws me an "undefined variable 'msg'..." error!
>  something i'm missing?
>  recent change in MIDI syntax? (i'm on chuck v1.2.1.3 on linux)
>  "chuck  --probe" does show my desired MIDI interface as "1".
>  thanks in advance... cheers!
>  .pltk.

ahh.... the next section of the tutorial (about outbound MIDI) includes:...

MidiMsg msg;

...to define the variable. it works fine. inclusion of that line in the above code (of course) makes it work too.

perhaps that should be clarified in the tutorial??


...and thanks for a maillist which is so amazing that we get answers without you guys even having to do anything!  ;-)

More information about the chuck-users mailing list