#define TUBA_MIN -18
#define TUBA_MAX 27
-#define TUBA_INSTRUMENTS 1
+#define TUBA_INSTRUMENTS 2
#define TUBA_STARTNOTE(i,n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
.float note; // note
// TODO switch to alternate instruments :)
if(self.weaponentity.state == WS_READY)
{
- /*
switch(self.tuba_instrument)
{
case 0:
self.tuba_instrument = 1;
- self.weaponname = "laser";
+ self.weaponname = "akordeon";
break;
case 1:
self.tuba_instrument = 0;
self.weaponname = "tuba";
break;
}
- */
W_SetupShot(self, FALSE, 0, "", 0, 0);
pointparticles(particleeffectnum("teleport"), w_shotorg, '0 0 0', 1);
self.weaponentity.state = WS_INUSE;
--- /dev/null
+akordeon
+{
+ dpglossexponentmod 64
+ dpreflectcube env/exomorph/exomorph
+ {
+ map models/weapons/akordeon.tga
+ rgbgen lightingDiffuse
+ }
+}
\ No newline at end of file
--- /dev/null
+r=44642
+
+base=261.6
+ls=$((7646/2))
+le=$((10378/2))
+for n in -18 -12; do
+ this=`echo "440*e(l(2)/12*($n+72-69))" | bc -l`
+ f=`echo "$r * $this / $base + 0.5" | bc -l`
+ f=${f%.*}
+ echo "$r -> $f"
+ if [ "$f" -gt 48000 ]; then
+ o="-r 48000"
+ s=`echo "$ls * 48000 / $f + 0.5" | bc -l`
+ s=${s%.*}
+ e=`echo "$le * 48000 / $f + 0.5" | bc -l`
+ e=${e%.*}
+ else
+ o=
+ s=$ls
+ e=$le
+ fi
+ sox -r "$f" 023_Tango_Accordion-0.wav $o "tuba1_loopnote$n.wav"
+ oggenc -c "LOOP_START=$s" -c "LOOP_END=$e" -q8 -o "tuba1_loopnote$n.ogg" "tuba1_loopnote$n.wav"
+done
+
+base=659.191
+ls=$((6326/2))
+le=$((7140/2))
+for n in -6 0 6 12 18 24; do
+ this=`echo "440*e(l(2)/12*($n+72-69))" | bc -l`
+ f=`echo "$r * $this / $base + 0.5" | bc -l`
+ f=${f%.*}
+ echo "$r -> $f"
+ if [ "$f" -gt 48000 ]; then
+ o="-r 48000"
+ s=`echo "$ls * 48000 / $f + 0.5" | bc -l`
+ s=${s%.*}
+ e=`echo "$le * 48000 / $f + 0.5" | bc -l`
+ e=${e%.*}
+ else
+ o=
+ s=$ls
+ e=$le
+ fi
+ sox -r "$f" 023_Tango_Accordion-1.wav $o "tuba1_loopnote$n.wav"
+ oggenc -c "LOOP_START=$s" -c "LOOP_END=$e" -q8 -o "tuba1_loopnote$n.ogg" "tuba1_loopnote$n.wav"
+done