From 293018e8bf22831612509895e7e288e08ed734b5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 30 Apr 2005 15:55:15 +0000 Subject: [PATCH] added bastis csound files SVN-Revision: 2373 --- contrib/sounds/csound/Makefile | 12 ++++++ contrib/sounds/csound/bubble.sco | 24 +++++++++++ contrib/sounds/csound/cscore.out | 0 contrib/sounds/csound/lava.sco | 12 ++++++ contrib/sounds/csound/rain.sco | 15 +++++++ contrib/sounds/csound/sfx.orc | 79 +++++++++++++++++++++++++++++++++++++ contrib/sounds/csound/test.orc | 18 +++++++++ contrib/sounds/csound/test.sco | 8 ++++ contrib/sounds/csound/waterfall.sco | 10 +++++ 9 files changed, 178 insertions(+) create mode 100644 contrib/sounds/csound/Makefile create mode 100644 contrib/sounds/csound/bubble.sco create mode 100644 contrib/sounds/csound/cscore.out create mode 100644 contrib/sounds/csound/lava.sco create mode 100644 contrib/sounds/csound/rain.sco create mode 100644 contrib/sounds/csound/sfx.orc create mode 100644 contrib/sounds/csound/test.orc create mode 100644 contrib/sounds/csound/test.sco create mode 100644 contrib/sounds/csound/waterfall.sco diff --git a/contrib/sounds/csound/Makefile b/contrib/sounds/csound/Makefile new file mode 100644 index 000000000..13a754a0f --- /dev/null +++ b/contrib/sounds/csound/Makefile @@ -0,0 +1,12 @@ + +CSOUND = /usr/bin/csound + +sounds: bubble.wav rain.wav lava.wav waterfall.wav + +%.wav: %.sco sfx.orc + $(CSOUND) sfx.orc $< -W -o $@ -g + +clean: + rm *.wav + rm *~ + diff --git a/contrib/sounds/csound/bubble.sco b/contrib/sounds/csound/bubble.sco new file mode 100644 index 000000000..d0cb3ae9b --- /dev/null +++ b/contrib/sounds/csound/bubble.sco @@ -0,0 +1,24 @@ + +; Bubble is very unproblematic, just needs a sine as a source (you +; might experiment with the gen to make the bubble sound different + +f 1 0 64 10 1 + +; lots of bubbles, just use one! + +;i3 0 0.1 8.0 30000 1.0004 +;i3 0 0.1 6.0 30000 1.0006 +;i3 0 0.1 5.11 30000 1.0006 +;i3 0 0.1 6.01 30000 1.0006 +;i3 0 0.1 6.02 30000 1.0006 +;i3 0 0.1 7.0 30000 1.0005 + +i3 0 0.1 6.11 30000 1.0005 + +;i3 0 0.1 7.01 30000 1.0005 +;i3 0 0.1 7.02 30000 1.0005 +;i3 0 0.1 8.02 30000 1.0004 +;i3 0 0.1 8.0 30000 1.0004 +;i3 0 0.1 8.11 30000 1.0004 +;i3 0 0.1 8.01 30000 1.0004 +;i3 0 0.1 8.02 30000 1.0004 diff --git a/contrib/sounds/csound/cscore.out b/contrib/sounds/csound/cscore.out new file mode 100644 index 000000000..e69de29bb diff --git a/contrib/sounds/csound/lava.sco b/contrib/sounds/csound/lava.sco new file mode 100644 index 000000000..098d808ad --- /dev/null +++ b/contrib/sounds/csound/lava.sco @@ -0,0 +1,12 @@ + +; lava + +;i1 0 1 100 3000 3000 2 +i1 0 3 100 1000 3000 1 +;i1 0 1 100 500 500 0.5 +;i1 0 1 50 500 500 0.5 +;i1 0 1 100 3000 1000 0.5 +;i1 0 1 100 8000 8000 0.5 +;i1 0 1 100 8000 8000 2 +;i1 0 1 100 6000 3000 3 + diff --git a/contrib/sounds/csound/rain.sco b/contrib/sounds/csound/rain.sco new file mode 100644 index 000000000..981789397 --- /dev/null +++ b/contrib/sounds/csound/rain.sco @@ -0,0 +1,15 @@ + +; some water/rain sounds + + +;i2 0 1 3000 10 7000 1 +;i2 0 5 1000 20 2000 0.4 +i2 0 5 2000 0.5 3000 -0.5 3 +;i2 0 1 3000 0 3000 1 +;i2 0 1 3000 2 4000 1 +;i2 0 1 6000 2 4000 1 + + + + + diff --git a/contrib/sounds/csound/sfx.orc b/contrib/sounds/csound/sfx.orc new file mode 100644 index 000000000..7dcfde6f7 --- /dev/null +++ b/contrib/sounds/csound/sfx.orc @@ -0,0 +1,79 @@ + +; supertux - various sound effect orchestra +; +; note - The sounds can't be looped right away, an external program needs +; to be used to make them loop +; +; Bastiaan Zapf - freenode.net basti_ + +sr = 44100 +kr = 44100 +ksmps = 1 +nchnls = 1 + +; lava sound + +instr 1 + ; Generate a random between 0 and 1. + ; krange = 1 + + kocrck init 0 + + a1 exprand 10 ; exponential noise as a base + + kncrck exprand 1 ; get new crackle raw + kcrck = (kocrck-kncrck)/2 ; dc correct crackle + kocrck = kncrck ; remember old crackle + + a1 pareq a1, p4, 30 , 1 , 1 ; growl + a1 pareq a1, p5, 0 , 1 , 2 ; high stop + a1 pareq a1, p6, kncrck, p7, 0 ; "crackling" of various intensity + + a1 pareq a1, 10, 0 , 1 , 1 ; thunder stop (dc correction) + + aout = a1*750 ; adjust your volume here + + out aout + +endin + +; rain / water - this is quite similar to lava, just "crackles" more + +instr 2 + + a1 exprand 10 + + kocrck init 0 + kncrck exprand 1 ; get new crackle + k2crck = kncrck + kncrck = kncrck -1 + kncrck = kncrck^p8 ; few high values, many low values - how sparse + ; the highs are is controlled by the power (p8). + kcrck = (kocrck-kncrck)/2 ; dc correct crackle + kocrck = kncrck ; remember old crackle + + a1 pareq a1, p4,p5, 1, 1 ; growl + a1 pareq a1, p6 ,1+kncrck*p7 ,1, 0 ; "crackling" + a1 pareq a1, p6/2,1+k2crck*p7 ,1, 0 ; "crackling" + + a1 pareq a1, 10, 0, 1, 1 ; thunder stop (dc correction) + a1 pareq a1, 4000, 0, 1, 2 ; extreme high stop + + out a1*700 ; adjust your volume here +endin + + +instr 3 + ifqc = cpspch(p4) + + kamp linseg 0,p3/4,1,p3/2,1,p3/4,0 + + kff init 1 + + aout oscil3 p5,ifqc*kff,1 ; make a sound + aout butterhp aout,500,0.5 ; ear protection ;) + + kff = kff*p6 ; frequency exponential rise + out aout*kamp + +endin \ No newline at end of file diff --git a/contrib/sounds/csound/test.orc b/contrib/sounds/csound/test.orc new file mode 100644 index 000000000..7ddcb290b --- /dev/null +++ b/contrib/sounds/csound/test.orc @@ -0,0 +1,18 @@ +/* gen10.orc */ +; Initialize the global variables. +sr = 44100 +kr = 4410 +ksmps = 10 +nchnls = 1 + +; Instrument #1. +instr 1 + kamp = 30000 + kcps = 440 + ifn = 1 + + ; Play the sine wave stored in Table #1. + a1 oscil kamp, kcps, ifn + out a1 +endin +/* gen10.orc */ diff --git a/contrib/sounds/csound/test.sco b/contrib/sounds/csound/test.sco new file mode 100644 index 000000000..0741a83a5 --- /dev/null +++ b/contrib/sounds/csound/test.sco @@ -0,0 +1,8 @@ +/* gen10.sco */ +; Table #1: a simple sine wave (using GEN10). +f 1 0 16384 10 1 + +; Play Instrument #1 for 2 seconds. +i 1 0 2 +e +/* gen10.sco */ diff --git a/contrib/sounds/csound/waterfall.sco b/contrib/sounds/csound/waterfall.sco new file mode 100644 index 000000000..897c561e2 --- /dev/null +++ b/contrib/sounds/csound/waterfall.sco @@ -0,0 +1,10 @@ + +; use the rain instrument to make a waterfall like sound + +i2 0 5 1000 10 5000 0.4 0 + + + + + + -- 2.11.0