Compare commits

...

4 Commits

Author SHA1 Message Date
Job Bautista 0b3c68a777 Fix indentation of createSamples() 2022-05-07 16:30:59 +08:00
Job Bautista 584c602a4a Remove ability to modify unneeded maxSynthChannels in stdin method 2022-05-07 16:21:14 +08:00
Job Bautista 7959ea758b Add ability to modify synth sample rate in stdin method of inputting notes 2022-05-07 16:15:29 +08:00
Job Bautista 119de25e40 Corrected dotted half note duration
That explains why I'm experiencing those desyncs while arranging
 The Internationale... And Dimension of Reverie too.
2022-05-07 16:13:42 +08:00
9 changed files with 13 additions and 13 deletions

View File

@ -47,7 +47,7 @@ sub setTempo {
our $qu=60 / $BPM; # Quarter note
our $ei=30 / $BPM; # Eighth note
our $si=15 / $BPM; # Sixteenth note
our $dha=190 / $BPM; # Dotted-half note
our $dha=180 / $BPM; # Dotted-half note
our $dqu=90 / $BPM; # Dotted-quarter note
our $dei=45 / $BPM; # Dotted-eighth note
our $dsi=22.5 / $BPM; # Dotted-sixteenth note
@ -118,7 +118,7 @@ sub createSamples {
'trim 0 ', POSIX::floor($currentNote[0]*1000)/1000, '"', "\n";
} else {
print '"|sox -M ';
for my $currentSample (iterate(0,$maxSamplesChannels-1)) {
for my $currentSample (iterate(0,$maxSamplesChannels-1)) {
if(exists($pitches[$currentSample])) {
print $samplesDir, '/', uc $pitches[$currentSample], '.* ';
} else {

View File

@ -11,4 +11,4 @@ DIR="background"
$DIR/verse6 \
$DIR/verse7 \
$DIR/chorus/1 $DIR/chorus/2 \
) | ../stdin/samples.pl 100 4 2 ../piano/ff
) | ../stdin/samples.pl 100 2 ../piano/ff

View File

@ -9,4 +9,4 @@ cat $DIR/verse1 \
$DIR/verse6/1 $DIR/dsdsdds $DIR/verse6/2 \
$DIR/verse7 \
$DIR/chorus/1 $DIR/chorus/2 |
../stdin/samples.pl 100 4 2 ../piano/ff
../stdin/samples.pl 100 2 ../piano/ff

View File

@ -6,4 +6,4 @@ $ei:G5
$ei:F5
$ei:D#5
$ei:C#5
1.8:C5
$dha:C5

View File

@ -4,4 +4,4 @@ $qu:G5/D#5
$qu:A#5
$qu:C#6/C#5
$qu:G5/A#4
1.8:G#5/C5
$dha:G#5/C5

View File

@ -2,4 +2,4 @@ $qu:G5
$qu:A#5
$qu:G#5
$qu:F5
1.8:D#5
$dha:D#5

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,9 +30,8 @@ use SoXMusicGen;
our @notes;
setTempo($ARGV[0]);
our $maxSynthChannels=$ARGV[1];
our $maxSamplesChannels=$ARGV[2];
our $samplesDir=$ARGV[3];
our $maxSamplesChannels=$ARGV[1];
our $samplesDir=$ARGV[2];
our @notestemp=<STDIN>;

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]);
}