Add ability to modify synth sample rate in stdin method of inputting notes

This commit is contained in:
Job Bautista 2022-05-07 16:15:29 +08:00
parent 119de25e40
commit 7959ea758b
2 changed files with 4 additions and 3 deletions

View File

@ -14,4 +14,4 @@ cat 00 \
04 \
04-05-common \
05 |
../stdin/synths.pl 180 6 square square triangle square square sawtooth
../stdin/synths.pl 180 48000 6 square square triangle square square sawtooth

View File

@ -30,10 +30,11 @@ use SoXMusicGen;
our @notes;
setTempo($ARGV[0]);
our $maxSynthChannels=$ARGV[1];
our $synthSampleRate=$ARGV[1];
our $maxSynthChannels=$ARGV[2];
my @synths;
for my $synth (iterate(2,@ARGV)) {
for my $synth (iterate(3,@ARGV)) {
if (exists($ARGV[$synth])) {
push (@synths, $ARGV[$synth]);
}