Csound Csound-dev Csound-tekno Search About

Crickets Orc/Sco

Date1999-09-04 16:38
FromHans Mikelson
SubjectCrickets Orc/Sco
Hi,

Summer is coming to an end but if you miss the sound of crickets you can
recreate it with the following Csound orc/sco.

Bye,
Hans Mikelson

; ORC
;---------------------------------------------------------
; Crickets
; Coded by Hans Mikelson September, 1999
;---------------------------------------------------------
sr      =        44100                      ; Sample rate
kr      =        4410                       ; Kontrol rate
ksmps   =        10                         ; Samples/Kontrol period
nchnls  =        2                          ; Normal stereo

;---------------------------------------------------------
; Cricket 2
;---------------------------------------------------------
       instr     14

idur   =         p3            ; Duration
iamp   =         p4            ; Amplitude
ifqc   =         p5            ; Frequency modification
ipuls  =         p6            ; Pulse table
iftab  =         p7            ; Frequency table
iloop  =         p8            ; Loop time
iltab  =         p9            ; Loop table
ilpetab =        p10           ; Loop envelope table
ifetab =         p11           ; Frequency envelope table
ibasef =         19            ; Base pulse frequency
ipanl  =         sqrt(p12)     ; Pan left
ipanr  =         sqrt(1-p12)   ; Pan right
iv     =         iamp/10000    ; High shelf level

kaf    oscili    2, 1/iloop, iltab     ; Pulse envelope FM
kamp1  oscili    1, 1/iloop, ilpetab   ; Loop envelope
kfenv  oscili    1, 1/iloop, ifetab    ; Loop frequency envelope

kamp2  oscili    1, ibasef*kaf, ipuls  ; Generate pulse stream
kamp   =         sqrt(kamp1*kamp2)     ; Make it rounded

kfqc1  oscil     4800*kfenv*ifqc, ibasef*kaf, iftab ; Fundamental fqc
kfqc2  oscil     9500*kfenv*ifqc, ibasef*kaf, iftab ; Overtone

kdclck linseg    0, .005, 1, idur-.01, 1, .005, 0   ; Declick envelope

afnd   oscil     kamp, kfqc1, 1                ; fundamental oscillator
ahrm   oscil     kamp, kfqc2, 1                ; Overtone oscillator

aout   pareq     (afnd+ahrm*.04)*iamp*kdclck, 7000, iv, .707, 2 ; Set high
shelf filter low for distant crickets

       outs      aout*ipanl, aout*ipanr  ; Output the sound with panning

       endin

; SCO
f1 0 65536 10 1
f2 0 1024  7  0 306 1   306 0   412 0
f3 0 1024  7  1 153 .97 153 .92 306 .85 412 1
f4 0 1024  7  1  43 1    10  .5  961 .5 10 1
f5 0 1024  7  .5 43 .5   10  .8  240 1 10 0 721 0 10 .5  ; Loop envelope
f8 0 1024  7  .5 43 .5   10  .8  300 1 10 0 661 0 10 .5  ; Loop envelope
f6 0 1024  7  .9 43 .9   10  1   961 1 10  .9
f7 0 1024  7  1 1024 1

; Cricket
;    Sta  Dur   Amp    Fqc  PlsTab  FqcTab  Loop  LoopFM   LoopEnv  FqcEnv
Pan
i14  0    .4    8000   1    2       3       .6    4        5        6      1
i14  2    .4    8000   1    2       3       .6    4        5        6      1
i14  4    3     8000   1    2       3       .6    4        5        6      1
i14  13.8 6     8000   1    2       3       .6    4        5        6      1
i14  23.8 4.3   7000   1    2       3       .6    4        5        6      1
i14  29.8 4.3   6000   1    2       3       .6    4        5        6      1

i14  16.2 1     9000   .98  2       3       .6    4        5        6
.5
i14  18.2 3     8000   .98  2       3       .6    4        5        6
.5
i14  24.2 4.5   7000   .98  2       3       .6    4        5        6
.5
i14  29.2 4.5   6000   .98  2       3       .6    4        5        6
.5

i14  8.5  3     7000   1.1  2       3       .5    4        8        6      0
i14  13   7     7000   1.1  2       3       .5    4        8        6      0
i14  24   4.2   7000   1.1  2       3       .5    4        8        6      0
i14  29   4.2   6000   1.1  2       3       .5    4        8        6      0


i14  23.2 5     5300   1.05 2       3       .5    4        8        6
.8
i14  29.2 5     3000   1.05 2       3       .5    4        8        6
.8

i14  30.5 5.2   3500   .992 2       3       .6    4        5        6
.6
i14  22.1 5.3   4100   .985 2       3       .6    4        5        6
.2
i14  29.1 5.3   4100   .985 2       3       .6    4        5        6
.2

i14  24.2 5.2   3200   1.0  2       3       .5    4        8        6
.9
i14  30.2 5.2   3200   1.0  2       3       .5    4        8        6
.9
i14  29.5 5.4   5000   1.1  2       3       .6    4        5        6
.1

Date1999-09-05 21:24
FromMatt Southall
SubjectRe: Crickets [ot]
HM> Summer is coming to an end but if you miss the sound of crickets you can
HM> recreate it with the following Csound orc/sco.

As a bit of an aside, when I was a PhD student, my supervisor's work
was building robotic models of cricket phonotaxis (part of their
mating behaviour). We simulated the cricket mating calls using Csound.
Off topic.. but I thought I'd share that with you all :)

Matt