]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
the accordeon!
authorRudolf Polzer <divverent@xonotic.org>
Mon, 10 Oct 2011 20:00:08 +0000 (22:00 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 10 Oct 2011 20:00:08 +0000 (22:00 +0200)
17 files changed:
models/weapons/akordeon.tga [new file with mode: 0644]
models/weapons/akordeon_gloss.tga [new file with mode: 0644]
models/weapons/akordeon_reflect.tga [new file with mode: 0644]
models/weapons/h_akordeon.iqm [new file with mode: 0644]
models/weapons/v_akordeon.md3 [new file with mode: 0644]
qcsrc/client/tuba.qc
qcsrc/server/w_tuba.qc
scripts/akordeon.shader [new file with mode: 0644]
sound/weapons/tuba1_loopnote-12.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote-18.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote-6.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote-src.txt [new file with mode: 0644]
sound/weapons/tuba1_loopnote0.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote12.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote18.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote24.ogg [new file with mode: 0644]
sound/weapons/tuba1_loopnote6.ogg [new file with mode: 0644]

diff --git a/models/weapons/akordeon.tga b/models/weapons/akordeon.tga
new file mode 100644 (file)
index 0000000..68b0ae0
Binary files /dev/null and b/models/weapons/akordeon.tga differ
diff --git a/models/weapons/akordeon_gloss.tga b/models/weapons/akordeon_gloss.tga
new file mode 100644 (file)
index 0000000..b03c089
Binary files /dev/null and b/models/weapons/akordeon_gloss.tga differ
diff --git a/models/weapons/akordeon_reflect.tga b/models/weapons/akordeon_reflect.tga
new file mode 100644 (file)
index 0000000..2f3eba9
Binary files /dev/null and b/models/weapons/akordeon_reflect.tga differ
diff --git a/models/weapons/h_akordeon.iqm b/models/weapons/h_akordeon.iqm
new file mode 100644 (file)
index 0000000..523ef99
Binary files /dev/null and b/models/weapons/h_akordeon.iqm differ
diff --git a/models/weapons/v_akordeon.md3 b/models/weapons/v_akordeon.md3
new file mode 100644 (file)
index 0000000..3990797
Binary files /dev/null and b/models/weapons/v_akordeon.md3 differ
index 13e37f0e770fc748366256a94e877804ede48aaa..2fea077c5d0c928c6629289de9273886b3e98fd9 100644 (file)
@@ -1,6 +1,6 @@
 #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
index 987e7b41e2570b6480e4d141aa546fcd3dc6ccec..8753e7ba5a4e93e4326284266f11c0d19c1725e0 100644 (file)
@@ -243,19 +243,17 @@ float w_tuba(float req)
                // 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;
diff --git a/scripts/akordeon.shader b/scripts/akordeon.shader
new file mode 100644 (file)
index 0000000..19a3041
--- /dev/null
@@ -0,0 +1,9 @@
+akordeon
+{
+       dpglossexponentmod  64
+       dpreflectcube env/exomorph/exomorph
+       {
+               map models/weapons/akordeon.tga
+               rgbgen lightingDiffuse
+       }
+}
\ No newline at end of file
diff --git a/sound/weapons/tuba1_loopnote-12.ogg b/sound/weapons/tuba1_loopnote-12.ogg
new file mode 100644 (file)
index 0000000..8f98c50
Binary files /dev/null and b/sound/weapons/tuba1_loopnote-12.ogg differ
diff --git a/sound/weapons/tuba1_loopnote-18.ogg b/sound/weapons/tuba1_loopnote-18.ogg
new file mode 100644 (file)
index 0000000..aea2cb7
Binary files /dev/null and b/sound/weapons/tuba1_loopnote-18.ogg differ
diff --git a/sound/weapons/tuba1_loopnote-6.ogg b/sound/weapons/tuba1_loopnote-6.ogg
new file mode 100644 (file)
index 0000000..9e77f12
Binary files /dev/null and b/sound/weapons/tuba1_loopnote-6.ogg differ
diff --git a/sound/weapons/tuba1_loopnote-src.txt b/sound/weapons/tuba1_loopnote-src.txt
new file mode 100644 (file)
index 0000000..56bcb5f
--- /dev/null
@@ -0,0 +1,47 @@
+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
diff --git a/sound/weapons/tuba1_loopnote0.ogg b/sound/weapons/tuba1_loopnote0.ogg
new file mode 100644 (file)
index 0000000..5e9ac89
Binary files /dev/null and b/sound/weapons/tuba1_loopnote0.ogg differ
diff --git a/sound/weapons/tuba1_loopnote12.ogg b/sound/weapons/tuba1_loopnote12.ogg
new file mode 100644 (file)
index 0000000..9be6994
Binary files /dev/null and b/sound/weapons/tuba1_loopnote12.ogg differ
diff --git a/sound/weapons/tuba1_loopnote18.ogg b/sound/weapons/tuba1_loopnote18.ogg
new file mode 100644 (file)
index 0000000..66c6c7c
Binary files /dev/null and b/sound/weapons/tuba1_loopnote18.ogg differ
diff --git a/sound/weapons/tuba1_loopnote24.ogg b/sound/weapons/tuba1_loopnote24.ogg
new file mode 100644 (file)
index 0000000..07c523f
Binary files /dev/null and b/sound/weapons/tuba1_loopnote24.ogg differ
diff --git a/sound/weapons/tuba1_loopnote6.ogg b/sound/weapons/tuba1_loopnote6.ogg
new file mode 100644 (file)
index 0000000..0af0417
Binary files /dev/null and b/sound/weapons/tuba1_loopnote6.ogg differ