Replace plasma sound effect with one generated using Csound.

This is the first sound effect which is generated from scratch
using Csound. The advantages of this are:

- Real source code for sound.
- Anyone with a text editor can tweak the sound effects.
- Source code is much more compact that the sound file itself.
- Sound files can be regenerated with arbitrary quality.
This commit is contained in:
Guus Sliepen 2012-02-29 22:13:26 +01:00
parent 7bc36c16b2
commit c72fa54344
3 changed files with 41 additions and 0 deletions

16
sound/Makefile Normal file
View File

@ -0,0 +1,16 @@
SFX = plasma
OGG = $(SFX:%=%.ogg)
WAV = $(SFX:%=%.wav)
all: $(OGG)
%.ogg: %.wav
oggenc $<
%.wav: %.csd
csound -g -o $@ $<
clean:
rm -f $(OGG) $(WAV)
.PHONY: all clean

25
sound/plasma.csd Normal file
View File

@ -0,0 +1,25 @@
<CsoundSynthesizer>
<CsInstruments>
sr = 48000
ksmps = 32
nchnls = 1
0dbfs = 1
; Plasma shot:
; Basically a sine wave sweep from 2 kHz to 0.1 kHz in 0.1 s,
; but with white noise with an amplitude of 500 Hz applied to the frequency.
instr 1
gisine ftgen 1, 0, 16384, 10, 1
k1 line 2500, p3, 100
k2 linrand 500
a1 poscil 0.2, k1 + k2, gisine
out a1
endin
</CsInstruments>
<CsScore>
i 1 0 0.1
e
</CsScore>
</CsoundSynthesizer>

Binary file not shown.