Hi List, Hi Larry
I havent been using PD for a while.
But i have a little project which i like to explore
I found i nice "scheme" script in the context of the linux-sound-editor "snd", that synthesizes plenty of birds, animals and insects.
So i was wondering if it possible to get this running inside of PD, so i can be played in realtime...
How difficult is it to compile "SIOD" on OS X ?
i dont know much about "scheme" and various dialects - so i post a little snippet of the code, to find out, if that would work.
;;; ================ Frogs and Toads ================
;;;
;;;
;;; Knudsen's frog
(definstrument (a-frog beg dur freq amp amp-env gliss gliss-env pulse-dur pulse-env fm-index fm-freq)
(let* ((start (seconds->samples beg))
(stop (+ start (seconds->samples dur)))
(base (make-oscil freq))
(modm (if (and fm-index (> fm-index 0.0)) (make-oscil fm-freq) #f))
(frqf (if gliss-env (make-env gliss-env :duration dur :base 32 :scaler (hz->radians gliss)) #f))
(pulse (make-pulsed-env pulse-env pulse-dur (/ 1.0 pulse-dur)))
(ampf (make-env amp-env :duration dur :scaler amp))
(index (hz->radians (* fm-freq fm-index))))
(run
(lambda ()
(do ((i start (1+ i)))
((= i stop))
(outa i (* (env ampf)
(pulsed-env pulse 0.0)
(oscil base (+ (if frqf (env frqf) 0.0)
(if modm (* index (oscil modm)) 0.0))))))))))
(define (knudsens-frog beg amp)
(a-frog beg .25 480 amp '(0 0 1 1 3 1 4 0)
50 '(0 0 .5 .2 .8 1 1 1)
(/ .25 7) '(0 .1 .5 .4 .6 .75 1 .9 1.5 1 2 .9 2.3 .1)
1.75 40)) ; 0.01 here is about 1.75 as an fm index: (/ (radians->hz .01) 40)
#|
;;; cricket-like:
(with-sound (:play #t)
(a-frog 0 .25 2000 .5 '(0 0 1 1 3 1 4 0) ; or 3000 6000 etc
50 '(0 0 .5 .2 .8 1 1 1)
(/ .25 5) '(0 0 1 0 5 1 8 0 20 0)
0.01 40))
(with-sound (:play #t)
(a-frog 0 .25 4000 .5 '(0 0 1 1 3 1 4 0)
0 #f
(/ .25 10) '(0 0 1 1 2 1 4 0 10 0)
0.0 10))
;;; frog-like
(with-sound (:play #t)
(a-frog 0 .25 2000 .5 '(0 0 1 1 3 1 4 0)
50 '(0 0 .5 .2 .8 1 1 1)
(/ .25 10) '(0 0 1 1 2 1 3 0 4 0 5 1 7 1 8 0 20 0)
0.0 10))
|#
(definstrument (a-cricket beg dur freq freq1 amp amp-env pulse-dur pulse-env)
(let* ((start (seconds->samples beg))
(stop (+ start (seconds->samples dur)))
(base (make-oscil freq))
(base1 (make-oscil freq1))
(pulse (make-pulsed-env pulse-env pulse-dur (/ 1.0 pulse-dur)))
(ampf (make-env amp-env :duration dur :scaler amp)))
(run
(lambda ()
(do ((i start (1+ i)))
((= i stop))
(outa i (* (env ampf)
(pulsed-env pulse 0.0)
(+ (* .8 (oscil base 0.0))
(* .2 (oscil base1 0.0))))))))))
;(with-sound (:play #t) (a-cricket 0 .12 4500 5400 .5 '(0 0 1 1 3 1 4 0) (/ .11 3) '(0 0 1 .8 5 1 6 0 15 0)))
;;; -----------------------------------------------------
and this
(define* (calling-all-mammals :optional (beg 0.0) (spacing 0.0))
(indri beg 0.25) (set! beg (+ beg spacing))
(+ beg 2))
(define* (calling-all-insects :optional (beg 0.0) (spacing 0.0))
(mosquito (+ beg 0) 5 560 0.2) (set! beg (+ beg spacing))
(mosquito (+ beg 1) 3 880 0.05) (set! beg (+ beg spacing))
(broad-winged-tree-cricket (+ beg 5.5) 2.0 0.2) (set! beg (+ beg spacing))
(long-spurred-meadow-katydid (+ beg 8) 0.5) (set! beg (+ beg spacing))
(southern-mole-cricket (+ beg 18.5) 3 0.15) (set! beg (+ beg spacing))
(handsome-trig (+ beg 22) 2 0.5) (set! beg (+ beg spacing))
(fast-calling-tree-cricket (+ beg 24.5) 2 0.25) (set! beg (+ beg spacing))
(dog-day-cicada (+ beg 27) 2 0.1) (set! beg (+ beg spacing))
(linnaeus-cicada (+ beg 29.5) 2 0.125) (set! beg (+ beg spacing))
(lyric-cicada (+ beg 32) 2 0.125) (set! beg (+ beg spacing))
(confused-ground-cricket (+ beg 34.5) 2 0.3) (set! beg (+ beg spacing))
(tinkling-ground-cricket (+ beg 37) 2 0.3) (set! beg (+ beg spacing))
(marsh-meadow-grasshopper (+ beg 39.5) 0.3) (set! beg (+ beg spacing))
(striped-ground-cricket (+ beg 45) 2 0.25) (set! beg (+ beg spacing))
(sphagnum-ground-cricket (+ beg 47.5) 2 0.3) (set! beg (+ beg spacing))
(southeastern-field-cricket (+ beg 50) 2 0.13) (set! beg (+ beg spacing))
(snowy-tree-cricket (+ beg 52.5) 2.1 0.3) (set! beg (+ beg spacing))
(slightly-musical-conehead (+ beg 55) 2 0.4) (set! beg (+ beg spacing))
(pine-tree-cricket (+ beg 57.5) 2 0.125) (set! beg (+ beg spacing))
(davis-tree-cricket (+ beg 60) 2 0.125) (set! beg (+ beg spacing))
(carolina-grasshopper (+ beg 62.5) 1.5 1.0) (set! beg (+ beg spacing))
(black-horned-tree-cricket (+ beg 64.5) 2 0.125) (set! beg (+ beg spacing))
(narrow-winged-tree-cricket (+ beg 67.0) 2.0 .25) (set! beg (+ beg spacing))
(four-spotted-tree-cricket (+ beg 69.5) 1.0 .25) (set! beg (+ beg spacing))
(+ beg 71))
Any help would be appreciated
Thanks Luig9i