Create Ultrasonic Signals with Oscil

Hi There.
I am about to re-produce bats calls with csound. What would you recommend, has anyone experience with ultrasonic signals in csound? I tested a simple signal with oscil and it works until aprox. 35kHz. I am using a babyface pro, which is able to 192kHz and so i used the sr too. Thanks fpr ur help. Greets

Iain McCurdy gave an exceptional keynote at the Csound Conference in Athlone that talked about using ultrasonic signals. I don’t think the details of that keynote are available online, but you might try contacting him for more information.

Oh, I would be also very interested in this!

Ok, thanks for the advice ill try, also i will let you know about my experiments. Greets.

Hi There, I finally managed (thanks to Iain McCurdy) to produce some Ultrasound Signals actually coming quite close to the Sounds you will hear from Pipistrellus and Myotis species. So if you are interested here is the code. Don`t hesitate to contact me :slight_smile:

;-odac

sr = 192000
ksmps = 32
nchnls = 2
0dbfs = 1

instr 99
; Fledermaus"movement"
gaEnv2 lfo 30, 0.3
endin

instr 1

ifreq1 random 86000, 90000
ifreq2 random 55000, 57000
ifreq3 random 39000, 41000
ifreq4 random 25000, 33000

abase transeg 90000, 0.001, 0, ifreq1, 0.0015, 0, ifreq2, 0.002, 1, ifreq3, 0.0012, 2, ifreq4 ; Frequency
aEnv linseg 0, 0.001, 0.8, 0.0015, 1, 0.001, 1, 0.001, 1, 0.0012, 0 ;Amplitude
asig_base poscil aEnv, abase ; Fundamental
aenv linseg 0.1, 0.0015, 1, 0.002, 1, 0.0012, 0.5, 0.001, 0 ; Envelope
aall = (asig_base) * aenv * 0.5

; Delay of the Click
idlt random 0.001, 0.025
adel delayr idlt ;
delayw(aall) ; Eingangssignal in den Delay-Buffer schreiben
aecho = adel * 0.1 ; Echosignal leicht gedämpft

aSig = aall + aecho

aSig *= ampdbfs(gaEnv2-25)

outs aSig, aSig

endin

instr 3
kindex init 0 ; Hier wird durchgeloopt
ktime init 0
imax random 9, 25

loop:
krandomtime random 0.086, 0.035 ; Zeit zwischen einzlenen Klicks
ktime += krandomtime ; Wird auf die Zeit vom Vorherigen addiert

            event           "i", 1, ktime, 0.1  ; Wird als Event aufgerufen

kindex += 1

if kindex < imax kgoto loop; Hüpfen

;----------------------------------------- hier gehts nur einmal am Ende weiter:

krandomtime random 0.2, 1 ; Abstand zwischen letztem Klick und nächstem Klickpaket
ktime += krandomtime
event “i”, 3, ktime, 1 ; hier wird dann nochmal instr 3 aufgerufen, aber erst nach ktime
turnoff

i99 0 60 i3 0 60