From: Rudolf Polzer Date: Wed, 12 Oct 2011 10:07:58 +0000 (+0200) Subject: some improvements X-Git-Tag: xonotic-v0.6.0~12 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=482478c0f7d4f2b17b308f568303acf82c1ea179;p=xonotic%2Fmediasource.git some improvements --- diff --git a/sound/weapons/loopfinder/findloop.c b/sound/weapons/loopfinder/findloop.c index cbfc434..997e11e 100644 --- a/sound/weapons/loopfinder/findloop.c +++ b/sound/weapons/loopfinder/findloop.c @@ -97,8 +97,8 @@ sf_count_t findMaximum(double (*func) (sf_count_t), sf_count_t x0, sf_count_t xg 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); diff --git a/sound/weapons/tuba_loopnote_maker.mid.pl b/sound/weapons/tuba_loopnote_maker.mid.pl index 5f9a3f3..1a9e69a 100644 --- a/sound/weapons/tuba_loopnote_maker.mid.pl +++ b/sound/weapons/tuba_loopnote_maker.mid.pl @@ -11,10 +11,12 @@ my $track = MIDI::Track->new(); $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({ diff --git a/sound/weapons/tuba_loopnote_maker.sh b/sound/weapons/tuba_loopnote_maker.sh index cd39988..4289b4d 100755 --- a/sound/weapons/tuba_loopnote_maker.sh +++ b/sound/weapons/tuba_loopnote_maker.sh @@ -23,6 +23,7 @@ loopmax=1.5 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) @@ -35,7 +36,7 @@ esac 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 \ diff --git a/sound/weapons/tuba_loopnotes.sh b/sound/weapons/tuba_loopnotes.sh index b007a9c..e399736 100644 --- a/sound/weapons/tuba_loopnotes.sh +++ b/sound/weapons/tuba_loopnotes.sh @@ -1,7 +1,7 @@ #!/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