break;
//fprintf(stderr, "round:\n");
sf_count_t bestguess = findMaximumSingle(func, xg, xg2, size / 32 + 1);
- xg = MAX(xg, bestguess - size / 3);
- xg2 = MIN(bestguess + size / 3, xg2);
+ xg = MAX(xg0, bestguess - size / 3);
+ xg2 = MIN(bestguess + size / 3, xg20);
}
fprintf(stderr, "guessed: %d\n", (int)xg);
$track->new_event('set_tempo', 0, $delta * 1000000);
$track->new_event('patch_change', 0, 0, $program - 1);
+my $first = 1;
for(@notes)
{
- $track->new_event('note_on', 96, 0, $transpose + $_, $velocity);
+ $track->new_event('note_on', $first ? 0 : 96, 0, $transpose + $_, $velocity);
$track->new_event('note_off', 96, 0, $transpose + $_, $velocity);
+ $first = 0;
}
my $opus = MIDI::Opus->new({
len=1.8
perl tuba_loopnote_maker.mid.pl "$t"/tuba_loopnote_maker.mid $delta $program $velocity $transpose -18 -12 -6 0 6 12 18 24
+cp "$t"/tuba_loopnote_maker.mid tuba$tubaid.mid
case "$synth" in
timidity)
normalize --peak "$t"/out.wav
-start=$delta
+start=0
step=$(($delta*2))
for note in -18 -12 -6 0 6 12 18 24; do
sox "$t"/out.wav "$t"/n$note.wav \
#!/bin/sh
# tuba = 59
-sh tuba_loopnote_maker.sh fluidsynth 59 100 48 "" /usr/share/soundfonts/fluidr3/FluidR3GM.SF2
+sh tuba_loopnote_maker.sh timidity 59 100 48 "" -EFreverb=G4
# accordeon = 24
-sh tuba_loopnote_maker.sh fluidsynth 24 100 60 "1" /usr/share/soundfonts/fluidr3/FluidR3GM.SF2
+sh tuba_loopnote_maker.sh timidity 24 100 60 "1" -EFreverb=G4