[PD] Midi noteout: changing the instrument

Frank Barknecht fbar at footils.org
Sun Nov 11 11:38:28 CET 2007

Andy Farnell hat gesagt: // Andy Farnell wrote:

> On Sat, 10 Nov 2007 17:06:07 -0600
> Timothy Sikes <trs164 at hotmail.com> wrote:
> > Hi once again.    
> >  What I'm trying to figure out now is how to change the instrument. 
> [pgmout] sends a program change, that's probably what you want.

Or maybe the problem is just how to send data to a different channel
of noteout. As makenote only generates pairs of notes without channel
information, you'd need to add the channel number yourself.

Unless you'd want to hardcode the channel as a creation argument to
[noteout], it's possible to add a settable channel with "pack": 

 [makenote]  "numberbox for channel number"
 |      /   /
 [pack 0 0 1] -- use channel 1 (GM piano) as default
 [unpack 0 0 0]
 |    |  /

It's also possible to leave out the "unpack" as [notein] like many
objects will distribute an incoming list over its three inlets

 [makenote]  "numberbox for channel number"
 |      /   /
 [pack 0 0 1]

Of course actually a third version would be even simpler, but you
wouldn't learn anything about [pack]/[unpack] :) 

 |      /
 |     /  "numberbox for channel number"
 |    /   /

Here you would need a separate [noteout] object for every [makenote],
whereas in the previous solutions you could send all your notes with
the respective channel number appended to the same [noteout].

 Frank Barknecht                                     _ ______footils.org__

More information about the Pd-list mailing list