Hallo, Andy Farnell hat gesagt: // Andy Farnell wrote:
On Sat, 10 Nov 2007 17:06:07 -0600 Timothy Sikes trs164@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] | | / [noteout]
It's also possible to leave out the "unpack" as [notein] like many objects will distribute an incoming list over its three inlets automatically:
[makenote] "numberbox for channel number" | / / [pack 0 0 1] | [noteout]
Of course actually a third version would be even simpler, but you wouldn't learn anything about [pack]/[unpack] :)
[makenote] | / | / "numberbox for channel number" | / / [noteout]
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__