in reply to BeatBox 2003

Ditto on wishing more ++'s on this great script. I was wondering how to adapt it to use other instruments. I changed the following:
sub load_patches { #my $channel = 'c9'; # channel 10 my $channel = 'c8';
That made it play as a piano. As a matter of fact, I changed it to alot of different values, and they all came out piano, so I guess piano is default when timidity dosn't know what else to use. Can anyone point me to some docs, concerning how to change patches and instruments. I read the hash in MIDI.pm for the patches, but changing them always comes out piano.

Replies are listed 'Best First'.
Re: Re: BeatBox 2003
by Mr. Muskrat (Canon) on Mar 18, 2003 at 15:42 UTC

    Channel 10 is for percussion instruments. The pitch values determine what instrument to play.

    So in addition to changing the channel you will need to tell it what instrument to use by issuing a patch_change( $channel, $patch ); command. Where $patch is the MIDI instrument you wish to use (i.e. 8 for Celesta). However, usage of BeatBox in this manner is not recommended since there are easier ways of doing what you want. :)