Skip to content

Commit

Permalink
Move Swish and Whiff to air.orc
Browse files Browse the repository at this point in the history
  • Loading branch information
wapcaplet committed Mar 5, 2022
1 parent 58f3974 commit 550ce9f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 26 deletions.
1 change: 1 addition & 0 deletions demo.csd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nchnls = 2
#include "soundbites.orc"
#include "soundscapes.orc"
#include "air.orc"
#include "fire.orc"
#include "rain.orc"
#include "wind.orc"
Expand Down
28 changes: 28 additions & 0 deletions orc/air.orc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
; Air movement sounds - swishes, puffs, whiffs, and whooshes

instr Swish ; Subtle swish of air, as when opening or closing a door
;---------------+---------------+---------------+---------------+---------------+---------------+----------------------;
iDur = p3
iAmp = p4
aSwish pinkish iAmp/2 ; pink noise with a lowpass filter and triangle envelope
aSwish lowpass2 aSwish, 200, 1
aSwishEnv linseg 0, iDur/2, 1, iDur/2, 0
aSig = aSwish * aSwishEnv
outs aSig, aSig
endin


instr Whiff ; Sharp slice through the air, as with a weapon
;---------------+---------------+---------------+---------------+---------------+---------------+----------------------;
iDur = p3
iAmp = p4
aNoise noise 1, 0
kFreqEnv line 200, iDur, 1000 ; Sweep frequency bandpass from low to high
aSweep butterbp aNoise, kFreqEnv, 100
aSweep balance aSweep, aNoise*.8 ; Re-normalize amplitude somewhat
; expseg gives the best 'whip' effect here
kAmpEnv expseg 0.001, iDur*.8, iAmp, iDur*0.2, 0.001
aSig = aSweep * kAmpEnv
outs aSig, aSig
endin

26 changes: 0 additions & 26 deletions orc/soundbites.orc
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ aSig = aShake
endin


instr Swish ; Subtle swish of air, as when opening or closing a door
;---------------+---------------+---------------+---------------+---------------+---------------+----------------------;
iDur = p3
iAmp = p4
aSwish pinkish iAmp/2 ; pink noise with a lowpass filter and triangle envelope
aSwish lowpass2 aSwish, 200, 1
aSwishEnv linseg 0, iDur/2, 1, iDur/2, 0
aSig = aSwish * aSwishEnv
outs aSig, aSig
endin


#include "resonate.orc"

instr CreakRising ; Creak sound, rising in pitch, as when opening a door
Expand Down Expand Up @@ -129,17 +117,3 @@ aSig = aThudRes
endin


instr Whiff ; Swishing through the air, as with a weapon
;---------------+---------------+---------------+---------------+---------------+---------------+----------------------;
iDur = p3
iAmp = p4
aNoise noise 1, 0
kFreqEnv line 200, iDur, 1000 ; Sweep frequency bandpass from low to high
aSweep butterbp aNoise, kFreqEnv, 100
aSweep balance aSweep, aNoise*.8 ; Re-normalize amplitude somewhat
; expseg gives the best 'whip' effect here
kAmpEnv expseg 0.001, iDur*.8, iAmp, iDur*0.2, 0.001
aSig = aSweep * kAmpEnv
outs aSig, aSig
endin

0 comments on commit 550ce9f

Please sign in to comment.