You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10914 lines
481KB

  1. ;;; animals.scm
  2. ;;; sources:
  3. ;;; "The Diversity of Animal Sounds", Cornell Lab of Ornithology
  4. ;;; Geoffrey Keller, "Bird Songs of California" (Cornell)
  5. ;;; Geoffrey Keller, "Bird Songs of Southeastern Arizona and Sonora, Mexico" (Cornell)
  6. ;;; Bret Whitney et al, "Voices of New World Parrots" (Cornell)
  7. ;;; Carlos Davidson, "Frog and Toad Calls of the Rocky Mountains" (Cornell)
  8. ;;; Geoffrey Keller, "Bird Songs of the Lower Rio Grande Valley" (Cornell)
  9. ;;; Vyn, Budney, "Voices of North American Owls" (Cornell)
  10. ;;; Roche and Chevereau, "Guide to the Sounds of the Birds of Europe"
  11. ;;; from Richard Mankin, Reference Library of Digitized Insect Sounds, http://www.ars.usda.gov/sp2UserFiles/person/3559/soundlibrary.html
  12. ;;; Lang Elliott, Donald and Lillian Stokes, "Stokes Field Guide to Bird Songs, Eastern Region"
  13. ;;; Lang Elliott "The Calls of Frogs and Toads"
  14. ;;; Lang Elliott and W Herschberger "The Songs of the Insects"
  15. ;;; Lang Elliott "Music of the Birds"
  16. ;;; Cocroft, Morales, McDiarmid "Frogs of Tambopata, Peru" (Cornell)
  17. ;;; Ross, Whitney, "Voices of Costa Rican Birds" (Cornell)
  18. ;;; Rebolledo, Ramirez, Cuervo, "A Guide to the Bird Sounds of the Colombian Andes" (Humboldt and Cornell)
  19. ;;; Emmons, Whitney, Ross, "Sounds of Neotropical Rainforest Mammals" (Cornell)
  20. ;;; Marantz, Zimmer, "Bird Voices of the Alta Floresta" (Cornell)
  21. ;;; "Voices of the Night" (Cornell)
  22. ;;; Keller, Vyn, "Bird Songs of the Pacific Northwest" (Cornell)
  23. ;;; -------- frogs and toads --------
  24. ;;; Oak toad
  25. ;;; Knudsen's frog
  26. ;;; Southern cricket frog
  27. ;;; Northern leopard frog (2)
  28. ;;; Spring peeper
  29. ;;; Crawfish frog
  30. ;;; River frog
  31. ;;; Green tree-frog
  32. ;;; Pinewoods tree frog
  33. ;;; Squirrel tree frog
  34. ;;; Ornate chorus frog
  35. ;;; Bullfrog
  36. ;;; Texas toad
  37. ;;; American toad
  38. ;;; Plains spadefoot
  39. ;;; Barking tree-frog
  40. ;;; Western toad
  41. ;;; Southwestern toad
  42. ;;; Great Plains Narrow-mouthed toad
  43. ;;; Pacific chorus frog
  44. ;;; Red-spotted toad
  45. ;;; Green toad
  46. ;;; Little grass frog
  47. ;;; Sonoran desert toad
  48. ;;; Amargosa toad
  49. ;;; -------- mammals --------
  50. ;;; Indri
  51. ;;; -------- insects --------
  52. ;;; mosquito
  53. ;;; Long-spurred meadow katydid
  54. ;;; Handsome trig
  55. ;;; Dog-day cicada
  56. ;;; Linnaeus' cicada
  57. ;;; Lyric cicada
  58. ;;; Southern mole cricket
  59. ;;; Confused ground cricket
  60. ;;; Tinkling ground cricket
  61. ;;; Striped ground cricket
  62. ;;; Sphagnum ground cricket
  63. ;;; Southeastern field cricket
  64. ;;; Snowy tree cricket
  65. ;;; Pine tree cricket
  66. ;;; Davis's tree cricket
  67. ;;; Broad-winged tree cricket
  68. ;;; Fast-calling tree cricket
  69. ;;; Black-horned tree cricket
  70. ;;; Narrow-winged tree cricket
  71. ;;; Four-spotted tree cricket
  72. ;;; Marsh meadow grasshopper
  73. ;;; Carolina grasshopper
  74. ;;; Slightly musical conehead
  75. ;;; -------- birds --------
  76. ;;; Fox sparrow
  77. ;;; White-throated sparrow
  78. ;;; Henslow's sparrow
  79. ;;; Field sparrow
  80. ;;; Savannah sparrow
  81. ;;; Chipping sparrow
  82. ;;; Bachman's sparrow
  83. ;;; Grasshopper sparrow
  84. ;;; Black-chinned sparrow
  85. ;;; Golden-crowned sparrow
  86. ;;; Cassin's sparrow
  87. ;;; Song sparrow
  88. ;;; Sage sparrow
  89. ;;; House sparrow
  90. ;;; Black-throated sparrow
  91. ;;; Dark-eyed junco
  92. ;;; Purple finch
  93. ;;; House finch
  94. ;;; Gray-crowned rosy-finch
  95. ;;; Eastern wood-pewee (2)
  96. ;;; Western wood-pewee (2)
  97. ;;; Greater pewee
  98. ;;; Tufted titmouse
  99. ;;; Oak titmouse
  100. ;;; Bushtit
  101. ;;; Wrentit
  102. ;;; California towhee
  103. ;;; Green-tailed towhee
  104. ;;; Carolina wren
  105. ;;; Warbling vireo
  106. ;;; Plumbeous vireo (2)
  107. ;;; Cassin's vireo
  108. ;;; Hutton's vireo
  109. ;;; Gray vireo (5)
  110. ;;; Yellow-green vireo
  111. ;;; Red-eyed vireo
  112. ;;; White-eyed vireo
  113. ;;; Philadelphia vireo
  114. ;;; Nashville warbler
  115. ;;; Orange-crowned warbler
  116. ;;; Yellow warbler
  117. ;;; Yellow-rumped warbler
  118. ;;; Lucy's warbler
  119. ;;; Macgillivray's warbler
  120. ;;; Wilson's warbler
  121. ;;; Magnolia warbler
  122. ;;; Chestnut-sided warbler
  123. ;;; Black-throated blue warbler
  124. ;;; Pine warbler
  125. ;;; Cape May warbler
  126. ;;; Kirtland's warbler
  127. ;;; Verdin
  128. ;;; Townsend's solitaire
  129. ;;; Cedar waxwing
  130. ;;; Western meadowlark
  131. ;;; Eastern meadowlark
  132. ;;; Ruby-crowned kinglet
  133. ;;; Least flycatcher
  134. ;;; Acadian flycatcher
  135. ;;; Vermillion flycatcher
  136. ;;; Ash-throated flycatcher
  137. ;;; Olive-sided flycatcher
  138. ;;; Willow flycatcher
  139. ;;; Hammond's flycatcher
  140. ;;; Pacific-slope flycatcher
  141. ;;; Dusky flycatcher
  142. ;;; Yellow-bellied flycatcher
  143. ;;; Great crested flycatcher
  144. ;;; Brown-crested flycatcher (2)
  145. ;;; Black phoebe
  146. ;;; Say's phoebe
  147. ;;; Northern beardless tyrannulet
  148. ;;; Great kiskadee
  149. ;;; Scrub euphonia
  150. ;;; Eastern bluebird
  151. ;;; Common yellowthroat
  152. ;;; Blue grosbeak
  153. ;;; Evening grosbeak
  154. ;;; Cardinal
  155. ;;; American robin
  156. ;;; Scott's oriole
  157. ;;; Swainson's thrush
  158. ;;; Varied thrush
  159. ;;; Hermit thrush
  160. ;;; Western tanager
  161. ;;; Summer tanager
  162. ;;; Chuck-will's-widow
  163. ;;; Whip-poor-will
  164. ;;; Lesser nighthawk
  165. ;;; Common pauraque
  166. ;;; Mourning dove
  167. ;;; Inca dove (2)
  168. ;;; White-tipped dove
  169. ;;; Bobwhite
  170. ;;; California quail
  171. ;;; Gambel's quail
  172. ;;; Scaled quail
  173. ;;; Montezuma quail
  174. ;;; Mountain quail
  175. ;;; Ruffed grouse
  176. ;;; Great-horned owl
  177. ;;; Barred owl
  178. ;;; Flammulated owl
  179. ;;; Burrowing owl
  180. ;;; Barn owl
  181. ;;; Long-eared owl
  182. ;;; Northern goshawk
  183. ;;; Red-shouldered hawk
  184. ;;; Zone-tailed hawk
  185. ;;; Bald eagle
  186. ;;; Crested caracara
  187. ;;; Pileated woodpecker
  188. ;;; White-headed woodpecker
  189. ;;; Acorn woodpecker
  190. ;;; Hairy woodpecker
  191. ;;; Red-breasted nuthatch
  192. ;;; White-breasted nuthatch
  193. ;;; Pygmy nuthatch
  194. ;;; Common loon (2)
  195. ;;; American crow
  196. ;;; Brown jay
  197. ;;; Steller's jay
  198. ;;; Pinyon jay
  199. ;;; Groove-billed ani
  200. ;;; Loggerhead shrike (2)
  201. ;;; Greater roadrunner
  202. ;;; Common Gull
  203. ;;; Willet
  204. ;;; Black-necked stilt
  205. ;;; Whooping crane
  206. ;;; Sandhill crane
  207. ;;; Trumpeter swan
  208. ;;; Canada goose
  209. ;;; Wood duck
  210. ;;; Black-crowned night heron
  211. ;;; Least bittern
  212. ;;; Black rail
  213. ;;; Virginia rail
  214. ;;; Sora
  215. ;;; Plain chacalaca
  216. ;;; Black-billed cuckoo
  217. ;;; Eared grebe
  218. ;;; Killdeer
  219. (provide 'snd-animals.scm)
  220. (require snd-generators.scm)
  221. ;; rk!cos blackman=polywave rcos rxycos
  222. (if (provided? 'snd)
  223. (require snd-ws.scm)
  224. (require sndlib-ws.scm))
  225. (set! *clm-default-frequency* 0.0)
  226. (define-macro (defanimal args . body)
  227. (let ((name (car args))
  228. (targs (cdr args)))
  229. `(begin
  230. (define (,name ,@targs)
  231. (if *clm-notehook*
  232. (*clm-notehook* (symbol->string ',name) ,@targs))
  233. ,@body)
  234. ,@(if *definstrument-hook*
  235. (list (*definstrument-hook* name targs))
  236. (list)))))
  237. #|
  238. (define-macro (defanimal args . body)
  239. (let ((name (car args))
  240. (targs (cdr args)))
  241. `(begin
  242. (define (,name ,@targs)
  243. (if *clm-notehook*
  244. (*clm-notehook* (symbol->string ',name) ,@targs))
  245. (let ((start (get-internal-real-time)))
  246. ,@body
  247. (format () "~A: ~A~%" (- (get-internal-real-time) start) ,name)))
  248. ,@(if *definstrument-hook*
  249. (list (*definstrument-hook* name targs))
  250. (list)))))
  251. |#
  252. #|
  253. ;;; ================================================================================
  254. ;;; useful settings and functions for this work (I have these in my init file):
  255. (define (clean-string e)
  256. ;; make the envelope lists look prettier
  257. (format #f "(~{~,3F~^ ~})" e))
  258. (define (seldur)
  259. (list (/ (selection-framples) 44100.0)
  260. (selection-maxamp)))
  261. (define (sp)
  262. (* 22050 (spectrum-end 0 0)))
  263. ;;; save us some dialog setup
  264. (set! (show-transform-peaks) #t)
  265. (set! (transform-size) 512)
  266. (set! (fft-window) blackman10-window)
  267. (set! (colormap) 7) ; jet
  268. (set! (speed-control-style) speed-control-as-ratio)
  269. (set! (color-cutoff) .001)
  270. (set! (enved-clip?) #t)
  271. ;;; if click play button and there's a selection, play the selection
  272. ;;; otherwise if the file is long (like most bird recordings), play what's in the current window.
  273. ;;; This is mainly to cut out the ubiquitous and useless announcer.
  274. (if (null? (hook-functions start-playing-hook))
  275. (hook-push start-playing-hook
  276. (lambda (hook)
  277. (let ((snd (hook 'snd)))
  278. (if (sound? snd) ; meaning not 123456 = temp-sound-index from View:Files play button
  279. (if (and (selection?)
  280. (selection-member? snd))
  281. (begin
  282. (play (selection))
  283. #t)
  284. (if (> (framples snd) (* 10 (srate snd)))
  285. (let ((chn (or (selected-channel) 0)))
  286. (with-temporary-selection
  287. (lambda () (play (selection)))
  288. (left-sample snd chn)
  289. (- (right-sample snd chn)
  290. (left-sample snd chn))
  291. snd chn)
  292. #t)
  293. #f))
  294. #f)))))
  295. ;;; precision window movements via arrow keys
  296. (define (move-one-pixel s c right)
  297. (let* ((ax (axis-info s c time-graph))
  298. (lo (ax 0))
  299. (hi (ax 1))
  300. (lo-pix (ax 10))
  301. (hi-pix (ax 12))
  302. (samps-per-pixel (max 1 (round (/ (- hi lo) (- hi-pix lo-pix)))))
  303. (change (if right
  304. (- (min (+ hi samps-per-pixel) (framples s c)) hi)
  305. (- (max 0 (- lo samps-per-pixel)) lo))))
  306. (set! (left-sample) (min (max 0 (+ lo change)) (framples s c)))
  307. keyboard-no-action))
  308. (bind-key "Left" 0 (lambda () "move one pixel backward" (move-one-pixel (selected-sound) (selected-channel) #f)))
  309. (bind-key "Right" 0 (lambda () "move one pixel forward" (move-one-pixel (selected-sound) (selected-channel) #t)))
  310. (define (move-more-pixels s c right)
  311. (let* ((ax (axis-info s c time-graph))
  312. (lo (ax 0))
  313. (hi (ax 1))
  314. (lo-pix (ax 10))
  315. (hi-pix (ax 12))
  316. (samps-per-pixel (* 8 (max 1 (round (/ (- hi lo) (- hi-pix lo-pix))))))
  317. (change (if right
  318. (- (min (+ hi samps-per-pixel) (framples s c)) hi)
  319. (- (max 0 (- lo samps-per-pixel)) lo))))
  320. (set! (left-sample) (min (max 0 (+ lo change)) (framples s c)))
  321. keyboard-no-action))
  322. (bind-key "Left" 4 (lambda () "move some pixels backward" (move-more-pixels (selected-sound) (selected-channel) #f)))
  323. (bind-key "Right" 4 (lambda () "move some pixels forward" (move-more-pixels (selected-sound) (selected-channel) #t)))
  324. (define (zoom-one-pixel s c in)
  325. (let* ((ax (axis-info s c time-graph))
  326. (lo (ax 0))
  327. (hi (ax 1))
  328. (lo-pix (ax 10))
  329. (hi-pix (ax 12))
  330. (samps-per-pixel (max 1 (round (/ (- hi lo) (- hi-pix lo-pix)))))
  331. (len (framples s c)))
  332. (if in
  333. (if (> (- hi-pix lo-pix) samps-per-pixel)
  334. (begin
  335. (set! (left-sample) (+ lo samps-per-pixel))
  336. (set! (x-zoom-slider) (* 1.0 (/ (max samps-per-pixel (- hi lo (* 2 samps-per-pixel))) len)))))
  337. (begin
  338. (set! (left-sample) (max 0 (- lo samps-per-pixel)))
  339. (set! (x-zoom-slider) (* 1.0 (/ (min len (+ (- hi lo) (* 2 samps-per-pixel))) len)))))
  340. keyboard-no-action))
  341. (bind-key "Up" 0 (lambda () "zoom out one pixel" (zoom-one-pixel (selected-sound) (selected-channel) #f))) ;up
  342. (bind-key "Down" 0 (lambda () "zoom in one pixel" (zoom-one-pixel (selected-sound) (selected-channel) #t))) ;down
  343. ;;; save the current window so that PageUp returns to it
  344. (bind-key "Page_Down" 0
  345. (lambda ()
  346. (let ((last-page-state (map (lambda (snd)
  347. (let ((data (list snd (file-name snd))))
  348. (do ((i 0 (+ i 1)))
  349. ((= i (channels snd)) data)
  350. (set! data (append data (list (cons i (axis-info snd i))))))))
  351. (sounds))))
  352. (bind-key "Page_Up" 0
  353. (lambda ()
  354. (if last-page-state
  355. (for-each
  356. (lambda (lst)
  357. (let ((snd (lst 0))
  358. (name (lst 1)))
  359. (if (and (sound? snd)
  360. (string=? (file-name snd) name))
  361. (for-each
  362. (lambda (chan-data)
  363. (let ((chn (chan-data 0))
  364. (x0 (chan-data 3))
  365. (x1 (chan-data 5))
  366. (y0 (chan-data 4))
  367. (y1 (chan-data 6)))
  368. (set! (x-bounds snd chn) (list x0 x1))
  369. (set! (y-bounds snd chn) (list y0 y1))))
  370. (cddr lst)))))
  371. last-page-state)))))))
  372. ;;; "m" -> make enved amp display suitable for drawing the amp env
  373. (bind-key #\m 0
  374. (lambda ()
  375. (set! (y-bounds (selected-sound) (selected-channel)) (list 0 (selection-maxamp))))
  376. #t)
  377. ;;; "C-m" returns to normal after "m"
  378. (bind-key #\m 4
  379. (lambda ()
  380. (set! (y-bounds (selected-sound) (selected-channel)) (list -1.0 1.0)))
  381. #t)
  382. |#
  383. ;;; ================================================================================
  384. ;;; some of these need srate=44100 since various frequencies are (well) over 10KHz
  385. ;;; also, I have bare indices scattered around -- ideally these would be wrapped in hz->radians
  386. ;;; these were done more or less in the order they occur within a section
  387. ;;; ================ Frogs and Toads ================
  388. ;;;
  389. ;;;
  390. ;;; Knudsen's frog
  391. (defanimal (a-frog beg dur freq amp amp-env gliss gliss-env pulse-dur pulse-env fm-index fm-freq)
  392. (let ((start (seconds->samples beg))
  393. (stop (seconds->samples (+ beg dur)))
  394. (base (make-oscil freq))
  395. (modm (make-oscil fm-freq))
  396. (frqf (make-env (or gliss-env '(0 0 1 0)) :duration dur :base 32 :scaler (hz->radians gliss)))
  397. (pulse (make-pulsed-env pulse-env pulse-dur (/ 1.0 pulse-dur)))
  398. (ampf (make-env amp-env :duration dur :scaler amp))
  399. (index (hz->radians (* fm-freq fm-index))))
  400. (do ((i start (+ i 1)))
  401. ((= i stop))
  402. (outa i (* (env ampf)
  403. (pulsed-env pulse)
  404. (oscil base (+ (env frqf) (* index (oscil modm)))))))))
  405. (define (knudsens-frog beg amp)
  406. (a-frog beg .25 480 amp '(0 0 1 1 3 1 4 0)
  407. 50 '(0 0 .5 .2 .8 1 1 1)
  408. (/ .25 7) '(0 .1 .5 .4 .6 .75 1 .9 1.5 1 2 .9 2.3 .1)
  409. 1.75 40)) ; 0.01 here is about 1.75 as an fm index: (/ (radians->hz .01) 40)
  410. #|
  411. ;;; cricket-like:
  412. (with-sound (:play #t)
  413. (a-frog 0 .25 2000 .5 '(0 0 1 1 3 1 4 0) ; or 3000 6000 etc
  414. 50 '(0 0 .5 .2 .8 1 1 1)
  415. (/ .25 5) '(0 0 1 0 5 1 8 0 20 0)
  416. 0.01 40))
  417. (with-sound (:play #t)
  418. (a-frog 0 .25 4000 .5 '(0 0 1 1 3 1 4 0)
  419. 0 #f
  420. (/ .25 10) '(0 0 1 1 2 1 4 0 10 0)
  421. 0.0 10))
  422. ;;; frog-like
  423. (with-sound (:play #t)
  424. (a-frog 0 .25 2000 .5 '(0 0 1 1 3 1 4 0)
  425. 50 '(0 0 .5 .2 .8 1 1 1)
  426. (/ .25 10) '(0 0 1 1 2 1 3 0 4 0 5 1 7 1 8 0 20 0)
  427. 0.0 10))
  428. |#
  429. (defanimal (a-cricket beg dur freq freq1 amp amp-env pulse-dur pulse-env)
  430. (let ((start (seconds->samples beg))
  431. (stop (seconds->samples (+ beg dur)))
  432. (base (make-oscil freq))
  433. (base1 (make-oscil freq1))
  434. (pulse (make-pulsed-env pulse-env pulse-dur (/ 1.0 pulse-dur)))
  435. (ampf (make-env amp-env :duration dur :scaler amp)))
  436. (do ((i start (+ i 1)))
  437. ((= i stop))
  438. (outa i (* (env ampf)
  439. (pulsed-env pulse)
  440. (+ (* .8 (oscil base))
  441. (* .2 (oscil base1))))))))
  442. ;; (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)))
  443. ;;; --------------------------------------------------------------------------------
  444. ;;;
  445. ;;; Oak Toad
  446. ;;; might be slightly too much noise (the peep I worked on turned out to be a raspy one)
  447. (defanimal (oak-toad beg amp)
  448. (let ((dur .15)
  449. (start (seconds->samples beg)))
  450. (let ((stop (seconds->samples (+ beg dur)))
  451. (ampf (make-env '(0 0 10 1 15 0) :base .3 :duration dur :scaler amp))
  452. (gen1 (make-polywave 2150 '(1 .01 2 1.0 3 .001 4 .005 6 .02)))
  453. (frqf (make-env '(0 -.5 1 1 5 -1) :duration .15 :scaler (hz->radians (+ 50 (random 40)))))
  454. (noise (make-rand-interp 1000 (+ .01 (random .005)))))
  455. (do ((i start (+ i 1)))
  456. ((= i stop))
  457. (outa i (* (env ampf)
  458. (polywave gen1 (+ (env frqf)
  459. (rand-interp noise)))))))))
  460. #|
  461. (with-sound (:play #t)
  462. (let ((last-beg 0.0))
  463. (do ((k 0 (+ k 1)))
  464. ((= k 12))
  465. (let ((beg (+ last-beg .37 (random .08))))
  466. (oak-toad beg (+ .25 (random .3)))
  467. (set! last-beg beg)))))
  468. |#
  469. ;;; (with-sound (:play #t) (oak-toad 0 .25))
  470. ;;; --------------------------------------------------------------------------------
  471. ;;;
  472. ;;; Southern cricket frog
  473. (defanimal (southern-cricket-frog beg amp)
  474. (let ((dur1 .03)
  475. (start (seconds->samples beg)))
  476. (let ((stop (seconds->samples (+ beg dur1)))
  477. (ampf (make-env '(0 0 .75 1 5 1 10 0) :scaler amp :duration dur1))
  478. (gen1 (make-oscil 3500))
  479. (gen2 (make-oscil 6400))
  480. (pulse (make-pulsed-env '(0 .1 1 .6 2 .8 3 1 6 .1 8 .1) (/ dur1 8) (/ 8 dur1)))
  481. (index (hz->radians 300))
  482. (f1 (make-env '(0 .9 9 .9 10 0) :duration dur1))
  483. (f2 (make-env '(0 .05 8 .1 10 .8 11 .1) :duration dur1))
  484. (fm (make-oscil 150)))
  485. (do ((i start (+ i 1)))
  486. ((= i stop))
  487. (let ((fm1 (* index (oscil fm))))
  488. (outa i (* (env ampf)
  489. (pulsed-env pulse)
  490. (+ (* (env f1) (oscil gen1 fm1))
  491. (* (env f2) (oscil gen2 (* 2 fm1)))))))))))
  492. ;; (with-sound (:play #t) (southern-cricket-frog 0 0.5))
  493. ;;; --------------------------------------------------------------------------------
  494. ;;;
  495. ;;; Northern leopard frog (2)
  496. (defanimal (northern-leopard-frog-1 beg amp)
  497. ;; this is slightly low-passed, and I don't quite have the vowel right at the end
  498. (let ((dur 4.2))
  499. (let ((start (seconds->samples beg))
  500. (stop (seconds->samples (+ beg dur)))
  501. (gen1 (make-oscil 440))
  502. (gen2 (make-oscil 1030)) ; there's also a 1500 formant that follows the 1000 case -- looks a lot like FM index 1 ca 600Hz
  503. (gen3 (make-oscil 2600))
  504. (pulsef1 (make-env '(0 0 .1 1 10 0) :duration .013 :base 32.0))
  505. (pulsef2 (make-env '(0 0 4 1 10 0) :duration .013 :base 3.0))
  506. (interpf (make-env '(0 0 6 1 8 1 10 .5) :duration dur))
  507. (ampf (make-env '(0 0 3 1 9.5 1 10 0) :base .2 :duration dur :scaler amp))
  508. (gen1f (make-env '(0 1 8 1 10 0) :duration dur :scaler .65 :base 3))
  509. (gen2f (make-env '(0 0 8 0 10 1) :duration dur :scaler (hz->radians 90)))
  510. (gen3f (make-env '(0 1 6 1 10 0) :duration dur :offset (hz->radians 2200) :scaler (hz->radians 400)))
  511. (gen4f (make-env '(0 0 8 0 10 .02) :duration dur))
  512. (gen5f (make-env '(0 0 5 0 10 -1) :duration dur :scaler (hz->radians 200)))
  513. (pulf (make-env (list 0.0 (/ 1.0 14.0) 2.0 (/ 1.0 11.0) 10.0 (/ 1.0 11.0)) :duration dur))
  514. (gen6 (make-polywave 170 '(1 .075)))
  515. (pulse-samps (seconds->samples 0.013)))
  516. (let ((pulse-sep (seconds->samples (env pulf))))
  517. (do ((i start (+ i pulse-sep)))
  518. ((>= i stop))
  519. (let ((pstop (+ i pulse-samps)))
  520. (set! (mus-location interpf) (- i start))
  521. (set! (mus-location ampf) (- i start))
  522. (set! (mus-location gen1f) (- i start))
  523. (set! (mus-location gen2f) (- i start))
  524. (set! (mus-location gen3f) (- i start))
  525. (set! (mus-location gen4f) (- i start))
  526. (set! (mus-location gen5f) (- i start))
  527. (let ((intrp (env interpf))
  528. (gen1trp (env gen1f))
  529. (gen2trp (env gen2f))
  530. (gen3trp (env gen3f))
  531. (gen4trp (env gen4f))
  532. (gen5trp (env gen5f))
  533. (pulse-amp (env ampf)))
  534. (let ((intrp-1 (- 1.0 intrp))
  535. (gen1trp-1 (- 1.0 gen1trp))
  536. (gen4trp-1 (- 1.0 gen4trp)))
  537. (do ((k i (+ k 1)))
  538. ((= k pstop))
  539. (outa k (* pulse-amp
  540. (+ (* intrp (env pulsef1))
  541. (* intrp-1 (env pulsef2)))
  542. (+ (* gen1trp (oscil gen2 gen5trp))
  543. (* gen1trp-1 (+ (* gen4trp-1 (oscil gen1 gen2trp))
  544. (* gen4trp (oscil gen3 (+ gen3trp
  545. (polywave gen6))))))))))))
  546. (for-each mus-reset (vector pulsef1 pulsef2 gen1 gen2))
  547. (set! (mus-location pulf) (- (+ i pulse-sep) start))
  548. (set! pulse-sep (seconds->samples (env pulf)))))))))
  549. ;; (with-sound (:statistics #t :play #t) (northern-leopard-frog-1 0 .5))
  550. (defanimal (northern-leopard-frog-2 beg amp)
  551. ;; rocky 57 2
  552. (let ((start (seconds->samples beg))
  553. (dur 1.53)
  554. (pulse-dur .03))
  555. (let ((stop (seconds->samples (+ beg dur)))
  556. (pulse-samps (seconds->samples .045))
  557. (pulse-out (seconds->samples pulse-dur))
  558. (ampf (make-env '(0.000 0.108 0.118 0.596 0.167 0.719 0.357 0.827 0.604 0.838 0.745 0.912 0.860 1.000 0.929 0.962 0.984 0.831 1.000 0.000)
  559. :duration dur :scaler amp))
  560. (frqf2 (make-env '(0.000 0.198 0.021 0.209 0.110 0.239 0.178 0.239 0.294 0.247 0.343 0.260 0.463 0.255
  561. 0.593 0.265 0.704 0.252 0.788 0.244 0.881 0.228 0.941 0.204 1.000 0.18)
  562. :duration dur :scaler 6100.0))
  563. (frqf1 (make-env '(0.000 0.086 0.462 0.110 1.000 0.118)
  564. :duration dur :scaler 6100.0))
  565. (frqf3 (make-env '(0.000 0.721 0.508 0.786 0.698 0.761 0.876 0.689 0.935 0.563 1.000 0.509)
  566. :duration dur :scaler 6100.0))
  567. (frqf4 (make-env '(0 7200 .5 7600 .9 7000 1 5400) :duration dur))
  568. (frm1 (make-formant 900 .995))
  569. (frm2 (make-formant 1260 .99))
  570. (frm3 (make-formant 4500 .99))
  571. (frm4 (make-formant 7200 .9))
  572. (ampfr1 (make-env '(0 .5 1 3) :duration dur :scaler (* 10 (sin (hz->radians 900))) :base 3))
  573. (ampfr2 (make-env '(0 .25 .5 .4 1 1) :duration dur :scaler (* 10 (sin (hz->radians 1260)))))
  574. (ampfr4 (make-env '(0 0 .3 1 1 1) :duration dur :scaler (* 10 (sin (hz->radians 7200)))))
  575. (ampfr3 (* 10 (sin (hz->radians 4500))))
  576. (gen1 (make-rk!cos 100 13.0))
  577. (ampf1 (make-env '(0 1 1 0) :base 3 :duration dur))
  578. (pulsef (make-env '(0.000 0.000 0.01 1 0.15 0.936 0.2 0.100 0.792 0.000 0.906 0.107 1.000 0.000)
  579. :duration pulse-dur))
  580. (pulse-frqf (make-env '(0 0 1 .9 2 1 ) :base .1 :duration pulse-dur :scaler (hz->radians 100))))
  581. (let ((fb (vector frm1 frm2 frm3 frm4))
  582. (fs (float-vector 0.0 0.0 ampfr3 0.0))
  583. (rk (make-float-vector pulse-out)))
  584. (set! fb (make-formant-bank fb fs))
  585. (do ((i start (+ i pulse-samps)))
  586. ((>= i stop))
  587. (set! (mus-location ampf) (- i start))
  588. (set! (mus-location ampf1) (- i start))
  589. (set! (mus-location ampfr1) (- i start))
  590. (set! (mus-location ampfr2) (- i start))
  591. (set! (mus-location ampfr4) (- i start))
  592. (set! (mus-location frqf1) (- i start))
  593. (set! (mus-location frqf2) (- i start))
  594. (set! (mus-location frqf3) (- i start))
  595. (set! (mus-location frqf4) (- i start))
  596. (set! (mus-location ampfr1) (- i start))
  597. (set! (mus-location ampfr2) (- i start))
  598. (set! (mus-location ampfr4) (- i start))
  599. (set! (mus-frequency frm1) (env frqf1))
  600. (set! (mus-frequency frm2) (env frqf2))
  601. (set! (mus-frequency frm3) (env frqf3))
  602. (set! (mus-frequency frm4) (env frqf4))
  603. (let ((reset-stop (min stop (+ i pulse-out)))
  604. (pulse-amp (env ampf))
  605. (val-amp (env ampf1)))
  606. (set! (fs 0) (env ampfr1))
  607. (set! (fs 1) (env ampfr2))
  608. (set! (fs 3) (env ampfr4))
  609. (do ((k 0 (+ k 1)))
  610. ((= k pulse-out))
  611. (set! (rk k) (rk!cos gen1 (env pulse-frqf))))
  612. (do ((k i (+ k 1)))
  613. ((= k reset-stop))
  614. (let ((val (* pulse-amp
  615. (env pulsef)
  616. (rk (- k i)))))
  617. ;(rk!cos gen1 (env pulse-frqf)))))
  618. (outa k (+ (* val val-amp)
  619. (formant-bank fb val)))))
  620. (set! (mus-phase gen1) (* -0.1 pi))
  621. (mus-reset pulse-frqf)
  622. (mus-reset pulsef)))))))
  623. ;; (with-sound (:play #t :statistics #t) (northern-leopard-frog-2 0 .5))
  624. ;;; --------------------------------------------------------------------------------
  625. ;;;
  626. ;;; Green tree-frog
  627. (defanimal (green-tree-frog beg amp)
  628. (let ((dur 0.2)
  629. (pitch 277)
  630. (start (seconds->samples beg)))
  631. (let ((stop (seconds->samples (+ beg dur)))
  632. (ampf (make-env '(0 0 1 1 8 1 12 0) :scaler (* .333 amp) :duration dur))
  633. (gen2770 (make-oscil (* 10 pitch) (* 0.5 pi)))
  634. (mod277 (make-oscil pitch (* 0.5 pi)))
  635. (gen7479 (make-oscil (* pitch 27)))
  636. (poly (make-polywave pitch (list 3 (* .78 .3) 8 (* .78 .2) 9 (* .78 .2) 10 (* .78 .9) 11 0.78 12 (* .78 .5))))
  637. (poly2 (make-polywave 860 (list 1 (* .25 .4) 2 (* .25 .1) 3 (* .25 .03) 4 (* .25 .3) 5 (* .25 .03))))
  638. (index (hz->radians 277))
  639. (frqf (make-env '(0 -.3 1 .3 2 0 5 0 6 -1) :duration dur :scaler (hz->radians 70)))
  640. (pulsef (make-pulsed-env '(0 .2 1 1 3 .7 5 .2) (/ 1.0 pitch) pitch)))
  641. (do ((i start (+ i 1)))
  642. ((= i stop))
  643. (let ((md (* index (oscil mod277)))
  644. (frq (env frqf)))
  645. (outa i (* (env ampf)
  646. (pulsed-env pulsef frq)
  647. (+ (polywave poly frq)
  648. (* .2 (oscil gen2770 (* 10 (+ frq md))))
  649. (* .02 (oscil gen7479 (* 27 (+ frq md))))
  650. (polywave poly2 (* 3.0 frq))))))))))
  651. ;; (with-sound (:play #t) (green-tree-frog 0 .5))
  652. ;;; --------------------------------------------------------------------------------
  653. ;;;
  654. ;;; Pinewoods tree-frog
  655. (defanimal (pinewoods-tree-frog beg dur amp)
  656. (let ((pitch 205.0)
  657. (pulse-dur .009)
  658. (start (seconds->samples beg))
  659. (stop (seconds->samples (+ beg dur))))
  660. (let ((pulsef (make-env '(0.000 0.000 0.065 0.5 0.117 0.85 0.179 1.0 0.236 0.9 0.503 0.4 0.606 0.2 1.000 0.000) :duration pulse-dur))
  661. (pulses (if (> (random 1.0) .6) 5 4))
  662. (pulse-amps (apply vector (map (lambda (x) (* amp x)) '(.7 .9 1.0 .9 .6))))
  663. (gen1 (make-oscil (* pitch 10) (* 0.5 pi)))
  664. (gen3 (make-oscil (* pitch 18) (* 0.5 pi)))
  665. (gen4 (make-oscil (* pitch 28) (* 0.5 pi)))
  666. (pulse-samps (seconds->samples pulse-dur))
  667. (pulse-sep (seconds->samples 0.078))
  668. (rnd (make-rand-interp (* 10 pitch) (hz->radians (* 3 pitch))))) ; not sure this actually helps
  669. (do ((i start (+ i pulse-sep)))
  670. ((>= i stop))
  671. (do ((pulse 0 (+ pulse 1))
  672. (pulse-start i (+ pulse-start pulse-samps)))
  673. ((= pulse pulses))
  674. (let ((pulse-amp (pulse-amps pulse))
  675. (pulse-stop (+ pulse-start pulse-samps)))
  676. (set! (mus-frequency gen1) (* pitch (if (< pulse 3) 10 11)))
  677. (do ((k pulse-start (+ k 1)))
  678. ((= k pulse-stop))
  679. (let ((noise (rand-interp rnd)))
  680. (outa k (* pulse-amp
  681. (env pulsef)
  682. (+ (* .9 (oscil gen1 (* .1 noise)))
  683. (* .08 (oscil gen3 (* .18 noise)))
  684. (* .02 (oscil gen4 (* .28 noise)))))))))
  685. (mus-reset pulsef)
  686. (set! (mus-phase gen1) (* 0.5 pi))
  687. (set! (mus-phase gen3) (* 0.5 pi))
  688. (set! (mus-phase gen4) (* 0.5 pi)))
  689. (set! pulses (if (> (random 1.0) .6) 5 4))))))
  690. ;; (with-sound (:play #t) (pinewoods-tree-frog 0 1 .5))
  691. ;;; --------------------------------------------------------------------------------
  692. ;;;
  693. ;;; Squirrel tree frog
  694. (defanimal (squirrel-tree-frog beg dur amp)
  695. (let ((pitch 120)
  696. (pulse-dur 0.24))
  697. (let ((start (seconds->samples beg))
  698. (stop (seconds->samples (+ beg dur)))
  699. (gen1 (make-blackman pitch 4))
  700. (gen2 (make-oscil (* 10 pitch)))
  701. (gen3 (make-oscil (* 24 pitch)))
  702. (gen4 (make-polywave pitch (list 1 (hz->radians .1))))
  703. (gen5 (make-oscil (* 14 pitch)))
  704. (gen6 (make-oscil (* 6 pitch)))
  705. (rnd (make-rand-interp 100 (hz->radians 5)))
  706. (frqf (make-env '(0 0 .2 0 .4 .75 .8 1 1.0 .5) :duration pulse-dur :scaler (hz->radians 15)))
  707. (pulsef (make-env '(0 0 .5 .7 2 1 3.5 .7 4 0) :duration pulse-dur :scaler amp))
  708. (pulse-samps (seconds->samples 0.52))
  709. (pulse-out (seconds->samples pulse-dur))
  710. (indf (make-env '(0 .3 1 .5 2 .5 3 0) :duration pulse-dur))
  711. (indf-1 (make-env '(0 .3 1 .5 2 .5 3 0) :offset 1.0 :scaler -1.0 :duration pulse-dur)))
  712. (do ((i start (+ i pulse-samps)))
  713. ((>= i stop))
  714. (let ((reset-stop (min stop (+ i pulse-out))))
  715. (do ((k i (+ k 1)))
  716. ((= k reset-stop))
  717. (let ((ind (+ (env frqf)
  718. (polywave gen4)
  719. (rand-interp rnd))))
  720. (outa k (* (env pulsef)
  721. (blackman gen1)
  722. (+ (* (env indf) (oscil gen2 (* 10.0 ind)))
  723. (* (env indf-1) (oscil gen3 (* 24.0 ind)))
  724. (* .1 (oscil gen5 (* 14.0 ind)))
  725. (* .1 (oscil gen6 (* 6.0 ind))))))))
  726. (for-each mus-reset (vector frqf pulsef indf-1 indf)))))))
  727. ;;; (with-sound (:play #t) (squirrel-tree-frog 0 1.0 .5))
  728. ;;; --------------------------------------------------------------------------------
  729. ;;;
  730. ;;; Ornate chorus frog
  731. (defanimal (ornate-chorus-frog beg dur amp)
  732. (let ((pulse-dur 0.024)
  733. (pitch 1210)
  734. (start (seconds->samples beg))
  735. (stop (seconds->samples (+ beg dur))))
  736. (let ((pulsef (make-env '(0.000 0.000 0.057 0.445 0.124 0.797 0.220 0.977 0.337 1.000 0.477 0.987 0.634 0.907 0.760 0.791 0.828 0.475 0.913 0.206 1.000 0.000)
  737. :scaler amp :duration pulse-dur))
  738. (gen1 (make-polywave pitch '(1 .02 2 .95 3 .01 4 .02 5 .01 6 .04 7 .01 8 .02)))
  739. (next-pulse (seconds->samples .4))
  740. (pulse-samps (seconds->samples pulse-dur)))
  741. (do ((i start (+ i next-pulse)))
  742. ((>= i stop))
  743. (let ((reset-stop (min stop (+ i pulse-samps))))
  744. (do ((k i (+ k 1)))
  745. ((= k reset-stop))
  746. (outa k (* (env pulsef) (polywave gen1))))
  747. (mus-reset pulsef)
  748. (set! next-pulse (seconds->samples (if (> (random 1.0) .8) (+ .25 (random .3)) .4))))))))
  749. ;; (with-sound (:play #t) (ornate-chorus-frog 0 4 .5))
  750. ;;; --------------------------------------------------------------------------------
  751. ;;;
  752. ;;; Spring peeper
  753. (defanimal (spring-peeper beg amp)
  754. (let ((dur 0.17)
  755. (pause 0.23)
  756. (dur2 .13)
  757. (index (hz->radians (* 0.1 2900))))
  758. ;; first note
  759. (let ((start (seconds->samples beg))
  760. (stop (seconds->samples (+ beg dur)))
  761. (ampf (make-env '(0 0 .25 .6 8 1 10 .8 10.5 0) :scaler amp :duration dur :base .03))
  762. (gen1 (make-oscil 2400))
  763. (gen2 (make-oscil 1200))
  764. (gen2a (make-oscil 2400))
  765. (frqf (make-env '(0 0 1 1) :scaler (hz->radians 600) :duration dur :base 30.0)))
  766. (do ((i start (+ i 1)))
  767. ((= i stop))
  768. (let ((frq (env frqf)))
  769. (outa i (* (env ampf)
  770. (oscil gen1 (+ frq
  771. (* index
  772. (+ (* 0.2 (oscil gen2 (* 0.5 frq)))
  773. (* 1.5 (oscil gen2a frq)))))))))) ; end is not quite right (original has a catch)
  774. ;; second note
  775. (let ((start2 (+ stop (seconds->samples pause))))
  776. (let ((stop2 (+ start2 (seconds->samples dur2)))
  777. (ampf2 (make-env '(0 0 .125 .8 1 .9 2 .7 4 1 10 0) :base .1 :duration dur2 :scaler (* .4 amp)))
  778. (frqf2 (make-env '(0 0 2 1 3 .75) :duration dur2 :base .03 :scaler (hz->radians 300)))
  779. (gen3 (make-oscil 2900))
  780. (gen4 (make-oscil 1450)))
  781. (do ((i start2 (+ i 1)))
  782. ((= i stop2))
  783. (let ((frq (env frqf2)))
  784. (outa i (* (env ampf2)
  785. (oscil gen3 (+ frq (* index (oscil gen4 (* 0.5 frq))))))))))))))
  786. ;; (with-sound (:play #t) (spring-peeper 0 .5))
  787. ;;;--------------------------------------------------------------------------------
  788. ;;;
  789. ;;; Crawfish frog
  790. (defanimal (crawfish-frog beg amp)
  791. (let ((dur 0.6)
  792. (pitch 58))
  793. (let ((start (seconds->samples beg))
  794. (stop (seconds->samples (+ beg dur)))
  795. (ampf (make-env '(0 0 4 1 8 1 9 .7 10 0) :scaler amp :duration dur))
  796. (pulse-samps (seconds->samples (/ 1.0 pitch)))
  797. (pulsef (make-env '(0 0 1 1 10 0) :base 32.0 :duration (/ 1.0 pitch)))
  798. (fmd (make-oscil pitch))
  799. (gen1 (make-oscil (* pitch 15)))
  800. (frqf (make-env '(0 .5 .2 0 1 1) :scaler (hz->radians pitch) :base 10.0 :duration dur))
  801. (index (hz->radians pitch))
  802. (poly1 (make-polywave (* pitch 6) '(1 .5 2 1 5 .5)))
  803. (poly2 (make-polywave (* pitch 6) '(2 .5 3 1 7 .25)))
  804. (intrp (make-env '(0 1 1 0) :duration dur :scaler .2 :base 4))
  805. (intrp-1 (make-env '(0 0 1 1) :duration dur :scaler .2 :base .25)))
  806. (do ((i start (+ i pulse-samps)))
  807. ((>= i stop))
  808. (set! (mus-location ampf) (- i start))
  809. (let ((reset-stop (min stop (+ i pulse-samps)))
  810. (pulse-amp (env ampf)))
  811. (do ((k i (+ k 1)))
  812. ((= k reset-stop))
  813. (let ((frq (env frqf)))
  814. (outa k (* pulse-amp
  815. (env pulsef)
  816. (+ (* .5 (oscil gen1 (+ frq (* index (oscil fmd (* frq .067))))))
  817. (* (env intrp) (polywave poly1 frq))
  818. (* (env intrp-1) (polywave poly2 frq))))))))
  819. (mus-reset pulsef)
  820. (mus-reset gen1)
  821. (mus-reset fmd)))))
  822. ;; (with-sound (:play #t) (crawfish-frog 0 .5))
  823. ;;; --------------------------------------------------------------------------------
  824. ;;;
  825. ;;; River frog
  826. ;;;
  827. ;;; original formants were much sharper, but using rxyk!cos to sharpen ours didn't seem to help
  828. ;;; animal seems to group these in 3's
  829. (defanimal (river-frog beg amp)
  830. (let ((dur 1.85)
  831. (pulse-pitch 42)
  832. (mid-pitch 185)
  833. (mid-pitch-change 10))
  834. (let ((start (seconds->samples beg))
  835. (stop (seconds->samples (+ beg dur)))
  836. (ampf (make-env '(0 0 2 1 7 .9 10 0) :scaler amp :duration dur :base .1))
  837. (pulsef #f)
  838. (pulse-samps (seconds->samples (/ 1.0 pulse-pitch)))
  839. (frqf (make-env '(0 .1 .2 -.02 .5 0 .65 0 1 1) :scaler (hz->radians mid-pitch-change) :duration dur))
  840. (vib (make-rand-interp 100 (hz->radians 10.0)))
  841. (fm (make-polywave pulse-pitch (list 1 (hz->radians pulse-pitch)) mus-chebyshev-second-kind))
  842. ;; cheb2 is needed here to match the original code which used (* index (oscil fm))
  843. ;; if cheb1, the main sideband is below rather than above, giving the frog a deeper call
  844. ;; does this make any sense?!?
  845. (poly1 (make-polywave mid-pitch (normalize-partials '(2 1.2 4 .1 7 0.75 8 .1 10 .5))))
  846. (poly2 (make-polywave mid-pitch (normalize-partials '(2 1.0 7 .5 9 .7 12 .01))))
  847. (interpf (make-env '(0 0 2 0 5 1 7 1) :duration dur))
  848. (interpf-1 (make-env '(0 0 2 0 5 1 7 1) :duration dur :offset 1.0 :scaler -1.0)))
  849. (do ((i start (+ i pulse-samps)))
  850. ((>= i stop))
  851. (set! (mus-location ampf) (- i start))
  852. (let ((reset-stop (min stop (+ i pulse-samps)))
  853. (pulse-amp (env ampf)))
  854. (set! pulsef (make-env '(0 .1 3 .1 3.1 1 4 1 6 .1 9 .1) :scaler pulse-amp :duration (/ 1.0 pulse-pitch)))
  855. (do ((k i (+ k 1)))
  856. ((= k reset-stop))
  857. (let ((frq (+ (env frqf)
  858. (rand-interp vib)
  859. (polywave fm))))
  860. (outa k (* (env pulsef)
  861. (+ (* (env interpf-1) (polywave poly1 frq))
  862. (* (env interpf) (polywave poly2 frq))))))))))))
  863. ;;; pulsed-env here was basically the same speed as using the nested do loop
  864. ;;; pulsed-env doesn't buy us anything if there's no run-time modulation
  865. ;; (with-sound (:play #t :statistics #t) (river-frog 0 .5))
  866. ;;; --------------------------------------------------------------------------------
  867. ;;;
  868. ;;; Bullfrog
  869. (defanimal (bullfrog beg amp)
  870. (let ((start (seconds->samples beg))
  871. (dur 0.81))
  872. (let ((stop (seconds->samples (+ beg dur)))
  873. (ampf (make-env '(0 0 1 1 2 1 3 0) :duration dur :scaler amp :base 10))
  874. (frqf (make-env '(0 0 1 6 2 0) :duration dur :scaler (hz->radians 1.0)))
  875. (f1 (make-rxyk!cos 200 1/2 0.6))
  876. (f2 (make-rxyk!cos 230 10/23 1.2))
  877. (f3 (make-rxyk!cos 600 1/6 8.0))
  878. (f4 (make-rxyk!cos 630 10/63 8.0))
  879. (rnd (make-rand-interp 4000 .2))
  880. (rnd1 (make-rand-interp 200 (hz->radians 2)))
  881. (frm1 (make-formant 400 .99))
  882. (frm2 (make-formant 1200 .98))
  883. (frm3 (make-formant 5000 .97))
  884. (frm1f (* 14 (sin (hz->radians 400))))
  885. (frm2f (* 28 (sin (hz->radians 1200))))
  886. (frm3f (* 8 (sin (hz->radians 5000))))
  887. (intrpf (make-env '(0 1 .6 0 1 1) :offset 1000.0 :scaler 200.0 :duration dur)))
  888. (let ((fb (vector frm1 frm2 frm3))
  889. (fs (float-vector frm1f frm2f frm3f)))
  890. (set! fb (make-formant-bank fb fs))
  891. (do ((i start (+ i 1)))
  892. ((= i stop))
  893. (let ((frq (+ (env frqf)
  894. (rand-interp rnd1))))
  895. (mus-set-formant-frequency frm2 (env intrpf))
  896. (outa i (formant-bank fb (* (env ampf)
  897. (+ .8 (rand-interp rnd))
  898. (+ (rxyk!cos f1 (* 2.0 frq))
  899. (* .5 (rxyk!cos f2 (* 2.3 frq)))
  900. (* .1 (rxyk!cos f3 (* 6.0 frq)))
  901. (* .1 (rxyk!cos f4 (* 6.3 frq)))))))))))))
  902. ;; (with-sound (:statistics #t) (bullfrog 0 .5))
  903. ;;; --------------------------------------------------------------------------------
  904. ;;;
  905. ;;; Texas toad
  906. (define (texas-toad beg1 dur1 amp1)
  907. (defanimal (texas-toad-1 beg dur amp)
  908. (let ((pulse-dur .0173))
  909. (let ((start (seconds->samples beg))
  910. (stop (seconds->samples (+ beg dur)))
  911. (gen (make-polywave 2460 '(1 .9 2 .01 3 .05 4 .005 5 .01)))
  912. (pulsef (make-env '(0 0 1 1 3 1 4 0) :duration pulse-dur :scaler amp))
  913. (pulse2 (make-blackman (/ 4.0 pulse-dur) 2))
  914. (pulse-samps (seconds->samples .02666))
  915. (pulse-out (seconds->samples pulse-dur))
  916. (rnd (make-rand-interp 4000 (hz->radians 200))))
  917. (do ((i start (+ i pulse-samps)))
  918. ((>= i stop))
  919. (let ((reset-stop (+ i pulse-out)))
  920. (if (<= reset-stop stop)
  921. (do ((k i (+ k 1)))
  922. ((= k reset-stop))
  923. (outa k (* (env pulsef)
  924. (blackman pulse2)
  925. (polywave gen (rand-interp rnd))))))
  926. (mus-reset pulsef)
  927. (mus-reset pulse2))))))
  928. (let ((last-dur 0.0)
  929. (last-call (+ beg1 dur1 -0.4)))
  930. (do ((call-beg beg1 (+ call-beg last-dur 0.3 (random 0.2))))
  931. ((>= call-beg last-call))
  932. (set! last-dur (+ .6 (random .25)))
  933. (texas-toad-1 call-beg last-dur amp1))))
  934. ;; (with-sound (:play #t) (texas-toad 0 2.0 0.5))
  935. ;;; --------------------------------------------------------------------------------
  936. ;;;
  937. ;;; American toad
  938. (defanimal (american-toad beg dur amp)
  939. (let ((pulse-dur .024)
  940. (pulse-sep .045)
  941. (start (seconds->samples beg)))
  942. (let ((stop (seconds->samples (+ beg dur)))
  943. (pulse-samps (seconds->samples pulse-sep))
  944. (pulse-out (seconds->samples pulse-dur))
  945. (ampf (make-env '(0 0.05 4 1 20 1 21 0) :duration dur :scaler amp))
  946. (gen1 #f)
  947. (frqf (make-env '(0 150 .1 250 .5 300 .9 200 1 0) :duration pulse-dur :scaler (hz->radians 1.0)))
  948. (pulsef (make-env '(0.000 0.000 0.147 0.700 0.261 0.968 0.405 0.996 0.601 0.830 0.878 0.198 1.000 0.000) :duration pulse-dur))
  949. (pulse-frqf (make-env (list 0 1100 .4 1300 dur (- 1300 (* dur 8))) :duration dur :scaler (hz->radians 1.0))))
  950. (do ((i start (+ i pulse-samps)))
  951. ((>= i stop))
  952. (set! (mus-location ampf) (- i start))
  953. (let ((reset-stop (min stop (+ i pulse-out))))
  954. (let ((pulse-amp (env ampf)))
  955. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .94)
  956. 2 (* pulse-amp .03)
  957. 3 (* pulse-amp .01)
  958. 4 (* pulse-amp .003)
  959. 5 (* pulse-amp .005)
  960. 7 (* pulse-amp .002)))))
  961. (set! (mus-location ampf) (- i start))
  962. (do ((k i (+ k 1)))
  963. ((= k reset-stop))
  964. (outa k (* (env pulsef)
  965. (polywave gen1 (+ (env frqf)
  966. (env pulse-frqf))))))
  967. (mus-reset pulsef)
  968. (mus-reset frqf))))))
  969. ;; (with-sound (:play #t) (american-toad 0 2 .25))
  970. ;;; --------------------------------------------------------------------------------
  971. ;;;
  972. ;;; Plains spadefoot
  973. (defanimal (plains-spadefoot beg amp)
  974. (let ((dur 0.73)
  975. (pulse-dur .019)
  976. (start (seconds->samples beg)))
  977. (let ((stop (seconds->samples (+ beg dur)))
  978. (pulse-samps (seconds->samples pulse-dur))
  979. (ampf (make-env '(0.000 0.000 0.098 0.423 0.310 0.747 0.630 0.929 0.785 0.830 0.902 0.553 1.000 0.000) :scaler amp :duration dur))
  980. (gen1 (make-oscil))
  981. (gen2 #f)
  982. (ampf2 (make-env '(0 0 .3 0 .8 1 1 1) :duration dur :scaler 0.4))
  983. (frqf (make-env '(0 1520 .4 1650 1 1630) :duration dur :scaler (hz->radians 1.0)))
  984. (pulsef #f)
  985. (rnd (make-rand-interp 100 (hz->radians 100))))
  986. (do ((i start (+ i pulse-samps)))
  987. ((>= i stop))
  988. (set! (mus-location ampf) (- i start))
  989. (set! (mus-location frqf) (- i start))
  990. (set! (mus-location ampf2) (- i start))
  991. (let ((reset-stop (min stop (+ i pulse-samps)))
  992. (pulse-amp (env ampf))
  993. (pulse-amp2 (env ampf2))
  994. (pulse-frq (env frqf)))
  995. (set! gen2 (make-polywave 0.0
  996. (if (= pulse-amp2 0.0)
  997. (list 1 0.0)
  998. (list 1 (* pulse-amp2 .01)
  999. 2 (* pulse-amp2 .01)
  1000. 6 (* pulse-amp2 .01)
  1001. 8 (* pulse-amp2 .1)
  1002. 10 (* pulse-amp2 .01)))))
  1003. (set! pulsef (make-env (list 0.000 0.000 0.03 pulse-amp 0.08 pulse-amp
  1004. 0.160 (* pulse-amp 0.486) 0.304 (* pulse-amp 0.202)
  1005. 0.508 (* pulse-amp 0.087) 1.000 0.000)
  1006. :duration pulse-dur))
  1007. (do ((k i (+ k 1)))
  1008. ((= k reset-stop))
  1009. (let ((frq (+ pulse-frq (rand-interp rnd))))
  1010. (outa k (* (env pulsef)
  1011. (+ (oscil gen1 frq)
  1012. (polywave gen2 (* 0.25 frq))))))))))))
  1013. ;; (with-sound (:play #t) (plains-spadefoot 0 .5))
  1014. ;;; --------------------------------------------------------------------------------
  1015. ;;;
  1016. ;;; Barking tree-frog
  1017. (defanimal (barking-tree-frog beg amp)
  1018. (let ((dur 0.165))
  1019. (let ((start (seconds->samples beg))
  1020. (stop (seconds->samples (+ beg dur)))
  1021. (ampf (make-env '(0.000 0.000 0.015 0.131 0.038 0.110 0.066 0.621 0.078 0.488 0.090 0.977 0.104 0.423
  1022. 0.108 0.013 0.113 0.504 0.122 0.005 0.129 0.979 0.138 0.337 0.142 0.470 0.152 0.008
  1023. 0.156 0.561 0.160 0.008 0.165 1.000 0.177 0.535 0.183 0.744 0.189 0.290 0.193 0.731
  1024. 0.200 0.381 0.209 0.977 0.217 0.499 0.237 0.846 0.247 0.896 0.260 0.898 0.464 0.846
  1025. 0.623 0.689 0.801 0.305 1.000 0.000)
  1026. :duration dur :scaler amp))
  1027. (frqf (make-env '(0 480 .3 430 1 425) :duration dur :scaler (hz->radians 1.0)))
  1028. (gen1 (make-polywave 0.0 (normalize-partials '(1 .9 2 .06 3 .25 4 .79 5 .18 6 .03 7 .02 8 .03 9 .01 10 .02 11 .005 12 .005))))
  1029. (rnd (make-rand-interp 1000 (hz->radians 10)))
  1030. (gen2 (make-oscil))
  1031. (frqf2 (make-env '(0 4750 .2 4790 .5 4710 1 4300) :duration dur :scaler (hz->radians 1.0)))
  1032. (attack (make-rand-interp 4000 (hz->radians 400)))
  1033. (gen3 (make-oscil 1720))
  1034. (attackf (make-env '(0.000 0.000 0.068 0.000 0.093 0.614 0.098 0.000 0.114 0.000 0.120 0.969 0.131 0.000
  1035. 0.155 0.000 0.159 0.997 0.175 0.000 0.198 0.000 0.2 1.000 0.224 0.000 0.241 0.000
  1036. 0.243 0.984 0.260 0.000 1.000 0.000)
  1037. :duration dur :scaler amp)))
  1038. (do ((i start (+ i 1)))
  1039. ((= i stop))
  1040. (outa i (+ (* (env ampf)
  1041. (+ (polywave gen1 (+ (env frqf)
  1042. (rand-interp rnd)))
  1043. (* .02 (oscil gen2 (env frqf2)))))
  1044. (* (env attackf)
  1045. (oscil gen3 (rand-interp attack)))))))))
  1046. ;; (with-sound (:play #t) (barking-tree-frog 0 .5))
  1047. ;;; --------------------------------------------------------------------------------
  1048. ;;;
  1049. ;;; Western toad
  1050. (defanimal (western-toad beg dur amp)
  1051. (do ((stop (seconds->samples (+ beg dur)))
  1052. (gen (make-polywave 0.0 '(1 .95 2 .02 3 .03 4 .005)))
  1053. (cur-start (seconds->samples beg))
  1054. (cur-is-long #t))
  1055. ((>= cur-start stop))
  1056. (let ((pulse-samps (seconds->samples (if cur-is-long
  1057. (+ 0.04 (random .04))
  1058. (+ .01 (random .02))))))
  1059. (let ((pulse-ampf (make-env (vector 0 0 (if cur-is-long
  1060. (values .1 .5 2 1 3 0)
  1061. (values 1 1 1.5 .3 2 0)))
  1062. :scaler (* amp (if cur-is-long (+ .6 (random .4)) (+ .1 (random .7))))
  1063. :length pulse-samps
  1064. :base (if cur-is-long 6.0 3.0)))
  1065. (pulse-frqf (make-env (if cur-is-long
  1066. '(0 -.5 .5 0 1 -.3)
  1067. '(0 -1 .1 0 1 0))
  1068. :length pulse-samps
  1069. :base .1
  1070. :offset (hz->radians (if cur-is-long (if (> (random 1.0) .6) 1340 1260) 1200))
  1071. :scaler (hz->radians (random 500.0))))
  1072. (cur-end (+ cur-start pulse-samps)))
  1073. (do ((i cur-start (+ i 1)))
  1074. ((= i cur-end))
  1075. (outa i (* (env pulse-ampf)
  1076. (polywave gen (env pulse-frqf)))))
  1077. (set! cur-start (+ cur-end
  1078. (seconds->samples
  1079. (if cur-is-long
  1080. (+ .015 (random (if (> (random 1.0) .8) .15 .04)))
  1081. (+ .01 (random .01))))))
  1082. (set! cur-is-long (or (not cur-is-long) (> (random 1.0) .3)))))))
  1083. ;; (with-sound (:play #t) (western-toad 0 2 .5))
  1084. ;;; --------------------------------------------------------------------------------
  1085. ;;;
  1086. ;;; Southwestern toad
  1087. (defanimal (southwestern-toad beg dur amp)
  1088. (let ((pulse-dur 0.0135)
  1089. (pulse-space 0.0236)
  1090. (start (seconds->samples beg)))
  1091. (let ((stop (seconds->samples (+ beg dur)))
  1092. (pulse-samps (seconds->samples pulse-space))
  1093. (pulse-out (seconds->samples pulse-dur))
  1094. (ampf (make-env (list 0 0 1.3 1 dur 1 (* 1.01 dur) 0) :duration dur :scaler amp :base .3))
  1095. (frqf (make-env (list 0 940 1 1230 dur 1230) :base 3.0 :duration dur :scaler (hz->radians 1.0) :offset (hz->radians -300)))
  1096. (gen1 #f)
  1097. (rnd (make-rand-interp 4000 (hz->radians 80)))
  1098. (pulse-ampf (make-env '(0 0 1 1 1.5 1 2 .5 3 0) :base .3 :duration pulse-dur))
  1099. (pulse-frqf (make-env '(0 0 .3 .8 1.5 1 2.7 .8 3 .3) :duration pulse-dur :scaler (hz->radians 300))))
  1100. (do ((i start (+ i pulse-samps)))
  1101. ((>= i stop))
  1102. (set! (mus-location ampf) (- i start))
  1103. (let ((reset-stop (min stop (+ i pulse-out)))
  1104. (pulse-amp (env ampf)))
  1105. (set! (mus-location ampf) (- i start))
  1106. (set! (mus-location frqf) (- i start))
  1107. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .95) 2 (* pulse-amp .02) 3 (* pulse-amp .03))))
  1108. (do ((k i (+ k 1)))
  1109. ((= k reset-stop))
  1110. (outa k (* (env pulse-ampf)
  1111. (polywave gen1 (+ (env frqf)
  1112. (env pulse-frqf)
  1113. (rand-interp rnd))))))
  1114. (mus-reset pulse-ampf)
  1115. (mus-reset pulse-frqf))))))
  1116. ;; (with-sound (:play #t) (southwestern-toad 0 2 .5))
  1117. ;;; --------------------------------------------------------------------------------
  1118. ;;;
  1119. ;;; Great Plains Narrow-mouthed toad
  1120. (defanimal (great-plains-narrow-mouthed-toad beg dur1 amp)
  1121. ;; rocky 75 28
  1122. (let ((attack-dur 0.155))
  1123. (let ((start (seconds->samples beg))
  1124. (stop (seconds->samples (+ beg (max dur1 0.3))))
  1125. ;; attack portion
  1126. (attack-stop (seconds->samples (+ beg attack-dur)))
  1127. (attack-ampf (make-env '(0.000 0.000 0.015 0.078 0.020 0.289 0.042 0.000 0.057 0.000 0.069 0.409 0.093 0.425
  1128. 0.101 0.520 0.113 0.588 0.141 0.218 0.159 0.537 0.182 0.695 0.221 0.140 0.223 0.640
  1129. 0.233 0.872 0.253 0.602 0.269 0.000 0.280 0.000 0.292 0.915 0.319 0.520 0.322 0.000
  1130. 0.333 0.000 0.347 0.912 0.359 0.777 0.371 0.509 0.381 0.000 0.391 0.000 0.399 0.611
  1131. 0.407 0.948 0.428 0.475 0.433 0.000 0.448 0.000 0.468 0.905 0.491 0.206 0.504 0.000
  1132. 0.513 0.000 0.528 0.909 0.537 0.583 0.543 0.125 0.554 0.000 0.572 0.911 0.578 0.957
  1133. 0.597 0.132 0.611 0.000 0.619 0.000 0.639 0.803 0.648 0.643 0.655 0.108 0.660 0.000
  1134. 0.677 0.000 0.683 0.629 0.693 0.902 0.706 0.186 0.716 0.000 0.731 0.000 0.736 0.568
  1135. 0.747 0.985 0.767 0.000 0.790 0.000 0.791 0.358 0.804 0.666 0.818 0.145 0.825 0.000
  1136. 0.842 0.000 0.848 0.408 0.857 0.768 0.878 0.000 0.898 0.000 0.904 0.511 0.915 0.883
  1137. 0.929 0.000 0.952 0.000 0.970 0.688 0.977 0.280 0.988 0.052 1.000 0.000)
  1138. :duration attack-dur :scaler amp))
  1139. (attack-frqf (make-env '(0.000 0.124 0.037 0.145 0.060 0.205 0.067 0.152 0.091 0.132 0.107 0.145 0.126 0.175
  1140. 0.147 0.150 0.166 0.173 0.190 0.173 0.206 0.137 0.219 0.179 0.232 0.192 0.245 0.177
  1141. 0.260 0.158 0.274 0.177 0.288 0.203 0.298 0.186 0.312 0.167 0.325 0.147 0.336 0.190
  1142. 0.347 0.207 0.362 0.184 0.377 0.158 0.393 0.190 0.403 0.220 0.421 0.190 0.434 0.158
  1143. 0.453 0.197 0.465 0.229 0.480 0.199 0.496 0.169 0.515 0.197 0.525 0.218 0.532 0.194
  1144. 0.544 0.171 0.558 0.197 0.573 0.222 0.584 0.197 0.606 0.177 0.623 0.201 0.633 0.222
  1145. 0.645 0.203 0.661 0.182 0.676 0.209 0.690 0.222 0.700 0.203 0.717 0.177 0.735 0.207
  1146. 0.749 0.207 0.771 0.179 0.791 0.205 0.805 0.203 0.814 0.179 0.846 0.209 0.862 0.212
  1147. 0.869 0.186 0.912 0.207 0.969 0.220 1.000 0.218)
  1148. :duration attack-dur :scaler (hz->radians 8900.0)))
  1149. (attack-gen1 (make-polywave 0.0 '(1 .92 2 .05 3 .02 4 .01))))
  1150. (do ((i start (+ i 1)))
  1151. ((= i attack-stop))
  1152. (outa i (* (env attack-ampf)
  1153. (polywave attack-gen1 (env attack-frqf)))))
  1154. ;; main portion
  1155. (let ((dur (- dur1 attack-dur)))
  1156. (let ((ampf (make-env '(0 1 1 1 10 1 11 0) :duration dur :scaler amp))
  1157. (frqf (make-env '(0 2000 .9 2000 1 1700) :duration dur :scaler (hz->radians 1.0)))
  1158. (gen1 (make-polywave 0.0 '(1 .92 2 .05 3 .02 4 .01)))
  1159. (frqf2 (make-env '(0 0 .1 25 4 20) :duration dur :scaler (hz->radians 1.0)))
  1160. (gp (make-polywave 100 '(4 1 9 1)))
  1161. (low-ampf (make-env (list 0 0 .2 1 dur 1) :duration dur :scaler .15))
  1162. (pulser (make-pulse-train 100))
  1163. (pulse-ampf (make-env '(0.000 0.000 0.227 0.057 0.319 0.164 0.407 0.946 0.554 0.706 0.707 0.036 0.839 0.031
  1164. 0.930 0.097 1.000 0.000) :duration .008))
  1165. (rnd (make-rand-interp 20 (hz->radians 3)))
  1166. (pulse-amp amp)
  1167. (saved-frq (make-float-vector (floor (* .03 *clm-srate*)))) ; 100 hz in pulser, so this is 3 times bigger than expected
  1168. (last-stop attack-stop))
  1169. (pulse-train pulser 0.0) ; flush the startup pulse
  1170. (do ((i attack-stop (+ i 1))
  1171. (j 0 (+ j 1)))
  1172. ((= i stop))
  1173. (if (> (pulse-train pulser (float-vector-set! saved-frq j (+ (env frqf2) (rand-interp rnd)))) 0.1)
  1174. (begin
  1175. (do ((k 0 (+ k 1))
  1176. (n last-stop (+ n 1)))
  1177. ((= k j))
  1178. (outa n (* pulse-amp
  1179. (env pulse-ampf)
  1180. (+ (* (env low-ampf)
  1181. (polywave gp (ina k saved-frq)))
  1182. (polywave gen1 (env frqf))))))
  1183. (mus-reset pulse-ampf)
  1184. (set! (mus-location ampf) (- i attack-stop))
  1185. (set! pulse-amp (env ampf))
  1186. (set! (mus-phase gen1) (* pi .75))
  1187. (set! last-stop i)
  1188. (set! j 0)))))))))
  1189. ;; (with-sound (:play #t) (great-plains-narrow-mouthed-toad 0 2 .25))
  1190. ;;; --------------------------------------------------------------------------------
  1191. ;;;
  1192. ;;; Pacific chorus frog
  1193. (defanimal (pacific-chorus-frog beg amp)
  1194. (let ((dur 0.25))
  1195. (let ((start (seconds->samples beg))
  1196. (stop (seconds->samples (+ beg dur)))
  1197. (ampf (make-env '(0.000 0.000 0.011 0.147 0.023 0.131 0.028 0.034 0.059 0.000 0.063 0.153 0.067 0.113
  1198. 0.072 0.391 0.081 0.095 0.088 0.052 0.102 0.025 0.124 0.000 0.131 0.452 0.139 0.327
  1199. 0.144 0.099 0.156 0.097 0.160 0.048 0.186 0.000 0.194 0.438 0.200 0.366 0.201 0.156
  1200. 0.211 0.063 0.247 0.000 0.256 0.628 0.268 0.154 0.274 0.190 0.285 0.027 0.296 0.059
  1201. 0.309 0.031 0.312 0.481 0.322 0.939 0.331 0.314 0.351 0.061 0.363 0.099 0.374 0.056
  1202. 0.377 0.438 0.389 0.858 0.394 0.467 0.403 0.241 0.414 0.197 0.415 0.127 0.425 0.075
  1203. 0.436 0.090 0.441 0.526 0.454 0.869 0.471 0.239 0.490 0.029 0.503 0.117 0.505 0.485
  1204. 0.514 0.811 0.528 0.415 0.538 0.088 0.552 0.056 0.561 0.106 0.580 0.075 0.597 0.000
  1205. 0.776 0.000 0.777 0.573 0.786 0.145 0.801 0.054 0.826 0.000 0.827 0.632 0.844 1.000
  1206. 0.856 0.524 0.866 0.031 0.883 0.074 0.891 0.136 0.896 0.745 0.907 0.424 0.915 0.765
  1207. 0.934 0.059 0.951 0.048 0.962 0.079 0.970 0.436 0.986 0.266 1.000 0.000)
  1208. :duration dur :scaler amp))
  1209. (frqf (make-env '(0.000 0.220 0.074 0.249 0.133 0.249 0.194 0.240 0.258 0.252 0.324 0.264 0.389 0.267
  1210. 0.456 0.270 0.520 0.264 0.847 0.270 0.920 0.273 1.000 0.279)
  1211. :duration dur :scaler (hz->radians (* 0.5 0.205 22050.0))))
  1212. (gen1 (make-polywave 0.0 '(2 .35 3 .1 4 .8 5 .01 6 .03 8 .005)))
  1213. (rnd (make-rand-interp 600 (hz->radians 50))))
  1214. (do ((i start (+ i 1)))
  1215. ((= i stop))
  1216. (outa i (* (env ampf)
  1217. (polywave gen1 (+ (env frqf)
  1218. (rand-interp rnd)))))))))
  1219. ;; (with-sound (:play #t) (pacific-chorus-frog 0 .5))
  1220. ;;; --------------------------------------------------------------------------------
  1221. ;;;
  1222. ;;; Red-spotted toad
  1223. (defanimal (red-spotted-toad beg dur amp)
  1224. ;; rocky 23 1
  1225. (let ((pulse-dur 0.0138)
  1226. (pulse-space 0.0234)
  1227. (start (seconds->samples beg)))
  1228. (let ((stop (seconds->samples (+ beg dur)))
  1229. (pulse-samps (seconds->samples pulse-space))
  1230. (pulse-out (seconds->samples pulse-dur))
  1231. (ampf (make-env '(0 0 .5 .8 .8 .8 .9 1 .98 1 1 0) :duration dur :scaler amp))
  1232. (frqf (make-env '(0 1900 .2 2200 .4 2250 .9 2200 1 2100) :duration dur :scaler (hz->radians 1.0)))
  1233. (rnd (make-rand-interp 1000 (hz->radians 40)))
  1234. (gen1 #f)
  1235. (pulse-ampf (make-env '(0 0 1 1 1.25 1 2 .5 3 0) :base .3 :duration pulse-dur)))
  1236. (do ((i start (+ i pulse-samps)))
  1237. ((>= i stop))
  1238. (set! (mus-location ampf) (- i start))
  1239. (let ((reset-stop (min stop (+ i pulse-out))))
  1240. (let ((pulse-amp (env ampf)))
  1241. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .99) 3 (* pulse-amp .005)))))
  1242. (set! (mus-location ampf) (- i start))
  1243. (set! (mus-location frqf) (- i start))
  1244. (do ((k i (+ k 1)))
  1245. ((= k reset-stop))
  1246. (outa k (* (env pulse-ampf)
  1247. (polywave gen1 (+ (env frqf)
  1248. (rand-interp rnd))))))
  1249. (mus-reset pulse-ampf))))))
  1250. ;; (with-sound (:play #t) (red-spotted-toad 0 4 .5))
  1251. ;;; --------------------------------------------------------------------------------
  1252. ;;;
  1253. ;;; Green toad
  1254. (defanimal (green-toad beg dur amp)
  1255. ;; rocky 31 1
  1256. ;; (an experiment with wave-train in place of pulsed env)
  1257. (let ((pulse (let ((wave-len 256))
  1258. (do ((v (make-float-vector wave-len))
  1259. (pulse-ampf (make-env '(0.000 0.000 0.063 0.312 0.277 0.937 0.405 1.000 0.617 0.696 0.929 0.146 2.000 0.000) :length wave-len))
  1260. (i 0 (+ i 1)))
  1261. ((= i wave-len) v)
  1262. (set! (v i) (env pulse-ampf))))))
  1263. (let ((start (seconds->samples beg))
  1264. (stop (seconds->samples (+ beg dur)))
  1265. (ampf (make-env (list 0 0 .2 .9 .3 .7 .4 1 (max .5 (- dur .01)) 1 (max .51 dur) 0) :duration dur :scaler amp))
  1266. (frqf (make-env (list 0 2540 .2 3250 (max .5 dur) 3200) :base 10 :duration dur :scaler (hz->radians 1.0)))
  1267. (pulse1 (make-wave-train 56.0 :wave pulse))
  1268. (pulse2 (make-delay (seconds->samples .0078))) ; pulses come in pairs
  1269. (gen1 (make-polywave 0.0 '(1 .95 2 .04 3 .01)))
  1270. (rnd (make-rand-interp 100 (hz->radians 2.0)))
  1271. (rnd1 (make-rand-interp 1000 (hz->radians 80))))
  1272. (do ((i start (+ i 1)))
  1273. ((= i stop))
  1274. (let ((val (wave-train pulse1 (rand-interp rnd))))
  1275. (outa i (* (env ampf)
  1276. (+ val
  1277. (delay pulse2 val))
  1278. (polywave gen1 (+ (env frqf)
  1279. (rand-interp rnd1))))))))))
  1280. ;; (with-sound (:play #t) (green-toad 0 1 .5))
  1281. ;;; --------------------------------------------------------------------------------
  1282. ;;;
  1283. ;;; Little grass frog
  1284. (defanimal (little-grass-frog beg amp)
  1285. ;; frogs 26 8.5
  1286. (let ((dur .032))
  1287. ;; initial note
  1288. (let ((start (seconds->samples beg))
  1289. (stop (seconds->samples (+ beg dur)))
  1290. (ampf (make-env '(0.000 0.000 0.061 0.739 0.124 0.998 0.358 0.902 0.630 0.419 0.727
  1291. 0.469 0.813 0.391 0.857 0.046 0.884 0.256 0.918 0.121 1.000 0.000)
  1292. :duration dur :scaler amp))
  1293. (frqf (make-env '(0.000 0.289 0.534 0.302 0.793 0.299 1.000 0.307)
  1294. :duration dur :scaler (hz->radians (* 0.5 21900.0))))
  1295. (gen1 (make-polywave 0.0 '(1 .005 2 .97 3 .02 4 .01))))
  1296. (do ((i start (+ i 1)))
  1297. ((= i stop))
  1298. (outa i (* (env ampf)
  1299. (polywave gen1 (env frqf))))))
  1300. ;; 4 tinks
  1301. (let ((begs (vector 0.085 0.118 0.141 0.162))
  1302. (amps (vector 1.0 1.0 .8 .6))
  1303. (frqs (vector 6840 6940 6890 6940)))
  1304. (do ((call 0 (+ call 1)))
  1305. ((= call 4))
  1306. (let ((start (seconds->samples (+ beg (begs call))))
  1307. (dur .01))
  1308. (let ((stop (+ start (seconds->samples dur)))
  1309. (ampf (make-env '(0.000 0.000 0.082 0.967 0.149 1.000 0.183 0.977 0.299 0.529
  1310. 0.334 0.595 0.451 0.312 0.520 0.176 0.639 0.155 0.753 0.077 1.000 0.000)
  1311. :duration dur :scaler (* amp (amps call))))
  1312. (frq (hz->radians (* 0.5 (frqs call))))
  1313. (gen1 (make-polywave 0.0 '(1 .005 2 .97 3 .02 4 .01))))
  1314. (do ((i start (+ i 1)))
  1315. ((= i stop))
  1316. (outa i (* (env ampf)
  1317. (polywave gen1 frq))))))))))
  1318. ;; (with-sound (:play #t) (little-grass-frog 0 .5))
  1319. ;;; --------------------------------------------------------------------------------
  1320. ;;;
  1321. ;;; Sonoran desert toad
  1322. (defanimal (sonoran-desert-toad beg dur amp)
  1323. ;; rocky 13 1
  1324. (let ((start (seconds->samples beg)))
  1325. (let ((stop (seconds->samples (+ beg dur)))
  1326. (ampf (make-env '(0.000 0.000 0.011 0.201 0.193 0.704 0.338 0.878 0.593 0.986 0.865 0.972 0.954 0.895
  1327. 0.970 0.645 1.000 0.000)
  1328. :duration dur :scaler amp))
  1329. (frqf (make-env '(0.000 0.360 0.069 0.387 0.144 0.411 0.500 0.428 0.649 0.432 0.746 0.425 0.877 0.435
  1330. 0.974 0.418 1.000 0.291)
  1331. :duration dur :scaler (hz->radians 2800.0)))
  1332. (gen1 (make-oscil))
  1333. (gen2 (make-oscil))
  1334. (ampf2 (make-env (list 0 .1 .05 1 .2 .1 .3 .01 (- dur .1) .1 dur 1) :duration dur :scaler .2))
  1335. (gen3 (make-polywave 0.0 '(3 .5 4 .2 5 .1 6 .08 7 .05 9 .03)))
  1336. (ampf3 (make-env (list 0 .2 .1 1 (- dur .2) 1 dur .5) :duration dur :scaler .1))
  1337. (rnd (make-rand-interp 4000 (hz->radians 200)))
  1338. (env1 (vector 0 0 .6 1 1 0))
  1339. (env2 (vector 0 0 .3 .7 .5 1 .8 .9 1 0))
  1340. (env3 (vector 0 0 .2 .7 .3 .1 .5 1 .7 .8 1 0))
  1341. (next-pulse start)
  1342. (pulse-samps 0)
  1343. (pulse-ampf #f))
  1344. (do ((i start (+ i pulse-samps)))
  1345. ((>= i stop))
  1346. (if (>= i next-pulse)
  1347. (let ((pulse-dur (+ .01 (random .003)))
  1348. (env-choice (random 3)))
  1349. (set! pulse-ampf (make-env (if (= env-choice 0) env1
  1350. (if (= env-choice 1) env2
  1351. env3))
  1352. :duration pulse-dur
  1353. :scaler (+ .7 (random .3))))
  1354. (set! pulse-samps (seconds->samples (+ pulse-dur (random 0.005))))
  1355. (set! next-pulse (+ next-pulse pulse-samps))))
  1356. (set! (mus-location ampf) (- i start))
  1357. (set! (mus-location frqf) (- i start))
  1358. (let ((pulse-end (+ i pulse-samps))
  1359. (pulse-amp (env ampf))
  1360. (pulse-frq (env frqf)))
  1361. (do ((k i (+ k 1)))
  1362. ((= k pulse-end))
  1363. (let ((frq (+ pulse-frq
  1364. (rand-interp rnd))))
  1365. (outa k (* pulse-amp
  1366. (env pulse-ampf)
  1367. (+ (* .7 (oscil gen1 frq))
  1368. (* (env ampf2) (oscil gen2 (* 2.0 frq)))
  1369. (* (env ampf3) (polywave gen3 frq))))))))))))
  1370. ;; (with-sound (:play #t) (sonoran-desert-toad 0 .8 .5))
  1371. ;;; --------------------------------------------------------------------------------
  1372. ;;;
  1373. ;;; Amargosa toad
  1374. (define (amargosa-toad beg1 amp1)
  1375. ;; rocky 17 0
  1376. (defanimal (amargosa-toad-1 beg dur frqscl frqenv ampscl ampenv)
  1377. (let ((start (seconds->samples beg))
  1378. (stop (seconds->samples (+ beg dur)))
  1379. (ampf (make-env ampenv :duration dur :scaler ampscl))
  1380. (frqf (make-env frqenv :duration dur :scaler (hz->radians frqscl)))
  1381. (gen1 (make-polywave
  1382. :partials
  1383. (normalize-partials
  1384. '(1 1 2 .18 3 .19 4 .04 5 .03 6 .04 8 .01 9 .01 10 .005 11 .01 12 .005)))))
  1385. (do ((i start (+ i 1)))
  1386. ((= i stop))
  1387. (outa i (* (env ampf)
  1388. (polywave gen1 (env frqf)))))))
  1389. (let ((begs (vector 0.0 0.15 0.325 0.47 0.61))
  1390. (durs (vector 0.027 0.06 0.065 0.042 0.05))
  1391. (amps (vector 0.9 1.0 1.0 0.4 0.1))
  1392. (frqs (vector 14800 14020 14800/3 14800 7400))
  1393. (ampenvs (vector '(0.000 0.000 0.085 0.906 0.117 1.000 0.328 0.909 0.715 0.464 0.892 0.118 1.000 0.000)
  1394. '(0.000 0.000 0.025 1.000 0.056 0.201 0.121 0.848 0.151 0.503 0.217 0.395 0.441 0.556
  1395. 0.602 0.868 0.642 0.870 0.734 0.726 0.808 0.456 0.964 0.141 1.000 0.000)
  1396. '(0.000 0.000 0.026 0.053 0.047 1.000 0.063 0.809 0.079 0.181 0.106 0.637 0.151 0.442
  1397. 0.180 0.604 0.346 0.507 0.463 0.511 0.582 0.694 0.641 0.663 0.697 0.519 0.744 0.331
  1398. 0.806 0.087 1.000 0.000)
  1399. '(0.000 0.000 0.037 0.108 0.070 1.000 0.090 0.700 0.117 0.067 0.144 0.462 0.166 0.523
  1400. 0.209 0.168 0.234 0.410 0.639 0.278 0.823 0.373 1.000 0.000)
  1401. '(0.000 0.000 0.091 0.302 0.184 0.083 0.243 0.639 0.286 0.120 0.364 0.465 0.570 0.187
  1402. 0.739 0.434 1.000 0.000)))
  1403. (frqenvs (vector '(0.000 0.075 0.317 0.073 1.000 0.065)
  1404. '(0.000 0.076 0.031 0.106 0.064 0.085 0.098 0.073 0.158 0.079 0.821 0.076 1.000 0.067)
  1405. '(0.000 0.201 0.050 0.209 0.090 0.213 0.257 0.217 0.377 0.215 0.486 0.221 0.548 0.231
  1406. 0.669 0.233 0.751 0.225 0.852 0.215 1.000 0.227)
  1407. '(0.000 0.071 0.063 0.081 0.097 0.083 0.155 0.073 0.195 0.069 0.832 0.069 1.000 0.053)
  1408. '(0.000 0.120 0.132 0.128 0.218 0.126 0.272 0.120 0.326 0.120 0.513 0.120 0.730 0.118
  1409. 1.000 0.096))))
  1410. (do ((call 0 (+ call 1)))
  1411. ((= call 5))
  1412. (amargosa-toad-1
  1413. (+ beg1 (begs call))
  1414. (durs call)
  1415. (frqs call)
  1416. (frqenvs call)
  1417. (* amp1 (amps call))
  1418. (ampenvs call)))))
  1419. ;; (with-sound (:play #t) (amargosa-toad 0 .5))
  1420. ;;; ================ Mammals ================
  1421. ;;;
  1422. ;;;
  1423. ;;; Indri
  1424. ;;;
  1425. ;;; close in spectrum, amp, freq, but the original has what sounds like a ton of reverb
  1426. ;;; if I add the reverb, it's close -- is this really what this animal sounds like?
  1427. (defanimal (indri beg amp)
  1428. (let ((pitch 900)
  1429. (dur 1.5))
  1430. (let ((start (seconds->samples beg))
  1431. (stop (seconds->samples (+ beg dur)))
  1432. (gen1 (make-polywave (* 2 pitch) '(1 .9)))
  1433. (gen4 (make-polywave pitch '(1 .125)))
  1434. (gen2 (make-polywave (* 8 pitch) '(1 .1)))
  1435. (gen3 (make-polywave pitch '(1 .2)))
  1436. (ampf (make-env '(0.0 0.0 0.05 0.4 0.1 0.65 0.2 0.5 0.27 1.0 0.4 0.43 0.43 0.53
  1437. 0.5 0.5 0.53 0.36 0.6 1.0 0.64 0.99 0.69 0.6 0.7 0.3 0.77 0.15
  1438. 0.8 0.04 1.0 0.0) :duration dur :scaler amp))
  1439. (frqf (make-env '(0 1 2 0 6 0 7 3 9 3) :scaler (hz->radians 60) :duration dur))
  1440. (vib (make-polywave 2 (list 1 (hz->radians 10)))))
  1441. (do ((i start (+ i 1)))
  1442. ((= i stop))
  1443. (let ((frq (+ (env frqf) (polywave vib))))
  1444. (outa i (* (env ampf)
  1445. (+ (polywave gen1 (+ (* 2.0 frq)
  1446. (polywave gen4 frq)))
  1447. (polywave gen2 (+ (* 8.0 frq)
  1448. (polywave gen3 frq)))))))))))
  1449. ;; (with-sound (:play #t) (indri 0 .5))
  1450. ;;; ================ Insects ================
  1451. ;;;
  1452. ;;;
  1453. ;;; mosquito
  1454. ;;;
  1455. ;;; need to make freq env flicks at call time (is there a comb-filter effect as it gets near?)
  1456. (defanimal (mosquito beg dur freq amp)
  1457. (let ((start (seconds->samples beg))
  1458. (stop (seconds->samples (+ beg dur)))
  1459. (carrier (make-oscil freq))
  1460. (modulator1 (make-polywave (* freq 2) '(1 .6))) ; or 1 (but leave lower mult at 2??)
  1461. (modulator3 (make-polywave (* freq 3) '(1 .3)))
  1462. (modulator2 (make-polywave (* freq 8) '(1 .1))) ; or 9
  1463. (ampf (make-env '(0 0 .2 .5 1 .5 2 .5 3 1 4 .5 5 .5 5.1 0) :scaler amp :duration dur :base 32))
  1464. (frqf (make-env '(0 0 1 0 1.01 0.1 1.03 -0.1 1.05 0.0 3 0 3.02 .05 3.03 -0.1 3.1 0 5 0.0) :duration dur :scaler (hz->radians freq)))
  1465. (vib (make-rand-interp 10.0 (hz->radians 10)))
  1466. (indf (make-rand-interp 1 .5))
  1467. (index2 (hz->radians (* freq 1.0)))
  1468. (index3 (hz->radians (* freq 0.5)))
  1469. (hfreq (hz->radians freq)))
  1470. (do ((i start (+ i 1)))
  1471. ((= i stop))
  1472. (let* ((frq (+ (env frqf) (rand-interp vib)))
  1473. (pitch (oscil carrier frq)))
  1474. (outa i (* (env ampf)
  1475. (+ (polywave modulator1 (+ (* 2.0 frq) (* hfreq pitch (+ 1.0 (rand-interp indf)))))
  1476. (polywave modulator3 (+ (* 3.0 frq) (* index3 pitch)))
  1477. (polywave modulator2 (+ (* 8.0 frq) (* index2 pitch))))))))))
  1478. ;; (with-sound (:play #t) (mosquito 0 5 560 .2) (mosquito 1 3 880 .05))
  1479. ;; (with-sound () (mosquito 0 1 560 .1))
  1480. ;;; --------------------------------------------------------------------------------
  1481. ;;;
  1482. ;;; Southern mole cricket
  1483. (defanimal (southern-mole-cricket beg dur amp)
  1484. (let ((start (seconds->samples beg))
  1485. (stop (seconds->samples (+ beg dur)))
  1486. (gen1 (make-oscil 2700))
  1487. (gen2 (make-oscil (* 2700 2.4)))
  1488. (gen3 (make-oscil 60))
  1489. (gen5 (make-polywave 360 '(0 .035 1 .015)))
  1490. (gen4 (make-oscil (* 2700 3.2)))
  1491. (gargle (make-rand-interp 360 (hz->radians (* .25 360)))))
  1492. (do ((i start (+ i 1)))
  1493. ((= i stop))
  1494. (let ((pval (oscil gen3))
  1495. (noise (rand-interp gargle)))
  1496. (outa i (* amp (+ (* (polywave gen5)
  1497. (- 1.0 pval)
  1498. (oscil gen2 (* 2.4 noise)))
  1499. (* (max 0.0 pval)
  1500. (+ (* .95 (oscil gen1 noise))
  1501. (* .05 (oscil gen4 noise)))))))))))
  1502. ;; (with-sound (:play #t) (southern-mole-cricket 0 3 .5))
  1503. ;;; --------------------------------------------------------------------------------
  1504. ;;;
  1505. ;;; Broad-winged Tree cricket
  1506. (defanimal (broad-winged-tree-cricket beg dur amp)
  1507. (let ((freq 1700))
  1508. (let ((start (seconds->samples beg))
  1509. (stop (seconds->samples (+ beg dur)))
  1510. (gp (make-polywave freq '(1 .7 2 .05 3 .04)))
  1511. (gb (make-polywave freq '(4 .02 5 .02)))
  1512. (ampmod (make-triangle-wave 155 :amplitude .07))
  1513. (ampf (make-env '(0 0 8 1 20 1 21 0) :duration dur :scaler amp))
  1514. (frqf (make-env '(0 1 1 -1 2 -1) :duration .06 :base 10.0 :scaler (hz->radians 40.0)))
  1515. (pulsef #f)
  1516. (pulse-samps (seconds->samples .06))
  1517. (indf (make-env '(0 0 10 0 18 1 23 1 26 0 30 0) :duration .06))
  1518. (noise (make-rand-interp 1000 .005)))
  1519. (do ((i start (+ i pulse-samps)))
  1520. ((>= i stop))
  1521. (set! (mus-location ampf) (- i start))
  1522. (let ((reset-stop (min stop (+ i pulse-samps)))
  1523. (pulse-amp (env ampf)))
  1524. (set! pulsef (make-env '(0 0 1 .1 6 .2 7 0 8 .3 10 1 18 .9 21 .1 23 .3 28 .1 30 0) :scaler pulse-amp :duration .06 :base .1))
  1525. (do ((k i (+ k 1)))
  1526. ((= k reset-stop))
  1527. (let ((buzz (+ (env frqf) (rand-interp noise))))
  1528. (outa k (* (env pulsef)
  1529. (+ .93 (triangle-wave ampmod))
  1530. (+ (polywave gp buzz)
  1531. (* (env indf)
  1532. (polywave gb buzz))))))))
  1533. (mus-reset pulsef)
  1534. (mus-reset frqf)
  1535. (mus-reset indf)))))
  1536. ;; (with-sound (:play #t) (broad-winged-tree-cricket 0 1.0 0.3))
  1537. ;;; --------------------------------------------------------------------------------
  1538. ;;;
  1539. ;;; Long-spurred meadow katydid
  1540. ;;;
  1541. ;;; I can barely hear this at its true pitch, so the match was
  1542. ;;; done down one or two octaves -- I think the recording has cut off high info (above 20Khz) --
  1543. ;;; need much higher srate to see what this guy is really doing. This is not very good...
  1544. (defanimal (long-spurred-meadow-katydid beg amp)
  1545. (let ((dur 10.1) ; overall duration
  1546. (slow-start 2.2)) ; buzz at start
  1547. (let ((soft-end (+ slow-start 4.0))) ; softer section, rest is full vol
  1548. (let ((start (seconds->samples beg))
  1549. (stop (seconds->samples (+ beg dur)))
  1550. ;; looks like the same basic pulse throughout, almost same speed at start but every other one is squelched
  1551. ;; slow startup pulse starts much faster (.06 mid-pulse duration, .0013 base pulse)
  1552. (carrier (make-polywave 400 (list 33 .36 35 (* .36 .7) 37 (* .36 .49) 39 (* .36 .343) 41 (* .36 .242))))
  1553. (modulator (make-polywave 1500 '(1 .003))) ; cos^2 = 1/2(cos 2x + 1), but polywave has constant term via partial 0
  1554. (modulator1 (make-polywave 3000 '(0 .5 1 .5)))
  1555. (noise (make-rand-interp 5000 .003))
  1556. (peep (make-pulsed-env '(0 0 1 0 2 .2 3 0 5 .75 8 1 10 0 11 0) .06 (/ 1.0 .06)))
  1557. (ampf (make-env (list 0 0 .5 .5 slow-start .4 soft-end .4 (+ soft-end .5) 1 (- dur 1) 1 dur 0.0) :duration dur :scaler amp))
  1558. (pulsef (make-env (list 0 -1 slow-start -1 (+ slow-start .03) 0 dur 0) :duration dur :scaler (hz->radians 8)))
  1559. (pulsef1 (make-env (list 0 -1 slow-start -1 (+ slow-start .03) 0 dur 0) :duration dur :scaler (hz->radians (* 24.75 8)))))
  1560. (do ((i start (+ i 1)))
  1561. ((= i stop))
  1562. (outa i (* (env ampf)
  1563. (polywave modulator1)
  1564. (pulsed-env peep (env pulsef))
  1565. (polywave carrier (+ (env pulsef1)
  1566. (rand-interp noise)
  1567. (polywave modulator))))))))))
  1568. ;; (with-sound (:statistics #t) (long-spurred-meadow-katydid 0 .5))
  1569. #|
  1570. (defanimal (long-spurred-meadow-katydid beg amp)
  1571. (let ((dur 10.1) ; overall duration
  1572. (slow-start 2.2)) ; buzz at start
  1573. (let ((soft-end (+ slow-start 4.0))) ; softer section, rest is full vol
  1574. (let ((start (seconds->samples beg))
  1575. (stop (seconds->samples (+ beg dur)))
  1576. ;; looks like the same basic pulse throughout, almost same speed at start but every other one is squelched
  1577. ;; slow startup pulse starts much faster (.06 mid-pulse duration, .0013 base pulse)
  1578. (carrier (make-nrxysin 13200 (/ 800 13200) 4 .7))
  1579. (modulator (make-oscil 1500 (* 0.5 pi)))
  1580. (noise (make-rand-interp 5000 .1))
  1581. (nrx 0.0)
  1582. (peep (make-pulsed-env '(0 0 1 0 2 .2 3 0 5 .75 8 1 10 0 11 0) .06 (/ 1.0 .06)))
  1583. (ampf (make-env (list 0 0 .5 .5 slow-start .4 soft-end .4 (+ soft-end .5) 1 (- dur 1) 1 dur 0.0) :duration dur :scaler amp))
  1584. (pulsef (make-env (list 0 -1 slow-start -1 (+ slow-start .03) 0 dur 0) :duration dur :scaler (hz->radians 8))))
  1585. (do ((i start (+ i 1)))
  1586. ((= i stop))
  1587. (let ((frq (env pulsef))
  1588. (md (oscil modulator)))
  1589. (set! nrx (nrxysin carrier (+ (* 825.0 frq) ; (/ 13200 16))
  1590. (rand-interp noise)
  1591. (* .1 md))))
  1592. (set! md (* md md nrx (pulsed-env peep frq)))
  1593. (outa i (* md (env ampf)))))))))
  1594. |#
  1595. #|
  1596. ;; this is slower!
  1597. (do ((i start (+ i 1)))
  1598. ((= i stop))
  1599. (let ((frq (env pulsef))
  1600. (md (oscil modulator)))
  1601. (outa i (* md md
  1602. (nrxysin carrier (+ (* 825.0 frq) ; (/ 13200 16))
  1603. (rand-interp noise)
  1604. (* .1 md)))
  1605. (pulsed-env peep frq) (env ampf)))))))))
  1606. |#
  1607. ;;; --------------------------------------------------------------------------------
  1608. ;;;
  1609. ;;; Handsome trig
  1610. (defanimal (handsome-trig beg dur amp)
  1611. (let ((freqs (apply float-vector (map hz->radians '(6439 6585 6860 6940 7090 7266 7362))))
  1612. (amps (float-vector 0.355 0.355 0.089 0.060 0.071 0.035 0.035))
  1613. (pulse-dur .02))
  1614. (let ((start (seconds->samples beg))
  1615. (stop (seconds->samples (+ beg dur)))
  1616. (pulsef (make-env '(0.0 0.0 0.05 1.0 0.13 1.0 0.4 0.1 1.0 0.0) :scaler amp :duration pulse-dur))
  1617. (pulse-samps (seconds->samples pulse-dur))
  1618. (pulse-sep (seconds->samples pulse-dur))
  1619. (pulses 0)
  1620. (obank (make-oscil-bank freqs (make-float-vector 7) amps #t)))
  1621. (do ((i start (+ i pulse-sep)))
  1622. ((>= i stop))
  1623. (let ((pulse-stop (+ i pulse-samps)))
  1624. (do ((k i (+ k 1)))
  1625. ((= k pulse-stop))
  1626. (outa k (* (env pulsef) (oscil-bank obank)))))
  1627. (set! pulses (+ pulses 1))
  1628. ;; count pulses in current group -- at least 2, at most 4, if 2 or 3, possibly and if 4 definitely insert a space
  1629. (if (or (= pulses 4)
  1630. (and (= pulses 2)
  1631. (> (random 1.0) 0.6))
  1632. (and (= pulses 3)
  1633. (> (random 1.0) 0.3)))
  1634. (begin
  1635. (set! pulse-sep (+ pulse-samps (seconds->samples (+ .015 (random .005)))))
  1636. (set! pulses 0))
  1637. (set! pulse-sep pulse-samps))
  1638. (mus-reset pulsef)
  1639. (mus-reset obank)))))
  1640. ;; (with-sound (:play #t :statistics #t) (handsome-trig 0 2 .5))
  1641. ;;; --------------------------------------------------------------------------------
  1642. ;;;
  1643. ;;; Fast calling tree cricket
  1644. ;;;
  1645. ;;; (use fm for noise to get the burble right, and pm for spectrum)
  1646. (defanimal (fast-calling-tree-cricket beg dur amp)
  1647. (let ((pulse-dur .0167))
  1648. (let ((start (seconds->samples beg))
  1649. (stop (seconds->samples (+ beg dur)))
  1650. (pulsef (make-env '(0.0 0.0 0.05 0.07 0.08 0.4 0.2 0.7 0.37 0.93 0.52 1.0 0.6 0.4 0.67 0.2 0.84 0.16 0.88 0.06 0.96 0.03 1.0 0.0)
  1651. :scaler amp :duration pulse-dur))
  1652. (pulse-samps (seconds->samples (/ 1.0 55)))
  1653. (pulse-out (seconds->samples pulse-dur))
  1654. (gen1 (make-oscil 4100))
  1655. (md (make-oscil 4100))
  1656. (md1 (make-oscil 205))
  1657. (rnd (make-rand-interp 180 .01)))
  1658. ;; 1.0 .04 .007
  1659. (do ((i start (+ i pulse-samps)))
  1660. ((>= i stop))
  1661. (let ((reset-stop (min stop (+ i pulse-out))))
  1662. (do ((k i (+ k 1)))
  1663. ((= k reset-stop))
  1664. (outa k (* (env pulsef)
  1665. (oscil gen1
  1666. (rand-interp rnd)
  1667. (+ (* .1 (oscil md))
  1668. (* .2 (oscil md1)))))))
  1669. (mus-reset pulsef))))))
  1670. ;; (with-sound (:play #t) (fast-calling-tree-cricket 0 2 .25))
  1671. ;;; --------------------------------------------------------------------------------
  1672. ;;;
  1673. ;;; Dog-day cicada
  1674. (defanimal (dog-day-cicada beg dur amp) ; dur ca 10 ..15 secs
  1675. (let ((start (seconds->samples beg))
  1676. (stop (seconds->samples (+ beg dur)))
  1677. (ampf (make-env '(0.0 0.0 0.1 0.03 0.2 0.2 0.3 0.6 0.34 0.8 0.44 1.0
  1678. 0.5 0.83 0.55 0.92 0.6 0.86 0.66 1.0 0.7 0.7 0.88 0.25
  1679. 0.91 0.24 0.93 0.02 1.0 0.0)
  1680. :duration dur :scaler (* 0.5 amp)))
  1681. (gen1 (make-oscil 7500))
  1682. (gen2 (make-polywave 200 '(1 .15)))
  1683. (rnd (make-rand-interp 200))
  1684. (rndf (make-env '(0 .3 .7 .3 .8 1 1 0) :duration dur :scaler (hz->radians 120)))
  1685. (frqf (make-env '(0 -.5 .2 0 .85 0 1 -1) :scaler (hz->radians 400) :duration dur))
  1686. (rx (make-rxyk!cos 4000 3/20 8.0)))
  1687. (do ((i start (+ i 1)))
  1688. ((= i stop))
  1689. (outa i (* (env ampf)
  1690. (+ (oscil gen1 (+ (env frqf)
  1691. (* (env rndf) (rand-interp rnd))
  1692. (polywave gen2)))
  1693. (rxyk!cos rx)))))))
  1694. ;; (with-sound (:play #t) (dog-day-cicada 0 2 .5))
  1695. ;;; --------------------------------------------------------------------------------
  1696. ;;;
  1697. ;;; Linnaeus' Cicada
  1698. (defanimal (linnaeus-cicada beg dur amp)
  1699. (let ((start (seconds->samples beg))
  1700. (stop (seconds->samples (+ beg dur)))
  1701. (ampf (make-env '(0 0 1 .8 10 1 11 0) :duration dur :scaler amp))
  1702. (frqf (make-env '(0 0 3 .02 6 0 8 .03 9.8 0 10.6 -1 11 -1) :scaler (hz->radians 450) :duration dur :base 32))
  1703. (gp1 (make-polywave 1280 '(1 .8 2 .02 3 .02)))
  1704. (gp2 (make-polywave 1100 '(1 .15)))
  1705. (gp3 (make-polywave 1460 '(1 .07)))
  1706. (rnd (make-rand-interp 1280 .014))
  1707. (saw (make-sawtooth-wave 180 .5)))
  1708. (do ((i start (+ i 1)))
  1709. ((= i stop))
  1710. (let ((sw (sawtooth-wave saw))
  1711. (md (+ (env frqf) (rand-interp rnd))))
  1712. (outa i (* (env ampf)
  1713. (+ .75 (* sw sw))
  1714. (+ (polywave gp1 md)
  1715. (polywave gp2 (* 0.8593 md)) ;(/ 1100 1280)
  1716. (polywave gp3 (* 1.1406 md))))))))) ;(/ 1460 1280)
  1717. ;; (with-sound (:statistics #t) (linnaeus-cicada 0 2 .5))
  1718. ;;; --------------------------------------------------------------------------------
  1719. ;;;
  1720. ;;; Lyric cicada
  1721. (defanimal (lyric-cicada beg dur amp)
  1722. (let ((p0 400))
  1723. (let ((start (seconds->samples beg))
  1724. (stop (seconds->samples (+ beg dur)))
  1725. (pulsef (make-pulsed-env '(0.0 0.0 0.038 0.16 0.044 0.6 0.07 0.6 0.08 0.26
  1726. 0.1 0.09 0.12 0.43 0.14 0.19 0.18 0.07 0.22 0.048
  1727. 0.23 0.65 0.25 0.65 0.26 0.23 0.28 0.044
  1728. 0.3 0.55 0.31 0.31 0.35 0.05 0.38 0.01 0.39 1.0
  1729. 0.41 0.36 0.42 0.16 0.44 0.02 0.46 0.7 0.48 0.23
  1730. 0.5 0.1 0.55 0.01 0.56 0.97
  1731. 0.6 0.12 0.612 0.02 0.63 0.61 0.65 0.18 0.69 0.07
  1732. 0.7 0.61 0.72 0.16 0.76 0.05 0.78 0.37 0.790 0.13
  1733. 0.82 0.02 0.83 0.4 0.85 0.12
  1734. 0.9 0.01 0.92 0.29 0.95 0.2 0.96 0.08
  1735. 1.0 0)
  1736. .02 50.0))
  1737. (gen1 (make-oscil (* p0 16)))
  1738. (gen2 (make-polywave p0 '(1 .15)))
  1739. (rnd (make-rand-interp p0 (hz->radians 800)))
  1740. (ampf (make-env '(0 0 1 1 10 1 11 0) :duration dur :scaler amp)))
  1741. (do ((i start (+ i 1)))
  1742. ((= i stop))
  1743. (outa i (* (env ampf)
  1744. (pulsed-env pulsef)
  1745. (oscil gen1 (+ (polywave gen2)
  1746. (rand-interp rnd)))))))))
  1747. ;; (with-sound (:play #t) (lyric-cicada 0 2 .5))
  1748. ;;; --------------------------------------------------------------------------------
  1749. ;;;
  1750. ;;; Confused ground cricket
  1751. (defanimal (confused-ground-cricket beg dur amp)
  1752. (let ((start (seconds->samples beg))
  1753. (stop (seconds->samples (+ beg dur)))
  1754. (gen1 (make-oscil 5700))
  1755. (gen2 (make-polywave 5700 '(1 .01)))
  1756. (rnd (make-rand-interp 600 (hz->radians 166)))
  1757. (songf (make-env '(0.0 0.0 0.02 0.5 0.18 0.5 0.24 0.28 0.28 0.27 0.45 0.8 0.65 1.0 0.93 0.94 1.0 0.0) :duration .4))
  1758. (pulsef #f)
  1759. (pulse-samps (seconds->samples .01))
  1760. (song-samps (seconds->samples .4)))
  1761. (do ((i start (+ i (seconds->samples (+ .5 (random .2))))))
  1762. ((>= i stop))
  1763. (let ((song-stop (min stop (+ i song-samps))))
  1764. (do ((k i (+ k (seconds->samples (+ .01 (random .006))))))
  1765. ((>= k song-stop))
  1766. (set! (mus-location songf) (- k i))
  1767. (let ((pstop (+ k pulse-samps))
  1768. (pulse-amp (env songf)))
  1769. (set! pulsef (make-env '(0.0 0.0 0.16 0.0 0.23 0.57 0.36 0.57 0.42 0.83 0.56 1.0 0.64 0.81 0.75 0.2 0.86 0.02 1.0 0.0)
  1770. :scaler (* pulse-amp amp) :duration .01))
  1771. (do ((j k (+ j 1)))
  1772. ((= j pstop))
  1773. (outa j (* (env pulsef)
  1774. (oscil gen1 (+ (polywave gen2)
  1775. (rand-interp rnd))))))))
  1776. (mus-reset songf)))))
  1777. ;; (with-sound (:play #t) (confused-ground-cricket 0 3 .3))
  1778. ;;; ------------------------------------------------------------------------------------------
  1779. ;;;
  1780. ;;; Tinkling ground cricket
  1781. ;;;
  1782. ;;; There's a secondary (slower) peep -- is this part of our cricket's song, or another cricket in the background?
  1783. (defanimal (tinkling-ground-cricket beg dur amp)
  1784. (let ((start (seconds->samples beg))
  1785. (stop (seconds->samples (+ beg dur)))
  1786. (gen1 (make-oscil 7200))
  1787. (gp (make-polywave 80 '(1 .01)))
  1788. (pulser (make-env '(0.0 0.0 0.07 0.5 0.28 0.86 0.42 0.97 0.55 1.0 0.63 0.88 0.71 0.6 0.85 0.14 0.9 0.1 0.94 0.02 1.0 0.0)
  1789. :scaler amp :duration .03))
  1790. (pulse-samps (seconds->samples .15))
  1791. (pulse-out (seconds->samples .03)))
  1792. (do ((i start (+ i pulse-samps)))
  1793. ((>= i stop))
  1794. (let ((reset-stop (min stop (+ i pulse-out))))
  1795. (do ((k i (+ k 1)))
  1796. ((= k reset-stop))
  1797. (outa k (* (env pulser)
  1798. (oscil gen1 (polywave gp)))))
  1799. (mus-reset pulser)))))
  1800. ;; (with-sound (:play #t) (tinkling-ground-cricket 0 3 .3))
  1801. ;;; --------------------------------------------------------------------------------
  1802. ;;;
  1803. ;;; Marsh meadow grasshopper
  1804. ;;;
  1805. ;;; this is just a random number generator with an elaborate amplitude envelope
  1806. (defanimal (marsh-meadow-grasshopper beg amp)
  1807. (let ((dur 4.8))
  1808. (let ((start (seconds->samples beg))
  1809. (stop (seconds->samples (+ beg dur)))
  1810. (ampf (make-env '(0 0 .2 .6 .65 1.0 .87 .87 1.0 0) :duration dur :scaler amp))
  1811. (pulsef (make-env '(0.000 0.000 0.070 0.086 0.176 0.083 0.311 0.170 0.432 0.173
  1812. 0.470 0.321 0.487 0.021 0.503 0.021 0.504 0.304 0.540 0.298
  1813. 0.553 0.435 0.600 0.193 0.614 0.458 0.652 0.315 0.665 0.024
  1814. 0.689 0.018 0.699 0.638 0.725 0.582 0.727 0.027 0.790 0.009
  1815. 0.799 0.819 0.824 0.635 0.833 0.036 0.926 0.015 0.941 0.866
  1816. 0.949 0.053 0.968 0.570 1.000 0.000)
  1817. :duration .19))
  1818. (pulse-samps (seconds->samples (+ .19 .02)))
  1819. (pulse-out (seconds->samples .19))
  1820. (r (make-rand 20000.0 1.0))
  1821. (oz (make-one-zero -1.0 1.0)))
  1822. (do ((i start (+ i pulse-samps)))
  1823. ((>= i stop))
  1824. (set! (mus-location ampf) (- i start))
  1825. (let ((reset-stop (min stop (+ i pulse-out)))
  1826. (pulse-amp (env ampf)))
  1827. (set! (mus-scaler r) pulse-amp)
  1828. (do ((k i (+ k 1)))
  1829. ((= k reset-stop))
  1830. (outa k (one-zero oz (* (env pulsef) (rand r)))))
  1831. (mus-reset pulsef))))))
  1832. ;; (with-sound (:play #t :statistics #t) (marsh-meadow-grasshopper 0 .3))
  1833. ;;; --------------------------------------------------------------------------------
  1834. ;;;
  1835. ;;; Carolina grasshopper
  1836. ;;;
  1837. ;;; tricky! spikes are at 48 Hz, but the sound they make requires 24 Hz pulse -- I presume
  1838. ;;; I'm seeing the 2 or 4 wings alternating?
  1839. (defanimal (carolina-grasshopper beg dur amp)
  1840. (let ((start (seconds->samples beg))
  1841. (stop (seconds->samples (+ beg dur)))
  1842. (ampf (make-env ;'(0.000 0.000 0.032 0.115 0.151 0.044 0.181 0.485 0.254 0.841 0.620 0.431 0.731 0.051 0.757 0.292 0.898 0.620 0.984 0.380 1.000 0.000)
  1843. '(0.000 0.000 0.031 0.122 0.076 0.054 0.148 0.010 0.177 0.512 0.199 0.366 0.246 0.868 0.291 0.336 0.320 0.644 0.386 0.244 0.450 0.553
  1844. 0.535 0.142 0.583 0.424 0.611 0.427 0.727 0.081 0.778 0.315 0.835 0.319 0.899 0.600 0.972 0.356 1.000 0.000)
  1845. :duration dur :scaler (* 3 amp)))
  1846. (spikes1 (make-nsin 24 250))
  1847. (spikes1a (make-nsin 24 250))
  1848. (spikes2 (make-nsin 48 140))
  1849. (spikes3 (make-nsin 48 120))
  1850. (rnd (make-rand-interp 100 .0001)) ; perhaps this is too much -- it clobbers the comb filter
  1851. (frqf (make-env '(0 0 1 -.4 2 0 3 -.2 4 .3 6 -1.0) :scaler (hz->radians .4) :duration dur))
  1852. (oz (make-one-zero 1.0 -1.0)))
  1853. (set! (mus-phase spikes1a) pi)
  1854. (set! (mus-phase spikes2) .7)
  1855. (set! (mus-phase spikes3) 1.4)
  1856. (do ((i start (+ i 1)))
  1857. ((= i stop))
  1858. (let* ((noi (rand-interp rnd))
  1859. (frq (+ noi (env frqf))))
  1860. (outa i (one-zero oz (* (env ampf)
  1861. (+ (* .6 (nsin spikes1 noi))
  1862. (* .6 (nsin spikes1a noi))
  1863. (* .4 (nsin spikes2 frq))
  1864. (* .3 (nsin spikes3 frq))))))))))
  1865. ;; (with-sound (:play #t) (carolina-grasshopper 0 1.5 1.0))
  1866. ;;; --------------------------------------------------------------------------------
  1867. ;;;
  1868. ;;; Striped ground cricket
  1869. (defanimal (striped-ground-cricket beg dur amp)
  1870. (let ((start (seconds->samples beg))
  1871. (stop (seconds->samples (+ beg dur)))
  1872. (gen1 (make-oscil 13200)) ;(* 2 6600)))
  1873. (gen2 (make-oscil 132 (* 0.5 (+ pi (hz->radians 132)))))
  1874. (gen3 (make-oscil 6600))
  1875. (gen4 (make-oscil 66 (* 0.5 (+ pi (hz->radians 66)))))
  1876. (pulsef (make-env '(0.000 0.000 0.041 0.466 0.144 0.775 0.359 1.0 0.484 0.858 1.000 0.000) :scaler amp :duration .012))
  1877. (pulsef1 (make-env '(0.000 0.000 0.041 0.466 0.144 0.775 0.359 1.0 0.484 0.858 1.000 0.000) :scaler (* 0.5 amp) :duration .012))
  1878. (pulse-samps (seconds->samples 0.012))
  1879. (pulse-sep (seconds->samples 0.015))
  1880. (long-pulse-samps (seconds->samples .54))
  1881. (rnd (make-rand-interp 198 .04))) ; (* 3 66)
  1882. (do ((i start (+ i long-pulse-samps)))
  1883. ((>= i stop))
  1884. ;; do the first 0.5 amp pulse
  1885. (let ((pstop (+ i pulse-samps))
  1886. (next-start i)
  1887. (pulses (+ 8 (random 3))))
  1888. (do ((j i (+ j 1)))
  1889. ((= j pstop))
  1890. (outa j (* (env pulsef1)
  1891. (+ (* .2 (oscil gen1 (* .075 (oscil gen2))))
  1892. (* .8 (oscil gen3 (+ (* .0125 (oscil gen4))
  1893. (rand-interp rnd))))))))
  1894. (mus-reset pulsef1)
  1895. ;; now the remaining pulses
  1896. (do ((k 1 (+ k 1)))
  1897. ((= k pulses))
  1898. (set! next-start (+ next-start pulse-sep))
  1899. (set! pstop (+ next-start pulse-samps))
  1900. (do ((j next-start (+ j 1)))
  1901. ((= j pstop))
  1902. (outa j (* (env pulsef)
  1903. (+ (* .2 (oscil gen1 (* .075 (oscil gen2))))
  1904. (* .8 (oscil gen3 (+ (* .0125 (oscil gen4))
  1905. (rand-interp rnd))))))))
  1906. (mus-reset pulsef))))))
  1907. ;; (with-sound (:play #t) (striped-ground-cricket 0 3 .5))
  1908. ;;; --------------------------------------------------------------------------------
  1909. ;;;
  1910. ;;; Sphagnum ground cricket
  1911. (defanimal (sphagnum-ground-cricket beg dur amp)
  1912. (let ((start (seconds->samples beg))
  1913. (stop (seconds->samples (+ beg dur)))
  1914. (gen1 (make-oscil 8850))
  1915. (gen2 (make-oscil 17700)) ;(* 8850 2)))
  1916. (rnd1 (make-rand-interp 885 .03))
  1917. (rnd2 (make-rand-interp 885 .1))
  1918. (ampf (make-env '(0 0 1 1 10 1 11 0) :duration dur :scaler amp))
  1919. (pulsef (make-env '(0.000 0.000 0.041 0.5 0.250 0.7 0.4 1.0 0.5 0.9 0.8 0.3 1.000 0.000) :duration .013))
  1920. (pulse-samps (seconds->samples .019))
  1921. (pulse-out (seconds->samples .013)))
  1922. (do ((i start (+ i pulse-samps)))
  1923. ((>= i stop))
  1924. (set! (mus-location ampf) (- i start))
  1925. (let ((reset-stop (min stop (+ i pulse-out)))
  1926. (pulse-amp (env ampf)))
  1927. (do ((k i (+ k 1)))
  1928. ((= k reset-stop))
  1929. (outa k (* pulse-amp
  1930. (env pulsef)
  1931. (+ (* .9 (oscil gen1 (rand-interp rnd1)))
  1932. (* .1 (oscil gen2 (rand-interp rnd2)))))))
  1933. (mus-reset pulsef)))))
  1934. ;; (with-sound (:play #t) (sphagnum-ground-cricket 0 2 .3))
  1935. ;;; --------------------------------------------------------------------------------
  1936. ;;;
  1937. ;;; Southeastern field cricket
  1938. (defanimal (southeastern-field-cricket beg dur amp)
  1939. (let ((pulse-dur 0.027)) ; occasionally a hicccup = .039, 30..100 pulses per song
  1940. (let ((start (seconds->samples beg))
  1941. (stop (seconds->samples (+ beg dur)))
  1942. (gen1 (make-polywave 4730 '(1 .8 2 .1 3 .1)))
  1943. (rnd (make-rand-interp 946 1)) ; (* 2 473)
  1944. (oz (make-one-zero 1.0 -1.0))
  1945. (ampf (make-env '(0 0 1 1 10 1 11 0) :duration dur :scaler amp))
  1946. (pulsef (make-env '(0.0 0.0 0.05 0.38 0.14 0.77 0.26 0.95 0.47 1.0 0.57 0.9 0.81 0.5 0.85 0.3 1.0 0.0) :duration .014))
  1947. (pulses (+ 30 (random 70)))
  1948. (pulse-samps (seconds->samples pulse-dur))
  1949. (current-pulse-samps (seconds->samples pulse-dur)))
  1950. (do ((i start (+ i current-pulse-samps)))
  1951. ((>= i stop))
  1952. (set! (mus-location ampf) (- i start))
  1953. (let ((reset-stop (min stop (+ i pulse-samps)))
  1954. (pulse-amp (env ampf)))
  1955. (do ((k i (+ k 1)))
  1956. ((= k reset-stop))
  1957. (outa k (* pulse-amp
  1958. (env pulsef)
  1959. (polywave gen1 (one-zero oz (rand-interp rnd)))))))
  1960. (mus-reset pulsef)
  1961. (set! pulses (- pulses 1))
  1962. (if (<= pulses 0)
  1963. (begin
  1964. (set! current-pulse-samps (+ pulse-samps (seconds->samples (+ .2 (random .1)))))
  1965. (set! pulses (+ 30 (random 70))))
  1966. (begin
  1967. (set! pulse-samps (seconds->samples (if (> (random 1.0) .95)
  1968. (+ pulse-dur .005 (random .01))
  1969. pulse-dur)))
  1970. (set! current-pulse-samps pulse-samps)))))))
  1971. ;; (with-sound (:play #t) (southeastern-field-cricket 0 5 .3))
  1972. ;;; --------------------------------------------------------------------------------
  1973. ;;;
  1974. ;;; Snowy tree cricket
  1975. (defanimal (snowy-tree-cricket beg dur amp)
  1976. (let ((pitch 1690))
  1977. (let ((start (seconds->samples beg))
  1978. (stop (seconds->samples (+ beg dur)))
  1979. (gp (make-polywave pitch '(1 .9 2 .05 3 .05)))
  1980. (rnd (make-rand-interp 1000 .014))
  1981. (pulsef (make-env '(0.0 0.0 0.04 0.79 0.08 0.09 0.11 0.02 0.14 0.83 0.15 0.95
  1982. 0.21 0.05 0.26 0.02 0.29 0.79 0.31 0.89 0.35 0.07 0.38 0.04
  1983. 0.39 0.79 0.42 0.94 0.45 0.08 0.48 0.05 0.50 0.80 0.52 0.96
  1984. 0.59 0.02 0.64 0.01 0.66 0.78 0.68 0.95 0.72 0.06 0.75 0.04
  1985. 0.76 0.70 0.79 0.96 0.83 0.07 0.85 0.02 0.88 0.80 0.90 1.0
  1986. 0.95 0.12 0.97 0.04 1.00 0.00)
  1987. :scaler amp :duration .352 :base .1))
  1988. (frqf (make-env '(0.0 0.0 0.04 1.0 0.08 0.0 0.11 0.0 0.14 1.0 0.15 0.0
  1989. 0.21 0.0 0.26 0.0 0.29 1.0 0.31 0.0 0.35 0.0 0.38 0.0
  1990. 0.39 1.0 0.42 0.0 0.45 0.0 0.48 0.0 0.50 1.0 0.52 0.0
  1991. 0.59 0.0 0.64 0.0 0.66 1.0 0.68 0.0 0.72 0.0 0.75 0.0
  1992. 0.76 1.0 0.79 0.0 0.83 0.0 0.85 0.0 0.88 1.0 0.90 0.0
  1993. 0.95 0.0 0.97 0.0 1.00 0.0)
  1994. :duration .352 :scaler (hz->radians 60)))
  1995. (reset-samps (seconds->samples .85))
  1996. (on-samps (seconds->samples .36))) ; else ampf is 0.0
  1997. (do ((i start (+ i reset-samps)))
  1998. ((>= i stop))
  1999. (let ((reset-stop (min stop (+ i on-samps))))
  2000. (do ((k i (+ k 1)))
  2001. ((= k reset-stop))
  2002. (outa k (* (env pulsef)
  2003. (polywave gp (+ (env frqf) (rand-interp rnd))))))
  2004. (mus-reset pulsef)
  2005. (mus-reset frqf))))))
  2006. ;; (with-sound (:play #t) (snowy-tree-cricket 0 2 .3))
  2007. ;;; --------------------------------------------------------------------------------
  2008. ;;;
  2009. ;;; Slightly musical conehead
  2010. ;;;
  2011. ;;; this could use some work
  2012. (defanimal (slightly-musical-conehead beg dur amp)
  2013. (let ((start (seconds->samples beg))
  2014. (stop (seconds->samples (+ beg dur)))
  2015. (gen1 (make-oscil 11000))
  2016. (gp (make-polywave 1100 '(1 .1 5 .05)))
  2017. (rnd1 (make-rand-interp 1100 .05))
  2018. (rnd2 (make-rand-interp 1100 .4))
  2019. (pulse-samps (seconds->samples .36))
  2020. (pulse-out (seconds->samples .146))
  2021. (pulsef (make-env '(0.00 0.00 0.02 0.29 0.04 0.55 0.07 0.37 0.08 0.06 0.11 0.48 0.14 0.13
  2022. 0.15 0.69 0.18 0.31 0.20 0.07 0.22 0.77 0.23 0.52 0.25 0.77 0.26 0.21
  2023. 0.28 0.70 0.30 0.12 0.34 0.80 0.38 0.17 0.39 0.79 0.42 0.08 0.44 0.54
  2024. 0.48 0.53 0.50 0.85 0.53 0.11 0.55 0.51 0.58 0.79 0.60 0.22 0.62 0.84
  2025. 0.65 0.09 0.67 0.56 0.70 0.91 0.74 0.81 0.77 0.10 0.79 0.70 0.83 0.51
  2026. 0.85 0.90 0.88 0.03 0.90 0.55 0.93 0.60 0.95 0.11 0.97 0.97 1.0 0.00)
  2027. :scaler amp :duration .146)))
  2028. (do ((i start (+ i pulse-samps)))
  2029. ((>= i stop))
  2030. (let ((reset-stop (min stop (+ i pulse-out))))
  2031. (do ((k i (+ k 1)))
  2032. ((= k reset-stop))
  2033. (outa k (* (env pulsef)
  2034. (+ .6 (rand-interp rnd2))
  2035. (oscil gen1 (polywave gp (rand-interp rnd1))))))
  2036. (mus-reset pulsef)))))
  2037. ;; (with-sound (:play #t) (slightly-musical-conehead 0 2 .4))
  2038. ;;; --------------------------------------------------------------------------------
  2039. ;;;
  2040. ;;; Pine tree cricket
  2041. (defanimal (pine-tree-cricket beg dur amp)
  2042. (let ((pulse-dur .014))
  2043. (let ((start (seconds->samples beg))
  2044. (stop (seconds->samples (+ beg dur)))
  2045. (pulsef (make-env '(0.000 0.000 0.027 0.196 0.104 0.448 0.236 0.773 0.341 0.910 0.416 0.975 0.532 1.0
  2046. 0.671 0.868 0.751 0.711 0.833 0.504 0.926 0.160 1.000 0.000)
  2047. :scaler amp :duration pulse-dur))
  2048. (gp (make-polywave 3580 '(1 .97 3 .03)))
  2049. (frqf (make-env '(0 1 1 0) :scaler (hz->radians 100) :duration pulse-dur))
  2050. (pulse-samps (seconds->samples .022))
  2051. (pulse-out (seconds->samples pulse-dur))
  2052. (rnd (make-rand-interp 100 .004)))
  2053. (do ((i start (+ i pulse-samps)))
  2054. ((>= i stop))
  2055. (let ((reset-stop (min stop (+ i pulse-out))))
  2056. (do ((k i (+ k 1)))
  2057. ((= k reset-stop))
  2058. (outa k (* (env pulsef)
  2059. (polywave gp (+ (env frqf) (rand-interp rnd))))))
  2060. (mus-reset frqf)
  2061. (mus-reset pulsef))))))
  2062. ;; (with-sound (:play #t) (pine-tree-cricket 0 2 .25))
  2063. ;;;--------------------------------------------------------------------------------
  2064. ;;;
  2065. ;;; Davis's tree cricket
  2066. (defanimal (davis-tree-cricket beg dur amp)
  2067. (let ((pulse-dur .013)
  2068. (pitch 2420))
  2069. (let ((start (seconds->samples beg))
  2070. (stop (seconds->samples (+ beg dur)))
  2071. (pulse-samps (seconds->samples 0.014))
  2072. (pulse-out (seconds->samples pulse-dur))
  2073. (pulsef (make-env '(0.000 0.000 0.079 0.395 0.245 0.925 0.410 1.000 0.470 0.874
  2074. 0.554 0.549 0.614 0.312 0.728 0.170 1.000 0.000)
  2075. :scaler amp :duration pulse-dur))
  2076. (gp (make-polywave pitch '(1 .93 2 .07)))
  2077. (rnd (make-rand-interp 150 .004)))
  2078. (do ((i start (+ i pulse-samps)))
  2079. ((>= i stop))
  2080. (let ((reset-stop (min stop (+ i pulse-out))))
  2081. (do ((k i (+ k 1)))
  2082. ((= k reset-stop))
  2083. (outa k (* (env pulsef)
  2084. (polywave gp (rand-interp rnd)))))
  2085. (mus-reset pulsef))))))
  2086. ;; (with-sound (:play #t) (davis-tree-cricket 0 2 .25))
  2087. ;;; --------------------------------------------------------------------------------
  2088. ;;;
  2089. ;;; Black-horned tree cricket
  2090. (defanimal (black-horned-tree-cricket beg dur amp)
  2091. (let ((pulse-dur 0.0173)
  2092. (pulse-space 0.0219)
  2093. (start (seconds->samples beg)))
  2094. (let ((stop (seconds->samples (+ beg dur)))
  2095. (pulse-samps (seconds->samples pulse-space))
  2096. (pulse-out (seconds->samples pulse-dur))
  2097. (ampf (make-env '(0 0 .05 1 .95 1 1 0) :duration dur :scaler amp))
  2098. (gen1 #f)
  2099. (rnd (make-rand-interp 1000 (hz->radians 50)))
  2100. (pulse-ampf (make-env '(0.000 0.000 0.076 0.443 0.277 0.866 0.454 0.925 0.603 0.771 0.690 0.573 0.726 0.304 1.000 0.000)
  2101. :duration pulse-dur)))
  2102. (do ((i start (+ i pulse-samps)))
  2103. ((>= i stop))
  2104. (set! (mus-location ampf) (- i start))
  2105. (let ((reset-stop (min stop (+ i pulse-out)))
  2106. (pulse-amp (env ampf)))
  2107. (set! gen1 (make-polywave 3680.0 (list 1 (* pulse-amp .94)
  2108. 2 (* pulse-amp .04)
  2109. 3 (* pulse-amp .01)
  2110. 4 (* pulse-amp .005)
  2111. 5 (* pulse-amp .003))))
  2112. (do ((k i (+ k 1)))
  2113. ((= k reset-stop))
  2114. (outa k (* (env pulse-ampf)
  2115. (polywave gen1 (rand-interp rnd)))))
  2116. (mus-reset pulse-ampf))))))
  2117. ;; (with-sound (:play #t) (black-horned-tree-cricket 0 2 .25))
  2118. ;;; --------------------------------------------------------------------------------
  2119. ;;;
  2120. ;;; Narrow-winged tree cricket
  2121. (defanimal (narrow-winged-tree-cricket beg dur amp)
  2122. ;; insects 18 4
  2123. (let ((start (seconds->samples beg))
  2124. (stop (seconds->samples (+ beg dur)))
  2125. (ampf (make-env '(0 0 .1 1 20 1 20.1 0) :duration dur :scaler amp))
  2126. (pulser (make-wave-train-with-env 43.0
  2127. '(0.000 0.000 0.144 0.332 0.269 0.715 0.361 0.838 0.459 0.866 0.609 0.727
  2128. 0.652 0.530 0.780 0.194 1.000 0.000)
  2129. (seconds->samples .0185)))
  2130. (gen1 (make-polywave 1900 '(1 .8 2 .07 3 .13)))
  2131. (rnd (make-rand-interp 150 (hz->radians 20))))
  2132. (do ((i start (+ i 1)))
  2133. ((= i stop))
  2134. (outa i (* (env ampf)
  2135. (wave-train pulser)
  2136. (polywave gen1 (rand-interp rnd)))))))
  2137. ;; (with-sound (:play #t) (narrow-winged-tree-cricket 0 2 .25))
  2138. ;;; --------------------------------------------------------------------------------
  2139. ;;;
  2140. ;;; Four-spotted tree cricket
  2141. (defanimal (four-spotted-tree-cricket beg dur amp)
  2142. ;; insects 16 4
  2143. (let ((index (hz->radians 400)))
  2144. (let ((start (seconds->samples beg))
  2145. (stop (seconds->samples (+ beg dur)))
  2146. (ampf (make-env '(0 0 .3 1 20 1 20.3 0) :duration dur :scaler amp))
  2147. (amp-pulser (make-table-lookup-with-env 40.0
  2148. '(0.000 0.000 0.071 0.518 0.174 0.783 0.315 0.885 0.492 0.727 0.579 0.466
  2149. 0.625 0.186 0.671 0.028 0.755 0.083 0.848 0.024 0.935 0.126 1.000 0.000 1.5 0)
  2150. (seconds->samples .025)))
  2151. (frq-pulser (make-table-lookup-with-env 40.0 (list 0 index 1 0 2 0) (seconds->samples .025)))
  2152. (gen1 (make-polywave 3220 '(1 .92 2 .07 3 .01)))
  2153. (gen2 (make-oscil 5000))
  2154. (gen3 (make-oscil 2200))
  2155. (rnd1 (make-rand-interp 8000 (hz->radians 2000)))
  2156. (rnd (make-rand-interp 200 (hz->radians 30))))
  2157. (do ((i start (+ i 1)))
  2158. ((= i stop))
  2159. (let ((noise (rand-interp rnd1)))
  2160. (outa i (* (env ampf)
  2161. (+ (* (table-lookup amp-pulser)
  2162. (polywave gen1 (+ (rand-interp rnd)
  2163. (table-lookup frq-pulser))))
  2164. (* .05
  2165. (+ (oscil gen2 noise)
  2166. (* .2 (oscil gen3 (* .2 noise)))))))))))))
  2167. ;; (with-sound (:play #t) (four-spotted-tree-cricket 0 1 .5))
  2168. ;;; ================ Birds ================
  2169. ;;;
  2170. ;;;
  2171. ;;; Fox sparrow
  2172. (defanimal (fox-sparrow beg dur amp)
  2173. (let ((begs (vector 0.0 0.3 0.6 0.93 1.23 1.49 1.74 1.98 2.12 2.29 3.0))
  2174. (ends (vector 0.12 0.46 0.85 1.17 1.44 1.7 1.95 2.08 2.26 2.45))
  2175. (low-frqs (vector 4260 4010 3910 4970 3360 3160 2810 2310 2700 2700))
  2176. (high-frqs (vector 5120 4170 5420 5520 4220 3410 5470 2460 3710 3710))
  2177. (start (seconds->samples beg)))
  2178. (let ((stop (seconds->samples (+ beg dur)))
  2179. (amp-envs (make-vector 10 #f))
  2180. (frq-envs (make-vector 10 #f))
  2181. (gen1 (make-oscil))
  2182. (gen2 (make-oscil))
  2183. (durs (let ((v (make-vector 10 0.0)))
  2184. (do ((i 0 (+ i 1)))
  2185. ((= i 10))
  2186. (set! (v i) (- (ends i) (begs i))))
  2187. v))
  2188. (rnd (make-rand-interp 100 .01)))
  2189. (let ((scls (vector .09 .19 .22 .19 .27 .23 .21 .04 .17 .17))
  2190. (amps (vector '(0.000 0.000 0.17 0.13 0.38 0.67 0.64 1.0 0.78 0.79 0.9 0.04 1.0 0.0)
  2191. '(0.000 0.000 0.15 0.15 0.27 0.67 0.37 0.89 0.69 1.0 0.79 0.6 0.8 0.05 1.0 0.0)
  2192. '(0.000 0.000 0.11 0.28 0.18 0.66 0.35 0.98 0.90 0.92 1.0 0.0)
  2193. '(0.000 0.000 0.11 0.28 0.14 0.70 0.32 0.98 0.85 0.84 1.0 0.0)
  2194. '(0.000 0.000 0.11 0.28 0.14 0.70 0.32 0.98 0.85 0.84 1.0 0.0)
  2195. '(0.000 0.000 0.15 0.86 0.24 1.00 0.63 0.64 0.89 0.61 1.0 0.0)
  2196. '(0.000 0.000 0.27 0.80 0.37 1.00 0.63 0.64 0.88 0.51 1.0 0.0)
  2197. '(0.000 0.000 0.08 0.48 0.37 1.00 0.88 0.76 1.00 0.0)
  2198. '(0.000 0.000 0.12 0.43 0.24 1.00 0.59 0.72 0.88 0.35 1.0 0.0)
  2199. '(0.000 0.000 0.12 0.43 0.24 1.00 0.59 0.72 0.88 0.35 1.0 0.0)))
  2200. (frqs (vector '(0 1 1 0)
  2201. '(0 0 1 .5 8 .6 9 1.0)
  2202. '(0 1 1 .5 2 .2 3 0)
  2203. '(0 1 1 0 5 0)
  2204. '(0 1 1 .3 2 0)
  2205. '(0 1 1 1)
  2206. '(0 1 2 .2 3 0)
  2207. '(0 0 1 .9 2 1)
  2208. '(0 1 1 .4 2 0)
  2209. '(0 1 1 .3 2 0))))
  2210. (do ((i 0 (+ i 1)))
  2211. ((= i 10))
  2212. (set! (amp-envs i) (make-env (amps i)
  2213. :scaler (/ (* amp (scls i)) .27)
  2214. :duration (durs i)))
  2215. (set! (frq-envs i) (make-env (frqs i)
  2216. :scaler (hz->radians (- (high-frqs i) (low-frqs i)))
  2217. :offset (hz->radians (low-frqs i))
  2218. :duration (durs i)))))
  2219. (call-with-exit
  2220. (lambda (done)
  2221. (let ((peep 0)
  2222. (peep-dur (seconds->samples (durs 0)))
  2223. (peep-start (+ start (seconds->samples (begs 0)))))
  2224. (do ((i peep-start peep-start))
  2225. ((>= i stop))
  2226. (let ((fe (frq-envs peep))
  2227. (ae (amp-envs peep))
  2228. (reset-stop (min stop (+ i peep-dur))))
  2229. (do ((k i (+ k 1)))
  2230. ((= k reset-stop))
  2231. (let ((frq (+ (env fe) (rand-interp rnd))))
  2232. (outa k (* (env ae)
  2233. (oscil gen1 frq
  2234. (* .03 (oscil gen2 (* 2.0 frq)))))))))
  2235. (set! peep (+ peep 1))
  2236. (if (>= peep 10) (done))
  2237. (set! peep-start (+ start (seconds->samples (begs peep))))
  2238. (set! peep-dur (seconds->samples (durs peep))))))))))
  2239. ;; (with-sound (:play #t) (fox-sparrow 0 3 .25))
  2240. ;;; --------------------------------------------------------------------------------
  2241. ;;;
  2242. ;;; White-throated sparrow
  2243. ;;;
  2244. ;;; probably music of birds 14, first song
  2245. (defanimal (white-throated-sparrow beg amp)
  2246. (let ((dur (+ 3.25 (random .2)))
  2247. (pitch 3800))
  2248. (let ((start (seconds->samples beg))
  2249. (stop (seconds->samples (+ beg dur)))
  2250. (ampf (make-env '(0.00 0.00 0.04 0.44 0.09 0.59 0.12 0.59 0.16 0.75 0.17 0.00
  2251. 0.22 0.00
  2252. 0.25 0.76 0.28 0.89 0.29 0.14 0.31 0.93 0.34 0.87 0.35 0.14 0.36 0.85
  2253. 0.37 0.84 0.38 0.00
  2254. 0.42 0.00 0.44 0.86 0.46 0.83 0.47 0.91 0.51 0.92
  2255. 0.52 0.87 0.53 0.00
  2256. 0.57 0.00 0.58 0.65 0.60 0.88 0.61 0.14 0.62 0.95
  2257. 0.63 0.94 0.64 0.20 0.66 0.99 0.67 0.88 0.68 0.00
  2258. 0.72 0.00 0.73 0.65
  2259. 0.75 0.82 0.76 0.13 0.77 0.78 0.78 0.88 0.79 0.83 0.797 0.12 0.803 0.12 0.81 0.79
  2260. 0.82 0.87 0.83 0.00
  2261. 0.87 0.00 0.89 0.58 0.91 0.75 0.917 0.13 0.923 0.13 0.93 0.73
  2262. 0.94 0.84 0.95 0.77 0.957 0.12 0.963 0.12 0.97 0.81 0.98 0.79 1.00 0.00)
  2263. :duration dur :scaler amp))
  2264. (frqf (make-env '(0 0 .17 0.0 .21 1
  2265. 0.22 1.5 0.23 1 0.41 1
  2266. 0.42 1.25 0.43 1 0.56 1
  2267. 0.57 1.25 0.58 1 0.71 1
  2268. 0.72 1.25 0.73 1 0.86 1
  2269. 0.87 1.25 0.88 1
  2270. 1 1)
  2271. :scaler (hz->radians 720) :duration dur))
  2272. (gen1 (make-polywave pitch :partials '(1 .9 2 .025 3 .075)))
  2273. (rnd (make-rand-interp 30 .005)))
  2274. (do ((i start (+ i 1)))
  2275. ((= i stop))
  2276. (outa i (* (env ampf)
  2277. (polywave gen1 (+ (env frqf)
  2278. (mus-random 0.001)
  2279. (rand-interp rnd)))))))))
  2280. ;; (with-sound (:play #t) (white-throated-sparrow 0 .25))
  2281. ;;; --------------------------------------------------------------------------------
  2282. ;;;
  2283. ;;; Henslow's sparrow
  2284. (defanimal (henslows-sparrow beg amp)
  2285. ;; "the poorest vocal effort of any bird" -- R T Peterson
  2286. (let ((dur 0.24))
  2287. (let ((start (seconds->samples beg))
  2288. (stop (seconds->samples (+ beg dur)))
  2289. (ampf (make-env '(0.00 0.00 0.05 0.42 0.08 0.03 0.10 0.30 0.12 0.02
  2290. 0.21 0.00 0.22 0.69 0.23 0.34 0.24 0.84 0.26 0.64
  2291. 0.28 0.04 0.29 0.11 0.30 0.47 0.32 0.00 0.46 0.00
  2292. 0.48 0.04 0.52 1.00 0.53 0.97 0.54 0.44 0.55 0.80
  2293. 0.57 0.02 0.58 0.07 0.59 0.72 0.60 0.45 0.61 0.79
  2294. 0.62 0.66 0.63 0.81 0.66 0.05 0.67 0.16 0.73 0.50
  2295. 0.75 0.52 0.78 0.04 0.81 0.03 0.82 0.08 0.85 0.47
  2296. 0.87 0.22 0.88 0.39 0.90 0.09 0.91 0.36 0.96 0.39
  2297. 0.98 0.07 1.00 0.00)
  2298. :duration dur :scaler amp))
  2299. (gen1 (make-oscil))
  2300. (frqf (make-env '(0.00 9310 0.05 9560 0.08 9480 0.10 9900 0.11 8140 0.12 9900
  2301. 0.21 9980 0.22 8630 0.23 8800 0.24 8400 0.26 8800
  2302. 0.28 8600 0.29 8800 0.30 8300 0.32 8100 0.46 8100
  2303. 0.48 5600 0.49 5200 0.52 6200 0.54 4800 0.55 6600
  2304. 0.57 5800 0.58 5800 0.59 6200 0.60 6200
  2305. 0.62 5800 0.66 3600 0.67 4400 0.73 3900 0.78 3100 0.85 4900
  2306. 0.88 3600 0.90 3900 0.91 4400 1.00 3900)
  2307. :duration dur :scaler (hz->radians 1.0))))
  2308. (do ((i start (+ i 1)))
  2309. ((= i stop))
  2310. (outa i (* (env ampf)
  2311. (oscil gen1 (env frqf))))))))
  2312. ;; (with-sound (:play #t) (henslows-sparrow 0 .25))
  2313. ;;; --------------------------------------------------------------------------------
  2314. ;;;
  2315. ;;; Eastern wood-pewee
  2316. (defanimal (eastern-wood-pewee-1 beg amp)
  2317. ;; probably east 39 3
  2318. (let ((dur 1.07))
  2319. (let ((start (seconds->samples beg))
  2320. (stop (seconds->samples (+ beg dur)))
  2321. (ampf (make-env '(0.000 0.000 0.037 0.894 0.045 0.711 0.061 0.845 0.072 0.760 0.076 0.912
  2322. 0.084 0.838 0.099 0.982 0.111 0.729 0.124 0.879 0.142 0.011 0.15 0.01 0.165 0.778
  2323. 0.172 0.601 0.180 0.706 0.212 0.441 0.258 0.227 0.298 0.325 0.312 0.564
  2324. 0.334 0.312 0.365 0.399 0.416 0.260 0.475 0.196 0.555 0.356 0.631 0.363
  2325. 0.712 0.294 0.746 0.464 0.753 0.369 0.776 0.508 0.799 0.425 0.825 0.479
  2326. 0.869 0.485 0.877 0.567 0.907 0.541 0.918 0.459 0.942 0.513 0.977 0.366
  2327. 1.000 0.000)
  2328. :duration dur :scaler amp))
  2329. (gen1 (make-polywave 0.0 '(1 .905 2 .025 3 .025)))
  2330. (frqf (make-env '(0 3370 .03 4300 .1 4600 .14 3400 0.15 4400 .16 3700 .18 4400 .24 4700 .3 4600 .34 3600 .4 3700 .6 3800 .8 4000 1.0 3900)
  2331. :duration dur :base .1 :scaler (hz->radians 1.0))))
  2332. (do ((i start (+ i 1)))
  2333. ((= i stop))
  2334. (outa i (* (env ampf) (polywave gen1 (env frqf))))))))
  2335. ;; (with-sound (:play #t) (eastern-wood-pewee-1 0 .25))
  2336. (defanimal (eastern-wood-pewee-2 beg amp)
  2337. ;; probably east 39 14
  2338. (let ((dur 1.07))
  2339. (let ((start (seconds->samples beg))
  2340. (stop (seconds->samples (+ beg dur)))
  2341. (ampf (make-env '(0.000 0.000 0.055 0.665 0.081 0.657 0.101 0.456 0.140 0.572
  2342. 0.165 0.477 0.219 0.564 0.288 0.526 0.306 0.668 0.328 0.613
  2343. 0.387 0.830 0.402 1.000 0.434 0.768 0.455 0.214 0.470 0.173
  2344. 0.484 0.387 0.499 0.631 0.512 0.229 0.559 0.142 0.582 0.165
  2345. 0.698 0.085 1.000 0.000)
  2346. :duration dur :scaler amp))
  2347. (gen1 (make-oscil))
  2348. (gen2 (make-oscil))
  2349. (gen3 (make-oscil))
  2350. (frqf (make-env '(0 3250 .1 4400 .2 4800 .3 4800 .47 4000 .49 6300 .51 3600 1.0 2800)
  2351. :duration dur :base .03 :scaler (hz->radians 1.0)))
  2352. (indf (make-env '(0 0 .35 0 .55 1 1 1) :duration dur :scaler 0.1))
  2353. (indf-1 (make-env '(0 0 .35 0 .55 1 1 1) :duration dur :offset 1.0 :scaler -1.0)))
  2354. (do ((i start (+ i 1)))
  2355. ((= i stop))
  2356. (let ((frq (env frqf)))
  2357. (outa i (* (env ampf)
  2358. (+ (* .9 (oscil gen1 frq))
  2359. (* (env indf) (oscil gen2 (* 2.0 frq)))
  2360. (* (env indf-1) .075 (oscil gen3 (* 3.0 frq)))))))))))
  2361. ;; (with-sound (:play #t) (eastern-wood-pewee-2 0 .25))
  2362. ;;; --------------------------------------------------------------------------------
  2363. ;;;
  2364. ;;; Field sparrow
  2365. (defanimal (field-sparrow beg amp)
  2366. (let ((dur 2.92))
  2367. (let ((start (seconds->samples beg))
  2368. (stop (seconds->samples (+ beg dur)))
  2369. (ampf (make-env '(0.000 0.000 0.025 0.201 0.095 0.307 0.113 0.235 0.122 0.005 0.146 0.000
  2370. 0.167 0.696 0.201 0.430 0.241 0.325 0.243 0.000 0.265 0.000
  2371. 0.287 0.840 0.300 0.791 0.312 0.567 0.354 0.369 0.365 0.000 0.388 0.000
  2372. 0.405 0.853 0.430 0.621 0.449 0.387 0.470 0.314 0.477 0.000 0.493 0.000
  2373. 0.511 0.887 0.529 0.796 0.552 0.402 0.566 0.327 0.578 0.000 0.594 0.000
  2374. 0.614 0.966 0.629 0.446 0.645 0.273 0.649 0.000 0.65 0.0 0.664 0.026
  2375. 0.673 1.0 0.690 0.459 0.706 0.000 0.714 0.031
  2376. 0.719 0.892 0.74 0.0 0.747 0.000
  2377. 0.755 0.851 0.773 0.0 0.781 0.000
  2378. 0.790 0.869 0.81 0.0 0.814 0.000
  2379. 0.827 0.827 0.845 0.0 0.849 0.000
  2380. 0.861 0.786 0.878 0.0 0.882 0.000
  2381. 0.894 0.716 0.912 0.0 0.918 0.000
  2382. 0.925 0.711 0.943 0.0 0.949 0.000
  2383. 0.959 0.657 0.97 0.0 0.975 0.000
  2384. 0.984 0.536 0.993 0.149
  2385. 1.000 0.000)
  2386. :duration dur :scaler amp))
  2387. (gp (make-polywave 0.0 '(1 .99 2 .01)))
  2388. (frqf (make-env '(0.000 4300 0.025 4300 0.1 3300 0.122 3300
  2389. 0.146 4300 0.18 4300 0.23 3300 0.243 3300
  2390. 0.265 4300 0.3 4300 0.35 3300 0.365 3300
  2391. 0.388 4300 0.42 4300 0.46 3300 0.477 3300
  2392. 0.493 4300 0.52 4300 0.56 3300 0.578 3300
  2393. 0.594 4300 0.61 4300 0.63 3300 0.649 3300 0.65 4300
  2394. 0.664 4300 0.68 4300 0.714 3300
  2395. 0.716 4300 0.74 3200 0.747 4300
  2396. 0.75 4300 0.773 3200 0.781 4300
  2397. 0.785 4300 0.81 3200 0.814 4300
  2398. 0.82 4300 0.845 3200 0.849 4300
  2399. 0.85 4300 0.878 3200 0.882 4300
  2400. 0.89 4300 0.912 3200 0.918 4300
  2401. 0.92 4300 0.943 3200 0.949 4300
  2402. 0.95 4300 0.97 3200 0.975 4300
  2403. 0.98 4300 0.993 3200
  2404. 1.000 3300)
  2405. :duration dur :scaler (hz->radians 1.0))))
  2406. (do ((i start (+ i 1)))
  2407. ((= i stop))
  2408. (outa i (* (env ampf)
  2409. (polywave gp (env frqf))))))))
  2410. ;; (with-sound (:play #t) (field-sparrow 0 .25))
  2411. ;;; --------------------------------------------------------------------------------
  2412. ;;;
  2413. ;;; Tufted titmouse
  2414. (defanimal (tufted-titmouse beg amp)
  2415. (let ((dur 1.0))
  2416. (let ((start (seconds->samples beg))
  2417. (stop (seconds->samples (+ beg dur)))
  2418. (ampf (make-env '(0.000 0.00 0.034 0.637 0.060 0.591 0.074 0.458 0.095 0.872 0.119 0.473 0.185 0.033 0.211 0.102
  2419. 0.233 0.00 0.384 0.00 0.425 0.926 0.447 0.898 0.461 0.665 0.471 1.0 0.497 0.578 0.529 0.422 0.565 0.054 0.594 0.107
  2420. 0.616 0.00 0.755 0.00 0.807 0.905 0.829 0.870 0.837 0.675 0.847 0.992 0.867 0.739 0.891 0.486 0.942 0.056 0.970 0.130
  2421. 1.000 0.000)
  2422. :duration dur :scaler amp))
  2423. (frqf (make-env '(0.0 3730 .04 3900 .07 3770 .09 2800 .17 2470 .19 2050 .21 2320 .23 2100
  2424. .38 3730 .42 3900 .45 3770 .46 2760 .53 2470 .55 2050 .58 2320 .6 2100
  2425. .75 3730 .79 3900 .83 3770 .84 2720 .91 2470 .94 2050 .96 2320 1.0 2100)
  2426. :duration dur :base .1 :scaler (hz->radians 1.0)))
  2427. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  2428. (do ((i start (+ i 1)))
  2429. ((= i stop))
  2430. (outa i (* (env ampf) (polywave gen1 (env frqf))))))))
  2431. ;; (with-sound (:play #t) (tufted-titmouse 0 .3))
  2432. ;;; --------------------------------------------------------------------------------
  2433. ;;;
  2434. ;;; Savannah sparrow
  2435. ;;;
  2436. ;;; 8 separate calls make up a song
  2437. (defanimal (savannah-sparrow beg amp)
  2438. (define (savannah-1 beg amp)
  2439. ;; peeps
  2440. (let ((dur .05)
  2441. (hi-pitch 9000)
  2442. (lo-pitch 7460))
  2443. (let ((start (seconds->samples beg))
  2444. (stop (seconds->samples (+ beg dur)))
  2445. (ampf (make-env '(0 0 1 1 2 0) :duration dur :scaler amp))
  2446. (frqf (make-env '(0 1 1 0) :duration dur :scaler (hz->radians (- hi-pitch lo-pitch)) :offset (hz->radians lo-pitch)))
  2447. (gp (make-polywave 0.0 '(1 .98 2 .02)))
  2448. (gen3 (make-oscil 80)))
  2449. (do ((i start (+ i 1)))
  2450. ((= i stop))
  2451. (outa i (* (env ampf)
  2452. (+ .8 (* .2 (abs (oscil gen3))))
  2453. (polywave gp (env frqf))))))))
  2454. (define (savannah-2 beg amp pitch)
  2455. ;; buzz
  2456. (let ((dur .008)
  2457. (hi-pitch (+ pitch 400))
  2458. (lo-pitch pitch))
  2459. (let ((start (seconds->samples beg))
  2460. (stop (seconds->samples (+ beg dur)))
  2461. (ampf (make-env '(0.000 0.000 0.094 0.228 0.148 0.832 0.248 1.000 0.364 0.695 0.522 0.586 0.634 0.284 0.801 0.558 0.891 0.102 1.000 0.000)
  2462. :duration dur :scaler amp))
  2463. (frqf (make-env '(0 1 1 0) :duration dur :scaler (hz->radians (- hi-pitch lo-pitch)) :offset (hz->radians lo-pitch)))
  2464. (gen1 (make-oscil))
  2465. (rnd (make-rand-interp 300 .03)))
  2466. (do ((i start (+ i 1)))
  2467. ((= i stop))
  2468. (outa i (* (env ampf)
  2469. (oscil gen1 (+ (env frqf)
  2470. (rand-interp rnd)))))))))
  2471. (define (savannah-3 beg amp)
  2472. ;; ticks
  2473. (let ((dur .004))
  2474. (let ((start (seconds->samples beg))
  2475. (stop (seconds->samples (+ beg dur)))
  2476. (rnd (make-rand 4000 .4))
  2477. (gen1 (make-oscil 8000))
  2478. (ampf (make-env '(0 0 1 1 2 .3 10 0) :duration dur :base 32 :scaler amp)))
  2479. (do ((i start (+ i 1)))
  2480. ((= i stop))
  2481. (outa i (* (env ampf)
  2482. (oscil gen1 (rand rnd))))))))
  2483. (define (savannah-4 beg amp)
  2484. (let ((dur .034))
  2485. (let ((start (seconds->samples beg))
  2486. (stop (seconds->samples (+ beg dur)))
  2487. (rnd (make-rand 12000 .1))
  2488. (gen1 (make-oscil 6400))
  2489. (frqf (make-env '(0 .5 1 0 2 1 4 1) :scaler (hz->radians 400) :duration dur))
  2490. (ampf (make-env '(0.000 0.000 0.045 0.018 0.067 0.196 0.096 0.004 0.166 0.032 0.196 0.207 0.209 0.116
  2491. 0.239 0.575 0.249 0.639 0.280 0.063 0.297 0.032 0.312 0.070 0.339 0.021 0.372 0.049
  2492. 0.378 0.544 0.391 0.088 0.437 0.211 0.441 0.611 0.455 0.218 0.480 0.140 0.498 0.253
  2493. 0.506 0.593 0.516 0.228 0.532 0.098 0.551 0.200 0.569 0.544 0.593 0.253 0.630 0.540
  2494. 0.660 0.133 0.684 0.540 0.722 0.158 0.748 0.604 0.760 0.779 0.787 0.260 0.824 1.000
  2495. 0.847 0.249 0.878 0.874 0.917 0.204 0.976 0.056 1.000 0.000)
  2496. :duration dur :scaler amp)))
  2497. (do ((i start (+ i 1)))
  2498. ((= i stop))
  2499. (outa i (* (env ampf)
  2500. (oscil gen1 (+ (env frqf) (rand rnd)))))))))
  2501. (define (savannah-5 beg amp)
  2502. (let ((dur .071))
  2503. (let ((start (seconds->samples beg))
  2504. (stop (seconds->samples (+ beg dur)))
  2505. (rnd (make-rand 12000 .1))
  2506. (gen1 (make-oscil 8500))
  2507. (ampf (make-env '(0.000 0.000 0.067 0.060 0.084 0.432 0.098 0.414 0.111 1.000 0.123 0.267 0.148 0.028
  2508. 0.160 0.877 0.181 0.151 0.189 0.007 0.305 0.007 0.316 0.347 0.331 0.225 0.341 1.000
  2509. 0.353 0.382 0.360 0.137 0.374 0.039 0.388 0.053 0.398 0.919 0.404 0.688 0.415 0.196
  2510. 0.438 0.000 0.530 0.000 0.542 0.502 0.561 0.151 0.573 0.958 0.586 0.218 0.599 0.035
  2511. 0.616 0.067 0.623 0.811 0.642 0.144 0.661 0.000 0.767 0.000 0.785 0.225 0.799 0.923
  2512. 0.822 0.000 0.853 0.000 0.861 0.674 0.880 0.053 0.906 0.000 1.000 0.000)
  2513. :duration dur :scaler amp)))
  2514. (do ((i start (+ i 1)))
  2515. ((= i stop))
  2516. (outa i (* (env ampf)
  2517. (oscil gen1 (rand rnd))))))))
  2518. (define (savannah-6 beg amp)
  2519. (let ((dur .023))
  2520. (let ((start (seconds->samples beg))
  2521. (stop (seconds->samples (+ beg dur)))
  2522. (rnd (make-rand 3500 .15))
  2523. (gen1 (make-oscil 3600))
  2524. (ampf (make-env '(0.000 0.000 0.297 0.323 0.339 0.547 0.388 0.891 0.439 1.000 0.553 0.975 0.591 0.295
  2525. 0.615 0.168 0.678 0.011 0.731 0.105 0.758 0.709 0.800 0.312 0.884 0.077 1.000 0.000)
  2526. :duration dur :scaler amp)))
  2527. (do ((i start (+ i 1)))
  2528. ((= i stop))
  2529. (outa i (* (env ampf)
  2530. (oscil gen1 (rand rnd))))))))
  2531. (define (savannah-7 beg amp)
  2532. (let ((dur .053)
  2533. (hi-pitch 8250)
  2534. (lo-pitch 6900))
  2535. (let ((start (seconds->samples beg))
  2536. (stop (seconds->samples (+ beg dur)))
  2537. (ampf (make-env '(0 0 2 1 3 0) :duration dur :scaler amp))
  2538. (frqf (make-env '(0 0 1 1) :duration dur :scaler (hz->radians (- hi-pitch lo-pitch)) :offset (hz->radians lo-pitch)))
  2539. (gen1 (make-oscil))
  2540. (gen2 (make-oscil 220)))
  2541. (do ((i start (+ i 1)))
  2542. ((= i stop))
  2543. (outa i (* (env ampf)
  2544. (+ .25 (* .75 (abs (oscil gen2))))
  2545. (oscil gen1 (env frqf))))))))
  2546. (define (savannah-8 beg amp)
  2547. (let ((dur .023))
  2548. (let ((start (seconds->samples beg))
  2549. (stop (seconds->samples (+ beg dur)))
  2550. (gen1 (make-oscil 3800))
  2551. (gen2 (make-oscil 150))
  2552. (ampf (make-env '(0.000 0.000 0.138 0.098 0.199 0.218 0.258 0.018 0.367 0.404 0.422 0.361 0.462 0.011
  2553. 0.549 0.782 0.639 0.519 0.665 0.000 0.678 0.379 0.707 1.000 0.801 0.551 0.835 0.165
  2554. 0.850 0.337 1.000 0.000)
  2555. :duration dur :scaler amp)))
  2556. (do ((i start (+ i 1)))
  2557. ((= i stop))
  2558. (outa i (* (env ampf)
  2559. (oscil gen1 0.0 (* 2.0 (oscil gen2)))))))))
  2560. ;; --------
  2561. (savannah-1 beg (* amp .21))
  2562. (savannah-1 (+ beg .35) (* amp .45))
  2563. (savannah-1 (+ beg .63) (* amp .51))
  2564. (savannah-1 (+ beg .87) (* amp .64))
  2565. (savannah-1 (+ beg 1.13) amp)
  2566. (savannah-1 (+ beg 1.3) amp)
  2567. (savannah-4 (+ .97 beg) (* amp .21))
  2568. (do ((i 0 (+ i 1)))
  2569. ((= i 6))
  2570. (savannah-3 (+ beg 1.02 (* i .014)) (* amp .12)))
  2571. (savannah-5 (+ beg 1.19) (* amp .2))
  2572. (savannah-5 (+ beg 1.36) (* amp .2))
  2573. (savannah-6 (+ beg 1.46) (* amp .15))
  2574. (savannah-6 (+ beg 1.5) (* amp .15))
  2575. (let* ((repeats 20)
  2576. (af-incr (/ .6 repeats)))
  2577. (do ((i 0 (+ i 1))
  2578. (beg2 0.0 (+ beg2 .004))
  2579. (af af-incr (+ af af-incr)))
  2580. ((= i repeats))
  2581. (savannah-2 (+ beg 1.58 beg2) (* amp af) 5250)))
  2582. (let ((af .24))
  2583. (do ((i 0 (+ i 1)))
  2584. ((= i 40))
  2585. (savannah-2 (+ beg 1.29 .36 (* i .0145)) (* amp af) 5600)
  2586. (set! af ((if (< i 20) + -) af 0.004))))
  2587. (savannah-7 (+ beg 2.27) (* .4 amp))
  2588. (do ((dist 0.01)
  2589. (i 0 (+ i 1))
  2590. (beg2 (+ beg 2.36) (+ beg2 dist))
  2591. (af .1 (* af .85)))
  2592. ((= i 20))
  2593. (savannah-8 beg2 (* amp af))
  2594. (set! dist (+ dist .001))))
  2595. ;; (with-sound (:play #t) (savannah-sparrow 0 .5))
  2596. ;;; --------------------------------------------------------------------------------
  2597. ;;;
  2598. ;;; Chipping sparrow
  2599. (defanimal (chipping-sparrow beg amp)
  2600. (let ((dur .055)
  2601. (repeats (+ 20 (random 25))))
  2602. (let ((start (seconds->samples beg))
  2603. (total-dur (* repeats .068)))
  2604. (let ((stop (+ start (seconds->samples total-dur)))
  2605. (ampf (make-env '(0 0 1 .7 2 1 10 1 11 0) :duration total-dur :scaler amp))
  2606. (pulsef (make-env '(0.000 0.000 0.049 0.091 0.179 0.636 0.253 0.186 0.293 0.518 0.361 0.170 0.413 0.079
  2607. 0.503 0.253 0.609 0.976 0.660 0.937 0.742 0.688 0.783 0.292 0.853 0.043 0.913 0.119 1.000 0.000)
  2608. :duration dur))
  2609. (frqf (make-env '(0 7600 .1 7900
  2610. .18 8700 .2 9000 .23 8300
  2611. .32 5300 .4 4300 .5 4800
  2612. .6 5600 0.8 6400 1.0 5400)
  2613. :duration dur :base 32 :scaler (hz->radians 1.0)))
  2614. (gen1 #f)
  2615. (pulse-samps (seconds->samples .068))
  2616. (pulse-out (seconds->samples dur)) ; pulsef and frqf dur
  2617. (rnd (make-rand-interp 100 .02)))
  2618. (do ((i start (+ i pulse-samps)))
  2619. ((>= i stop))
  2620. (set! (mus-location ampf) (- i start))
  2621. (let ((reset-stop (min stop (+ i pulse-out)))
  2622. (pulse-amp (env ampf)))
  2623. (set! gen1 (make-polywave 0.0 (list 1 pulse-amp)))
  2624. (do ((k i (+ k 1)))
  2625. ((= k reset-stop))
  2626. (outa k (* (env pulsef)
  2627. (polywave gen1 (+ (env frqf) (rand-interp rnd)))))))
  2628. (mus-reset pulsef)
  2629. (mus-reset frqf))))))
  2630. ;; (with-sound (:play #t) (chipping-sparrow 0 .3))
  2631. ;;; --------------------------------------------------------------------------------
  2632. ;;;
  2633. ;;; Least flycatcher
  2634. (defanimal (least-flycatcher beg amp)
  2635. (let ((call1-dur .032)
  2636. (pause .065)
  2637. (call2-dur .04)
  2638. (start (seconds->samples beg)))
  2639. (let ((stop1 (+ start (seconds->samples call1-dur)))
  2640. (ampf1 (make-env '(0.000 0.000 0.223 0.158 0.386 0.379 0.617 1.0 0.679 0.929 0.810 0.458 1.000 0.000) :duration call1-dur :scaler amp))
  2641. (gen1 (make-oscil))
  2642. (gen11 (make-oscil))
  2643. (frqf1 (make-env '(0 3000 .4 6250 .5 6400 1.0 6000) :duration call1-dur :scaler (hz->radians 1.0)))
  2644. (start2 (+ start (seconds->samples pause))))
  2645. (let ((stop2 (+ start2 (seconds->samples call2-dur)))
  2646. (ampf2 (make-env '(0.000 0.000 0.088 0.124 0.157 0.258 0.198 0.202 0.237 0.264 0.273 0.823 0.286 0.419
  2647. 0.328 0.814 0.343 1.000 0.360 0.329 0.409 0.413 0.435 0.935 0.448 0.295 0.481 0.183
  2648. 0.539 0.901 0.563 0.444 0.619 0.373 0.644 0.944 0.662 0.311 0.724 0.053 0.756 0.186
  2649. 0.782 0.432 0.823 0.512 0.865 0.174 0.886 0.230 1.000 0.000)
  2650. :duration call2-dur :scaler (* .5 amp)))
  2651. (gen2 (make-oscil 4600))
  2652. (gen21 (make-oscil 5600))
  2653. (gen22 (make-rand-interp 2000 (hz->radians 1000))))
  2654. (do ((i start (+ i 1)))
  2655. ((= i stop1))
  2656. (let ((frq (env frqf1)))
  2657. (outa i (* (env ampf1)
  2658. (+ (* .9 (oscil gen1 frq))
  2659. (* .1 (oscil gen11 (* 2.0 frq))))))))
  2660. (do ((i start2 (+ i 1)))
  2661. ((= i stop2))
  2662. (let ((noise (rand-interp gen22)))
  2663. (outa i (* (env ampf2)
  2664. (+ (* .7 (oscil gen2 noise))
  2665. (* .3 (oscil gen21 noise)))))))))))
  2666. ;; (with-sound (:play #t) (least-flycatcher 0 .5))
  2667. ;;; --------------------------------------------------------------------------------
  2668. ;;;
  2669. ;;; Acadian flycatcher
  2670. (defanimal (acadian-flycatcher beg amp)
  2671. (let ((dur 0.3))
  2672. (let ((start (seconds->samples beg))
  2673. (stop (seconds->samples (+ beg dur)))
  2674. (ampf (make-env '(0.000 0.000 0.102 0.301 0.221 0.705 0.287 0.332 0.357 0.801 0.406 0.385 0.45 0 0.55 0
  2675. 0.567 0.298 0.623 1.0 0.706 0.727 0.729 0.292 0.860 0.239 0.885 0.484 1.000 0.000)
  2676. :duration dur :scaler amp))
  2677. (gen1 (make-polywave 0.0 '(1 .95 2 .05)))
  2678. (frqf (make-env '(0 2800 .075 3600 .11 4200 .22 4900 .28 3200 .35 5400 .45 4200 .47 4000
  2679. .55 4900 .62 5000 .7 5500 .75 5200 .8 5500 .87 5400 1.0 2800)
  2680. :duration dur :scaler (hz->radians 1.0) :base 32)))
  2681. (do ((i start (+ i 1)))
  2682. ((= i stop))
  2683. (outa i (* (env ampf) (polywave gen1 (env frqf))))))))
  2684. ;; (with-sound (:play #t) (acadian-flycatcher 0 .25))
  2685. ;;; --------------------------------------------------------------------------------
  2686. ;;;
  2687. ;;; Swainson's thrush
  2688. ;;;
  2689. ;;; are there really multiphonics in this birdsong?
  2690. ;;; also, is this a song that uses both parts of the syrinx? -- I think the doubled stuff is reverb
  2691. (defanimal (swainsons-thrush beg amp)
  2692. (let ((dur 2.0))
  2693. (let ((start (seconds->samples beg))
  2694. (stop (seconds->samples (+ beg dur)))
  2695. (ampf (make-env '(0.000 0.000 0.058 0.146 0.075 0.127
  2696. 0.085 0.000 0.113 0.000 0.143 0.481 0.150 0.516 0.227 0.735
  2697. 0.238 0.000 0.260 0.000 0.289 0.474 0.311 0.423
  2698. 0.316 0.000 0.337 0.000 0.350 0.559 0.355 0.805 0.367 0.895 0.413 0.990 0.427 0.598 0.446 0.373
  2699. 0.452 0.066 0.460 0.103 0.470 0.651 0.492 0.828 0.510 0.502 0.531 0.457
  2700. 0.541 0.000 0.568 0.000 0.569 0.424 0.587 0.548 0.603 0.553 0.613 0.061 0.645 0.633 0.686 0.760
  2701. 0.703 0.000 0.726 0.000 0.727 0.236 0.735 0.037 0.793 0.301 0.815 0.125 0.835 0.130
  2702. 0.847 0.000 0.868 0.000 0.931 0.180
  2703. 1.000 0.000)
  2704. :duration dur :scaler amp))
  2705. (gen1 (make-polywave 0.0 '(1 0.96 2 0.01 3 0.02 4 0.001 5 .005)))
  2706. (gen2 (make-oscil)) ; eschew aliasing
  2707. (intrpf (make-env '(0 1 .7 1 .75 0 1 0) :duration dur))
  2708. (intrpf-1 (make-env '(0 1 .7 1 .75 0 1 0) :duration dur :offset 1.0 :scaler -1.0))
  2709. (frqf (make-env '(0.000 0.000
  2710. 0.01 0.175 0.015 0.264
  2711. 0.02 0.172 0.025 0.263
  2712. 0.03 0.171 0.035 0.260
  2713. 0.04 0.172 0.045 0.263
  2714. 0.05 0.172 0.055 0.265
  2715. 0.06 0.171 0.065 0.263
  2716. 0.07 0.170 0.077 0.267
  2717. 0.08 0.174 0.085 0.266
  2718. 0.09 0.170 0.095 0.265
  2719. 0.1 0.171 0.105 0.266
  2720. 0.107 0.186 0.128 0.172 0.141 0.240 0.155 0.238 0.164 0.280 0.170 0.180
  2721. 0.178 0.330 0.181 0.177 0.190 0.322 0.196 0.185 0.201 0.326 0.207 0.288 0.242 0.283 0.272 0.238 0.276 0.238
  2722. 0.288 0.238 0.318 0.238 0.342 0.240 0.344 0.270 0.355 0.325 0.365 0.376 0.370 0.325 0.378 0.376 0.383 0.325
  2723. 0.390 0.376 0.395 0.309 0.401 0.426 0.410 0.502 0.424 0.305 0.433 0.280 0.436 0.238 0.447 0.241 0.453 0.199
  2724. 0.466 0.378 0.471 0.431 0.482 0.391 0.494 0.384 0.504 0.350 0.516 0.334 0.532 0.334 0.558 0.330 0.564 0.412
  2725. 0.569 0.477 0.578 0.511 0.582 0.568 0.590 0.429 0.596 0.553 0.604 0.416 0.620 0.735 0.629 0.653 0.641 0.617
  2726. 0.647 0.572 0.656 0.542 0.662 0.510 0.681 0.436 0.689 0.379 0.694 0.293 0.719 0.395 0.723 0.510 0.734 0.555
  2727. 0.743 0.807 0.765 0.786 0.783 0.637 0.797 0.875 0.806 0.902 0.812 0.957 0.832 0.981
  2728. 0.85 .9 0.868 0.416 0.895 0.814 0.900 0.788 0.903 0.735 0.917 0.635 0.922 0.686 0.931 0.855 0.949 0.952 0.965 0.939 1.000 .9)
  2729. :duration dur
  2730. :scaler (hz->radians 8200))))
  2731. (do ((i start (+ i 1)))
  2732. ((= i stop))
  2733. (let ((frq (env frqf)))
  2734. (outa i (* (env ampf)
  2735. (+ (* (env intrpf) (polywave gen1 frq))
  2736. (* (env intrpf-1) (oscil gen2 frq))))))))))
  2737. ;; (with-sound (:play #t) (swainsons-thrush 0 .5))
  2738. ;;; --------------------------------------------------------------------------------
  2739. ;;;
  2740. ;;; Carolina wren
  2741. (defanimal (carolina-wren beg amp)
  2742. (let ((dur 1.84)
  2743. (pulse-dur 0.25))
  2744. (let ((start (seconds->samples beg))
  2745. (stop (seconds->samples (+ beg dur)))
  2746. (pulsef (make-env '(0.000 0.000 0.027 0.031 0.049 0.185 0.065 0.749 0.121 0.508 0.137 0.339 0.146 0.270
  2747. 0.195 0.571 0.247 0.806 0.270 0.994 0.311 0.837 0.325 0.129 0.335 0.373 0.354 0.000
  2748. 0.512 0.000 0.525 0.677 0.548 0.831 0.560 0.737 0.594 0.082 0.602 0.000 0.618 0.223
  2749. 0.635 0.313 0.657 0.712 0.698 0.649 0.716 0.517 0.741 0.006 0.775 0.094 0.791 0.467
  2750. 0.808 0.373 0.838 0.480 0.885 0.414 0.917 0.160 0.930 0.031 1.000 0.000)
  2751. :duration pulse-dur))
  2752. (frqf (make-env '(0.000 0.3 0.06 0.209 0.079 0.204 0.084 0.158 0.171 0.160 0.260 0.175 0.310 0.185
  2753. 0.495 0.153 0.582 0.155 0.621 0.145 0.653 0.125 0.738 0.121 0.794 0.125 0.805 0.109
  2754. 0.835 0.104 1.000 0.102)
  2755. :duration pulse-dur :scaler (hz->radians 22050)))
  2756. (ampf (make-env '(0 0 1 .5 16 1 18 .8 20 0) :duration dur :scaler amp))
  2757. (gen1 #f)
  2758. (pulse-samps (seconds->samples (/ 1.6 6.0)))) ; .26
  2759. (do ((i start (+ i pulse-samps)))
  2760. ((>= i stop))
  2761. (set! (mus-location ampf) (- i start))
  2762. (let ((reset-stop (min stop (+ i pulse-samps)))
  2763. (pulse-amp (env ampf)))
  2764. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .95) 2 (* pulse-amp .015) 3 (* pulse-amp .025) 3 (* pulse-amp .01))))
  2765. (do ((k i (+ k 1)))
  2766. ((= k reset-stop))
  2767. (outa k (* (env pulsef)
  2768. (polywave gen1 (env frqf))))))
  2769. (mus-reset pulsef)
  2770. (mus-reset frqf)))))
  2771. ;; (with-sound (:play #t) (carolina-wren 0 .25))
  2772. ;;; --------------------------------------------------------------------------------
  2773. ;;;
  2774. ;;; Bachman's sparrow
  2775. (defanimal (bachmans-sparrow beg amp)
  2776. ;; two pieces -- initial steady tone, then 10 repetitions of 2nd call
  2777. (let ((call1-dur .576)
  2778. (call2-dur .172)
  2779. (start (seconds->samples beg)))
  2780. (let ((stop1 (+ start (seconds->samples call1-dur)))
  2781. (ampf1 (make-env '(0.000 0.000 0.684 0.978 0.863 1.0 0.962 0.773 1.000 0.000) :duration call1-dur :scaler (* .5 amp)))
  2782. (gen1 (make-polywave 0.0 '(1 .98 3 .02))) ; first section uses ampf1 for amp scaling (.5)
  2783. (frqf1 (make-env '(0 4970 1 4850) :duration call1-dur :scaler (hz->radians 1.0)))
  2784. (pulse-samps (seconds->samples .184))
  2785. (pulse-out (seconds->samples call2-dur))
  2786. (stop2 (+ start (seconds->samples 2.4)))
  2787. (ampf2 (make-env '(0.000 0.000 0.070 0.025 0.239 0.430 0.331 0.404 0.381 0.000 0.422 0.007
  2788. 0.495 0.560 0.541 0.596 0.552 0.466 0.578 0.469 0.592 1.000 0.616 0.798
  2789. 0.642 0.751
  2790. 0.75 0 0.786 0.000 0.834 0.267 0.859 0.227 0.902 0.043 1.000 0.000)
  2791. :duration call2-dur :scaler amp))
  2792. ;; these two envs may not be aligned correctly -- maybe backup the frq slightly?
  2793. (frqf2 (make-env '(0.000 0.252 0.129 0.266 0.210 0.291 0.282 0.293 0.336 0.293 0.442 0.404
  2794. 0.473 0.416 0.515 0.416 0.556 0.447
  2795. 0.576 0.6
  2796. 0.598 0.443 0.607 0.386
  2797. 0.638 0.342 0.688 0.332 0.784 0.338 0.796 0.340 0.886 0.57
  2798. 0.948 0.697 1 .7)
  2799. :duration call2-dur :scaler (hz->radians 10000)))
  2800. (ampf (make-env '(0 1 1.78 1 1.79 0 1.82 0) :duration 1.82)))
  2801. (do ((i start (+ i 1)))
  2802. ((= i stop1))
  2803. (outa i (* (env ampf1)
  2804. (polywave gen1 (env frqf1)))))
  2805. (do ((i stop1 (+ i pulse-samps)))
  2806. ((>= i stop2))
  2807. (set! (mus-location ampf) (- i stop1))
  2808. (let ((reset-stop (min stop2 (+ i pulse-out)))
  2809. (pulse-amp (env ampf)))
  2810. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .98) 3 (* pulse-amp .02))))
  2811. (do ((k i (+ k 1)))
  2812. ((= k reset-stop))
  2813. (outa k (* (env ampf2)
  2814. (polywave gen1 (env frqf2))))))
  2815. (mus-reset ampf2)
  2816. (mus-reset frqf2)))))
  2817. ;; (with-sound (:play #t) (bachmans-sparrow 0 .25))
  2818. ;;; --------------------------------------------------------------------------------
  2819. ;;;
  2820. ;;; Grasshopper sparrow
  2821. (defanimal (grasshopper-sparrow beg amp)
  2822. ;; 2 portions -- simple tones, then a buzz (calif case has much tighter (faster) buzz)
  2823. (let ((start (seconds->samples beg))
  2824. (begs (vector 0.0 .24 .36 .44 .55))
  2825. (durs (vector 0.019 0.020 0.011 0.021 1.09))
  2826. (amps (vector .48 .54 .07 .22 1.0))
  2827. (frqs (vector 8500 7240 9730 4920 8000))
  2828. (starts (make-vector 4 0))
  2829. (stops (make-vector 4 0))
  2830. (ampfs (make-vector 4 #f))
  2831. (gen1 (make-oscil)))
  2832. (let ((buzz-start (+ start (seconds->samples (begs 4)))))
  2833. (let ((buzz-end (+ buzz-start (seconds->samples (durs 4))))
  2834. (buzz-ampf (make-env '(0.000 0.000 0.095 0.953 0.114 0.182 0.158 0.822 0.236 0.996 0.332 1.000 0.848 0.589 0.957 0.372 1.000 0.000)
  2835. :duration (durs 4) :scaler amp))
  2836. (buzzer (make-nrxysin 40 :n 5 :r .5)) ; sawtooth not great here due to broad spectrum
  2837. (buzzer-index (hz->radians 2000))
  2838. (buzzer-amp (make-triangle-wave 40 0.8)))
  2839. (do ((i 0 (+ i 1)))
  2840. ((= i 4))
  2841. (set! (ampfs i) (make-env '(0 0 1 .8 1.5 1 2 .8 3 0) :duration (durs i) :scaler (* amp (amps i))))
  2842. (set! (starts i) (+ start (seconds->samples (begs i))))
  2843. (set! (stops i) (+ (starts i) (seconds->samples (durs i)))))
  2844. ;; first the 4 tones
  2845. (do ((tone 0 (+ 1 tone)))
  2846. ((= tone 4))
  2847. (set! (mus-frequency gen1) (frqs tone))
  2848. (let ((ampf (ampfs tone))
  2849. (start (starts tone))
  2850. (end (stops tone)))
  2851. (do ((i start (+ i 1)))
  2852. ((= i end))
  2853. (outa i (* (env ampf)
  2854. (oscil gen1))))))
  2855. ;; then the buzz
  2856. (set! (mus-frequency gen1) 8000.0)
  2857. (do ((i buzz-start (+ i 1)))
  2858. ((= i buzz-end))
  2859. (outa i (* (env buzz-ampf)
  2860. (+ 0.2 (abs (triangle-wave buzzer-amp)))
  2861. (oscil gen1 (* buzzer-index
  2862. (nrxysin buzzer))))))))))
  2863. ;; (with-sound (:play #t) (grasshopper-sparrow 0 .25))
  2864. ;;; --------------------------------------------------------------------------------
  2865. ;;;
  2866. ;;; American robin
  2867. (defanimal (american-robin beg amp)
  2868. (let ((start (seconds->samples beg))
  2869. (ampfs (make-vector 4 #f))
  2870. (frqfs (make-vector 4 #f))
  2871. (starts (make-vector 4 0))
  2872. (stops (make-vector 4 0))
  2873. (begs (vector 0.0 0.6 1.3 1.8))
  2874. (durs (vector 0.34 0.25 0.16 0.39))
  2875. (amps (vector 0.6 1.0 0.7 0.95))
  2876. (gen1 (make-polywave 0.0 '(1 .95 2 .03 3 .01 4 .01)))
  2877. (amp-envs (vector
  2878. '(0.000 0.000 0.085 0.847 0.117 0.555 0.125 0.731 0.137 0.505 0.158 0.635 0.178 0.595
  2879. 0.200 0.449 0.224 0.578 0.241 0.395 0.274 0.515 0.372 0.415 0.409 0.243 0.434 0.266
  2880. 0.445 0.000 0.463 0.166 0.489 0.080 0.527 0.272 0.535 0.150 0.559 0.777 0.594 0.967
  2881. 0.632 0.811 0.650 0.897 0.692 0.718 0.710 0.525 0.726 0.588 0.743 0.000 0.746 0.661
  2882. 0.764 0.748 0.782 0.711 0.799 0.528 0.824 0.678 0.834 0.615 0.864 0.721 0.883 0.548
  2883. 0.904 0.625 0.940 0.458 0.957 0.505 1.000 0.000)
  2884. '(0.000 0.000 0.117 0.734 0.200 0.934 0.220 0.814 0.233 0.900 0.254 0.864 0.268 0.538
  2885. 0.280 0.718 0.302 0.063 0.328 0.439 0.340 0.445 0.356 0.070 0.401 0.123 0.437 0.000
  2886. 0.529 0.000 0.543 0.372 0.566 0.512 0.579 0.369 0.630 0.449 0.654 0.402 0.704 0.555
  2887. 0.794 0.515 0.814 0.442 0.822 0.213 0.838 0.654 0.947 0.502 1.000 0.000)
  2888. '(0.000 0.000 0.013 0.282 0.085 0.568 0.140 0.522 0.174 0.678 0.217 0.960 0.232 1.000
  2889. 0.258 0.718 0.277 0.877 0.310 0.970 0.361 0.927 0.429 0.864 0.487 0.641 0.513 0.382
  2890. 0.565 0.425 0.586 0.166 0.611 0.040 0.647 0.319 0.692 0.784 0.806 0.947 0.846 0.671
  2891. 0.875 0.462 0.905 0.605 0.959 0.508 1.000 0.000)
  2892. '(0.000 0.000 0.059 0.282 0.107 0.711 0.154 0.711 0.176 0.588 0.221 0.525 0.289 0.475
  2893. 0.386 0.445 0.415 0.199 0.438 0.286 0.451 0.060 0.455 0.269 0.479 0.090 0.493 0.196
  2894. 0.577 0.924 0.674 0.924 0.699 0.608 0.710 0.831 0.762 0.571 0.778 0.645 0.842 0.425
  2895. 0.899 0.372 0.933 0.415 1.000 0.000)))
  2896. (frq-envs (vector
  2897. '(0.000 0.491 0.026 0.502 0.083 0.509 0.098 0.456 0.132 0.428 0.165 0.428 0.190 0.442
  2898. 0.350 0.436 0.367 0.419 0.440 0.415 0.450 0.606 0.485 0.608 0.502 0.634 0.583 0.636
  2899. 0.607 0.677 0.658 0.684 0.663 0.562 0.687 0.564 0.703 0.546 0.725 0.546 0.773 0.564
  2900. 0.793 0.560 0.808 0.555 1.000 0.555)
  2901. '(0.000 0.634 0.074 0.647 0.094 0.666 0.113 0.671 0.130 0.663 0.147 0.625 0.172 0.620
  2902. 0.189 0.601 0.219 0.601 0.229 0.627 0.251 0.622 0.265 0.601 0.329 0.597 0.481 0.601
  2903. 0.508 0.602 0.514 0.504 0.556 0.502 0.625 0.473 0.722 0.477 0.729 0.583 0.825 0.572
  2904. 0.852 0.553 0.892 0.555 1.000 0.578)
  2905. '(0.000 0.509 0.075 0.518 0.124 0.560 0.150 0.640 0.192 0.663 0.223 0.654 0.271 0.551
  2906. 0.313 0.539 0.354 0.551 0.389 0.583 0.433 0.601 0.542 0.606 0.595 0.564 0.669 0.558
  2907. 0.736 0.557 0.749 0.610 0.788 0.655 0.821 0.678 0.857 0.680 0.874 0.611 0.907 0.595 1.000 0.580)
  2908. '(0.000 0.481 0.032 0.491 0.084 0.530 0.098 0.595 0.113 0.592 0.118 0.458 0.186 0.436
  2909. 0.229 0.445 0.313 0.442 0.330 0.452 0.346 0.440 0.386 0.442 0.464 0.428 0.504 0.560
  2910. 0.529 0.641 0.573 0.636 0.605 0.647 0.657 0.661 0.690 0.680 0.705 0.558 0.758 0.549
  2911. 0.787 0.555 0.821 0.544 0.849 0.532 0.913 0.535 0.939 0.548 1.000 0.537))))
  2912. (do ((i 0 (+ i 1)))
  2913. ((= i 4))
  2914. (set! (ampfs i) (make-env (amp-envs i) :duration (durs i) :scaler (* amp (amps i))))
  2915. (set! (frqfs i) (make-env (frq-envs i) :duration (durs i) :scaler (hz->radians 5000)))
  2916. (set! (starts i) (+ start (seconds->samples (begs i))))
  2917. (set! (stops i) (+ (starts i) (seconds->samples (durs i)))))
  2918. (do ((tone 0 (+ 1 tone)))
  2919. ((= tone 4))
  2920. (let ((ampf (ampfs tone))
  2921. (frqf (frqfs tone))
  2922. (start (starts tone))
  2923. (end (stops tone)))
  2924. (do ((i start (+ i 1)))
  2925. ((= i end))
  2926. (outa i (* (env ampf)
  2927. (polywave gen1 (env frqf)))))))))
  2928. ;; (with-sound (:play #t) (american-robin 0 .25))
  2929. ;;; --------------------------------------------------------------------------------
  2930. ;;;
  2931. ;;; Common loon
  2932. (defanimal (common-loon-1 beg amp)
  2933. (let ((dur 2.5))
  2934. (let ((start (seconds->samples beg))
  2935. (stop (seconds->samples (+ beg dur)))
  2936. (ampf (make-env '(0.000 0.000 0.049 0.134 0.122 0.131 0.174 0.070 0.178 0.244
  2937. 0.522 0.954 0.649 0.922 0.736 1.0 0.860 0.962 0.957 0.839 .98 .5 1.000 0.000)
  2938. :duration dur :scaler amp))
  2939. (gen1 (make-polywave 0.0 '(1 .85 2 .1 3 .02 4 .05 5 .01 7 .003 9 .001)))
  2940. (frqf (make-env '(0.000 0.330 0.030 0.388 0.087 0.395 0.155 0.509 0.158 0.609 0.204 0.633 0.346 0.685
  2941. 0.35 0.852 0.469 0.882 0.585 0.886 0.780 0.888 0.896 0.878 0.961 0.869 .98 .8 1.000 0.76)
  2942. :duration dur :scaler (hz->radians 1000.0))))
  2943. (do ((i start (+ i 1)))
  2944. ((= i stop))
  2945. (outa i (* (env ampf)
  2946. (polywave gen1 (env frqf))))))))
  2947. ;; (with-sound (:play #t) (common-loon-1 0 .25))
  2948. (defanimal (common-loon-2 beg amp)
  2949. (let ((dur 0.63))
  2950. (let ((start (seconds->samples beg))
  2951. (stop (seconds->samples (+ beg dur)))
  2952. (ampf (make-env '(0.000 0.000 0.021 0.270 0.045 0.253 0.088 0.103 0.141 0.416 0.165 0.251 0.179 0.107
  2953. 0.192 0.403 0.211 0.399 0.222 0.208 0.242 0.206 0.286 0.895 0.303 0.882 0.327 0.672
  2954. 0.350 0.324 0.362 0.150 0.378 0.236 0.389 0.268 0.423 0.991 0.447 0.923 0.459 0.785
  2955. 0.488 0.242 0.506 0.200 0.531 0.245 0.540 0.371 0.556 0.785 0.566 0.792 0.573 0.981
  2956. 0.579 0.873 0.585 0.931 0.600 0.811 0.622 0.354 0.636 0.191 0.652 0.120 0.663 0.148
  2957. 0.674 0.099 0.687 0.163 0.707 0.489 0.720 0.631 0.731 0.624 0.765 0.339 0.778 0.170
  2958. 0.810 0.056 0.842 0.116 0.863 0.227 0.899 0.240 0.907 0.189 0.965 0.122 1.000 0.000)
  2959. :duration dur :scaler amp))
  2960. (gen1 (make-polywave 0.0 '(1 .85 2 .02 3 .008 4 .01 5 .006)))
  2961. (frqf (make-env '(0.000 0.267 0.029 0.354 0.131 0.349 0.188 0.414 0.202 0.534 0.232 0.453 0.250 0.427
  2962. 0.267 0.455 0.279 0.505 0.296 0.540 0.312 0.549 0.332 0.532 0.365 0.442 0.380 0.427
  2963. 0.395 0.443 0.417 0.512 0.430 0.544 0.446 0.558 0.465 0.542 0.503 0.436 0.521 0.421
  2964. 0.535 0.440 0.558 0.510 0.570 0.534 0.588 0.544 0.608 0.525 0.625 0.479 0.646 0.425
  2965. 0.669 0.410 0.690 0.432 0.715 0.514 0.733 0.532 0.753 0.514 0.801 0.423 0.817 0.421
  2966. 0.830 0.304 0.866 0.343 0.891 0.354 0.913 0.338 0.950 0.312 1.000 0.304)
  2967. :duration dur :scaler (hz->radians 2000.0))))
  2968. (do ((i start (+ i 1)))
  2969. ((= i stop))
  2970. (outa i (* (env ampf)
  2971. (polywave gen1 (env frqf))))))))
  2972. ;; (with-sound (:play #t) (common-loon-2 0 .25))
  2973. ;;; --------------------------------------------------------------------------------
  2974. ;;;
  2975. ;;; Hermit thrush
  2976. (defanimal (hermit-thrush beg amp)
  2977. (let ((start (seconds->samples beg))
  2978. (ampfs (make-vector 3 #f))
  2979. (frqf1s (make-vector 3 #f))
  2980. (frqf2s (make-vector 3 #f))
  2981. (starts (make-vector 3 0))
  2982. (stops (make-vector 3 0))
  2983. (begs (vector 0.0 0.42 0.84))
  2984. (durs (vector 0.34 0.35 0.56))
  2985. (amps (vector 0.6 0.8 1.0))
  2986. (gen1 (make-polywave 0.0 (list 1 (* .55 .95) 2 (* .55 .01) 3 (* .55 .03))))
  2987. (gen2 (make-polywave 0.0 (list 1 (* .45 .95) 2 (* .45 .01) 3 (* .45 .03))))
  2988. (amp-envs (vector
  2989. '(0.000 0.000 0.117 0.054 0.301 0.269 0.518 0.605 0.608 0.620 0.703 0.783 0.779 0.900
  2990. 0.804 0.857 0.863 0.987 0.912 0.959 0.943 1.000 0.967 0.900 1.000 0.000)
  2991. '(0.000 0.000 0.028 0.109 0.037 0.059 0.056 0.223 0.066 0.000 0.094 0.252 0.104 0.488
  2992. 0.136 0.605 0.151 0.770 0.154 0.000 0.162 0.857 0.175 0.727 0.187 0.000 0.198 0.505
  2993. 0.217 0.280 0.229 0.427 0.240 0.291 0.249 0.479 0.266 0.369 0.277 0.518 0.289 0.380
  2994. 0.297 0.503 0.310 0.380 0.321 0.495 0.334 0.000 0.343 0.584 0.376 0.545 0.398 0.649
  2995. 0.412 0.605 0.423 0.642 0.445 0.607 0.456 0.651 0.493 0.638 0.516 0.586 0.532 0.000
  2996. 0.541 0.386 0.570 0.579 0.577 0.210 0.603 0.885 0.627 0.704 0.645 0.000 0.647 0.482
  2997. 0.659 0.584 0.673 0.148 0.683 0.573 0.698 0.432 0.708 0.649 0.722 0.529 0.735 0.701
  2998. 0.754 0.586 0.764 0.709 0.777 0.575 0.791 0.716 0.802 0.568 0.819 0.681 0.837 0.601
  2999. 0.872 0.783 0.933 0.967 0.978 0.902 1.000 0.000)
  3000. '(0.000 0.000 0.006 0.202 0.014 0.082 0.023 0.349 0.057 0.605 0.064 0.581 0.071 0.367
  3001. 0.105 0.184 0.107 0.000 0.152 0.421 0.171 0.538 0.183 0.443 0.210 0.000 0.230 0.150
  3002. 0.250 0.707 0.264 0.716 0.276 0.579 0.280 0.499 0.306 0.712 0.328 0.711 0.340 0.852
  3003. 0.356 0.850 0.367 0.957 0.391 0.904 0.412 0.616 0.420 0.000 0.446 0.516 0.452 0.482
  3004. 0.456 0.391 0.457 0.256 0.487 0.000 0.511 0.247 0.554 0.213 0.572 0.106 0.606 0.000
  3005. 0.645 0.340 0.668 0.167 0.706 0.000 0.725 0.273 0.736 0.267 0.753 0.000 0.779 0.364
  3006. 0.799 0.347 0.823 0.256 0.847 0.132 0.853 0.000 0.877 0.160 0.887 0.078 0.924 0.000
  3007. 0.948 0.095 1.000 0.000)))
  3008. (frq1-envs (vector
  3009. '(0.000 0.352 1.000 0.345)
  3010. '(0.000 0.485 0.037 0.482 0.058 0.511 0.068 0.482 0.085 0.523 0.102 0.489 0.112 0.562
  3011. 0.200 0.549 0.215 0.490 0.233 0.510 0.243 0.487 0.256 0.508 0.265 0.484 0.281 0.508
  3012. 0.293 0.482 0.302 0.499 0.318 0.489 0.528 0.492 0.544 0.516 0.557 0.487 0.572 0.492
  3013. 0.576 0.518 0.578 0.549 0.675 0.542 0.680 0.496 0.691 0.485 0.704 0.508 0.712 0.487
  3014. 0.728 0.506 0.743 0.480 0.755 0.503 0.770 0.482 0.782 0.497 0.794 0.478 0.805 0.492
  3015. 0.827 0.490 0.851 0.397 1.000 0.392)
  3016. '(0.000 0.499 0.018 0.497 0.029 0.563 0.061 0.563 0.074 0.553 0.086 0.487 0.098 0.513
  3017. 0.105 0.492 0.116 0.510 0.127 0.612 0.137 0.641 0.190 0.641 0.202 0.510 0.213 0.487
  3018. 0.224 0.548 0.235 0.510 0.244 0.567 0.268 0.553 0.277 0.501 0.286 0.489 0.314 0.504
  3019. 0.323 0.449 0.423 0.442 0.432 0.553 0.446 0.567 0.457 0.503 0.467 0.487 0.481 0.497
  3020. 0.506 0.563 0.526 0.553 0.533 0.510 0.544 0.496 0.555 0.510 0.582 0.556 0.583 0.624
  3021. 0.591 0.645 0.649 0.643 0.662 0.515 0.674 0.489 0.708 0.551 0.722 0.553 0.740 0.490
  3022. 0.761 0.487 0.793 0.506 0.820 0.556 0.859 0.560 0.889 0.490 0.926 0.494 0.928 0.556
  3023. 0.946 0.555 0.972 0.489 1.000 0.487)))
  3024. (frq2-envs (vector
  3025. '(0.000 0.352 1.000 0.345)
  3026. '(0.000 0.000 0.001 0.352 0.025 0.440 0.034 0.388 0.051 0.438 0.064 0.380 0.088 0.425
  3027. 0.098 0.383 0.120 0.350 0.146 0.357 0.193 0.336 0.207 0.409 0.219 0.381 0.231 0.418
  3028. 0.243 0.388 0.259 0.421 0.268 0.388 0.279 0.426 0.293 0.388 0.307 0.426 0.316 0.397
  3029. 0.336 0.428 0.345 0.402 0.364 0.430 0.371 0.397 0.372 0.492 0.534 0.494 0.549 0.402
  3030. 0.565 0.386 0.585 0.347 0.614 0.355 0.663 0.336 0.672 0.354 0.678 0.395 0.697 0.388
  3031. 0.707 0.406 0.735 0.407 0.758 0.406 0.804 0.397 0.830 0.400 0.846 0.397 1.000 0.395)
  3032. '(0.000 0.409 0.018 0.392 0.034 0.364 0.069 0.343 0.080 0.400 0.092 0.357 0.100 0.399
  3033. 0.114 0.354 0.136 0.347 0.157 0.315 0.195 0.399 0.206 0.376 0.218 0.399 0.231 0.348
  3034. 0.257 0.345 0.270 0.393 0.286 0.400 0.293 0.440 0.312 0.447 0.410 0.445 0.424 0.350
  3035. 0.434 0.340 0.449 0.393 0.462 0.393 0.476 0.406 0.489 0.366 0.504 0.348 0.516 0.360
  3036. 0.530 0.404 0.538 0.380 0.551 0.397 0.569 0.348 0.589 0.350 0.615 0.324 0.643 0.357
  3037. 0.653 0.400 0.678 0.400 0.685 0.376 0.694 0.352 0.716 0.350 0.730 0.404 0.748 0.411
  3038. 0.757 0.447 0.830 0.447 0.851 0.350 0.873 0.400 0.901 0.406 0.917 0.360 0.946 0.357
  3039. 1.000 0.447))))
  3040. (do ((i 0 (+ i 1)))
  3041. ((= i 3))
  3042. (set! (ampfs i) (make-env (amp-envs i) :duration (durs i) :scaler (* amp (amps i))))
  3043. (set! (frqf1s i) (make-env (frq1-envs i) :duration (durs i) :scaler (hz->radians 10000)))
  3044. (set! (frqf2s i) (make-env (frq2-envs i) :duration (durs i) :scaler (hz->radians 10000)))
  3045. (set! (starts i) (+ start (seconds->samples (begs i))))
  3046. (set! (stops i) (+ (starts i) (seconds->samples (durs i)))))
  3047. (do ((tone 0 (+ 1 tone)))
  3048. ((= tone 3))
  3049. (let ((ampf (ampfs tone))
  3050. (frqf1 (frqf1s tone))
  3051. (frqf2 (frqf2s tone))
  3052. (start (starts tone))
  3053. (end (stops tone)))
  3054. (do ((i start (+ i 1)))
  3055. ((= i end))
  3056. (outa i (* (env ampf)
  3057. (+ (polywave gen1 (env frqf1))
  3058. (polywave gen2 (env frqf2))))))))))
  3059. ;; (with-sound (:play #t) (hermit-thrush 0 .25))
  3060. ;;; --------------------------------------------------------------------------------
  3061. ;;;
  3062. ;;; Chuck-will's-widow
  3063. (defanimal (chuck-wills-widow beg amp)
  3064. (let ((dur 1.05))
  3065. (let ((start (seconds->samples beg))
  3066. (stop (seconds->samples (+ beg dur)))
  3067. (ampf (make-env '(0.000 0.000 0.017 0.656 0.026 0.136 0.048 0.000
  3068. 0.289 0.000 0.328 0.154 0.353 0.405 0.361 0.961 0.369 0.667 0.381 0.918 0.394 0.269
  3069. 0.402 0.204 0.425 0.333 0.440 0.570 0.466 0.444 0.515 0.470 0.592 0.294
  3070. 0.65 0.000 .68 0.0 .7 .1 .74 0 0.762 0.000 0.791 0.305 0.818 0.337
  3071. 0.832 1.000 0.844 0.699 0.857 0.903 0.867 0.405 0.883 0.398 0.895 0.853 0.907 0.853
  3072. 0.921 0.297 0.953 0.294 0.981 0.140 1.000 0.000)
  3073. :duration dur :scaler amp))
  3074. (gen1 (make-polywave 0.0 '(1 .97 3 .02 4 .01)))
  3075. (rnd (make-rand-interp 100 .25))
  3076. (frqf (make-env '(0.000 0.702 0.014 0.637 0.023 0.478 0.048 0.343 0.298 0.385 0.335 0.389 0.353 0.459
  3077. 0.362 0.546 0.371 0.687 0.376 0.715 0.383 0.687 0.388 0.635 0.391 0.565 0.398 0.474
  3078. 0.417 0.370 0.455 0.561 0.490 0.389 0.504 0.465 0.523 0.483 0.541 0.461 0.552 0.413
  3079. 0.605 0.409 0.610 0.370 0.781 0.380 0.804 0.417 0.823 0.457 0.837 0.517 0.851 0.693
  3080. 0.858 0.737 0.867 0.702 0.871 0.572 0.878 0.496 0.889 0.430 0.904 0.535 0.914 0.630
  3081. 0.924 0.554 0.933 0.457 0.951 0.380 1.000 0.354)
  3082. :duration dur :scaler (hz->radians 3000.0))))
  3083. (do ((i start (+ i 1)))
  3084. ((= i stop))
  3085. (outa i (* (env ampf)
  3086. (+ .75 (abs (rand-interp rnd)))
  3087. (polywave gen1 (env frqf))))))))
  3088. ;; (with-sound (:play #t) (chuck-wills-widow 0 .25))
  3089. ;;; --------------------------------------------------------------------------------
  3090. ;;;
  3091. ;;; California towhee
  3092. (defanimal (california-towhee beg amp)
  3093. (let ((dur 1.17)
  3094. ;; peep pitch changes
  3095. (amps (vector .5 .8 .85 .9 .95 1.0))
  3096. (begs (vector 0.0 0.39 0.67 0.86 0.96 1.09))
  3097. (frqs (vector 4750 4950 4880 4920 5210 5140))
  3098. (starts (make-vector 7 0))
  3099. (peep-dur 0.055)
  3100. (start (seconds->samples beg)))
  3101. (let ((stop (seconds->samples (+ beg dur)))
  3102. (ampf (make-env '(0.000 0.000 0.141 0.119 0.220 0.652 0.329 0.968 0.495 0.830 0.603 0.399 0.715 0.178 1.000 0.000)
  3103. :duration peep-dur :scaler amp))
  3104. (gen1 #f)
  3105. (frqf (make-env '(0 .5 .1 3 .2 1 .4 0 1 .2) :duration peep-dur :scaler (hz->radians 800)))
  3106. (peep-samps (seconds->samples peep-dur))
  3107. (peep-amp 1.0)
  3108. (peep-ctr 0))
  3109. (do ((i 0 (+ i 1)))
  3110. ((= i 6))
  3111. (set! (starts i) (+ start (seconds->samples (begs i)))))
  3112. (set! (starts 6) (+ 1 stop))
  3113. (do ((i start start))
  3114. ((>= i stop))
  3115. (set! peep-amp (amps peep-ctr))
  3116. (set! gen1 (make-polywave (frqs peep-ctr) :partials (list 1 (* peep-amp .97) 2 (* peep-amp .02) 3 (* peep-amp .01))))
  3117. (set! peep-ctr (+ peep-ctr 1))
  3118. (let ((reset-stop (min stop (+ i peep-samps))))
  3119. (do ((k i (+ k 1)))
  3120. ((= k reset-stop))
  3121. (outa k (* (env ampf)
  3122. (polywave gen1 (env frqf))))))
  3123. (set! start (starts peep-ctr))
  3124. (mus-reset ampf)
  3125. (mus-reset frqf)))))
  3126. ;; (with-sound (:play #t) (california-towhee 0 .25))
  3127. ;;; --------------------------------------------------------------------------------
  3128. ;;;
  3129. ;;; Black-chinned sparrow
  3130. (defanimal (black-chinned-sparrow beg amp gliss-up)
  3131. (let ((initial-dur .36)
  3132. (initial-pitch 6800)
  3133. (initial-amp .05)
  3134. (buzz-dur 2.62)
  3135. (buzz-frq0 (/ 1.0 (* 2 .34)))
  3136. (buzz-frq1 (/ 1.0 .02))
  3137. (buzz-frqmid (/ 1.0 .15))
  3138. (buzz-size 128)
  3139. (buzz-low 3000)
  3140. (buzz-high 8500)
  3141. (buzz-mid 4000)
  3142. (start (seconds->samples beg)))
  3143. (let (;; initial stable pitch, then the gliss->buzz with frq going either up or down
  3144. (initial-stop (+ start (seconds->samples initial-dur)))
  3145. (initial-ampf (make-env '(0 0 1 1 10 1 11 0) :duration initial-dur :scaler (* amp initial-amp)))
  3146. (initial-gen (make-oscil initial-pitch))
  3147. (buzz-frq-table (let ((v (make-float-vector buzz-size))
  3148. (bfrqf (make-env (vector 0 (if gliss-up
  3149. (values buzz-low .5 buzz-mid 1 buzz-high)
  3150. (values buzz-high .5 buzz-mid 1 buzz-low)))
  3151. :length buzz-size
  3152. :scaler (hz->radians 1.0))))
  3153. (do ((i 0 (+ i 1)))
  3154. ((= i buzz-size))
  3155. (set! (v i) (env bfrqf)))
  3156. v))
  3157. (buzz-amp-table (let ((v (make-float-vector buzz-size))
  3158. (bampf (make-env (if gliss-up
  3159. '(0 0 1 1 2.5 .7 3 0 3.5 0)
  3160. '(0 0 .5 1 2 1 3 0 3.5 0))
  3161. :length buzz-size)))
  3162. (do ((i 0 (+ i 1)))
  3163. ((= i buzz-size))
  3164. (set! (v i) (env bampf)))
  3165. v)))
  3166. (let ((buzz-stop (+ initial-stop (seconds->samples buzz-dur)))
  3167. (buzz-amp (make-env '(0.000 0.000 0.035 0.190 0.082 0.336 0.168 0.625 0.348 0.743 0.467 0.763
  3168. 0.530 0.723 0.628 0.818 0.668 1.000 0.728 0.913 0.777 0.506 0.818 0.174 1.000 0.000)
  3169. :duration buzz-dur :scaler amp))
  3170. (buzz-frq (make-env (list 0 buzz-frq0 .5 buzz-frqmid 1 buzz-frq1) :duration buzz-dur :scaler (hz->radians 1.0)))
  3171. (buzz-frqf (make-table-lookup buzz-frq0 :wave buzz-frq-table))
  3172. (buzz-ampf (make-table-lookup buzz-frq0 :wave buzz-amp-table))
  3173. (buzz-gen (make-polywave 0.0 '(1 .98 2 .005 3 .01))))
  3174. (do ((i start (+ i 1)))
  3175. ((= i initial-stop))
  3176. (outa i (* (env initial-ampf) (oscil initial-gen)) ))
  3177. (do ((i initial-stop (+ i 1)))
  3178. ((= i buzz-stop))
  3179. (let ((frq (env buzz-frq)))
  3180. (outa i (* (env buzz-amp)
  3181. (table-lookup buzz-ampf frq)
  3182. (polywave buzz-gen (table-lookup buzz-frqf frq))))))))))
  3183. ;; (with-sound (:play #t) (black-chinned-sparrow 0 .25 #t))
  3184. ;;; --------------------------------------------------------------------------------
  3185. ;;;
  3186. ;;; Mourning dove
  3187. (defanimal (mourning-dove beg amp)
  3188. (let ((dur 4.1))
  3189. (let ((start (seconds->samples beg))
  3190. (stop (seconds->samples (+ beg dur)))
  3191. (rnd (make-rand-interp 2000 (hz->radians 200.0)))
  3192. (rndf (make-env '(0 1 2 .3 5 .3) :duration dur :scaler .1))
  3193. (gen2 (make-oscil 620))
  3194. (gen1 (make-polywave 0.0 (list 1 (* .95 .95) 2 (* .95 .05) 3 (* .95 .005))))
  3195. (ampf (make-env '(0.000 0.000 0.012 0.256 0.032 0.247 0.048 0.188 0.197 0.156 0.224 0.988 0.238 0.844
  3196. 0.256 0.881 0.309 0.000 0.390 0.000 0.414 0.881 0.441 0.819 0.494 0.394 0.564 0.175
  3197. 0.579 0.000 0.647 0.000 0.678 0.725 0.703 0.659 0.786 0.000 0.856 0.000 0.879 0.631
  3198. 0.892 0.675 0.920 0.494 0.986 0.162 1.000 0.000)
  3199. :duration dur :scaler amp))
  3200. (frqf (make-env '(0.000 0.395 0.019 0.449 0.065 0.439 0.159 0.439 0.198 0.427 0.217 0.493 0.229 0.621
  3201. 0.236 0.658 0.270 0.642 0.298 0.555 0.309 0.495 0.414 0.487 0.432 0.499 0.477 0.497
  3202. 0.537 0.484 0.577 0.468 0.588 0.427 0.674 0.480 0.698 0.493 0.729 0.487 0.771 0.472
  3203. 0.877 0.468 0.903 0.493 0.960 0.478 1.000 0.462)
  3204. :duration dur :scaler (hz->radians 1000.0))))
  3205. (do ((i start (+ i 1)))
  3206. ((= i stop))
  3207. (outa i (* (env ampf)
  3208. (+ (polywave gen1 (env frqf))
  3209. (* (env rndf)
  3210. (oscil gen2 (rand-interp rnd))))))))))
  3211. ;; (with-sound (:play #t) (mourning-dove 0 .25))
  3212. ;;; --------------------------------------------------------------------------------
  3213. ;;;
  3214. ;;; Bobwhite
  3215. (defanimal (bobwhite beg amp)
  3216. (let ((call1-dur .32)
  3217. (call1-amp .07)
  3218. (call2-beg .80)
  3219. (call2-dur .20)
  3220. (call2-amp .35)
  3221. (call3-beg 1.43)
  3222. (call3-dur .22)
  3223. (call3-amp 1.0)
  3224. (call1-start (seconds->samples beg)))
  3225. (let ((call1-gen (make-oscil 1450))
  3226. (call1-ampf (make-env '(0 0 1 1 8 1 9 0) :duration call1-dur :scaler (* amp call1-amp)))
  3227. (call1-frqf (make-env '(0 1 1 0) :duration call1-dur :scaler (hz->radians 80)))
  3228. (call1-stop (+ call1-start (seconds->samples call1-dur)))
  3229. (call2-gen (make-polywave 1320 '(1 .95 2 .04 3 .01 4 .02 5 .01)))
  3230. (call2-ampf (make-env '(0 0 1 1 4 1 5 0) :duration call2-dur :scaler (* amp call2-amp)))
  3231. (call2-frqf (make-env '(0 0 1 1 4 1 5 .5) :duration call2-dur :scaler (hz->radians 430)))
  3232. (call2-start (+ call1-start (seconds->samples call2-beg))))
  3233. (let ((call2-stop (+ call2-start (seconds->samples call2-dur)))
  3234. (call3-gen (make-polywave 0.0 '(1 .95 2 .04 4 .01)))
  3235. (call4-gen (make-polywave 0.0 '(1 .05 2 .6 3 .2 4 .1 5 .01 6 .005)))
  3236. (call3-ampf (make-env '(0 0 .5 1 .75 .2 1 0) :duration call3-dur :scaler (* amp call3-amp)))
  3237. (call3-frqf (make-env '(0.000 0.245 0.135 0.304 0.399 0.335 0.439 0.345 0.491 0.384 0.551 0.434 0.591 0.485
  3238. 0.65 0.65 .67 .5 1 .3)
  3239. :duration call3-dur :scaler (hz->radians 6000.0)))
  3240. (call3-f1 (make-env '(0 1 .6 1 .75 0 1 0) :duration call3-dur))
  3241. (call3-f2 (make-env '(0 0 .6 0 .64 1 1 1) :duration call3-dur))
  3242. (call3-start (+ call1-start (seconds->samples call3-beg))))
  3243. (let ((call3-stop (+ call3-start (seconds->samples call3-dur))))
  3244. (do ((i call1-start (+ i 1)))
  3245. ((= i call1-stop))
  3246. (outa i (* (env call1-ampf)
  3247. (oscil call1-gen (env call1-frqf)))))
  3248. (do ((i call2-start (+ i 1)))
  3249. ((= i call2-stop))
  3250. (outa i (* (env call2-ampf)
  3251. (polywave call2-gen (env call2-frqf)))))
  3252. (do ((i call3-start (+ i 1)))
  3253. ((= i call3-stop))
  3254. (let ((frq (env call3-frqf)))
  3255. (outa i (* (env call3-ampf)
  3256. (+ (* (env call3-f1) (polywave call3-gen frq))
  3257. (* (env call3-f2) (polywave call4-gen (* 0.5 frq)))))))))))))
  3258. ;; (with-sound (:play #t) (bobwhite 0 .5))
  3259. ;;; --------------------------------------------------------------------------------
  3260. ;;;
  3261. ;;; Warbling vireo
  3262. (defanimal (warbling-vireo beg amp)
  3263. (let ((dur 2.25))
  3264. (let ((start (seconds->samples beg))
  3265. (stop (seconds->samples (+ beg dur)))
  3266. (ampf (make-env '(0.000 0.000 0.018 0.042 0.046 0.000 0.074 0.113 0.091 0.111 0.096 0.000
  3267. 0.113 0.000 0.129 0.124 0.144 0.089 0.148 0.026 0.164 0.000 0.187 0.108
  3268. 0.209 0.000 0.220 0.000 0.222 0.103 0.235 0.218 0.245 0.205 0.258 0.000
  3269. 0.268 0.000 0.279 0.087 0.305 0.089 0.316 0.000 0.338 0.000 0.345 0.216
  3270. 0.379 0.726 0.402 0.000 0.411 0.000 0.414 0.324 0.437 0.155 0.455 0.139
  3271. 0.461 0.000 0.473 0.000 0.482 0.126 0.492 0.126 0.497 0.321 0.509 0.139
  3272. 0.520 0.003 0.536 0.308 0.552 0.187 0.565 0.250 0.572 0.000 0.587 0.000
  3273. 0.596 0.737 0.619 0.966 0.646 0.501 0.661 0.000 0.670 0.000 0.679 0.266
  3274. 0.697 0.097 0.703 0.711 0.719 0.000 0.736 0.000 0.746 0.997 0.756 0.282
  3275. 0.775 0.392 0.787 0.000 0.804 0.000 0.813 0.811 0.826 0.463 0.836 0.411
  3276. 0.847 0.000 0.862 0.000 0.873 0.284 0.893 0.192 0.899 0.066 0.912 0.329
  3277. 0.921 0.000 0.931 0.000 0.934 0.303 0.947 0.466 0.960 0.418 0.980 0.258 1.000 0.000)
  3278. :duration dur :scaler amp))
  3279. (gen1 (make-oscil))
  3280. (frqf (make-env '(0.000 0.184 0.010 0.214 0.026 0.214 0.036 0.197 0.057 0.197 0.066 0.233
  3281. 0.085 0.266 0.099 0.260 0.113 0.255 0.124 0.274 0.125 0.222 0.134 0.249
  3282. 0.146 0.227 0.165 0.227 0.169 0.178 0.179 0.184 0.191 0.192 0.209 0.175
  3283. 0.221 0.186 0.226 0.312 0.227 0.258 0.233 0.285 0.234 0.236 0.242 0.274
  3284. 0.245 0.241 0.252 0.230 0.268 0.227 0.272 0.203 0.284 0.225 0.295 0.216
  3285. 0.306 0.208 0.316 0.219 0.346 0.233 0.357 0.282 0.359 0.252 0.366 0.296
  3286. 0.369 0.252 0.373 0.304 0.376 0.255 0.382 0.301 0.385 0.263 0.390 0.301
  3287. 0.412 0.279 0.418 0.321 0.421 0.247 0.424 0.279 0.427 0.233 0.441 0.211
  3288. 0.450 0.208 0.457 0.178 0.480 0.197 0.484 0.238 0.488 0.205 0.492 0.241
  3289. 0.495 0.200 0.499 0.247 0.506 0.241 0.512 0.186 0.529 0.192 0.530 0.255
  3290. 0.548 0.238 0.557 0.214 0.568 0.241 0.582 0.230 0.591 0.299 0.599 0.307
  3291. 0.609 0.301 0.615 0.274 0.627 0.342 0.645 0.359 0.648 0.329 0.670 0.332
  3292. 0.672 0.247 0.700 0.227 0.705 0.304 0.715 0.249 0.722 0.244 0.738 0.247
  3293. 0.749 0.307 0.753 0.425 0.762 0.422 0.770 0.468 0.774 0.392 0.786 0.342
  3294. 0.808 0.326 0.821 0.255 0.832 0.285 0.843 0.266 0.866 0.263 0.891 0.197
  3295. 0.915 0.247 0.935 0.285 0.942 0.345 0.945 0.290 0.947 0.441 0.950 0.353
  3296. 0.953 0.411 0.957 0.367 0.960 0.405 0.964 0.370 0.967 0.405 0.973 0.373
  3297. 0.979 0.373 0.990 0.296 1.000 0.255)
  3298. :duration dur :scaler (hz->radians 11900))))
  3299. (do ((i start (+ i 1)))
  3300. ((= i stop))
  3301. (outa i (* (env ampf)
  3302. (oscil gen1 (env frqf))))))))
  3303. ;; (with-sound (:play #t) (warbling-vireo 0 .25))
  3304. ;;; --------------------------------------------------------------------------------
  3305. ;;;
  3306. ;;; Great-horned owl
  3307. (defanimal (great-horned-owl beg amp)
  3308. (let ((begs (vector 0.0 0.26 1.42 2.16))
  3309. (durs (vector 0.14 0.40 0.43 0.37))
  3310. (amps (vector .75 .9 .95 1.0)))
  3311. (do ((call 0 (+ call 1)))
  3312. ((= call 4))
  3313. (let ((start (seconds->samples (+ beg (begs call)))))
  3314. (let ((stop (+ start (seconds->samples (durs call))))
  3315. (gen (make-polywave 0.0 '(1 .9 2 .12 3 .007 7 .003)))
  3316. (rnd (make-rand-interp 30 (hz->radians 5)))
  3317. (ampf (make-env '(0 0 1 1 4 .9 5 0) :duration (durs call) :scaler (* amp (amps call))))
  3318. (frqf (make-env '(0 1.25 .5 2 4.4 1.95 5 1) :base .1 :duration (durs call) :scaler (hz->radians (* 0.5 328)))))
  3319. (do ((i start (+ i 1)))
  3320. ((= i stop))
  3321. (outa i (* (env ampf)
  3322. (polywave gen (+ (env frqf)
  3323. (rand-interp rnd)))))))))))
  3324. ;; (with-sound (:play #t) (great-horned-owl 0 .5))
  3325. ;;; --------------------------------------------------------------------------------
  3326. ;;;
  3327. ;;; Western tanager
  3328. (defanimal (western-tanager beg amp)
  3329. (let ((gen (make-polywave 0.0 '(1 .98 2 .02)))
  3330. (begs (vector 0.0 0.7 1.4 2.0))
  3331. (durs (vector 0.27 0.32 0.25 0.24))
  3332. (amps (vector 0.32 0.85 1.0 0.65)))
  3333. (let ((ampfs (vector
  3334. (make-env '(0.000 0.000 0.086 0.398 0.247 0.610 0.363 0.000 0.416 0.000 0.513 0.603 0.610 0.603
  3335. 0.708 0.507 0.733 0.232 0.798 0.895 0.848 1.000 0.898 0.927 1.000 0.000)
  3336. :duration (durs 0) :scaler (* amp (amps 0)))
  3337. (make-env '(0.000 0.000 0.060 0.735 0.303 1.000 0.394 0.408 0.503 0.318 0.617 0.879 0.912 0.258
  3338. 0.939 0.055 1.000 0.000)
  3339. :duration (durs 1) :scaler (* amp (amps 1)))
  3340. (make-env '(0.000 0.000 0.098 0.837 0.183 0.704 0.395 1.000 0.469 0.185 0.553 0.086 0.731 0.841
  3341. 0.785 0.834 1.000 0.000)
  3342. :duration (durs 2) :scaler (* amp (amps 2)))
  3343. (make-env '(0.000 0.000 0.047 0.837 0.117 0.172 0.167 0.157 0.234 0.993 0.296 0.826 0.319 0.609
  3344. 0.431 0.781 0.567 0.506 0.642 0.166 0.673 0.757 0.769 0.874 0.873 0.766 0.919 0.605
  3345. 0.956 0.230 1.000 0.000)
  3346. :duration (durs 3) :scaler (* amp (amps 3)))))
  3347. (frqfs (vector
  3348. (make-env '(0.000 0.437 0.056 0.561 0.075 0.558 0.094 0.459 0.109 0.536 0.128 0.411 0.142 0.521
  3349. 0.156 0.435 0.172 0.532 0.190 0.450 0.214 0.556 0.226 0.459 0.239 0.556 0.350 0.318
  3350. 0.409 0.313 0.491 0.461 0.614 0.461 0.665 0.428 0.702 0.340 0.718 0.406 0.739 0.331
  3351. 0.756 0.470 0.772 0.336 0.803 0.510 0.818 0.353 0.845 0.536 0.862 0.415 0.886 0.545
  3352. 0.903 0.470 0.924 0.534 0.945 0.442 1.000 0.395)
  3353. :duration (durs 0) :scaler (hz->radians 6000))
  3354. (make-env '(0.000 0.587 0.045 0.543 0.064 0.459 0.088 0.563 0.105 0.481 0.127 0.600 0.141 0.514
  3355. 0.172 0.620 0.185 0.532 0.212 0.640 0.233 0.567 0.251 0.629 0.266 0.589 0.374 0.448
  3356. 0.440 0.404 0.528 0.406 0.557 0.450 0.583 0.466 0.604 0.517 0.618 0.481 0.648 0.552
  3357. 0.667 0.499 0.691 0.556 0.710 0.517 0.739 0.561 0.758 0.519 0.791 0.561 0.814 0.510
  3358. 0.833 0.534 0.975 0.483 1.000 0.488)
  3359. :duration (durs 1) :scaler (hz->radians 6000))
  3360. (make-env '(0.000 0.247 0.059 0.539 0.073 0.556 0.131 0.490 0.150 0.444 0.172 0.501 0.199 0.402
  3361. 0.222 0.512 0.249 0.430 0.279 0.552 0.304 0.464 0.340 0.600 0.360 0.479 0.383 0.567
  3362. 0.496 0.311 0.611 0.320 0.635 0.470 0.655 0.331 0.680 0.492 0.703 0.349 0.742 0.534
  3363. 0.770 0.373 0.797 0.536 0.823 0.419 0.856 0.536 0.881 0.433 0.910 0.506 0.950 0.397
  3364. 0.978 0.508 1.000 0.514)
  3365. :duration (durs 2) :scaler (hz->radians 6000))
  3366. (make-env '(0.000 0.614 0.031 0.607 0.046 0.514 0.072 0.430 0.145 0.307 0.168 0.380 0.191 0.536
  3367. 0.205 0.453 0.223 0.570 0.239 0.457 0.261 0.547 0.282 0.426 0.297 0.503 0.318 0.426
  3368. 0.341 0.453 0.449 0.468 0.580 0.435 0.635 0.419 0.652 0.353 0.674 0.494 0.687 0.545
  3369. 0.706 0.455 0.732 0.556 0.754 0.457 0.783 0.547 0.807 0.455 0.840 0.558 0.858 0.453
  3370. 0.885 0.539 0.914 0.439 0.938 0.541 0.965 0.433 1.000 0.472)
  3371. :duration (durs 3) :scaler (hz->radians 6000)))))
  3372. (do ((call 0 (+ call 1)))
  3373. ((= call 4))
  3374. (let ((ampf (ampfs call))
  3375. (frqf (frqfs call))
  3376. (start (seconds->samples (+ beg (begs call)))))
  3377. (let ((stop (+ start (seconds->samples (durs call)))))
  3378. (do ((i start (+ i 1)))
  3379. ((= i stop))
  3380. (outa i (* (env ampf)
  3381. (polywave gen (env frqf)))))))))))
  3382. ;; (with-sound (:play #t) (western-tanager 0 .5))
  3383. ;;; --------------------------------------------------------------------------------
  3384. ;;;
  3385. ;;; Pileated woodpecker
  3386. (defanimal (pileated-woodpecker beg amp)
  3387. (let ((dur 2.28)
  3388. (pulse-space .137)
  3389. (pulse-dur .06)
  3390. (start (seconds->samples beg)))
  3391. (let ((gen #f)
  3392. (partials '(1 .06 2 1.0 3 .1 4 .13 5 .07 6 .01 7 .015 8 .01 9 .017 10 .006)) ; .705 is scaling
  3393. (stop (seconds->samples (+ beg dur)))
  3394. (ampf (make-env '(0 .5 4 1 15 1) :duration dur :scaler (* .705 amp)))
  3395. (pulse-ampf (make-env '(0.000 0.000 0.20 0.625 0.511 0.985 0.663 1.000 0.802 0.940 0.906 0.731 0.961 0.157 1.000 0.000)
  3396. :duration pulse-dur))
  3397. (pulse-frqf (make-env '(0 0 .3 .9 .6 1 .8 1 1 .75) :duration pulse-dur :scaler (hz->radians 300)))
  3398. (pulse-off (make-env '(0 1120 .25 1140 .4 1190 .9 1150) :length 18))
  3399. (pulse-samps (seconds->samples pulse-space))
  3400. (pulse-out (seconds->samples pulse-dur)))
  3401. (do ((i start (+ i pulse-samps)))
  3402. ((>= i stop))
  3403. (set! (mus-location ampf) (- i start))
  3404. (let ((reset-stop (min stop (+ i pulse-out))))
  3405. (let ((pulse-amp (env ampf)))
  3406. (set! gen (make-polywave
  3407. :partials (let ((xcoord #f))
  3408. (map (lambda (x)
  3409. (set! xcoord (not xcoord))
  3410. (if xcoord x (* x pulse-amp)))
  3411. partials)))))
  3412. (set! (mus-frequency gen) (- (env pulse-off) 300.0))
  3413. (do ((k i (+ k 1)))
  3414. ((= k reset-stop))
  3415. (outa k (* (env pulse-ampf)
  3416. (polywave gen (env pulse-frqf)))))
  3417. (mus-reset pulse-ampf)
  3418. (mus-reset pulse-frqf))))))
  3419. ;; (with-sound (:play #t) (pileated-woodpecker 0 .5))
  3420. ;;; --------------------------------------------------------------------------------
  3421. ;;;
  3422. ;;; Whip-poor-will
  3423. (defanimal (whip-poor-will beg amp)
  3424. (let ((dur 0.75))
  3425. (let ((start (seconds->samples beg))
  3426. (stop (seconds->samples (+ beg dur)))
  3427. (ampf (make-env '(0.000 0.000 0.043 0.172 0.063 0.341 0.093 0.256 0.188 0.159 0.209 0.000
  3428. 0.466 0.000 0.527 0.097 0.558 0.081 0.626 0.309 0.650 0.288
  3429. 0.657 0.140 0.674 0.142 0.708 0.322 0.750 0.343 0.765 0.121
  3430. 0.787 0.201 0.805 0.381 0.826 0.470
  3431. 0.861 0.144 0.867 0.451 0.877 0.106
  3432. 0.890 0.964
  3433. 0.914 0.117 0.919 0.377 0.926 0.233 0.931 0.324 0.949 0.244 0.977 0.377 1.000 0.000)
  3434. :duration dur :scaler amp))
  3435. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .01)))
  3436. (frqf (make-env '(0 1170 .093 1680 .2 1640
  3437. .46 1170 .558 1170 .626 1450 .650 1530
  3438. .66 1290 .707 1480 .750 1480 .765 1290
  3439. .78 1320 .8 1600
  3440. .81 1300 .82 1900 .83 1500 .84 2100 .85 1700 .86 2150 .87 1900
  3441. .89 2460 .914 2160 .93 1680 1.0 1600)
  3442. :duration dur :scaler (hz->radians 1.0))))
  3443. (do ((i start (+ i 1)))
  3444. ((= i stop))
  3445. (outa i (* (env ampf)
  3446. (polywave gen1 (env frqf))))))))
  3447. ;; (with-sound (:play #t) (whip-poor-will 0 .25))
  3448. ;;; --------------------------------------------------------------------------------
  3449. ;;;
  3450. ;;; Varied thrush
  3451. (defanimal (varied-thrush beg amp)
  3452. (let ((dur 1.02))
  3453. (let ((start (seconds->samples beg))
  3454. (stop (seconds->samples (+ beg dur)))
  3455. (ampf (make-env '(0.000 0.000 0.052 0.100 0.130 0.538 0.261 0.845 0.438 0.983 0.580 0.917 0.738 0.720 0.860 0.475 0.941 0.172 1.000 0.000)
  3456. :duration dur :scaler (/ amp 2.25)))
  3457. (gen1 (make-rxyk!cos 3360 -5/84 0.7)) ; (/ 200 3360)
  3458. (gen2 (make-rxyk!cos 3760 5/94 0.3)) ; (/ 200 3760)
  3459. (gen3 (make-polywave 3660 (list 1 (* .25 .98) 2 (* .25 .02))))
  3460. (frqf (make-env '(0 1 .1 0 .95 0 1.0 -.1) :duration dur :scaler (hz->radians 10.0)))
  3461. (rnd (make-rand-interp 100 (hz->radians 3))))
  3462. (do ((i start (+ i 1)))
  3463. ((= i stop))
  3464. (let ((fm (+ (env frqf)
  3465. (rand-interp rnd))))
  3466. (outa i (* (env ampf)
  3467. (+ (rxyk!cos gen1 (* 16.8 fm))
  3468. (rxyk!cos gen2 (* 18.8 fm))
  3469. (polywave gen3 fm)))))))))
  3470. ;; (with-sound (:play #t) (varied-thrush 0 .25))
  3471. ;;; --------------------------------------------------------------------------------
  3472. ;;;
  3473. ;;; Nashville warbler
  3474. (defanimal (nashville-warbler beg amp)
  3475. (define (nashville-warbler-1 beg dur amp)
  3476. (let ((start (seconds->samples beg))
  3477. (stop (seconds->samples (+ beg dur)))
  3478. (ampf (make-env '(0.000 0.000 0.111 0.837 0.169 0.995 0.328 1.000 0.430 0.905 0.561 0.333
  3479. 0.595 0.000 0.61 0.0 0.62 0.154 0.715 0.675 0.806 0.959 0.969 0.908 1.000 0.000)
  3480. :duration dur :scaler amp))
  3481. (frqf (make-env '(0 7200 .1 5500 .3 4800 .56 4400
  3482. .59 4500 .62 7200 .72 7200
  3483. .8 6800 .83 6700
  3484. .85 6700 .87 6600
  3485. .9 6600 .92 6500
  3486. .96 6500 1 6520)
  3487. :duration dur :scaler (hz->radians 1.0)))
  3488. (gen1 (make-polywave 0.0 '(1 .95 2 .005 3 .03))))
  3489. (do ((i start (+ i 1)))
  3490. ((= i stop))
  3491. (outa i (* (env ampf)
  3492. (polywave gen1 (env frqf)))))))
  3493. (define (nashville-warbler-2 beg dur amp)
  3494. (let ((start (seconds->samples beg))
  3495. (stop (seconds->samples (+ beg dur)))
  3496. (ampf (make-env '(0.000 0.000 0.049 0.165 0.082 0.591 0.123 0.561 0.139 0.434 0.219 0.981 0.325 0.984
  3497. 0.374 0.100 0.438 0.100 0.484 0.415 0.552 0.818 0.618 0.995 0.753 0.748 0.888 0.439 1.000 0.000)
  3498. :duration dur :scaler amp))
  3499. (frqf (make-env '(0 3450 .1 5000
  3500. .14 4800 .37 5600
  3501. .44 8600 .55 6600 .61 5300 1 3200)
  3502. :duration dur :scaler (hz->radians 1.0)))
  3503. (gen1 (make-polywave 0.0 '(1 .95 2 .005 3 .03))))
  3504. (do ((i start (+ i 1)))
  3505. ((= i stop))
  3506. (outa i (* (env ampf)
  3507. (polywave gen1 (env frqf)))))))
  3508. (define (nashville-warbler-3 beg amp)
  3509. (let ((dur .1))
  3510. (let ((start (seconds->samples beg))
  3511. (stop (seconds->samples (+ beg dur)))
  3512. (ampf (make-env '(0 0 1 1 3 1 4 0) :duration dur :scaler amp))
  3513. (frqf (make-env '(0 7580 .6 5100 1 5000) :duration dur :scaler (hz->radians 1.0)))
  3514. (gen1 (make-polywave 0.0 '(1 .95 2 .005 3 .03))))
  3515. (do ((i start (+ i 1)))
  3516. ((= i stop))
  3517. (outa i (* (env ampf)
  3518. (polywave gen1 (env frqf))))))))
  3519. (define (nashville-warbler-4 beg amp)
  3520. (let ((dur 0.07))
  3521. (let ((start (seconds->samples beg))
  3522. (stop (seconds->samples (+ beg dur)))
  3523. (ampf (make-env '(0.000 0.000 0.129 0.201 0.182 0.382 0.197 1.000
  3524. 0.243 0.350 0.342 0.520 0.393 0.759 0.485 0.878 0.647 0.694 1.000 0.000)
  3525. :duration dur :scaler amp))
  3526. (frqf (make-env '(0 3300 .195 4800
  3527. .24 5500 .26 5500 .4 4500 .7 3460 1 3000)
  3528. :duration dur :scaler (hz->radians 1.0)))
  3529. (gen1 (make-polywave 0.0 '(1 .96 2 .03 3 .005 4 .004))))
  3530. (do ((i start (+ i 1)))
  3531. ((= i stop))
  3532. (outa i (* (env ampf)
  3533. (polywave gen1 (env frqf))))))))
  3534. (let ((amps1 (vector .2 .5 .7 .9 1.0 1.0)))
  3535. (do ((call 0 (+ call 1)))
  3536. ((= call 6))
  3537. (nashville-warbler-1 (+ beg (* .21 call)) (+ .15 (random .02)) (* amp (amps1 call)))))
  3538. (do ((call 0 (+ call 1)))
  3539. ((= call 3))
  3540. (nashville-warbler-2 (+ beg 1.26 (* .17 call)) (+ .13 (random .02)) amp))
  3541. (nashville-warbler-3 (+ beg 1.8) amp)
  3542. (nashville-warbler-4 (+ beg 1.94) (* 0.4 amp)))
  3543. ;; (with-sound (:play #t) (nashville-warbler 0 .25))
  3544. ;;; --------------------------------------------------------------------------------
  3545. ;;;
  3546. ;;; Ruffed grouse
  3547. (defanimal (ruffed-grouse beg amp)
  3548. (let ((dur 10.33)
  3549. (bump-dur 0.27))
  3550. (let ((start (seconds->samples beg))
  3551. (stop (seconds->samples (+ beg dur)))
  3552. (ampf (make-env '(0.000 0.000 0.006 0.097 0.045 0.135 0.091 0.244 0.141 0.223
  3553. 0.219 0.552 0.301 0.682 0.360 0.689 0.503 0.766 0.696 0.619
  3554. 0.751 0.622 0.806 0.705 0.820 0.552 0.829 0.787 0.849 0.687
  3555. 0.867 1.1000 0.910 0.494 0.929 0.559 0.944 0.527 0.969 0.339 1.000 0.000)
  3556. :duration dur :scaler (* 3 amp)))
  3557. (frqf (make-env (list 0 (/ 1.0 .45)
  3558. .18 (/ 1.0 .45)
  3559. .19 (/ 1.0 .8)
  3560. .22 (/ 1.0 .8)
  3561. .25 (/ 1.0 .6)
  3562. .5 (/ 1.0 .4)
  3563. .74 (/ 1.0 .15)
  3564. .9 (/ 1.0 .08)
  3565. 1 (/ 1.0 .4))
  3566. :duration dur :scaler (hz->radians 1.0)))
  3567. (bump-samps (seconds->samples bump-dur))
  3568. (bump (make-env '(0.000 0.499 0.040 0.499 0.063 0.506 0.089 0.492 0.108 0.499 0.122 0.523
  3569. 0.134 0.506 0.143 0.462 0.153 0.425 0.164 0.457 0.171 0.508 0.173 0.580
  3570. 0.176 0.647 0.181 0.691 0.186 0.650 0.195 0.404 0.197 0.355 0.202 0.311
  3571. 0.208 0.362 0.222 0.657 0.229 0.696 0.235 0.661 0.258 0.350 0.263 0.311
  3572. 0.271 0.297 0.283 0.343 0.311 0.661 0.316 0.703 0.322 0.733 0.333 0.698
  3573. 0.340 0.643 0.375 0.343 0.379 0.304 0.389 0.278 0.404 0.353 0.443 0.624
  3574. 0.458 0.661 0.473 0.631 0.494 0.508 0.517 0.434 0.537 0.394 0.557 0.436
  3575. 0.589 0.520 0.618 0.564 0.644 0.538 0.679 0.490 0.703 0.473 0.736 0.483
  3576. 0.794 0.510 0.831 0.510 0.909 0.494 1.000 0.499)
  3577. :duration bump-dur :offset -0.5)))
  3578. (let ((bump-wave (make-float-vector bump-samps)))
  3579. (do ((i 0 (+ i 1)))
  3580. ((= i bump-samps))
  3581. (set! (bump-wave i) (env bump)))
  3582. (let ((wt (make-wave-train 0.0 0.0 bump-wave)))
  3583. (do ((i start (+ i 1)))
  3584. ((= i stop))
  3585. (outa i (* (env ampf) (wave-train wt (env frqf))))))))))
  3586. #|
  3587. ;; old form:
  3588. (do ((i start (+ i 1)))
  3589. ((= i stop))
  3590. (if (> (pulse-train pulser (env frqf)) .1)
  3591. (let ((bump-stop (+ i bump-samps)))
  3592. (set! (mus-location ampf) (- i start))
  3593. (let ((vol (env ampf)))
  3594. (mus-reset bump)
  3595. (do ((k i (+ k 1)))
  3596. ((= k bump-stop))
  3597. (outa k (* vol (env bump)))))))))))
  3598. |#
  3599. ;; (with-sound (:play #t) (ruffed-grouse 0 0.5))
  3600. ;;; --------------------------------------------------------------------------------
  3601. ;;;
  3602. ;;; Plumbeous vireo
  3603. (defanimal (plumbeous-vireo-1 beg amp)
  3604. (let ((dur 0.34))
  3605. (let ((start (seconds->samples beg))
  3606. (stop (seconds->samples (+ beg dur)))
  3607. (ampf (make-env '(0.000 0.000 .02 .1 0.124 0.146 0.142 0.370 0.251 1.000 0.277 0.373 .29 .1 0.393 0.326 0.419 0.731
  3608. 0.568 0.407 0.713 0.286 0.885 0.351 0.947 0.311 0.967 0.123 1.000 0.000)
  3609. :duration dur :scaler amp))
  3610. (gen1 (make-polywave 0.0 '(1 .98 3 .01 5 .004)))
  3611. (ampf1a (make-env '(0 .2 .15 .25 .2 .01 .24 .02 .25 .1 .32 .1 .34 .005 .37 .001 .4 .05 .6 .03 1 0) :duration dur))
  3612. (gen1a (make-oscil))
  3613. (frqf (make-env '(0.000 0.181 0.054 0.175 0.072 0.187 0.087 0.156 0.097 0.177 0.118 0.154 0.151 0.259 0.201
  3614. 0.320 0.243 0.293 0.256 0.261 0.275 0.202 0.295 0.162 0.316 0.204 0.328 0.314 0.339 0.446
  3615. 0.359 0.489 0.382 0.454 0.394 0.352 0.425 0.286 0.449 0.277 0.467 0.246 0.494 0.238 0.507
  3616. 0.211 0.525 0.234 0.551 0.166 0.570 0.215 0.586 0.207 0.595 0.161 0.617 0.211 0.633 0.203
  3617. 0.642 0.159 0.657 0.207 0.692 0.168 0.711 0.231 0.728 0.227 0.742 0.188 0.750 0.257 0.795
  3618. 0.218 0.802 0.283 0.845 0.234 0.856 0.296 0.897 0.229 0.909 0.292 0.958 0.227 0.969 0.261 1.000 0.252)
  3619. :duration dur :scaler (hz->radians 10000.0)))
  3620. (gen2 (make-polywave 0.0 '(1 .05 2 .1 3 .2 4 .3 5 .2 6 .1 7 .05)))
  3621. (ampf2 (make-env '(0 1 .15 0 1 0) :duration dur :scaler (* .5 amp)))
  3622. (frqf2 (make-env '(0 850 1 700) :duration dur :scaler (hz->radians 1.0)))
  3623. (rnd (make-rand-interp 1000 (hz->radians 50)))
  3624. (buzz (make-rand-interp 1000 (hz->radians 40))))
  3625. (do ((i start (+ i 1)))
  3626. ((= i stop))
  3627. (let ((frq (+ (env frqf)
  3628. (rand-interp rnd))))
  3629. (outa i (* (env ampf)
  3630. (+ (polywave gen1 frq)
  3631. (* (env ampf1a)
  3632. (oscil gen1a (* 2.0 frq)))
  3633. (* (env ampf2)
  3634. (polywave gen2 (+ (env frqf2)
  3635. (rand-interp buzz))))))))))))
  3636. ;; (with-sound (:play #t) (plumbeous-vireo-1 0 .25))
  3637. (defanimal (plumbeous-vireo-2 beg amp)
  3638. (let ((dur 0.455))
  3639. (let ((start (seconds->samples beg))
  3640. (stop (seconds->samples (+ beg dur)))
  3641. (ampf (make-env '(0.000 0.000 0.106 0.184 0.148 0.082 0.169 0.156 0.183 0.441 0.199 0.484 0.216 0.379
  3642. 0.234 0.770 0.244 0.748 0.252 0.527 0.261 0.992 0.320 0.961 0.343 0.742 0.360 0.832
  3643. 0.395 0.916 0.411 0.145 0.416 0.559 0.421 0.126 0.424 0.577 0.435 0.791 0.448 0.529
  3644. 0.452 0.089 0.460 0.639 0.472 0.777 0.485 0.181 0.495 0.656 0.499 0.319 0.506 0.854
  3645. 0.515 0.668 0.516 0.186 0.523 0.559 0.535 0.933 0.540 0.599 0.545 0.923 0.554 0.282
  3646. 0.562 0.795 0.569 0.609 0.574 0.988 0.579 0.908 0.588 0.772 0.593 0.161 0.597 0.646
  3647. 0.604 0.879 0.612 0.931 0.625 0.800 0.630 0.267 0.634 0.782 0.644 0.926 0.649 0.812
  3648. 0.652 0.423 0.658 0.955 0.664 0.718 0.670 0.973 0.675 0.235 0.682 0.752 0.691 1.000
  3649. 0.698 0.938 0.706 0.153 0.712 0.889 0.720 0.693 0.735 0.906 0.745 0.661 0.750 0.228
  3650. 0.754 0.594 0.757 0.683 0.763 0.411 0.767 0.621 0.779 0.797 0.793 0.693 0.797 0.532
  3651. 0.802 0.564 0.810 0.386 0.814 0.653 0.839 0.535 0.840 0.092 0.843 0.495 0.851 0.572
  3652. 0.862 0.627 0.870 0.490 0.873 0.592 0.882 0.416 0.888 0.054 0.889 0.359 0.896 0.465
  3653. 0.901 0.379 0.908 0.543 0.919 0.413 0.926 0.443 0.931 0.218 0.949 0.516 0.959 0.423
  3654. 0.979 0.151 1.000 0.000 )
  3655. :duration dur :scaler amp))
  3656. (frqf (make-env '(0.030 0.200 0.053 0.223 0.086 0.262 0.135 0.262 0.179 0.225 0.200 0.215 0.210 0.257
  3657. 0.222 0.374 0.235 0.441 0.266 0.396 0.293 0.376 0.332 0.401 0.345 0.418 0.353 0.450
  3658. 0.365 0.413 0.382 0.465 0.397 0.428 0.413 0.505 0.427 0.433 0.446 0.537 0.461 0.438
  3659. 0.480 0.550 0.494 0.446 0.508 0.525 0.533 0.386 0.546 0.473 0.565 0.371 0.581 0.455
  3660. 0.607 0.344 0.618 0.426 0.646 0.324 0.658 0.391 0.687 0.300 0.704 0.364 0.730 0.302
  3661. 0.747 0.359 0.773 0.297 0.789 0.347 0.815 0.290 0.832 0.342 0.861 0.285 0.883 0.347
  3662. 0.907 0.285 0.923 0.332 1.000 0.252)
  3663. :duration dur :scaler (hz->radians 8100.0)))
  3664. (gen1 (make-polywave 0.0 '(1 .99 3 .005)))
  3665. (gen2 (make-oscil))
  3666. (gen3 (make-oscil))
  3667. (ampf2 (make-env '(0 .2 .1 1 .13 0 1 0) :duration dur :scaler .5))
  3668. (ampf3 (make-env '(0 .3 .1 .3 .16 1 .19 0 1 0) :duration dur :scaler 1))
  3669. (rnd (make-rand-interp 1000 (hz->radians 50))))
  3670. (do ((i start (+ i 1)))
  3671. ((= i stop))
  3672. (let ((frq (+ (env frqf)
  3673. (rand-interp rnd))))
  3674. (outa i (* (env ampf)
  3675. (+ (polywave gen1 frq)
  3676. (* (env ampf2)
  3677. (oscil gen2 (* 1.5 frq)))
  3678. (* (env ampf3)
  3679. (oscil gen3 (* 2.0 frq)))))))))))
  3680. ;; (with-sound (:play #t) (plumbeous-vireo-2 0 .5))
  3681. ;;; --------------------------------------------------------------------------------
  3682. ;;;
  3683. ;;; Least bittern
  3684. (defanimal (least-bittern beg amp)
  3685. (let ((dur 1.25)
  3686. (pulse-dur .09))
  3687. (let ((start (seconds->samples beg))
  3688. (stop (seconds->samples (+ beg dur)))
  3689. (ampf (make-env '(0.000 0.100 0.123 0.388 0.454 0.884 0.649 0.995 0.754 0.776 1.000 0.100) :duration dur :scaler amp))
  3690. (frqf (make-env '(0 .6 1 .75 2 1 3 .40) :duration dur :scaler (hz->radians 90)))
  3691. (gen1 #f)
  3692. (rnd (make-rand-interp 200 (hz->radians 40)))
  3693. (pulse-samps (seconds->samples .13))
  3694. (pulse-out (seconds->samples pulse-dur))
  3695. (pulse-ampf (make-env '(0.000 0.000 0.119 0.698 0.258 1.000 0.355 0.310 0.564 0.1 0.7 0.070 1.3 0) :duration pulse-dur))
  3696. (pulse-frqf (make-env '(0 150 .3 300 1 250 2 200 3 200 3.5 150 4 230) :duration pulse-dur :scaler (hz->radians 1.0)))
  3697. (pulse-rnd #f))
  3698. (do ((i start (+ i pulse-samps)))
  3699. ((>= i stop))
  3700. (set! (mus-location ampf) (- i start))
  3701. (let ((reset-stop (min stop (+ i pulse-out)))
  3702. (pulse-amp (env ampf)))
  3703. (set! (mus-location frqf) (- i start))
  3704. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .25) 2 (* pulse-amp .6) 3 (* pulse-amp .2)
  3705. 4 (* pulse-amp .01) 5 (* pulse-amp .01))))
  3706. (set! pulse-rnd (make-rand-interp 4000 (* pulse-amp .2)))
  3707. (do ((k i (+ k 1)))
  3708. ((= k reset-stop))
  3709. (outa k (* (env pulse-ampf)
  3710. (+ (polywave gen1 (+ (env frqf)
  3711. (env pulse-frqf)
  3712. (rand-interp rnd)))
  3713. (rand-interp pulse-rnd)))))
  3714. (mus-reset pulse-ampf)
  3715. (mus-reset pulse-frqf))))))
  3716. ;; (with-sound (:play #t) (least-bittern 0 .5))
  3717. ;;; --------------------------------------------------------------------------------
  3718. ;;;
  3719. ;;; American crow
  3720. (define (nrcos->polywave n r scl)
  3721. (if (not (< 0 n 8192))
  3722. (error 'out-of-range "nrcos->polywave: too many partials")
  3723. (let ((lst ())
  3724. (total (polynomial (make-float-vector n 1.0) r)))
  3725. (set! scl (/ scl total))
  3726. (do ((i 0 (+ i 1)))
  3727. ((= i n) (reverse lst))
  3728. (set! lst (cons (* scl (expt r i)) (cons (+ i 1) lst)))))))
  3729. (defanimal (american-crow beg amp)
  3730. (let ((dur 0.27))
  3731. (let ((start (seconds->samples beg))
  3732. (stop (seconds->samples (+ beg dur)))
  3733. (ampf (make-env '(0.000 0.000 .02 .1 .04 .01 .06 0.056 0.110 0.700 0.258 1.000 0.344 0.970 0.369 0.677 .7 .3 1.000 0.000)
  3734. :duration dur :scaler (* 2 amp)))
  3735. (frqf (make-env '(0.000 0.360 0.038 0.362 0.052 0.396 0.076 0.403 0.095 0.445 0.129 0.445 0.153 0.493
  3736. 0.201 0.495 0.231 0.501 0.260 0.490 0.297 0.503 0.317 0.499 0.346 0.473 0.407 0.473
  3737. 0.435 0.424 0.495 0.439 0.528 0.392 0.589 0.405 0.621 0.362 0.677 0.373 0.704 0.332
  3738. 0.767 0.325 0.791 0.281 0.832 0.278 0.859 0.251 0.890 0.225 0.912 0.255 0.950 0.263 1.000 0.26)
  3739. :duration dur :scaler (hz->radians 1250.0)))
  3740. (frm1 (make-formant 1400 .995))
  3741. (frm2 (make-formant 5500 .98))
  3742. (frm3 (make-formant 3800 .98))
  3743. (fr1 (* 40 (sin (hz->radians 1400))))
  3744. (fr2 (* 2 (sin (hz->radians 5500))))
  3745. (fr3 (* 4 (sin (hz->radians 3800))))
  3746. (gen (make-polywave 0.0 (nrcos->polywave 15 .75 1.0)))
  3747. (rnd (make-rand-interp 5000 .007)))
  3748. (let ((fb (vector frm1 frm2 frm3))
  3749. (fs (float-vector fr1 fr2 fr3)))
  3750. (set! fb (make-formant-bank fb fs))
  3751. (do ((i start (+ i 1)))
  3752. ((= i stop))
  3753. (outa i (formant-bank fb (* (env ampf)
  3754. (polywave gen (+ (env frqf)
  3755. (rand-interp rnd)))))))))))
  3756. ;; (with-sound (:play #t) (american-crow 0 .5))
  3757. (defanimal (american-crow-no-formants beg amp) ; this is for sndclm.html
  3758. (let ((dur 0.27))
  3759. (let ((start (seconds->samples beg))
  3760. (stop (seconds->samples (+ beg dur)))
  3761. (ampf (make-env '(0.000 0.000 .02 .1 .04 .01 .06 0.056 0.110 0.700 0.258 1.000 0.344 0.970 0.369 0.677 .7 .3 1.000 0.000)
  3762. :duration dur :scaler amp))
  3763. (frqf (make-env '(0.000 0.360 0.038 0.362 0.052 0.396 0.076 0.403 0.095 0.445 0.129 0.445 0.153 0.493
  3764. 0.201 0.495 0.231 0.501 0.260 0.490 0.297 0.503 0.317 0.499 0.346 0.473 0.407 0.473
  3765. 0.435 0.424 0.495 0.439 0.528 0.392 0.589 0.405 0.621 0.362 0.677 0.373 0.704 0.332
  3766. 0.767 0.325 0.791 0.281 0.832 0.278 0.859 0.251 0.890 0.225 0.912 0.255 0.950 0.263 1.000 0.26)
  3767. :duration dur :scaler (hz->radians 1250.0)))
  3768. (gen (make-polywave 0.0 (nrcos->polywave 15 .75 1.0) mus-chebyshev-second-kind))
  3769. (rnd (make-rand-interp 5000 .007)))
  3770. (do ((i start (+ i 1)))
  3771. ((= i stop))
  3772. (outa i (* (env ampf)
  3773. (polywave gen (+ (env frqf)
  3774. (rand-interp rnd)))))))))
  3775. ;;; --------------------------------------------------------------------------------
  3776. ;;;
  3777. ;;; Orange-crowned warbler
  3778. (defanimal (orange-crowned-warbler beg amp)
  3779. (let ((dur 1.5)
  3780. (pulse-dur 0.045)
  3781. (call2-dur 0.13)
  3782. (start (seconds->samples beg)))
  3783. (let ((stop (seconds->samples (+ beg dur)))
  3784. (ampf (make-env '(0.000 0.05 0.347 1.000 0.838 0.831 1.000 0.000) :duration dur :scaler amp))
  3785. (gen1 (make-oscil))
  3786. (frqf (make-env '(0 0 7 1 10 0) :duration dur :scaler (hz->radians 600.0)))
  3787. (pulse-ampf1 (make-env '(0.000 0.000 0.038 0.152 0.062 0.115 0.148 0.468 0.211 0.530 0.228 0.290
  3788. 0.266 0.642 0.313 0.873 0.362 0.623 0.401 0.918 0.443 0.054 0.475 0.983
  3789. 0.490 0.901 0.501 0.290 0.525 0.668 0.576 0.189 0.605 0.155 0.621 0.313
  3790. 0.656 0.082 0.679 0.259 0.703 0.118 0.730 0.177 0.752 0.062 0.775 0.155
  3791. 0.798 0.048 0.812 0.099 0.831 0.059 0.885 0.096 0.922 0.048 0.947 0.087 1.000 0.000)
  3792. :duration pulse-dur))
  3793. (pulse-frqf1 (make-env '(0 3700 .2 4500 .3 4500 .45 4000 .8 4000 1 4300) :duration pulse-dur :scaler (hz->radians 1.0)))
  3794. (pulse-samps (seconds->samples pulse-dur))
  3795. (call1-stop (+ start (seconds->samples 1.35)))
  3796. (call2-start (+ start (seconds->samples 1.36)))
  3797. (pulse-ampf2 (make-env '(0.000 0.000 0.074 0.994 0.135 0.375 0.184 0.637 0.238 0.721 0.290 0.411 0.381 0.003
  3798. 0.537 0.000 0.591 0.186 0.704 0.121 0.737 0.437 0.843 0.358 0.880 0.045 0.908 0.225 1.000 0.000)
  3799. :duration call2-dur :scaler (* 0.5 amp)))
  3800. (pulse-frqf2 (make-env '(0 4800 .1 3950 .15 3820 .22 3950 .4 4800 .6 4600 .7 3480 .75 3940 .86 5200 1 5150)
  3801. :duration call2-dur :scaler (hz->radians 1.0))))
  3802. ;; 30 repetitions, then 2 special end tones
  3803. (do ((i start (+ i pulse-samps)))
  3804. ((>= i call1-stop))
  3805. (set! (mus-location ampf) (- i start))
  3806. (let ((reset-stop (min call1-stop (+ i pulse-samps)))
  3807. (pulse-amp (env ampf)))
  3808. (do ((k i (+ k 1)))
  3809. ((= k reset-stop))
  3810. (outa k (* pulse-amp
  3811. (env pulse-ampf1)
  3812. (oscil gen1 (+ (env frqf) (env pulse-frqf1))))))
  3813. (mus-reset pulse-ampf1)
  3814. (mus-reset pulse-frqf1)))
  3815. (do ((i call2-start (+ i 1)))
  3816. ((= i stop))
  3817. (outa i (* (env pulse-ampf2)
  3818. (oscil gen1 (env pulse-frqf2))))))))
  3819. ;; (with-sound (:play #t) (orange-crowned-warbler 0 .5))
  3820. ;;; --------------------------------------------------------------------------------
  3821. ;;;
  3822. ;;; Loggerhead shrike
  3823. (defanimal (loggerhead-shrike-1 beg amp)
  3824. (let ((dur 0.65)
  3825. (open-dur .036)
  3826. (pulse-dur .008)
  3827. (start (seconds->samples beg)))
  3828. (let ((stop (seconds->samples (+ beg dur)))
  3829. (ampf (make-env '(0 0 .01 1 .99 1 1 0) :duration dur :scaler amp))
  3830. (gen1 (make-oscil))
  3831. (frqf (make-env '(0 0 1 1) :duration dur :scaler (hz->radians 100.0)))
  3832. (open-samps (seconds->samples open-dur)))
  3833. (let ((open-stop (+ start open-samps))
  3834. (open-ampf (make-env '(0.000 0.000 0.158 0.063 0.280 0.162 0.386 0.775 0.418 0.644
  3835. 0.465 0.000 0.573 0.000 0.592 0.921 .62 .1 0.633 0.866
  3836. 0.726 0.000 0.788 0.000 0.829 0.399 0.889 0.154 1.000 0.000)
  3837. :duration open-dur :scaler .75))
  3838. (open-frqf (make-env '(0 4200 .35 3900 .46 3800
  3839. .57 3600 .6 3900 .61 5100 .72 5100
  3840. .8 3400 .83 4200 1 4200)
  3841. :duration open-dur :scaler (hz->radians 1.0)))
  3842. (pulse-samps (seconds->samples pulse-dur))
  3843. (pulse-ampf (make-env '(0 0 .05 1 .3 1 .8 .1 1 0) :duration pulse-dur))
  3844. (pulse-frqf (make-env '(0 3600 .2 4800 .5 5000 .85 4000 1 3700) :duration pulse-dur :scaler (hz->radians 1.0)))
  3845. (trem (make-oscil 160))
  3846. (rnd (make-rand-interp 500 .04))
  3847. (rnd1 (make-rand-interp 100 .01)))
  3848. ;; special starting call, then the buzz
  3849. (do ((i start (+ i 1)))
  3850. ((= i open-stop))
  3851. (outa i (* (env open-ampf)
  3852. (env ampf)
  3853. (oscil gen1 (+ (env frqf)
  3854. (env open-frqf))))))
  3855. (do ((i open-stop (+ i pulse-samps)))
  3856. ((>= i stop))
  3857. (set! (mus-location ampf) (- i start))
  3858. (let ((reset-stop (min stop (+ i pulse-samps)))
  3859. (pulse-amp (env ampf)))
  3860. (do ((k i (+ k 1)))
  3861. ((= k reset-stop))
  3862. (outa k (* pulse-amp
  3863. (* (env pulse-ampf)
  3864. (+ .5 (* .5 (abs (oscil trem (rand-interp rnd1)))))
  3865. (oscil gen1 (+ (env frqf)
  3866. (env pulse-frqf)
  3867. (rand-interp rnd))))))))
  3868. (mus-reset pulse-ampf)
  3869. (mus-reset pulse-frqf))))))
  3870. ;; (with-sound (:play #t) (loggerhead-shrike-1 0 .5))
  3871. (defanimal (loggerhead-shrike-2 beg amp)
  3872. (let ((dur 0.4)
  3873. (pulse-dur .08)
  3874. (frqs (vector .9 .95 .95 1.0 1.0 1.0))
  3875. (start (seconds->samples beg)))
  3876. (let ((stop (seconds->samples (+ beg dur)))
  3877. (pulse-samps (seconds->samples pulse-dur))
  3878. (pulse-ampf (make-env '(0.000 0.000 0.114 0.077 0.153 0.943 0.191 0.960 0.291 0.510 0.320 0.114
  3879. 0.342 0.647 0.373 0.191 0.400 0.490 0.419 0.066 0.456 0.291 0.728 0.288
  3880. 0.769 0.479 0.792 0.407 0.812 0.003 1.000 0.000)
  3881. :duration pulse-dur :scaler amp))
  3882. (frqf1 (make-env '(0.000 0.229 0.310 0.231 0.325 0.271 0.345 0.273 0.377 0.237 0.397 0.240
  3883. 0.615 0.235 0.7 0.235 1.000 0.235)
  3884. :duration pulse-dur :scaler (hz->radians 10500.0)))
  3885. (frqf2 (make-env '(0.000 0.13 .6 .13 0.7 0.15 .9 .15 1.000 0.1)
  3886. :duration pulse-dur :scaler (hz->radians 10500.0))))
  3887. (let ((ampf1 (make-env '(0 1 .8 1 1 0) :duration pulse-dur))
  3888. (ampf2 (make-env '(0 0 .6 0 .7 1 1 1) :duration pulse-dur))
  3889. (gen1 (make-polywave 0.0 '(1 .95 2 .04 3 .005)))
  3890. (gen2 (make-polywave 0.0 '(1 .5 2 .5 4 .01)))
  3891. (pulse-frq (frqs 0))
  3892. (pulse-ctr 1)
  3893. (rnd (make-rand-interp 500 .02)))
  3894. (do ((i start (+ i pulse-samps)))
  3895. ((>= i stop))
  3896. (let ((reset-stop (min stop (+ i pulse-samps))))
  3897. (do ((k i (+ k 1)))
  3898. ((= k reset-stop))
  3899. (let ((noise (rand-interp rnd)))
  3900. (outa k (* (env pulse-ampf)
  3901. (+ (* (env ampf1)
  3902. (polywave gen1 (* pulse-frq (+ noise (env frqf1)))))
  3903. (* (env ampf2)
  3904. (polywave gen2 (* pulse-frq (+ noise (env frqf2)))))))))))
  3905. (set! pulse-frq (frqs pulse-ctr))
  3906. (set! pulse-ctr (+ pulse-ctr 1))
  3907. (for-each mus-reset (vector pulse-ampf ampf1 ampf2 frqf1 frqf2)))))))
  3908. ;; (with-sound (:play #t) (loggerhead-shrike-2 0 .5))
  3909. ;;; --------------------------------------------------------------------------------
  3910. ;;;
  3911. ;;; California Quail
  3912. (defanimal (california-quail beg amp)
  3913. (let ((durs (vector .075 .23 .16))
  3914. (begs (vector 0.0 .21 .58))
  3915. (ampfs (make-vector 3 #f))
  3916. (frqfs (make-vector 3 #f))
  3917. (gens (make-vector 3 #f))
  3918. (starts (make-vector 3 0))
  3919. (stops (make-vector 3 0))
  3920. (frm1 (make-formant 1000 .995))
  3921. (frm2 (make-formant 1700 .99))
  3922. (frm3 (make-formant 5600 .98))
  3923. (fr1 (* 10 (sin (hz->radians 1000))))
  3924. (fr2 (* 30 (sin (hz->radians 1700))))
  3925. (fr3 (* 10 (sin (hz->radians 5600)))))
  3926. (let ((fb (make-formant-bank (vector frm1 frm2 frm3)
  3927. (float-vector fr1 fr2 fr3))))
  3928. (do ((i 0 (+ i 1)))
  3929. ((= i 3))
  3930. (set! (starts i) (seconds->samples (+ beg (begs i))))
  3931. (set! (stops i) (+ (starts i) (seconds->samples (durs i)))))
  3932. (set! (gens 0) (make-nrxysin 530 1.0 8 .5))
  3933. (set! (gens 1) (make-nrxysin 450 1.0 15 .6))
  3934. (set! (gens 2) (make-nrxysin 400 1.0 8 .5))
  3935. (set! (ampfs 0) (make-env '(0 0 1.25 1 1.75 1 3 0) :base 10 :duration (durs 0) :scaler (* amp 0.25)))
  3936. (set! (ampfs 1) (make-env '(0.000 0.000 0.208 0.719 0.292 0.965 0.809 0.869 0.928 0.682 1.000 0.000) :base 10 :duration (durs 1) :scaler (* 0.5 amp)))
  3937. (set! (ampfs 2) (make-env '(0 0 1 1 3 1 6 0) :base 10 :duration (durs 2) :scaler (* amp .375)))
  3938. (set! (frqfs 0) (make-env '(0 0 1.3 1 2 0) :duration (durs 0) :scaler (hz->radians 300)))
  3939. (set! (frqfs 1) (make-env '(0 0 1.5 .8 2.5 1 4 .95 5 .25) :base .03 :duration (durs 1) :scaler (hz->radians 520)))
  3940. (set! (frqfs 2) (make-env '(0 0 .2 .7 .3 1 1 .5) :duration (durs 2) :scaler (hz->radians 450.0)))
  3941. (do ((k 0 (+ k 1)))
  3942. ((= k 3))
  3943. (let ((start (starts k))
  3944. (stop (stops k))
  3945. (ampf (ampfs k))
  3946. (frqf (frqfs k))
  3947. (gen (gens k)))
  3948. (do ((i start (+ i 1)))
  3949. ((= i stop))
  3950. (outa i (* (env ampf) (formant-bank fb (nrxysin gen (env frqf)))))))))))
  3951. ;; (with-sound (:play #t) (california-quail 0 .25))
  3952. ;;; --------------------------------------------------------------------------------
  3953. ;;;
  3954. ;;; Vermillion flycatcher
  3955. (defanimal (vermillion-flycatcher beg amp)
  3956. (let ((dur 0.72))
  3957. (let ((start (seconds->samples beg))
  3958. (stop (seconds->samples (+ beg dur)))
  3959. (ampf (make-env '(0.000 0.000 0.023 0.527
  3960. 0.045 0.000 0.264 0.000 0.282 0.868 0.295 0.231
  3961. 0.312 0.000 0.462 0.000 0.481 0.918 0.503 0.206
  3962. 0.520 0.000 0.598 0.000 0.614 0.848 0.633 0.729 0.648 0.164
  3963. 0.660 0.000 0.685 0.000 0.696 0.654 0.709 0.746 0.719 0.532
  3964. 0.738 0.000 0.747 0.100 0.750 0.570 0.770 0.435
  3965. 0.779 0.000 0.814 0.000 0.823 0.923 0.836 0.525 0.840 0.998 0.855 0.968 0.866 0.321
  3966. 0.883 0.095 0.909 0.517 0.924 0.600 0.961 0.440 1.000 0.000)
  3967. :duration dur :scaler amp))
  3968. (gen1 (make-polywave 0.0 '(1 .98 2 .015 3 .006)))
  3969. (frqf (make-env '(0.000 0.378 0.022 0.474 0.032 0.400
  3970. 0.266 0.378 0.278 0.496 0.297 0.402 0.462 0.351 0.469 0.466 0.482
  3971. 0.526 0.504 0.398 0.602 0.378 0.607 0.486 0.617 0.546 0.637 0.490 0.643 0.398
  3972. 0.686 0.402 0.689 0.510 0.709 0.582 0.721 0.560 0.736 0.558 0.744 0.406 0.752 0.562 0.767 0.679
  3973. 0.793 0.394 0.810 0.394 0.827 0.851 0.836 0.633 0.849 0.564 0.856 0.478 0.871 0.448
  3974. 0.887 0.480 0.902 0.506 0.924 0.510 0.950 0.500 0.973 0.466 1.000 0.470)
  3975. :duration dur :scaler (hz->radians 8000.0))))
  3976. (do ((i start (+ i 1)))
  3977. ((= i stop))
  3978. (outa i (* (env ampf)
  3979. (polywave gen1 (env frqf))))))))
  3980. ;; (with-sound (:play #t) (vermillion-flycatcher 0 .5))
  3981. ;;;--------------------------------------------------------------------------------
  3982. ;;;
  3983. ;;; Cardinal
  3984. (defanimal (cardinal beg amp)
  3985. (let ((call1-dur 0.185)
  3986. (call2-dur 0.19)
  3987. (start (seconds->samples beg)))
  3988. (let ((stop (+ start (seconds->samples 3.26)))
  3989. (call 0)
  3990. (next-call 0)
  3991. (gen1 (make-polywave 0.0 (normalize-partials '(1 1 2 .08 3 .01 4 .05 5 .005 6 .01))))
  3992. (call1-ampf (make-env '(0.000 0.000 0.174 0.333 0.243 0.273 0.332 0.446 0.391 0.373 0.446 0.488
  3993. 0.496 0.363 0.545 0.064 0.606 0.048 0.632 0.614 0.676 0.783 0.732 0.655
  3994. 0.764 0.667 0.802 0.992 0.841 0.659 0.888 0.633 0.951 0.347 0.974 0.122 1.000 0.000)
  3995. :duration call1-dur :scaler (* 0.5 amp)))
  3996. (call1-frqf (make-env '(0.000 0.299 0.230 0.320 0.387 0.339 0.513 0.349 0.586 0.349 0.610 0.534
  3997. 0.622 0.570 0.654 0.585 0.703 0.594 0.753 0.584 0.778 0.566 0.803 0.560
  3998. 0.911 0.434 1.000 0.435)
  3999. :duration call1-dur :scaler (hz->radians 6000.0)))
  4000. (call2-ampf (make-env '(0.000 0.000 0.041 0.159 0.101 0.263 0.167 0.247 0.246 0.126 0.266 0.150
  4001. 0.443 0.000 0.573 0.000 0.599 0.202 0.635 0.299 0.667 0.273 0.683 0.371 0.724 0.411
  4002. 0.796 0.000 0.83 0.0 0.848 0.155 0.870 1.000 0.925 0.639 0.951 0.126 1.000 0.000)
  4003. :duration call2-dur :scaler amp))
  4004. (call2-frqf (make-env '(0.000 0.138 0.032 0.173 0.063 0.187 0.215 0.176 0.403 0.140 0.542 0.117 0.590 0.214
  4005. 0.659 0.218 0.750 0.250 0.794 0.244 0.832 0.618 0.843 0.518
  4006. 0.876 0.352 0.909 0.335 0.954 0.323 1.000 0.311)
  4007. :duration call2-dur :scaler (hz->radians 10000.0))))
  4008. (let ((call-ampf call1-ampf)
  4009. (call-frqf call1-frqf)
  4010. (call-samps (seconds->samples call1-dur)))
  4011. (do ((i start next-call))
  4012. ((>= i stop))
  4013. (let ((call-stop (min stop (+ i call-samps))))
  4014. (do ((k i (+ k 1)))
  4015. ((= k call-stop))
  4016. (outa k (* (env call-ampf)
  4017. (polywave gen1 (env call-frqf))))))
  4018. (mus-reset call-ampf)
  4019. (mus-reset call-frqf)
  4020. (if (= call 0)
  4021. (set! next-call (+ start (seconds->samples 0.35)))
  4022. (if (= call 1)
  4023. (begin
  4024. (set! next-call (+ next-call (seconds->samples (- 0.63 0.35))))
  4025. (set! call-samps (seconds->samples call2-dur))
  4026. (set! call-ampf call2-ampf)
  4027. (set! call-frqf call2-frqf))
  4028. (set! next-call (+ next-call (seconds->samples 0.24)))))
  4029. (set! call (+ call 1)))))))
  4030. ;; (with-sound (:play #t) (cardinal 0 .5))
  4031. ;;; --------------------------------------------------------------------------------
  4032. ;;;
  4033. ;;; Black phoebe
  4034. (defanimal (black-phoebe beg amp)
  4035. (let ((dur 0.36))
  4036. (let ((start (seconds->samples beg))
  4037. (stop (seconds->samples (+ beg dur)))
  4038. (ampf (make-env '(0.000 0.000 0.082 0.899 0.098 0.957 0.118 0.892 0.142 0.396
  4039. 0.181 0.000 0.287 0.000 0.367 0.661 0.396 0.000 0.440 0.778
  4040. 0.458 0.739 0.479 0.300 0.507 0.636 0.532 0.558 0.555 0.380
  4041. 0.588 0.535 0.807 0.325 0.926 0.181 1.000 0.000)
  4042. :duration dur :scaler amp))
  4043. (gen1 (make-polywave 0.0 '(1 .9 2 .1 3 .006)))
  4044. (frqf (make-env '(0.000 0.167 0.066 0.212 0.077 0.234 0.104 0.231 0.132 0.187
  4045. 0.148 0.181 0.166 0.153 0.231 0.146 0.289 0.101 0.298 0.196
  4046. 0.319 0.229 0.339 0.222 0.349 0.240 0.357 0.219 0.377 0.159
  4047. 0.388 0.146 0.401 0.167 0.417 0.199 0.438 0.209 0.456 0.202
  4048. 0.467 0.177 0.479 0.174 0.485 0.196 0.503 0.206 0.531 0.201
  4049. 0.550 0.176 0.563 0.194 0.602 0.196 0.622 0.186 0.658 0.192
  4050. 0.931 0.163 1.000 0.141)
  4051. :duration dur :scaler (hz->radians 22050.0))))
  4052. (do ((i start (+ i 1)))
  4053. ((= i stop))
  4054. (outa i (* (env ampf)
  4055. (polywave gen1 (env frqf))))))))
  4056. ;; (with-sound (:play #t) (black-phoebe 0 .25))
  4057. ;;; --------------------------------------------------------------------------------
  4058. ;;;
  4059. ;;; Yellow warbler
  4060. (defanimal (yellow-warbler beg amp)
  4061. (let ((dur 1.38))
  4062. (let ((start (seconds->samples beg))
  4063. (stop (seconds->samples (+ beg dur)))
  4064. (gen1 (make-oscil))
  4065. (ampf (make-env '(0.000 0.000 0.028 0.077 0.056 0.000 0.135 0.000 0.156 0.125 0.182 0.112 0.197 0.000
  4066. 0.268 0.000 0.287 0.235 0.314 0.243 0.326 0.000 0.406 0.000 0.415 0.339 0.440 0.301 0.463 0.000
  4067. 0.486 0.000 0.499 0.403 0.513 0.611 0.531 0.592 0.553 0.000
  4068. 0.582 0.000 0.596 0.517 0.606 0.648 0.627 0.621 0.640 0.000 0.667 0.000 0.673 0.533 0.696 0.896 0.720 0.000
  4069. 0.750 0.000 0.774 1.000 0.800 0.000 0.831 0.000 0.858 0.971 0.884 0.000
  4070. 0.905 0.000 0.926 0.349 0.942 0.424 0.978 0.421 1.000 0.000)
  4071. :duration dur :scaler amp))
  4072. (frqf (make-env '(0.000 0.827 0.026 0.661 0.042 0.706 0.104 0.695 0.134 0.909 0.167 0.672 0.184 0.708
  4073. 0.229 0.677 0.271 0.909 0.292 0.715 0.303 0.670 0.310 0.713 0.342 0.674 0.396 0.911
  4074. 0.418 0.715 0.425 0.672 0.441 0.727 0.480 0.720 0.487 0.476 0.491 0.533 0.510 0.558
  4075. 0.526 0.704 0.539 0.765 0.563 0.754 0.578 0.472 0.582 0.526 0.594 0.540 0.618 0.720
  4076. 0.630 0.781 0.656 0.765 0.674 0.683 0.693 0.567 0.713 0.408 0.735 0.410 0.751 0.711
  4077. 0.765 0.654 0.795 0.358 0.817 0.355 0.826 0.708 0.839 0.681 0.854 0.565 0.881 0.330
  4078. 0.904 0.308 0.924 0.351 0.957 0.460 0.967 0.408 0.976 0.362 1.000 0.314)
  4079. :duration dur :scaler (hz->radians 10000.0))))
  4080. (do ((i start (+ i 1)))
  4081. ((= i stop))
  4082. (outa i (* (env ampf)
  4083. (oscil gen1 (env frqf))))))))
  4084. ;; (with-sound (:play #t) (yellow-warbler 0 .25))
  4085. ;;; --------------------------------------------------------------------------------
  4086. ;;;
  4087. ;;; Barred owl (the "hoo-aw" call, not the more complex one -- I haven't succeeded with the latter yet)
  4088. (defanimal (barred-owl-1 beg amp)
  4089. (let ((dur 1.27)
  4090. (owl-env '(0 0 .53 0 .54 1 1 1)))
  4091. (let ((start (seconds->samples beg))
  4092. (stop (seconds->samples (+ beg dur)))
  4093. (ampf (make-env '(0.000 0.000 0.030 0.308 0.052 0.345 0.057 0.932 0.104 0.567 0.161 0.605 0.259 0.510
  4094. 0.299 0.399 0.371 0.535 0.396 0.463 0.472 0.678 0.495 1.000 0.517 0.995
  4095. 0.534 0.000 0.538 0.365 0.560 0.435 0.630 0.254 0.828 0.338 0.850 0.190
  4096. 0.897 0.154 0.929 0.079 1.000 0.000)
  4097. :duration dur :scaler amp))
  4098. (frqf (make-env '(0.000 0.09 0.025 0.09 0.092 0.156 0.435 0.149 0.491 0.132 0.517 0.124
  4099. 0.53 .124 0.536 0.088 0.830 0.061 1.000 0.013)
  4100. :base .03 :duration dur :scaler (hz->radians 4060.0)))
  4101. (gen1 (make-polywave 0.0 (nrcos->polywave 9 .5 1.0)))
  4102. (rnd (make-rand-interp 300 (hz->radians 5)))
  4103. (intrpf (make-env owl-env :duration dur))
  4104. (intrpf1 (make-env owl-env :offset (hz->radians 550.0) :scaler (hz->radians 80.0) :duration dur))
  4105. (intrpf2 (make-env owl-env :offset (hz->radians 1500.0) :scaler (hz->radians -400.0) :duration dur))
  4106. (intrpf3 (make-env owl-env :offset (hz->radians 2300.0) :scaler (hz->radians 150.0) :duration dur))
  4107. (rnd1 (make-rand-interp 1000 .1))
  4108. (frm1 (make-formant 730 .995))
  4109. (frm2 (make-formant 1090 .999))
  4110. (frm3 (make-formant 2240 .993))
  4111. (fr1 (* 30 (sin (hz->radians 730))))
  4112. (fr2 (* 2 (sin (hz->radians 1090))))
  4113. (fr3 (* 2 (sin (hz->radians 2240))))
  4114. (vib (make-polywave 12.0 (list 1 (hz->radians 7.0)))))
  4115. (do ((i start (+ i 1)))
  4116. ((= i stop))
  4117. (let ((val (* (+ .9 (rand-interp rnd1))
  4118. (polywave gen1 (+ (env frqf)
  4119. (* (env intrpf) (+ (polywave vib)
  4120. (rand-interp rnd))))))))
  4121. (outa i (* (env ampf)
  4122. (+ (* fr1 (formant frm1 val (env intrpf1)))
  4123. (* fr2 (formant frm2 val (env intrpf2)))
  4124. (* fr3 (formant frm3 val (env intrpf3)))))))))))
  4125. ;; (with-sound (:play #t :statistics #t) (barred-owl-1 0 .5))
  4126. ;;; --------------------------------------------------------------------------------
  4127. ;;;
  4128. ;;; Say's phoebe
  4129. (defanimal (says-phoebe beg amp)
  4130. (let ((dur 0.64))
  4131. (let ((start (seconds->samples beg))
  4132. (stop (seconds->samples (+ beg dur)))
  4133. (ampf (make-env '(0.000 0.000 0.017 0.223 0.039 0.372 0.056 0.000 0.101 0.000 0.122 0.132
  4134. 0.145 0.000 0.192 0.000 0.214 0.639 0.232 0.507 0.324 0.981 0.415 0.402
  4135. 0.496 0.413 0.610 0.317 0.771 0.287 0.970 0.179 1.000 0.000)
  4136. :duration dur :scaler amp))
  4137. (gen1 (make-polywave 0.0 '(1 .98 2 .07 3 .08 4 .01 5 .003)))
  4138. (frqf (make-env '(0.000 0.221 0.022 0.305 0.032 0.318 0.040 0.297 0.054 0.225 0.106 0.229
  4139. 0.111 0.250 0.130 0.240 0.139 0.215 0.196 0.238 0.205 0.274 0.223 0.322
  4140. 0.249 0.337 0.295 0.333 0.324 0.310 0.356 0.293 0.584 0.265 0.781 0.261
  4141. 0.958 0.250 1.000 0.204)
  4142. :duration dur :scaler (hz->radians 10040.0))))
  4143. (do ((i start (+ i 1)))
  4144. ((= i stop))
  4145. (outa i (* (env ampf)
  4146. (polywave gen1 (env frqf))))))))
  4147. ;; (with-sound (:play #t) (says-phoebe 0 .25))
  4148. ;;; --------------------------------------------------------------------------------
  4149. ;;;
  4150. ;;; Yellow-rumped warbler
  4151. (defanimal (yellow-rumped-warbler beg amp)
  4152. (let ((dur 1.6))
  4153. (let ((start (seconds->samples beg))
  4154. (stop (seconds->samples (+ beg dur)))
  4155. (ampf (make-env '(0.000 0.000 0.009 0.038 0.022 0.220 0.028 0.000 0.037 0.152 0.048 0.000 0.079 0.000
  4156. 0.088 0.218 0.094 0.000 0.109 0.132 0.122 0.488 0.127 0.363 0.128 0.000 0.133 0.303
  4157. 0.141 0.381 0.147 0.000 0.178 0.000 0.196 0.296 0.201 0.000 0.216 0.432 0.227 0.515
  4158. 0.231 0.000 0.242 0.601 0.250 0.000 0.269 0.000 0.290 0.187 0.298 0.040 0.305 0.227
  4159. 0.311 0.000 0.316 0.486 0.327 0.579 0.331 0.000 0.336 0.407 0.343 0.459 0.345 0.000
  4160. 0.371 0.000 0.376 0.085 0.386 0.122 0.393 0.399 0.397 0.000 0.405 0.194 0.412 0.045
  4161. 0.419 0.470 0.428 0.505 0.431 0.000 0.444 0.630 0.446 0.100 0.458 0.000 0.474 0.000
  4162. 0.477 0.114 0.488 0.169 0.496 0.412 0.500 0.000 0.505 0.207 0.509 0.100 0.516 0.265
  4163. 0.524 0.748 0.530 0.599 0.537 0.000 0.541 0.613 0.545 0.819 0.551 0.000 0.577 0.000
  4164. 0.584 0.151 0.591 0.200 0.601 0.577 0.607 0.004 0.610 0.319 0.614 0.111 0.618 0.283
  4165. 0.621 0.132 0.626 0.993 0.637 0.924 0.642 0.000 0.644 0.621 0.652 0.855 0.655 0.000
  4166. 0.681 0.000 0.687 0.156 0.696 0.214 0.706 0.613 0.709 0.000 0.711 0.187 0.719 0.120
  4167. 0.726 0.902 0.733 0.494 0.737 0.955 0.749 0.000 0.753 0.673 0.768 0.000 0.784 0.000
  4168. 0.810 0.768 0.821 0.227 0.829 0.000 0.849 0.592 0.855 0.281 0.863 0.000 0.874 0.354
  4169. 0.875 0.000 0.901 0.000 0.913 0.430 0.931 0.517 0.941 0.000 0.948 0.000 0.965 0.454
  4170. 0.971 0.169 0.975 0.120 0.987 0.225 0.993 0.045 1.000 0.000)
  4171. :duration dur :scaler amp))
  4172. (gen1 (make-polywave 0.0 '(1 .99 2 .01 3 .005)))
  4173. (frqf (make-env '(0.000 0.371 0.017 0.571 0.030 0.491 0.035 0.397 0.037 0.321 0.043 0.466 0.047 0.438
  4174. 0.052 0.387 0.087 0.344 0.095 0.417 0.102 0.290 0.106 0.458 0.108 0.507 0.117 0.542
  4175. 0.122 0.513 0.131 0.446 0.135 0.384 0.136 0.323 0.145 0.446 0.150 0.407 0.151 0.356
  4176. 0.185 0.403 0.189 0.442 0.190 0.337 0.201 0.440 0.205 0.294 0.212 0.483 0.218 0.536
  4177. 0.224 0.515 0.234 0.434 0.235 0.317 0.243 0.446 0.248 0.436 0.252 0.309 0.279 0.352
  4178. 0.286 0.438 0.290 0.405 0.291 0.356 0.298 0.425 0.302 0.307 0.307 0.468 0.311 0.530
  4179. 0.318 0.530 0.330 0.436 0.335 0.350 0.340 0.429 0.343 0.458 0.345 0.436 0.350 0.382
  4180. 0.377 0.389 0.381 0.434 0.386 0.350 0.397 0.446 0.403 0.331 0.408 0.495 0.411 0.517
  4181. 0.417 0.526 0.428 0.458 0.431 0.417 0.434 0.348 0.441 0.476 0.449 0.401 0.479 0.362
  4182. 0.485 0.431 0.490 0.354 0.499 0.438 0.502 0.342 0.509 0.515 0.513 0.540 0.521 0.515
  4183. 0.529 0.456 0.536 0.366 0.541 0.479 0.551 0.374 0.582 0.370 0.588 0.440 0.591 0.348
  4184. 0.601 0.421 0.605 0.356 0.611 0.515 0.616 0.532 0.623 0.517 0.636 0.425 0.638 0.339
  4185. 0.644 0.464 0.650 0.438 0.654 0.395 0.655 0.344 0.680 0.368 0.688 0.425 0.692 0.356
  4186. 0.702 0.421 0.706 0.344 0.710 0.497 0.718 0.509 0.727 0.476 0.740 0.397 0.743 0.470
  4187. 0.747 0.534 0.754 0.497 0.760 0.446 0.788 0.499 0.793 0.528 0.796 0.448 0.814 0.507
  4188. 0.816 0.374 0.826 0.352 0.835 0.360 0.839 0.389 0.846 0.438 0.851 0.337 0.862 0.333
  4189. 0.868 0.395 0.900 0.485 0.907 0.489 0.909 0.431 0.922 0.452 0.926 0.485 0.934 0.317
  4190. 0.943 0.350 0.954 0.352 0.961 0.423 0.965 0.325 0.974 0.317 0.983 0.376 0.985 0.436 1.000 0.454)
  4191. :duration dur :scaler (hz->radians 10125.0))))
  4192. (do ((i start (+ i 1)))
  4193. ((= i stop))
  4194. (outa i (* (env ampf)
  4195. (polywave gen1 (env frqf))))))))
  4196. ;; (with-sound (:play #t) (yellow-rumped-warbler 0 .5))
  4197. ;;; --------------------------------------------------------------------------------
  4198. ;;;
  4199. ;;; Purple finch
  4200. (defanimal (purple-finch beg amp)
  4201. (let ((dur 2.5))
  4202. (let ((start (seconds->samples beg))
  4203. (stop (seconds->samples (+ beg dur)))
  4204. (ampf (make-env '(0.0000 0.0000 0.0150 0.0420 0.0210 0.0018 0.0291 0.0804 0.0355 0.1682 0.0402 0.0658
  4205. 0.0428 0.2468 0.0449 0.0676 0.0505 0.1243 0.0522 0.0000 0.0651 0.0000 0.0702 0.1298
  4206. 0.0741 0.0841 0.0766 0.1590 0.0848 0.0000 0.0890 0.0530 0.0950 0.2724 0.1006 0.2249
  4207. 0.1032 0.1499 0.1057 0.3784 0.1104 0.2578 0.1143 0.0000 0.1259 0.0000 0.1284 0.1901
  4208. 0.1323 0.1079 0.1361 0.2358 0.1417 0.0000 0.1468 0.0000 0.1507 0.2486 0.1558 0.2888
  4209. 0.1614 0.1207 0.1648 0.5503 0.1678 0.2267 0.1691 0.3693 0.1717 0.0000 0.1858 0.0000
  4210. 0.1896 0.1938 0.1931 0.0859 0.1952 0.2267 0.2016 0.0000 0.2063 0.0420 0.2149 0.4771
  4211. 0.2188 0.4004 0.2209 0.1865 0.2256 0.6399 0.2265 0.2596 0.2295 0.4644 0.2354 0.0000
  4212. 0.2436 0.0000 0.2491 0.2431 0.2513 0.1718 0.2568 0.3528 0.2616 0.0000 0.2748 0.0640
  4213. 0.2868 0.4388 0.2967 0.4954 0.3018 0.0000 0.3215 0.0000 0.3318 0.1865 0.3339 0.1097
  4214. 0.3412 0.7697 0.3438 0.3857 0.3450 0.7770 0.3472 0.4260 0.3485 0.7843 0.3502 0.3565
  4215. 0.3528 0.7751 0.3566 0.0000 0.3669 0.0000 0.3716 0.5686 0.3737 0.2303 0.3776 0.9854
  4216. 0.3801 0.3108 0.3840 0.3309 0.3857 0.5960 0.3908 0.1207 0.3934 0.5759 0.4003 0.0000
  4217. 0.4127 0.0000 0.4199 0.2176 0.4234 0.1152 0.4272 0.5850 0.4281 0.2980 0.4324 0.5009
  4218. 0.4345 0.3693 0.4379 0.4241 0.4405 0.2943 0.4452 0.5046 0.4533 0.1408 0.4568 0.5795
  4219. 0.4606 0.0000 0.4735 0.0000 0.4837 0.8501 0.4842 0.6088 0.4880 0.7093 0.4893 0.6581
  4220. 0.4923 0.9049 0.4953 0.1828 0.4974 0.7770 0.5009 0.0859 0.5060 0.8537 0.5132 0.0000
  4221. 0.5256 0.0000 0.5321 0.7477 0.5368 0.3364 0.5420 0.6527 0.5454 0.2834 0.5488 0.2212
  4222. 0.5518 0.0512 0.5552 0.6691 0.5634 0.0000 0.5766 0.0000 0.5775 0.3364 0.5809 0.0000
  4223. 0.5826 0.4826 0.5860 0.0037 0.5920 0.6362 0.5963 0.5448 0.5967 0.6600 0.5993 0.5759
  4224. 0.6002 0.6289 0.6040 0.5503 0.6100 0.9360 0.6160 0.0000 0.6271 0.0000 0.6280 0.3583
  4225. 0.6322 0.0000 0.6327 0.4388 0.6366 0.0000 0.6430 0.7733 0.6468 0.6088 0.6481 0.7532
  4226. 0.6528 0.7166 0.6541 0.4899 0.6563 0.8355 0.6648 0.0000 0.6777 0.0000 0.6781 0.2523
  4227. 0.6817 0.0000 0.6832 0.2943 0.6870 0.0000 0.6952 0.5850 0.7033 0.4095 0.7098 0.6728
  4228. 0.7145 0.0000 0.7286 0.0000 0.7295 0.1609 0.7334 0.0000 0.7359 0.3382 0.7380 0.0000
  4229. 0.7483 0.4845 0.7539 0.5814 0.7624 0.0000 0.7748 0.0000 0.7783 0.2633 0.7811 0.0000
  4230. 0.7825 0.2541 0.7869 0.0000 0.7958 0.4717 0.8031 0.5393 0.8116 0.0000 0.8271 0.0000
  4231. 0.8288 0.2431 0.8315 0.0000 0.8339 0.0000 0.8399 0.2687 0.8433 0.1700 0.8446 0.3967
  4232. 0.8506 0.4826 0.8600 0.0000 0.8754 0.0000 0.8767 0.1207 0.8796 0.0000 0.8818 0.2377
  4233. 0.8844 0.0000 0.8951 0.3528 0.9114 0.0000 0.9255 0.0000 0.9285 0.1024 0.9322 0.0000
  4234. 0.9336 0.1737 0.9388 0.0000 0.9439 0.0859 0.9482 0.2431 0.9521 0.1024 0.9546 0.2761
  4235. 0.9636 0.0000 0.9850 0.0000 0.9927 0.0402 1.0000 0.0000)
  4236. :duration dur :scaler amp))
  4237. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .005 4 .003)))
  4238. (rnd (make-rand-interp 800 (hz->radians 200)))
  4239. (frqf (make-env '(0.0000 0.2374 0.0125 0.1869 0.0192 0.1616 0.0250 0.1835 0.0370 0.3316 0.0388 0.2407
  4240. 0.0419 0.3013 0.0450 0.2003 0.0473 0.2694 0.0513 0.2155 0.0646 0.2003 0.0727 0.2761
  4241. 0.0728 0.2020 0.0798 0.2559 0.0852 0.1751 0.0936 0.2424 0.0994 0.3535 0.1025 0.2424
  4242. 0.1048 0.3030 0.1074 0.2138 0.1110 0.2576 0.1271 0.2290 0.1315 0.2037 0.1355 0.2374
  4243. 0.1404 0.3451 0.1453 0.1684 0.1587 0.3350 0.1605 0.2542 0.1632 0.3131 0.1658 0.2525
  4244. 0.1690 0.2744 0.1868 0.2239 0.1935 0.3249 0.1979 0.2357 0.2069 0.1835 0.2167 0.3316
  4245. 0.2207 0.2559 0.2225 0.3199 0.2269 0.2273 0.2300 0.2795 0.2341 0.2290 0.2461 0.2222
  4246. 0.2479 0.2559 0.2514 0.2138 0.2555 0.2576 0.2595 0.2020 0.2662 0.1667 0.2853 0.2458
  4247. 0.2951 0.2778 0.3027 0.2256 0.3255 0.2306 0.3290 0.1902 0.3388 0.2811 0.3433 0.3232
  4248. 0.3455 0.2424 0.3486 0.3754 0.3513 0.2155 0.3522 0.3333 0.3549 0.2879 0.3691 0.3519
  4249. 0.3749 0.2710 0.3785 0.3384 0.3807 0.2811 0.3848 0.2576 0.3870 0.3064 0.3923 0.2492
  4250. 0.3941 0.2997 0.3968 0.2744 0.4155 0.1852 0.4222 0.2357 0.4289 0.2845 0.4391 0.2845
  4251. 0.4463 0.2795 0.4525 0.2340 0.4579 0.2980 0.4610 0.2138 0.4753 0.2980 0.4819 0.3249
  4252. 0.4864 0.3636 0.4900 0.4040 0.4931 0.3468 0.4962 0.2795 0.4993 0.3535 0.5029 0.2542
  4253. 0.5051 0.3788 0.5087 0.3114 0.5127 0.2811 0.5145 0.2189 0.5310 0.3519 0.5372 0.2811
  4254. 0.5408 0.3603 0.5439 0.2862 0.5515 0.2441 0.5582 0.2997 0.5631 0.2239 0.5778 0.3131
  4255. 0.5809 0.5017 0.5863 0.3266 0.5934 0.3990 0.5961 0.3064 0.6054 0.3603 0.6135 0.2761
  4256. 0.6291 0.3215 0.6349 0.5051 0.6371 0.2997 0.6433 0.3822 0.6469 0.3232 0.6540 0.3451
  4257. 0.6603 0.2929 0.6643 0.2458 0.6799 0.3114 0.6830 0.4983 0.6906 0.2424 0.6973 0.3098
  4258. 0.7044 0.3485 0.7107 0.3165 0.7156 0.2593 0.7321 0.3249 0.7356 0.5286 0.7445 0.2138
  4259. 0.7477 0.3030 0.7543 0.3064 0.7633 0.2256 0.7793 0.2761 0.7864 0.5034 0.7900 0.2189
  4260. 0.7954 0.2205 0.7967 0.2778 0.8038 0.3182 0.8123 0.1734 0.8292 0.2290 0.8324 0.4293
  4261. 0.8377 0.2155 0.8444 0.2121 0.8471 0.2929 0.8533 0.2963 0.8613 0.2037 0.8823 0.2391
  4262. 0.8850 0.4478 0.8903 0.1886 0.8939 0.2256 0.8979 0.2946 0.9015 0.3131 0.9104 0.2088
  4263. 0.9309 0.2172 0.9358 0.5556 0.9403 0.2172 0.9456 0.2290 0.9563 0.3215 0.9666 0.2104
  4264. 0.9924 0.1785 1.0000 0.1801)
  4265. :duration dur :scaler (hz->radians 10035.0))))
  4266. (do ((i start (+ i 1)))
  4267. ((= i stop))
  4268. (outa i (* (env ampf)
  4269. (polywave gen1 (+ (env frqf)
  4270. (rand-interp rnd)))))))))
  4271. ;; (with-sound (:play #t) (purple-finch 0 .5))
  4272. ;;; --------------------------------------------------------------------------------
  4273. ;;;
  4274. ;;; Northern goshawk
  4275. (defanimal (northern-goshawk beg amp)
  4276. (let ((dur 0.31))
  4277. (let ((start (seconds->samples beg))
  4278. (stop (seconds->samples (+ beg dur)))
  4279. (ampf (make-env '(0.000 0.000 0.124 0.399 0.174 0.520 0.223 0.881 0.355 0.998 0.499 0.644 1.000 0.000)
  4280. :duration dur :scaler amp))
  4281. (gen1 (make-polywave 0.0 '(1 .1 2 .8 3 .3 4 .05 5 .01 6 .005 7 .003)))
  4282. (frqf (make-env '(0.000 0.137 0.126 0.138 0.237 0.144 0.314 0.142 0.400 0.140 1.000 0.130)
  4283. :duration dur :scaler (hz->radians 9040.0))))
  4284. (do ((i start (+ i 1)))
  4285. ((= i stop))
  4286. (outa i (* (env ampf)
  4287. (polywave gen1 (env frqf))))))))
  4288. ;; (with-sound (:play #t) (northern-goshawk 0 .25))
  4289. ;;;--------------------------------------------------------------------------------
  4290. ;;;
  4291. ;;; Common Gull
  4292. (defanimal (common-gull beg amp)
  4293. (let ((dur 0.42))
  4294. (let ((start (seconds->samples beg))
  4295. (stop (seconds->samples (+ beg dur)))
  4296. (ampf (make-env '(0 0 1 1 1.4 1 1.7 .8 1.8 .2 2 0) :duration dur :scaler amp))
  4297. (gen1 (make-rcos 1200 0.5))
  4298. (gen2 (make-rxycos 1800 (/ 1200 1800.0) 0.75))
  4299. (frqf (make-env '(0.000 0.326 0.057 0.599 0.075 0.602 0.102 0.637 0.140 0.618 0.255 0.626 0.378 0.607
  4300. 0.401 0.589 0.441 0.584 0.491 0.562 0.591 0.544 0.628 0.557 0.675 0.541 0.733 0.538
  4301. 0.756 0.523 0.809 0.501 0.853 0.469 0.887 0.390 1.000 0.325)
  4302. :duration dur :offset (hz->radians -1200) :scaler (hz->radians 2000.0)))
  4303. (intrpf (make-env '(0 1 .2 1 .5 0 1 0) :duration dur :scaler .3 :base 10))
  4304. (rnd (make-rand-interp 800 .2))
  4305. (attf (make-env '(0 1 .15 0 1 0) :duration dur :base 10))
  4306. (frm1 (make-formant 2300 .99))
  4307. (frm2 (make-formant 6100 .98))
  4308. (frm3 (make-formant 3800 .98))
  4309. (frm4 (make-formant 1800 .99))
  4310. (fr1 (* 10 (sin (hz->radians 2300))))
  4311. (fr2 (* 6 (sin (hz->radians 6100))))
  4312. (fr3 (* 10 (sin (hz->radians 3800))))
  4313. (fr4 (* 14 (sin (hz->radians 1800))))
  4314. (rnd2 (make-rand-interp 300 (hz->radians 15))))
  4315. (let ((fb (vector frm1 frm2 frm3 frm4))
  4316. (fs (float-vector fr1 fr2 fr3 fr4)))
  4317. (set! fb (make-formant-bank fb fs))
  4318. (do ((i start (+ i 1)))
  4319. ((= i stop))
  4320. (let ((frq (+ (env frqf)
  4321. (rand-interp rnd2)
  4322. (* (env attf)
  4323. (rand-interp rnd)))))
  4324. (outa i (* (env ampf)
  4325. (formant-bank fb (+ (rcos gen1 frq)
  4326. (* (env intrpf)
  4327. (rxycos gen2 frq))))))))))))
  4328. ;; (with-sound (:play #t) (common-gull 0 .5))
  4329. ;;; --------------------------------------------------------------------------------
  4330. ;;;
  4331. ;;; Ash-throated flycatcher
  4332. (defanimal (ash-throated-flycatcher beg amp)
  4333. (let ((dur 0.47))
  4334. (let ((start (seconds->samples beg))
  4335. (stop (seconds->samples (+ beg dur)))
  4336. (ampf (make-env '(0.000 0.000 0.018 0.176 0.030 0.756 0.041 1.000 0.052 0.916 0.066 0.198 0.097 0.046
  4337. 0.128 0.000 0.165 0.000 0.211 0.141 0.224 0.108 0.244 0.149 0.261 0.105 0.267 0.031
  4338. 0.272 0.218 0.278 0.125 0.302 0.237 0.315 0.510 0.336 0.255 0.346 0.000 0.369 0.000
  4339. 0.386 0.345 0.403 0.246 0.412 0.000 0.481 0.000 0.490 0.084 0.504 0.330 0.514 0.174
  4340. 0.527 0.070 0.531 0.000 0.546 0.000 0.550 0.055 0.556 0.000 0.560 0.000 0.565 0.053
  4341. 0.571 0.000 0.575 0.000 0.580 0.048 0.587 0.000 0.592 0.000 0.597 0.064 0.601 0.000
  4342. 0.605 0.000 0.609 0.084 0.616 0.000 0.620 0.000 0.623 0.086 0.631 0.000 0.636 0.000
  4343. 0.638 0.103 0.644 0.000 0.650 0.000 0.653 0.095 0.657 0.000 0.663 0.000 0.669 0.105
  4344. 0.675 0.000 0.679 0.000 0.683 0.046 0.689 0.000 0.722 0.000 0.727 0.084 0.736 0.312
  4345. 0.741 0.365 0.747 0.314 0.756 0.000 0.819 0.000 0.830 0.086 0.838 0.369 0.845 0.411
  4346. 0.854 0.365 0.861 0.000 0.864 0.092 0.869 0.081 0.873 0.200 0.881 0.336 0.889 0.374
  4347. 0.901 0.033 0.908 0.000 0.913 0.066 0.929 0.310 0.936 0.266 0.940 0.079 0.948 0.000
  4348. 0.967 0.044 0.973 0.101 1.000 0.000)
  4349. :duration dur :scaler amp))
  4350. (gen1 (make-polywave 0.0 '(1 .98 2 .02 4 .01)))
  4351. (frqf (make-env '(0.000 0.317 0.013 0.368 0.029 0.464 0.048 0.485 0.062 0.469 0.100 0.310 0.176 0.320
  4352. 0.224 0.389 0.242 0.395 0.270 0.370 0.280 0.492 0.284 0.304 0.292 0.363 0.305 0.411
  4353. 0.322 0.464 0.347 0.306 0.376 0.269 0.386 0.368 0.396 0.398 0.407 0.366 0.415 0.290
  4354. 0.485 0.288 0.520 0.405 0.536 0.315 0.690 0.313 0.728 0.267 0.733 0.350 0.743 0.375
  4355. 0.756 0.345 0.759 0.281 0.827 0.285 0.834 0.349 0.850 0.375 0.868 0.312 0.878 0.358
  4356. 0.886 0.375 0.897 0.352 0.910 0.297 0.923 0.342 0.932 0.361 0.942 0.342 0.960 0.283
  4357. 0.968 0.327 0.978 0.350 0.989 0.335 1.000 0.290)
  4358. :duration dur :scaler (hz->radians 6070.0))))
  4359. (do ((i start (+ i 1)))
  4360. ((= i stop))
  4361. (outa i (* (env ampf)
  4362. (polywave gen1 (env frqf))))))))
  4363. ;; (with-sound (:play #t) (ash-throated-flycatcher 0 .25))
  4364. ;;; --------------------------------------------------------------------------------
  4365. ;;;
  4366. ;;; White-header woodpecker
  4367. (defanimal (white-headed-woodpecker beg amp)
  4368. ;; spectrum travels right off the top -- I wonder how high it actually goes
  4369. (let ((dur 0.16))
  4370. (let ((start (seconds->samples beg))
  4371. (stop (seconds->samples (+ beg dur)))
  4372. (ampf (make-env '(0.000 0.000 0.053 0.952 0.066 0.865 0.079 0.386 0.091 0.937 0.145 0.963 0.182 0.923
  4373. 0.197 0.384 0.221 0.892 0.256 0.751 0.298 0.000 0.410 0.000 0.430 0.915 0.450 0.836
  4374. 0.464 0.307 0.479 0.873 0.496 0.952 0.531 0.886 0.554 0.291 0.575 0.892 0.606 0.717
  4375. 0.654 0.000 0.775 0.000 0.801 0.712 0.814 0.233 0.822 0.712 0.893 0.712 0.923 0.225
  4376. 0.938 0.758 0.959 0.640 1.000 0.000 )
  4377. :duration dur :scaler amp))
  4378. (frqf1 (make-env '(0.000 0.106 0.051 0.119 0.063 0.177 0.087 0.230 0.198 0.228 0.211 0.175 0.236 0.153
  4379. 0.282 0.122 0.427 0.103 0.465 0.156 0.483 0.214 0.542 0.220 0.563 0.159 0.588 0.146
  4380. 0.615 0.095 0.767 0.122 0.8 0.2 0.851 0.2 0.871 0.16 0.903 0.148
  4381. 0.939 0.143 .95 .14)
  4382. :duration dur :scaler (hz->radians (/ 22050.0 3.0))))
  4383. (frqf2 (make-env '(0.000 0.230 0.061 0.262 0.088 0.341 0.152 0.323 0.206 0.341 0.219 0.265 0.237 0.235
  4384. 0.450 0.220 0.459 0.317 0.514 0.302 0.558 0.354 0.605 0.246 0.772 0.246 0.838 0.323
  4385. 0.857 0.278 0.864 0.325 0.914 0.222 .95 .22)
  4386. :duration dur :scaler (hz->radians (/ 22050.0 5.0))))
  4387. (gen1 (make-polywave 0.0 (list 1 (* .8 .01) 2 (* .8 .1) 3 (* .8 .6) 4 (* .8 .02)
  4388. 6 (* .8 .4) 7 (* .8 .05) 9 (* .8 .1) 10 (* .8 .1)
  4389. 12 (* .8 .01))))
  4390. (gen2 (make-polywave 0.0 (list 5 (* .2 .9) 8 (* .2 .3) 11 (* .2 .1))))
  4391. (rnd (make-sawtooth-wave 700 .01))
  4392. (rndf (make-env '(0 0 .01 1 .08 .02 .25 .02 .3 1 .45 1 .47 .03 .64 .01 .65 1 .75 1 .77 .05 .92 .01 1 1)
  4393. :duration dur)))
  4394. (do ((i start (+ i 1)))
  4395. ((= i stop))
  4396. (let ((noise (* (env rndf)
  4397. (sawtooth-wave rnd))))
  4398. (outa i (* (env ampf)
  4399. (+ (polywave gen1 (+ (env frqf1) noise))
  4400. (polywave gen2 (+ (env frqf2) (* 10.0 noise)))))))))))
  4401. ;; (with-sound (:play #t) (white-headed-woodpecker 0 .5))
  4402. ;;; --------------------------------------------------------------------------------
  4403. ;;;
  4404. ;;; Phainopepla
  4405. (defanimal (phainopepla beg amp)
  4406. (let ((dur 0.26))
  4407. (let ((start (seconds->samples beg))
  4408. (stop (seconds->samples (+ beg dur)))
  4409. (ampf (make-env '(0.000 0.000 0.063 0.073 0.119 0.181 0.142 0.290 0.178 0.617 0.192 0.525 0.236 0.288
  4410. 0.255 0.000 0.272 0.557 0.285 0.178 0.296 0.095 0.393 0.088 0.501 0.000 0.522 0.108
  4411. 0.538 0.634 0.647 0.000 0.663 0.000 0.681 0.484 0.704 0.211 0.777 0.643 0.850 0.961
  4412. 0.880 0.998 0.899 0.974 0.958 0.277 1.000 0.000)
  4413. :duration dur :scaler amp))
  4414. (gen1 (make-polywave 0.0 '(1 .9 2 .1 3 .01)))
  4415. (frqf (make-env '(0.000 0.203 0.061 0.309 0.259 0.317 0.276 0.533 0.300 0.720 0.329 0.739 0.373 0.697
  4416. 0.450 0.792 0.496 0.836 0.516 0.794 0.525 0.689 0.532 0.417 0.550 0.351 0.573 0.314
  4417. 0.607 0.296 0.624 0.351 0.629 0.435 0.652 0.425 0.660 0.219 0.698 0.398 0.726 0.441
  4418. 0.839 0.433 1.000 0.427)
  4419. :duration dur :scaler (hz->radians 8040.0))))
  4420. (do ((i start (+ i 1)))
  4421. ((= i stop))
  4422. (outa i (* (env ampf)
  4423. (polywave gen1 (env frqf))))))))
  4424. ;; (with-sound (:play #t) (phainopepla 0 .5))
  4425. ;;; --------------------------------------------------------------------------------
  4426. ;;;
  4427. ;;; Golden-crowned sparrow
  4428. (defanimal (golden-crowned-sparrow beg amp)
  4429. (let ((dur 2.13))
  4430. (let ((start (seconds->samples beg))
  4431. (stop (seconds->samples (+ beg dur)))
  4432. (ampf (make-env '(0.000 0.000 0.079 0.343 0.188 0.391 0.301 0.504 0.343 0.963 0.379 0.887 0.388 0.000
  4433. 0.459 0.000 0.474 0.480 0.494 0.549 0.595 0.984 0.637 1.000 0.688 0.720 0.701 0.000
  4434. 0.770 0.000 0.795 0.311 0.863 0.420 0.916 0.383 0.985 0.272 1.000 0.000)
  4435. :duration dur :scaler amp))
  4436. (gen1 (make-polywave 0.0 '(1 .9 2 .01 3 .1)))
  4437. (frqf (make-env '(0.000 0.814 0.028 0.730 0.064 0.690 0.122 0.549 0.156 0.551 0.178 0.573 0.207 0.544
  4438. 0.272 0.556 0.296 0.580 0.320 0.549 0.343 0.501 0.377 0.468 0.452 0.446 0.467 0.475
  4439. 0.488 0.470 0.523 0.477 0.529 0.561 0.535 0.480 0.572 0.473 0.589 0.494 0.612 0.477
  4440. 0.655 0.456 0.672 0.482 0.691 0.463 0.767 0.413 0.819 0.394 0.861 0.396 0.865 0.449
  4441. 0.873 0.408 0.894 0.401 0.930 0.401 0.975 0.396 1.000 0.329 )
  4442. :duration dur :scaler (hz->radians 8040.0)))
  4443. (vib (make-rand-interp 50 (hz->radians 80))))
  4444. (do ((i start (+ i 1)))
  4445. ((= i stop))
  4446. (outa i (* (env ampf)
  4447. (polywave gen1 (+ (env frqf)
  4448. (rand-interp vib)))))))))
  4449. ;; (with-sound (:play #t) (golden-crowned-sparrow 0 .5))
  4450. ;;; --------------------------------------------------------------------------------
  4451. ;;;
  4452. ;;; House finch
  4453. (defanimal (house-finch beg amp)
  4454. (let ((dur 3.16))
  4455. (let ((start (seconds->samples beg))
  4456. (stop (seconds->samples (+ beg dur)))
  4457. (ampf (make-env '(0.000 0.000 0.014 0.128 0.021 0.000 0.052 0.000 0.058 0.146 0.062 0.314 0.068 0.301
  4458. 0.073 0.000 0.097 0.000 0.101 0.296 0.104 0.151 0.106 0.447 0.114 0.459 0.119 0.143
  4459. 0.125 0.000 0.151 0.000 0.162 0.415 0.180 0.375 0.188 0.000 0.209 0.000 0.212 0.353
  4460. 0.214 0.175 0.217 0.442 0.222 0.153 0.225 0.528 0.232 0.002 0.246 0.000 0.247 0.109
  4461. 0.258 0.030 0.259 0.294 0.263 0.180 0.267 0.333 0.271 0.000 0.290 0.000 0.295 0.128
  4462. 0.298 0.388 0.303 0.000 0.313 0.857 0.322 0.000 0.346 0.000 0.358 0.990 0.359 0.528
  4463. 0.361 0.778 0.370 0.000 0.384 0.000 0.390 0.504 0.395 0.227 0.399 0.328 0.409 0.000
  4464. 0.420 0.993 0.425 0.402 0.433 0.000 0.444 0.000 0.449 0.380 0.455 0.978 0.461 0.000
  4465. 0.472 0.000 0.480 0.477 0.487 0.000 0.492 0.558 0.500 0.430 0.506 0.000 0.516 0.000
  4466. 0.525 0.844 0.533 0.104 0.537 0.072 0.541 0.538 0.550 0.067 0.557 0.067 0.559 0.232
  4467. 0.564 0.528 0.567 0.064 0.573 0.901 0.579 0.084 0.582 0.551 0.587 0.430 0.593 0.000
  4468. 0.606 0.000 0.611 0.257 0.618 0.000 0.625 0.079 0.629 0.516 0.636 0.642 0.639 0.489
  4469. 0.643 0.104 0.653 0.000 0.672 0.000 0.680 0.736 0.694 0.696 0.701 0.121 0.707 0.057
  4470. 0.713 0.558 0.722 0.000 0.752 0.000 0.757 0.723 0.774 0.546 0.782 0.116 0.794 0.207
  4471. 0.801 0.499 0.818 0.689 0.833 0.388 0.847 0.000 0.859 0.000 0.863 0.123 0.867 0.726
  4472. 0.872 0.000 0.878 0.116 0.879 0.385 0.885 0.669 0.944 0.835 0.989 0.328 0.995 0.035
  4473. 1.000 0.000)
  4474. :duration dur :scaler amp))
  4475. (frqf (make-env '(0.0000 0.3997 0.0085 0.4810 0.0103 0.3943 0.0166 0.4228 0.0573 0.4268 0.0605 0.4932
  4476. 0.0663 0.4160 0.0708 0.4363 0.0985 0.4228 0.1008 0.2846 0.1066 0.4228 0.1146 0.3089
  4477. 0.1187 0.3238 0.1339 0.3225 0.1487 0.4864 0.1617 0.4607 0.1769 0.4512 0.1818 0.3740
  4478. 0.1948 0.3794 0.2100 0.4214 0.2114 0.2859 0.2172 0.4350 0.2248 0.3157 0.2293 0.3320
  4479. 0.2427 0.5054 0.2512 0.4214 0.2557 0.3374 0.2584 0.4648 0.2620 0.5434 0.2665 0.3835
  4480. 0.2888 0.4119 0.2942 0.3794 0.3014 0.5813 0.3032 0.3130 0.3081 0.4892 0.3144 0.3266
  4481. 0.3193 0.3388 0.3395 0.4065 0.3462 0.4824 0.3542 0.4458 0.3605 0.3333 0.3645 0.3144
  4482. 0.3820 0.2927 0.3842 0.2751 0.3887 0.3360 0.3932 0.4173 0.4017 0.5705 0.4035 0.4607
  4483. 0.4107 0.3862 0.4187 0.3360 0.4263 0.2737 0.4438 0.3062 0.4456 0.3686 0.4478 0.4228
  4484. 0.4541 0.3266 0.4635 0.3225 0.4720 0.2317 0.4765 0.3225 0.4814 0.3726 0.4828 0.4702
  4485. 0.4877 0.4363 0.4913 0.3672 0.4922 0.3130 0.4993 0.2846 0.5204 0.3496 0.5280 0.2913
  4486. 0.5311 0.2195 0.5361 0.4241 0.5428 0.3089 0.5567 0.2913 0.5584 0.4295 0.5625 0.3198
  4487. 0.5665 0.5000 0.5723 0.4065 0.5808 0.3225 0.5902 0.2060 0.6064 0.2642 0.6117 0.3374
  4488. 0.6122 0.2195 0.6189 0.1789 0.6296 0.3591 0.6444 0.1599 0.6458 0.4160 0.6771 0.4201
  4489. 0.6950 0.4214 0.7026 0.2778 0.7112 0.2764 0.7228 0.1897 0.7394 0.4092 0.7546 0.4160
  4490. 0.7721 0.4187 0.7895 0.3198 0.8343 0.3184 0.8616 0.2344 0.8634 0.3808 0.8697 0.2276
  4491. 0.8804 0.3279 0.9149 0.3835 0.9472 0.4688 1.0000 0.8306)
  4492. :duration dur :scaler (hz->radians 9130.0)))
  4493. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .01)))
  4494. (gen2 (make-polywave 0.0 '(1 .98 2 .005)))
  4495. (buzz (make-oscil 0))
  4496. (buzzsweep (make-nrxysin :n 5 :r .5))
  4497. (bsweep (hz->radians 500))
  4498. (buzzf (make-env '(0 0 .14 0 .15 1 .19 1 .20 0 .66 0 .67 1 1 1) :duration dur))
  4499. (buzzf-1 (make-env '(0 0 .14 0 .15 1 .19 1 .20 0 .66 0 .67 1 1 1) :duration dur :offset 1.0 :scaler -1.0))
  4500. (buzzfrqf (make-env '(0 110 .5 110 .6 70 .85 70 .86 130 1 130) :duration dur :scaler (hz->radians 1.0)))
  4501. (rnd (make-rand-interp 400 (hz->radians 100))))
  4502. (do ((i start (+ i 1)))
  4503. ((= i stop))
  4504. (let ((frq (env frqf))
  4505. (bfrq (env buzzfrqf)))
  4506. (outa i (* (env ampf)
  4507. (+ (* (env buzzf-1)
  4508. (polywave gen1 frq))
  4509. (* (env buzzf)
  4510. (+ .1 (* .9 (abs (oscil buzz bfrq))))
  4511. (polywave gen2 (+ frq
  4512. (* bsweep (nrxysin buzzsweep bfrq))
  4513. (rand-interp rnd))))))))))))
  4514. ;; (with-sound (:play #t) (house-finch 0 .5))
  4515. ;;; --------------------------------------------------------------------------------
  4516. ;;;
  4517. ;;; Ruby-crowned kinglet
  4518. (defanimal (ruby-crowned-kinglet beg amp)
  4519. (let ((dur 2.17))
  4520. (let ((start (seconds->samples beg))
  4521. (stop (seconds->samples (+ beg dur)))
  4522. (ampf (make-env '(0.000 0.000 0.017 0.053 0.025 0.000 0.034 0.000 0.044 0.088 0.053 0.076 0.057 0.000
  4523. 0.112 0.000 0.133 0.298 0.151 0.060 0.167 0.158 0.179 0.000 0.214 0.000 0.232 0.496
  4524. 0.247 0.100 0.265 0.745 0.275 0.000 0.310 0.000 0.318 0.601 0.326 0.714 0.344 0.169
  4525. 0.361 0.334 0.372 0.000 0.401 0.000 0.417 1.000 0.433 0.115 0.450 0.979 0.459 0.000
  4526. 0.496 0.000 0.506 0.745 0.516 0.778 0.526 0.322 0.537 0.236 0.546 0.258 0.553 0.212
  4527. 0.559 0.000 0.599 0.000 0.613 0.967 0.631 0.189 0.647 0.933 0.656 0.000 0.697 0.000
  4528. 0.706 0.726 0.714 0.589 0.719 0.714 0.729 0.236 0.737 0.160 0.743 0.241 0.754 0.198
  4529. 0.761 0.000 0.808 0.000 0.826 0.752 0.839 0.098 0.856 0.599 0.862 0.558 0.868 0.000
  4530. 0.921 0.000 0.932 0.470 0.941 0.511 0.951 0.179 0.976 0.229 0.980 0.057 1.000 0.000)
  4531. :duration dur :scaler amp))
  4532. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .004)))
  4533. (frqf (make-env '(0.000 0.671 0.017 0.698 0.026 0.786 0.031 0.785 0.032 0.556 0.039 0.556 0.053 0.646
  4534. 0.059 0.591 0.119 0.476 0.146 0.284 0.193 0.269 0.216 0.549 0.225 0.464 0.238 0.564
  4535. 0.244 0.477 0.250 0.411 0.262 0.411 0.268 0.442 0.274 0.414 0.316 0.446 0.337 0.289
  4536. 0.363 0.285 0.368 0.267 0.391 0.287 0.404 0.523 0.410 0.481 0.423 0.553 0.432 0.426
  4537. 0.441 0.401 0.452 0.441 0.458 0.396 0.502 0.444 0.528 0.285 0.550 0.285 0.557 0.259
  4538. 0.572 0.260 0.594 0.513 0.607 0.482 0.618 0.568 0.626 0.529 0.629 0.451 0.642 0.429
  4539. 0.650 0.462 0.653 0.427 0.703 0.442 0.729 0.282 0.750 0.285 0.756 0.259 0.778 0.259
  4540. 0.793 0.616 0.806 0.588 0.813 0.481 0.825 0.571 0.841 0.444 0.851 0.416 0.860 0.442
  4541. 0.923 0.444 0.952 0.279 1.000 0.275)
  4542. :duration dur :scaler (hz->radians 9060.0))))
  4543. (do ((i start (+ i 1)))
  4544. ((= i stop))
  4545. (outa i (* (env ampf)
  4546. (polywave gen1 (env frqf))))))))
  4547. ;; (with-sound (:play #t) (ruby-crowned-kinglet 0 .5))
  4548. ;;; --------------------------------------------------------------------------------
  4549. ;;;
  4550. ;;; Green-tailed towhee
  4551. ;;;
  4552. ;;; not very elegant, but a real test of the envelope editor
  4553. (defanimal (green-tailed-towhee beg amp)
  4554. (let ((dur 1.86))
  4555. (let ((start (seconds->samples beg))
  4556. (stop (seconds->samples (+ beg dur)))
  4557. (ampf (make-env '(0.000 0.000 0.010 0.168 0.013 0.000 0.018 0.000 0.021 0.200 0.027 0.255 0.033 0.119
  4558. 0.039 0.000 0.141 0.000 0.149 0.104 0.159 0.586 0.163 0.438 0.166 0.586 0.168 0.374
  4559. 0.171 0.519 0.173 0.429 0.176 0.487 0.179 0.284 0.180 0.554 0.184 0.261 0.186 0.539
  4560. 0.189 0.270 0.190 0.530 0.194 0.243 0.197 0.449 0.200 0.272 0.202 0.443 0.205 0.243
  4561. 0.207 0.377 0.218 0.200 0.222 0.000 0.277 0.000 0.286 0.122 0.289 0.417 0.292 0.055
  4562. 0.296 0.417 0.299 0.490 0.303 0.058 0.307 0.336 0.309 0.000 0.323 0.093 0.327 0.658
  4563. 0.330 0.087 0.335 0.530 0.341 0.000 0.343 0.438 0.346 0.000 0.356 0.061 0.362 0.232
  4564. 0.365 0.872 0.368 0.145 0.372 0.655 0.378 0.061 0.381 0.542 0.383 0.000 0.392 0.000
  4565. 0.397 0.159 0.403 0.739 0.406 0.081 0.411 0.600 0.416 0.000 0.420 0.452 0.422 0.000
  4566. 0.432 0.078 0.437 0.235 0.441 0.788 0.445 0.078 0.450 0.614 0.454 0.078 0.459 0.357
  4567. 0.460 0.000 0.470 0.081 0.476 0.281 0.479 0.733 0.485 0.070 0.489 0.588 0.493 0.000
  4568. 0.498 0.194 0.500 0.000 0.533 0.000 0.535 0.374 0.538 0.090 0.550 1.000 0.557 0.991
  4569. 0.572 0.078 0.577 0.145 0.583 0.354 0.612 0.000 0.646 0.000 0.663 0.588 0.671 0.583
  4570. 0.686 0.081 0.701 0.591 0.706 0.577 0.721 0.000 0.759 0.000 0.763 0.420 0.765 0.084
  4571. 0.768 0.191 0.772 0.136 0.775 0.000 0.778 0.464 0.780 0.119 0.783 0.212 0.788 0.154
  4572. 0.790 0.003 0.794 0.571 0.796 0.136 0.799 0.241 0.803 0.165 0.807 0.009 0.810 0.710
  4573. 0.812 0.125 0.814 0.275 0.819 0.174 0.822 0.017 0.824 0.536 0.828 0.136 0.831 0.272
  4574. 0.835 0.186 0.837 0.006 0.841 0.684 0.844 0.142 0.846 0.345 0.855 0.006 0.856 0.617
  4575. 0.860 0.130 0.862 0.287 0.870 0.006 0.873 0.606 0.876 0.142 0.879 0.290 0.883 0.154
  4576. 0.885 0.009 0.889 0.623 0.892 0.139 0.893 0.281 0.903 0.023 0.904 0.600 0.908 0.130
  4577. 0.911 0.241 0.918 0.006 0.921 0.580 0.924 0.110 0.926 0.209 0.934 0.009 0.938 0.455
  4578. 0.940 0.090 0.943 0.159 0.951 0.003 0.955 0.391 0.956 0.093 0.959 0.136 0.967 0.012
  4579. 0.970 0.386 0.974 0.116 0.983 0.012 0.987 0.333 0.990 0.049 1.000 0.000)
  4580. :duration dur :scaler amp))
  4581. (gen1 (make-oscil))
  4582. (frqf (make-env '(0.0000 0.3575 0.0067 0.4860 0.0110 0.5475 0.0119 0.3203 0.0181 0.3911 0.0219 0.5438
  4583. 0.0229 0.3389 0.0267 0.4860 0.0300 0.3948 0.0334 0.3259 0.1411 0.3315 0.1478 0.4953
  4584. 0.1554 0.4413 0.1635 0.3296 0.1640 0.4376 0.1697 0.3315 0.1698 0.4302 0.1755 0.3389
  4585. 0.1759 0.4153 0.1797 0.3296 0.1821 0.4358 0.1859 0.3240 0.1864 0.4078 0.1892 0.3575
  4586. 0.1907 0.4358 0.1959 0.3240 0.1964 0.4134 0.2031 0.3128 0.2032 0.4376 0.2078 0.3035
  4587. 0.2126 0.3166 0.2127 0.4246 0.2183 0.3464 0.2194 0.4320 0.2216 0.3669 0.2698 0.3892
  4588. 0.2827 0.7318 0.2898 0.5214 0.2941 0.3054 0.2979 0.5978 0.3046 0.3091 0.3207 0.7745
  4589. 0.3241 0.6685 0.3322 0.2868 0.3346 0.5512 0.3394 0.2626 0.3547 0.8209 0.3608 0.6462
  4590. 0.3689 0.2756 0.3723 0.5196 0.3785 0.2868 0.3918 0.8425 0.3999 0.6331 0.4066 0.3110
  4591. 0.4109 0.5568 0.4175 0.3147 0.4280 0.8541 0.4337 0.7263 0.4409 0.5531 0.4447 0.2961
  4592. 0.4485 0.6555 0.4561 0.2607 0.4682 0.8375 0.4743 0.6853 0.4790 0.5661 0.4833 0.3315
  4593. 0.4871 0.6089 0.4933 0.3315 0.4976 0.6462 0.5353 0.4860 0.5362 0.6872 0.5377 0.2849
  4594. 0.5405 0.4488 0.5458 0.4860 0.5567 0.4600 0.5648 0.3464 0.5758 0.2458 0.5877 0.3240
  4595. 0.6025 0.2495 0.6482 0.3222 0.6568 0.4860 0.6754 0.4618 0.6888 0.4823 0.6892 0.2775
  4596. 0.7021 0.3315 0.7188 0.2682 0.7541 0.2793 0.7610 0.6542 0.7649 0.2737 0.7650 0.6574
  4597. 0.7717 0.4097 0.7769 0.6499 0.7798 0.3222 0.7822 0.5791 0.7879 0.3743 0.7927 0.6480
  4598. 0.7939 0.3003 0.7974 0.6034 0.8022 0.3799 0.8065 0.6518 0.8117 0.2961 0.8136 0.6425
  4599. 0.8184 0.4041 0.8241 0.6499 0.8255 0.2896 0.8282 0.6167 0.8341 0.4004 0.8379 0.6610
  4600. 0.8442 0.2857 0.8451 0.6145 0.8506 0.3969 0.8537 0.6491 0.8585 0.3066 0.8600 0.6269
  4601. 0.8652 0.3816 0.8700 0.6422 0.8755 0.2760 0.8756 0.6238 0.8831 0.3697 0.8870 0.6499
  4602. 0.8919 0.2794 0.8923 0.6145 0.8985 0.3526 0.9021 0.6405 0.9066 0.3408 0.9075 0.3066
  4603. 0.9080 0.6071 0.9145 0.3748 0.9175 0.6388 0.9238 0.3135 0.9249 0.6065 0.9306 0.3714
  4604. 0.9351 0.6303 0.9390 0.2998 0.9404 0.5791 0.9442 0.3855 0.9514 0.6294 0.9542 0.3575
  4605. 0.9571 0.5791 0.9628 0.3724 0.9670 0.6235 0.9720 0.3152 0.9747 0.5680 0.9795 0.3594
  4606. 0.9858 0.5963 0.9900 0.3520 1.0000 0.2777)
  4607. :duration dur :scaler (hz->radians 10030.0))))
  4608. (do ((i start (+ i 1)))
  4609. ((= i stop))
  4610. (outa i (* (env ampf)
  4611. (oscil gen1 (env frqf))))))))
  4612. ;; (with-sound (:play #t) (green-tailed-towhee 0 .5))
  4613. ;;; --------------------------------------------------------------------------------
  4614. ;;;
  4615. ;;; Lucy's warbler
  4616. (defanimal (lucys-warbler beg amp)
  4617. (let ((dur 1.72))
  4618. (let ((start (seconds->samples beg))
  4619. (stop (seconds->samples (+ beg dur)))
  4620. (ampf (make-env '(0.000 0.000 0.019 0.093 0.038 0.000 0.057 0.000 0.066 0.170 0.073 0.132 0.081 0.168
  4621. 0.091 0.000 0.116 0.000 0.125 0.269 0.132 0.211 0.137 0.280 0.149 0.000 0.174 0.000
  4622. 0.185 0.384 0.191 0.261 0.196 0.461 0.209 0.000 0.233 0.000 0.239 0.416 0.245 0.474
  4623. 0.248 0.284 0.254 0.543 0.259 0.405 0.267 0.000 0.287 0.000 0.295 0.659 0.301 0.507
  4624. 0.308 0.655 0.320 0.000 0.343 0.000 0.355 0.881 0.358 0.629 0.365 0.761 0.377 0.000
  4625. 0.396 0.000 0.408 0.965 0.424 0.573 0.431 0.000 0.450 0.000 0.459 0.983 0.471 0.466
  4626. 0.477 0.000 0.494 0.000 0.503 0.853 0.516 0.442 0.520 0.000 0.536 0.000 0.549 0.853
  4627. 0.567 0.000 0.581 0.000 0.596 0.981 0.614 0.000 0.628 0.000 0.634 0.813 0.640 0.425
  4628. 0.642 0.860 0.653 0.422 0.657 0.000 0.678 0.000 0.682 0.757 0.686 0.364 0.688 0.875
  4629. 0.704 0.000 0.720 0.000 0.727 0.761 0.731 0.440 0.733 0.875 0.743 0.461 0.750 0.000
  4630. 0.768 0.000 0.773 0.993 0.781 0.601 0.785 0.918 0.798 0.000 0.816 0.000 0.823 0.877
  4631. 0.827 0.535 0.830 0.877 0.855 0.000 0.879 0.000 0.885 0.638 0.889 0.741 0.919 0.000
  4632. 0.945 0.000 0.950 0.556 0.955 0.379 0.959 0.563 0.986 0.037 1.000 0.000)
  4633. :duration dur :scaler amp))
  4634. (gen1 (make-polywave 0.0 '(1 .98 2 .015 3 .005)))
  4635. (frqf (make-env '(0.000 0.651 0.018 0.637 0.040 0.401 0.049 0.361 0.055 0.658 0.072 0.644 0.087 0.526
  4636. 0.098 0.358 0.106 0.340 0.110 0.677 0.130 0.665 0.136 0.595 0.146 0.509 0.155 0.361
  4637. 0.161 0.342 0.175 0.628 0.191 0.602 0.202 0.536 0.212 0.394 0.219 0.361 0.229 0.648
  4638. 0.244 0.623 0.254 0.590 0.263 0.500 0.271 0.382 0.278 0.354 0.285 0.627 0.302 0.611
  4639. 0.315 0.536 0.322 0.391 0.328 0.356 0.333 0.661 0.357 0.644 0.369 0.547 0.379 0.387
  4640. 0.390 0.363 0.396 0.630 0.415 0.613 0.425 0.543 0.432 0.394 0.442 0.351 0.449 0.724
  4641. 0.462 0.708 0.474 0.538 0.475 0.418 0.488 0.365 0.491 0.774 0.502 0.743 0.513 0.613
  4642. 0.519 0.438 0.528 0.389 0.533 0.821 0.544 0.800 0.551 0.688 0.562 0.526 0.565 0.387
  4643. 0.577 0.354 0.579 0.807 0.588 0.795 0.597 0.701 0.606 0.595 0.612 0.384 0.621 0.339
  4644. 0.624 0.797 0.634 0.773 0.648 0.627 0.657 0.385 0.663 0.333 0.664 0.809 0.678 0.799
  4645. 0.686 0.696 0.695 0.575 0.701 0.389 0.709 0.345 0.714 0.825 0.724 0.797 0.736 0.630
  4646. 0.746 0.432 0.748 0.373 0.759 0.325 0.760 0.813 0.770 0.780 0.785 0.623 0.789 0.507
  4647. 0.793 0.405 0.802 0.342 0.803 0.837 0.818 0.795 0.829 0.630 0.836 0.535 0.854 0.372
  4648. 0.864 0.309 0.868 0.826 0.878 0.802 0.884 0.727 0.888 0.618 0.915 0.373 0.930 0.314
  4649. 0.931 0.819 0.944 0.792 0.951 0.670 0.963 0.563 0.977 0.448 0.981 0.387 1.000 0.318)
  4650. :duration dur :scaler (hz->radians 8070.0))))
  4651. (do ((i start (+ i 1)))
  4652. ((= i stop))
  4653. (outa i (* (env ampf)
  4654. (polywave gen1 (env frqf))))))))
  4655. ;; (with-sound (:play #t) (lucys-warbler 0 .25))
  4656. ;;; --------------------------------------------------------------------------------
  4657. ;;;
  4658. ;;; Cassin's vireo
  4659. (defanimal (cassins-vireo beg amp)
  4660. (let ((dur 0.5))
  4661. (let ((start (seconds->samples beg))
  4662. (stop (seconds->samples (+ beg dur)))
  4663. (ampf (make-env '(0.000 0.000 0.028 0.110 0.037 0.062 0.050 0.098 0.060 0.075 0.078 0.179 0.085 0.065
  4664. 0.093 0.116 0.100 0.379 0.119 0.163 0.136 0.457 0.147 0.473 0.159 0.180 0.173 0.608
  4665. 0.182 0.655 0.193 0.001 0.200 0.292 0.210 0.180 0.219 0.262 0.224 0.103 0.241 0.204
  4666. 0.253 0.055 0.268 0.225 0.285 0.061 0.299 0.251 0.312 0.171 0.330 0.298 0.366 0.182
  4667. 0.375 0.138 0.384 0.159 0.391 0.000 0.512 0.000 0.527 0.085 0.539 0.267 0.553 0.111
  4668. 0.565 0.200 0.574 0.150 0.583 0.360 0.587 0.117 0.595 0.257 0.602 0.096 0.610 0.297
  4669. 0.623 0.072 0.635 0.241 0.640 0.201 0.653 0.336 0.669 0.996 0.679 0.730 0.689 0.235
  4670. 0.702 0.336 0.714 0.688 0.725 0.752 0.733 0.466 0.744 0.680 0.752 0.070 0.763 0.628
  4671. 0.766 0.567 0.774 0.671 0.786 0.094 0.792 0.514 0.797 0.099 0.800 0.187 0.807 0.224
  4672. 0.810 0.523 0.820 0.444 0.824 0.155 0.829 0.481 0.832 0.598 0.838 0.521 0.843 0.070
  4673. 0.847 0.209 0.857 0.476 0.862 0.294 0.873 0.775 0.880 0.175 0.884 0.495 0.888 0.083
  4674. 0.896 0.644 0.916 0.074 0.919 0.379 0.926 0.072 0.940 0.657 0.944 0.613 0.955 0.070
  4675. 0.960 0.181 0.966 0.087 0.970 0.111 0.975 0.069 0.981 0.173 0.989 0.021 1.000 0.000)
  4676. :duration dur :scaler amp))
  4677. (frqf (make-env '(0.000 0.069 0.028 0.063 0.060 0.075 0.078 0.110 0.100 0.144 0.121 0.159 0.141 0.162
  4678. 0.160 0.154 0.188 0.130 0.206 0.119 0.216 0.120 0.225 0.100 0.239 0.119 0.254 0.093
  4679. 0.265 0.117 0.281 0.094 0.298 0.120 0.325 0.129 0.356 0.133 0.382 0.128 0.395 0.100
  4680. 0.516 0.090 0.568 0.108 0.600 0.075 0.621 0.150 0.639 0.183 0.662 0.178 0.682 0.159
  4681. 0.703 0.155 0.721 0.139 0.735 0.157 0.753 0.123 0.769 0.148 0.784 0.124 0.795 0.159
  4682. 0.816 0.139 0.831 0.172 0.845 0.148 0.857 0.180 0.872 0.178 0.881 0.159 0.892 0.198
  4683. 0.908 0.178 0.922 0.206 0.942 0.194 0.957 0.212 0.982 0.199 1.000 0.179)
  4684. :duration dur :scaler (hz->radians 22050.0)))
  4685. (gen1 (make-oscil))
  4686. (gen2 (make-oscil))
  4687. (gen3 (make-oscil))
  4688. (gen4 (make-oscil))
  4689. (gen5 (make-oscil))
  4690. (f1 (make-env '(0 .01 .06 .01 .1 1 .3 1 .5 .01 .65 .05 .67 1 1 1) :duration dur))
  4691. (f2 (make-env '(0 .25 .06 .5 .1 .01 .3 .01 .5 .75 .6 .5 .64 .01 1 .01) :duration dur))
  4692. (f3 (make-env '(0 1 .06 .5 .1 .01 .3 .01 .5 .01 .6 .3 .65 .01 .67 .01 1 .01) :duration dur)))
  4693. (do ((i start (+ i 1)))
  4694. ((= i stop))
  4695. (let ((frq (env frqf)))
  4696. (outa i (* (env ampf)
  4697. (+ (* (env f1) (oscil gen1 frq))
  4698. (* (env f2) (oscil gen2 (* 2.0 frq)))
  4699. (+ (* (env f3) (oscil gen3 (* 3.0 frq)))
  4700. (* .005 (oscil gen4 (* 4.0 frq)))
  4701. (* .005 (oscil gen5 (* 5.0 frq))))))))))))
  4702. ;;; formants sounded bad here, polywave worse
  4703. ;; (with-sound (:play #t) (cassins-vireo 0 .5))
  4704. ;;; --------------------------------------------------------------------------------
  4705. ;;;
  4706. ;;; Plain chacalaca
  4707. ;;;
  4708. ;;; the recording doesn't do this bird justice -- it actually does say "chacalaca"
  4709. ;;; (and the mosquitos darken the skies)
  4710. (define (plain-chacalaca beg1 amp)
  4711. (defanimal (plain-chacalaca-1 beg dur amp frmfrq frqlst)
  4712. (let ((start (seconds->samples beg))
  4713. (stop (seconds->samples (+ beg dur)))
  4714. (ampf (make-env '(0.000 0.000 2 1 4 1 6 0) :duration dur :scaler (* 0.5 amp)))
  4715. (frqf (make-env frqlst :duration dur :scaler (hz->radians 1.0)))
  4716. (frm1 (make-formant frmfrq .99))
  4717. (frm2 (make-formant 4200 .98))
  4718. (frm3 (make-formant 2800 .98))
  4719. (fr1 (* 40 (sin (hz->radians frmfrq))))
  4720. (fr2 (* 2 (sin (hz->radians 4200))))
  4721. (fr3 (* 16 (sin (hz->radians 2800))))
  4722. (gen (make-polywave 0.0 (nrcos->polywave 15 .75 1.0)))
  4723. (rnd (make-rand-interp 5000 .03))
  4724. (rnd1 (make-rand-interp 1000 .15))
  4725. (vib (make-blackman 50 4))
  4726. (vib-index (hz->radians -100)))
  4727. (let ((fb (vector frm1 frm2 frm3))
  4728. (fs (float-vector fr1 fr2 fr3)))
  4729. (set! fb (make-formant-bank fb fs))
  4730. (do ((i start (+ i 1)))
  4731. ((= i stop))
  4732. (outa i (* (env ampf)
  4733. (formant-bank fb (* (+ .85 (abs (rand-interp rnd1)))
  4734. (polywave gen (+ (env frqf)
  4735. (rand-interp rnd)
  4736. (* vib-index (blackman vib))))))))))))
  4737. (plain-chacalaca-1 beg1 0.17 (* .7 amp) 1700 '(0 450 1 680))
  4738. (plain-chacalaca-1 (+ beg1 0.20) 0.12 amp 1400 '(0 500 1 680 2 660))
  4739. (plain-chacalaca-1 (+ beg1 0.35) 0.20 amp 1400 '(0 500 1 680 4 660)))
  4740. ;; (with-sound (:play #t) (plain-chacalaca 0 .5))
  4741. ;;; --------------------------------------------------------------------------------
  4742. ;;;
  4743. ;;; Black-billed cuckoo
  4744. (defanimal (black-billed-cuckoo beg amp)
  4745. (let ((dur 0.68))
  4746. (let ((start (seconds->samples beg))
  4747. (stop (seconds->samples (+ beg dur)))
  4748. (ampf (make-env '(0.000 0.000 0.013 0.388 0.023 0.303 0.026 0.419 0.042 0.530 0.066 0.104 0.128 0.000
  4749. 0.215 0.000 0.243 0.642 0.257 0.536 0.266 0.725 0.296 0.737 0.311 0.044 0.357 0.070
  4750. 0.367 0.000 0.421 0.000 0.448 0.856 0.460 0.807 0.468 0.913 0.483 0.960 0.515 0.928
  4751. 0.535 0.048 0.575 0.085 0.584 0.000 0.638 0.000 0.658 0.903 0.674 0.989 0.708 0.822
  4752. 0.732 0.079 0.781 0.038 0.798 0.070 0.806 0.028 0.823 0.059 0.845 0.000 0.883 0.000
  4753. 0.892 0.593 0.913 0.739 0.940 0.031 0.976 0.066 1.000 0.000)
  4754. :duration dur :scaler amp))
  4755. (gen1 (make-polywave 0.0 '(1 .97 2 .005 3 .008 5 .005)))
  4756. (rnd (make-rand-interp 400 (hz->radians 25)))
  4757. (frqf (make-env '(0.000 0.568 0.057 0.568 0.078 0.399 0.203 0.315 0.218 0.632 0.252 0.557 0.314 0.553
  4758. 0.340 0.350 0.410 0.337 0.426 0.667 0.469 0.557 0.528 0.559 0.548 0.381 0.616 0.352
  4759. 0.624 0.617 0.659 0.544 0.721 0.544 0.748 0.350 0.840 0.297 0.851 0.615 0.889 0.540
  4760. 0.926 0.542 0.948 0.416 1.000 0.419)
  4761. :duration dur :scaler (hz->radians 1190.0))))
  4762. (do ((i start (+ i 1)))
  4763. ((= i stop))
  4764. (outa i (* (env ampf)
  4765. (polywave gen1 (+ (env frqf)
  4766. (rand-interp rnd)))))))))
  4767. ;; (with-sound (:play #t) (black-billed-cuckoo 0 .5))
  4768. ;;; --------------------------------------------------------------------------------
  4769. ;;;
  4770. ;;; Eared grebe
  4771. (defanimal (eared-grebe beg amp)
  4772. ;; note #1
  4773. (let ((dur 0.3))
  4774. (let ((start (seconds->samples beg))
  4775. (stop (seconds->samples (+ beg dur)))
  4776. (ampf (make-env '(0 0 9 1 10 0) :duration dur :scaler amp))
  4777. (frqf (make-env '(0 1050 1 1400) :duration dur :scaler (hz->radians 1.0)))
  4778. (gen1 (make-oscil))
  4779. (gen2 (make-oscil))
  4780. (gen3 (make-oscil))
  4781. (gen4 (make-oscil))
  4782. (gen5 (make-oscil))
  4783. (f1 (make-env '(0 .03 9 .144 10 .1) :duration dur))
  4784. (f2 (make-env '(0 .5 9 .844 10 .2) :duration dur))
  4785. (f3 (make-env '(0 .01 9 .03 10 .02) :duration dur))
  4786. (f4 (make-env '(0 0 1 .002 7 .003 10 0) :duration dur)))
  4787. (do ((i start (+ i 1)))
  4788. ((= i stop))
  4789. (let ((frq (env frqf)))
  4790. (outa i (* (env ampf)
  4791. (+ (* (env f1) (oscil gen1 frq))
  4792. (* (env f2) (oscil gen2 (* 2.0 frq)))
  4793. (+ (* (env f3) (oscil gen3 (* 3.0 frq)))
  4794. (* (env f4) (oscil gen4 (* 4.0 frq)))
  4795. (* .005 (oscil gen5 (* 5.0 frq)))))))))))
  4796. ;; note #2
  4797. (let ((dur 0.085)
  4798. (start (seconds->samples (+ beg 0.29))))
  4799. (let ((stop (+ start (seconds->samples dur)))
  4800. (ampf (make-env '(0 0 1 1 2 .5 2.9 1 3 0) :duration dur :scaler amp))
  4801. (frqf (make-env '(0 2280 .25 2320 .6 2440 .65 3240 .8 3470 1 3260) :duration dur :scaler (hz->radians 1.0)))
  4802. (gen1 (make-oscil))
  4803. (gen2 (make-oscil))
  4804. (f1 (make-env '(0 .5 .6 1 .62 .05 .65 .5 1 .5) :duration dur)))
  4805. (do ((i start (+ i 1)))
  4806. ((= i stop))
  4807. (let ((frq (env frqf)))
  4808. (outa i (* (env ampf)
  4809. (+ (* (env f1) (oscil gen1 frq))
  4810. (* .01 (oscil gen2 (* 2.0 frq))))))))))
  4811. ;; note #3
  4812. (let ((dur 0.02)
  4813. (start (seconds->samples (+ beg 0.446))))
  4814. (let ((stop (+ start (seconds->samples dur)))
  4815. (ampf (make-env '(0 0 1 1 2.5 0) :duration dur :scaler (* .5 amp)))
  4816. (frqf1 (make-env '(0 1120 .5 1540 1 1100) :duration dur :scaler (hz->radians 1.0)))
  4817. (frqf2 (make-env '(0 2400 .5 2520 1 2300) :duration dur :scaler (hz->radians 1.0)))
  4818. (gen1 (make-oscil))
  4819. (gen2 (make-oscil))
  4820. (gen3 (make-oscil))
  4821. (gen4 (make-oscil))
  4822. (f1 (make-env '(0 .9 .2 1 .6 1 .8 0 1 0) :duration dur))
  4823. (f2 (make-env '(0 .5 .2 1 .6 .01 1 0) :duration dur))
  4824. (f3 (make-env '(0 .1 .2 0 1 0) :duration dur))
  4825. (f4 (make-env '(0 0 .2 0 .7 .25 1 .1) :duration dur))
  4826. (rnd (make-rand-interp 3000 (hz->radians 100))))
  4827. (do ((i start (+ i 1)))
  4828. ((= i stop))
  4829. (let ((frq1 (+ (env frqf1)
  4830. (rand-interp rnd))))
  4831. (outa i (* (env ampf)
  4832. (+ (* (env f1) (oscil gen1 (* 2.0 frq1)))
  4833. (* (env f2) (oscil gen2 frq1))
  4834. (* (env f3) (oscil gen3 (* 3.0 frq1)))
  4835. (* (env f4) (oscil gen4 (env frqf2)))))))))))
  4836. ;; (with-sound (:play #t :statistics #t) (eared-grebe 0 .5))
  4837. ;;; --------------------------------------------------------------------------------
  4838. ;;;
  4839. ;;; Brown jay
  4840. (defanimal (brown-jay beg amp)
  4841. (let ((dur 0.26))
  4842. (let ((start (seconds->samples beg))
  4843. (stop (seconds->samples (+ beg dur)))
  4844. (ampf (make-env '(0.000 0.000 0.012 0.106 0.044 0.151 0.072 0.267 0.129 0.766 0.221 0.889 0.372 1.000
  4845. 0.455 0.837 0.534 0.553 0.632 0.660 0.762 0.540 0.912 0.105 1.000 0.000)
  4846. :duration dur :scaler amp))
  4847. (gen1 (make-polywave 0.0 '(1 .1 2 .9 3 .3 4 .07 5 .05 6 .2 7 .01 8 .005 9 .004 10 .003)))
  4848. (gen2 (make-polywave 0.0 '( 2 .5 3 .1 4 .05)))
  4849. (intrpf (make-env '(0 1 .5 1 .8 .6 1 0) :duration dur))
  4850. (intrpf-1 (make-env '(0 1 .5 1 .8 .6 1 0) :duration dur :offset 1.0 :scaler -1.0))
  4851. (frqf (make-env '(0.000 0.201 0.052 0.201 0.091 0.271 0.143 0.285 0.631 0.288 0.659 0.268
  4852. 0.858 0.257 .93 .2 1.000 0.22)
  4853. :duration dur :scaler (hz->radians 4060.0)))
  4854. (rnd (make-rand-interp 500 (hz->radians 15))))
  4855. (do ((i start (+ i 1)))
  4856. ((= i stop))
  4857. (let ((frq (+ (env frqf) (rand-interp rnd))))
  4858. (outa i (* (env ampf)
  4859. (+ (* (env intrpf) (polywave gen1 frq))
  4860. (* (env intrpf-1) (polywave gen2 frq))))))))))
  4861. ;; (with-sound (:play #t) (brown-jay 0 .5))
  4862. ;;; --------------------------------------------------------------------------------
  4863. ;;;
  4864. ;;; Blue grosbeak
  4865. (defanimal (blue-grosbeak beg amp)
  4866. (let ((dur 2.26))
  4867. (let ((start (seconds->samples beg))
  4868. (stop (seconds->samples (+ beg dur)))
  4869. (ampf (make-env '(0.000 0.000 0.010 0.029 0.019 0.110 0.032 0.024 0.055 0.260 0.058 0.003 0.062 0.034
  4870. 0.071 0.282 0.078 0.000 0.119 0.000 0.124 0.057 0.129 0.335 0.134 0.410 0.138 0.035
  4871. 0.143 0.464 0.146 0.430 0.150 0.034 0.156 0.593 0.162 0.513 0.167 0.355 0.172 0.319
  4872. 0.175 0.000 0.213 0.000 0.222 0.279 0.223 0.099 0.226 0.224 0.228 0.055 0.232 0.087
  4873. 0.238 0.503 0.249 0.663 0.253 0.025 0.255 0.060 0.256 0.435 0.261 0.468 0.274 0.000
  4874. 0.315 0.000 0.326 0.426 0.333 0.046 0.342 0.499 0.349 0.658 0.351 0.090 0.355 0.868
  4875. 0.360 0.677 0.367 0.000 0.390 0.000 0.399 0.673 0.400 0.270 0.403 0.949 0.406 0.934
  4876. 0.418 0.002 0.429 0.072 0.442 0.240 0.449 0.528 0.455 0.585 0.458 0.533 0.464 0.000
  4877. 0.484 0.000 0.487 0.323 0.491 0.187 0.495 0.439 0.505 0.683 0.513 0.000 0.526 0.000
  4878. 0.534 0.784 0.541 0.648 0.545 0.781 0.548 0.160 0.553 0.734 0.569 0.077 0.572 0.097
  4879. 0.580 0.532 0.583 0.505 0.589 0.000 0.620 0.000 0.627 0.520 0.631 0.543 0.637 0.071
  4880. 0.641 0.402 0.653 0.846 0.656 0.075 0.662 1.000 0.674 0.000 0.696 0.000 0.702 0.155
  4881. 0.703 0.361 0.705 0.046 0.710 0.491 0.719 0.133 0.723 0.091 0.730 0.074 0.735 0.110
  4882. 0.744 0.406 0.753 0.467 0.758 0.053 0.760 0.007 0.765 0.029 0.771 0.481 0.774 0.539
  4883. 0.781 0.000 0.820 0.000 0.823 0.168 0.825 0.045 0.827 0.005 0.830 0.050 0.831 0.360
  4884. 0.834 0.047 0.837 0.017 0.843 0.441 0.844 0.086 0.848 0.036 0.854 0.437 0.857 0.085
  4885. 0.860 0.231 0.864 0.626 0.869 0.136 0.873 0.324 0.880 0.081 0.883 0.344 0.888 0.076
  4886. 0.890 0.045 0.893 0.235 0.899 0.000 0.932 0.000 0.942 0.091 0.946 0.007 0.951 0.035
  4887. 0.956 0.104 0.963 0.319 0.970 0.424 0.973 0.065 0.976 0.011 0.977 0.058 0.980 0.244
  4888. 0.992 0.059 1.000 0.000)
  4889. :duration dur :scaler amp))
  4890. (gen1 (make-polywave 0.0 '(1 .97 2 .03 3 .01 4 .005)))
  4891. (frqf (make-env '(0.0000 0.5530 0.0090 0.5109 0.0278 0.3367 0.0521 0.5167 0.0589 0.7257 0.0718 0.5675
  4892. 0.0756 0.4949 0.1252 0.4717 0.1282 0.5501 0.1354 0.3120 0.1418 0.4775 0.1495 0.3222
  4893. 0.1568 0.4761 0.1649 0.3962 0.1717 0.4557 0.1743 0.3919 0.2174 0.3266 0.2213 0.3904
  4894. 0.2234 0.5559 0.2268 0.3033 0.2358 0.3861 0.2456 0.4833 0.2499 0.5457 0.2525 0.7083
  4895. 0.2563 0.5225 0.2597 0.4441 0.2704 0.3367 0.2994 0.3367 0.3093 0.5849 0.3165 0.5835
  4896. 0.3217 0.4833 0.3268 0.4180 0.3319 0.2917 0.3353 0.4935 0.3396 0.4441 0.3456 0.4688
  4897. 0.3481 0.5109 0.3520 0.7547 0.3537 0.5602 0.3584 0.5094 0.3635 0.4630 0.3904 0.5167
  4898. 0.3934 0.7010 0.3947 0.5065 0.3964 0.6546 0.3981 0.4659 0.3998 0.7242 0.4020 0.5007
  4899. 0.4032 0.6168 0.4041 0.5399 0.4075 0.4833 0.4122 0.3904 0.4186 0.2467 0.4421 0.3759
  4900. 0.4541 0.4296 0.4724 0.4282 0.4776 0.3077 0.484 0.3091 0.488 0.4146 0.4920 0.3120
  4901. 0.4964 0.4209 0.5015 0.4601 0.5058 0.4238 0.5088 0.3062 0.5203 0.3048 0.5229 0.6067
  4902. 0.5284 0.6081 0.5344 0.5138 0.5412 0.4630 0.5451 0.5181 0.5481 0.6923 0.5515 0.5733
  4903. 0.5540 0.4702 0.5592 0.4078 0.5716 0.3106 0.5805 0.4282 0.6010 0.4282 0.6168 0.3672
  4904. 0.6215 0.3687 0.6232 0.5704 0.6258 0.4398 0.6314 0.4267 0.6369 0.2903 0.6416 0.4369
  4905. 0.6489 0.4644 0.6536 0.5327 0.6561 0.7983 0.6587 0.6038 0.6617 0.5472 0.6702 0.4514
  4906. 0.6822 0.4485 0.6890 0.3425 0.6980 0.3440 0.7031 0.3890 0.7053 0.7286 0.7074 0.5152
  4907. 0.7172 0.3498 0.7258 0.3048 0.7347 0.3396 0.7428 0.4035 0.7531 0.5007 0.7612 0.7257
  4908. 0.7800 0.5007 0.8232 0.5936 0.8249 0.7837 0.8300 0.6734 0.8334 0.5646 0.8351 0.7576
  4909. 0.8394 0.6415 0.8428 0.5094 0.8462 0.7460 0.8484 0.6299 0.8526 0.4586 0.8578 0.6386
  4910. 0.8620 0.4151 0.8672 0.5631 0.8710 0.3701 0.8770 0.4848 0.8804 0.3527 0.8855 0.4761
  4911. 0.8902 0.3295 0.8958 0.4964 0.8975 0.2874 0.9381 0.2903 0.9436 0.5036 0.9470 0.2642
  4912. 0.9680 0.4731 0.9718 0.5559 0.9765 0.7881 0.9795 0.5414 0.9889 0.3657 1.0000 0.3033)
  4913. :base 10 :duration dur :scaler (hz->radians 7190.0))))
  4914. (do ((i start (+ i 1)))
  4915. ((= i stop))
  4916. (outa i (* (env ampf)
  4917. (polywave gen1 (env frqf))))))))
  4918. ;; (with-sound (:play #t) (blue-grosbeak 0 .5))
  4919. ;;; --------------------------------------------------------------------------------
  4920. ;;;
  4921. ;;; Acorn woodpecker
  4922. (defanimal (acorn-woodpecker beg1 amp1)
  4923. (define (acorn-woodpecker-1 beg dur ampf frqf ampf2 ampf4 rndf)
  4924. (let ((start (seconds->samples beg))
  4925. (stop (seconds->samples (+ beg dur)))
  4926. (gen1 (make-polywave 0.0 '(1 .2 2 1 3 .01 4 .005)))
  4927. (gen2 (make-polywave 0.0 '(3 .5 5 1 6 .05 7 .1)))
  4928. (gen3 (make-polywave 0.0 (list 5 (* 2 .005) 6 (* 2 .01) 7 (* 2 .003) 8 (* 2 .005)
  4929. 9 (* 2 .002) 10 (* 2 .005) 11 (* 2 .001) 13 (* 2 .003) 15 (* 2 .001))))
  4930. (gen4 (make-oscil))
  4931. (rnd (make-rand-interp 1000 (hz->radians 200))))
  4932. (do ((i start (+ i 1)))
  4933. ((= i stop))
  4934. (let ((frq (+ (env frqf)
  4935. (* (env rndf)
  4936. (rand-interp rnd))))
  4937. (amp2 (env ampf2)))
  4938. (outa i (* (env ampf)
  4939. (+ (polywave gen1 (* 2.0 frq))
  4940. (* amp2 (polywave gen2 frq))
  4941. (* (- 1.0 amp2) (polywave gen3 (* 2.0 frq)))
  4942. (* (env ampf4) (oscil gen4 (* 6.0 frq))))))))))
  4943. ;; note #1
  4944. (let ((dur1 0.36))
  4945. (acorn-woodpecker-1 beg1 dur1
  4946. (make-env '(0.000 0.000 0.046 0.257 0.248 0.331 0.371 0.745 0.564 1.000 0.738 0.970 0.909 0.442 1.000 0.000)
  4947. :duration dur1 :scaler amp1)
  4948. (make-env '(0.000 0.430 0.054 0.526 0.171 0.534 0.244 0.591 0.284 0.603 0.317 0.630 0.378 0.639 0.414 0.658
  4949. 0.518 0.662 0.581 0.693 0.627 0.697 0.671 0.685 0.726 0.685 0.762 0.710 0.807 0.714 0.829 0.691
  4950. 0.854 0.710 1.000 0.618)
  4951. :duration dur1 :scaler (hz->radians (* 0.25 3030)))
  4952. (make-env '(0 .2 .2 .2 .3 0 1 0) :duration dur1)
  4953. (make-env '(0 1 .2 1 .25 0 .4 1 .5 0 .6 1 .7 0 .9 1 1 1) :duration dur1 :scaler .1)
  4954. (make-env '(0 .03 .85 .03 1 1) :duration dur1)))
  4955. ;; note #2
  4956. (let ((dur1 0.35))
  4957. (acorn-woodpecker-1 (+ beg1 0.55) dur1
  4958. (make-env '(0 0 .2 .1 .9 1 1 0) :duration dur1 :scaler amp1)
  4959. (make-env '(0.000 0.466 0.088 0.497 0.202 0.513 0.319 0.585 0.386 0.596 0.747 0.632
  4960. 0.835 0.671 0.882 0.661 1.000 0.350)
  4961. :duration dur1 :scaler (hz->radians (* 0.25 3080)))
  4962. (make-env '(0 0 .2 .1 .3 .1 .4 0 1 0) :duration dur1)
  4963. (make-env '(0 1 .2 1 .25 0 .4 0 .6 1 .7 0 .9 1 1 1) :duration dur1 :scaler .2)
  4964. (make-env '(0 .3 .05 .03 .8 .03 1 .3) :duration dur1 :base 10)))
  4965. ;; note #3
  4966. (let ((dur1 0.34))
  4967. (acorn-woodpecker-1 (+ beg1 1.17) dur1
  4968. (make-env '(0 0 .2 .1 .8 1 .9 1 1 0) :duration dur1 :scaler amp1)
  4969. (make-env '(0.000 0.310 0.076 0.331 0.118 0.388 0.184 0.422 0.239 0.484 0.336 0.544
  4970. 0.720 0.549 0.831 0.581 0.896 0.570 0.920 0.630 0.938 0.604 1.000 0.448)
  4971. :duration dur1 :scaler (hz->radians (* 0.25 3310)))
  4972. (make-env '(0 0 .2 .1 .3 .1 .4 0 .5 0 .6 .1 .7 .1 .8 0 1 0) :duration dur1)
  4973. (make-env '(0 1 .2 1 .25 0 .4 0 .6 1 .7 0 .8 1 .9 1 1 1) :duration dur1 :scaler .3)
  4974. (make-env '(0 .1 .05 .03 .8 .03 1 .5) :duration dur1 :base 10))))
  4975. ;; (with-sound (:play #t) (acorn-woodpecker 0 .3))
  4976. ;;; --------------------------------------------------------------------------------
  4977. ;;;
  4978. ;;; Lesser nighhawk
  4979. (defanimal (lesser-nighthawk beg dur amp)
  4980. (let ((pulse-dur .021)
  4981. (pulse-sep .047))
  4982. (let ((start (seconds->samples beg))
  4983. (stop (seconds->samples (+ beg dur)))
  4984. (ampf (make-env '(0 0 2 1 10 1 11 0) :duration dur :scaler amp :base 10))
  4985. (gen1 #f)
  4986. (pulsef (make-env '(0.000 0.000 .6 1 1 0) :base .1 :duration pulse-dur))
  4987. (pulse-samps (seconds->samples pulse-sep))
  4988. (pulse-out (seconds->samples pulse-dur))
  4989. (frqf (make-env (list 0 600 .5 620 (max .55 (- dur .5)) 620 (max .6 dur) 570) :duration dur :scaler (hz->radians 1.0))))
  4990. (do ((i start (+ i pulse-samps)))
  4991. ((>= i stop))
  4992. (set! (mus-location ampf) (- i start))
  4993. (let ((reset-stop (min stop (+ i pulse-out)))
  4994. (pulse-amp (env ampf))
  4995. (pulse-frq (env frqf)))
  4996. (set! (mus-location frqf) (- i start))
  4997. (set! gen1 (make-polywave 0.0 (list 1 (* pulse-amp .94) 3 (* pulse-amp .04) 4 (* pulse-amp .01))))
  4998. (do ((k i (+ k 1)))
  4999. ((= k reset-stop))
  5000. (outa k (* (env pulsef)
  5001. (polywave gen1 pulse-frq))))
  5002. (mus-reset pulsef))))))
  5003. ;; (with-sound (:play #t) (lesser-nighthawk 0 1 .5))
  5004. ;;; --------------------------------------------------------------------------------
  5005. ;;;
  5006. ;;; Olive-sided flycatcher
  5007. (defanimal (olive-sided-flycatcher beg amp)
  5008. (let ((dur 1.08))
  5009. (let ((start (seconds->samples beg))
  5010. (stop (seconds->samples (+ beg dur)))
  5011. (ampf (make-env '(0.000 0.000 0.021 0.129 0.035 0.369 0.053 0.250 0.064 0.000 0.352 0.000 0.381 0.674
  5012. 0.394 0.483 0.407 0.834 0.418 0.852 0.425 0.795 0.440 0.898 0.457 0.931 0.489 0.922
  5013. 0.506 0.878 0.534 0.991 0.548 0.988 0.577 0.717 0.593 0.834 0.615 0.000 0.690 0.000
  5014. 0.704 0.698 0.710 0.436 0.712 0.610 0.726 0.395 0.736 0.483 0.756 0.545 0.773 0.795
  5015. 0.786 0.583 0.808 0.919 0.816 0.843 0.826 0.898 0.837 0.797 0.844 0.659 0.860 0.640
  5016. 0.879 0.334 0.975 0.176 0.989 0.034 1.000 0.000)
  5017. :duration dur :scaler amp))
  5018. (frqf (make-env '(0.000 0.175 0.020 0.235 0.035 0.269 0.041 0.311 0.070 0.224 0.356 0.209 0.377 0.309
  5019. 0.402 0.352 0.449 0.360 0.549 0.348 0.574 0.339 0.588 0.354 0.596 0.330 0.603 0.354
  5020. 0.612 0.235 0.691 0.213 0.702 0.313 0.725 0.380 0.743 0.397 0.765 0.354 0.794 0.328
  5021. 0.844 0.299 0.876 0.277 0.975 0.254 1.000 0.198)
  5022. :duration dur :scaler (hz->radians 10100.0)))
  5023. (gen1 (make-polywave 0.0 '(1 .95 2 .03 3 .01 4 .005))))
  5024. (do ((i start (+ i 1)))
  5025. ((= i stop))
  5026. (outa i (* (env ampf)
  5027. (polywave gen1 (env frqf))))))))
  5028. ;; (with-sound (:play #t) (olive-sided-flycatcher 0 .5))
  5029. ;;; --------------------------------------------------------------------------------
  5030. ;;;
  5031. ;;; Red-shouldered hawk
  5032. ;;;
  5033. ;;; ending is not right
  5034. (defanimal (red-shouldered-hawk beg amp)
  5035. (let ((dur 0.475))
  5036. (let ((start (seconds->samples beg))
  5037. (stop (seconds->samples (+ beg dur)))
  5038. (ampf (make-env '(0.000 0.000 0.071 0.704 0.128 0.964 0.168 0.593 0.383 0.356 0.399 0.798 0.446 0.901
  5039. 0.492 0.628 0.595 0.771 0.677 0.700 0.693 0.439 0.715 0.593 0.750 0.715 0.872 0.648
  5040. 0.894 0.360 0.938 0.360 0.984 0.213 1.000 0.000)
  5041. :duration dur :scaler (* 0.2 amp)))
  5042. (frqf (make-env '(0.000 0.083 0.027 0.094 0.035 0.129 0.103 0.143 0.116 0.180 0.370 0.167 0.381 0.13
  5043. 0.66 .114 .72 .116 .8 .112
  5044. 0.871 0.105 0.888 0.080 0.976 0.078 1.000 0.08)
  5045. :base .1 :duration dur :scaler (hz->radians (* 0.5 9130.0))))
  5046. (histuff (make-polywave 0.0 '(1 .1 2 .75 3 .1 4 .1 5 .01 6 .01 7 .01 8 .02 9 .01 11 .005 )))
  5047. (lostuff (make-polywave 0.0 '(2 .1 3 .3 5 .03 7 .1 9 .01 13 .1 15 .1 17 .05 19 .03)))
  5048. (midstuff (make-polywave 0.0 '(1 .3 3 .7)))
  5049. (midf (make-env '(0 1 .3 1 .4 .1 1 0) :duration dur :scaler 1.0))
  5050. (oddf (make-env '(0 1 .1 1 .12 .01 .45 .01 .55 .75 1 0) :duration dur :scaler 0.7 :base 10))
  5051. (frm1 (make-formant 2300 .98))
  5052. (frm2 (make-formant 3200 .99))
  5053. (frm3 (make-formant 5300 .97))
  5054. (frm4 (make-formant 1600 .99))
  5055. (fr1 (* 20 (sin (hz->radians 2300))))
  5056. (fr2 (* 6 (sin (hz->radians 3200))))
  5057. (fr3 (* 10 (sin (hz->radians 5300))))
  5058. (fr4 (* 10 (sin (hz->radians 1600))))
  5059. (rnd (make-rand-interp 400 (hz->radians 10))))
  5060. (let ((fb (vector frm1 frm2 frm3 frm4))
  5061. (fs (float-vector fr1 fr2 fr3 fr4)))
  5062. (set! fb (make-formant-bank fb fs))
  5063. (do ((i start (+ i 1)))
  5064. ((= i stop))
  5065. (let* ((frq (+ (env frqf)
  5066. (rand-interp rnd)))
  5067. (val (* (env ampf)
  5068. (+ (polywave histuff (* 2.0 frq))
  5069. (* (env oddf) (polywave lostuff frq))
  5070. (* (env midf) (polywave midstuff (* 2.0 frq)))))))
  5071. (outa i (+ val (formant-bank fb val)))))))))
  5072. ;; (with-sound (:play #t) (red-shouldered-hawk 0 .5))
  5073. ;;; --------------------------------------------------------------------------------
  5074. ;;;
  5075. ;;; Common yellowthroat
  5076. (define (common-yellowthroat beg1 amp1)
  5077. (defanimal (common-yellowthroat-1 beg amp)
  5078. (let ((dur .42))
  5079. (let ((start (seconds->samples beg))
  5080. (stop (seconds->samples (+ beg dur)))
  5081. (ampf (make-env '(0.000 0.000 0.067 0.312 0.105 0.773 0.132 0.685 0.160 0.168 0.178 0.075 0.192 0.178
  5082. 0.211 0.636 0.227 0.782 0.236 0.623 0.258 0.807 0.283 0.639 0.299 0.000 0.434 0.000
  5083. 0.482 0.751 0.503 0.804 0.518 0.651 0.540 0.000 0.638 0.000 0.661 0.576 0.715 0.664
  5084. 0.736 0.984 0.763 0.685 0.784 0.620 0.817 0.894 0.830 0.745 0.912 0.134 1.000 0.000)
  5085. :duration dur :scaler amp))
  5086. (frqf (make-env '(0.000 0.296 0.029 0.290 0.052 0.305 0.072 0.334 0.088 0.367 0.108 0.381 0.132 0.348
  5087. 0.159 0.305 0.183 0.352 0.210 0.410 0.241 0.436 0.267 0.441 0.292 0.434 0.398 0.417
  5088. 0.410 0.682 0.428 0.686 0.457 0.581 0.475 0.534 0.491 0.503 0.521 0.485 0.531 0.468
  5089. 0.645 0.488 0.672 0.506 0.690 0.530 0.704 0.543 0.718 0.521 0.733 0.486 0.763 0.457
  5090. 0.791 0.423 0.838 0.356 0.918 0.261 0.951 0.252 1.000 0.194)
  5091. :duration dur :scaler (hz->radians 10150.0)))
  5092. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  5093. (do ((i start (+ i 1)))
  5094. ((= i stop))
  5095. (outa i (* (env ampf)
  5096. (polywave gen1 (env frqf))))))))
  5097. (common-yellowthroat-1 beg1 (* 0.4 amp1))
  5098. (common-yellowthroat-1 (+ beg1 0.44) amp1)
  5099. (common-yellowthroat-1 (+ beg1 0.90) amp1)
  5100. (common-yellowthroat-1 (+ beg1 1.36) (* 0.8 amp1)))
  5101. ;; (with-sound (:play #t) (common-yellowthroat 0 .5))
  5102. ;;; --------------------------------------------------------------------------------
  5103. ;;;
  5104. ;;; Cassin's sparrow
  5105. (define (cassins-sparrow beg amp)
  5106. ;; buzz1
  5107. (let ((dur 0.2)
  5108. (pulse-dur .0064)
  5109. (start (seconds->samples beg)))
  5110. (let ((stop (seconds->samples (+ beg dur)))
  5111. (gen1 (make-polywave 0.0 '(1 .95 2 .05)))
  5112. (ampf (make-env '(0.000 0.000 0.139 0.174 0.302 0.577 0.492 0.601 0.720 0.415 0.853 0.628 0.962 0.945 1.000 0.000)
  5113. :duration dur :scaler (* .3 amp)))
  5114. (pulse-samps (seconds->samples pulse-dur))
  5115. (pulse-frqf (make-env '(0 0 1 200 3 0) :duration pulse-dur :scaler (hz->radians 1.0)))
  5116. (frqf (make-env '(0 5850 .2 6200 .3 6000 1 6100) :duration dur :scaler (hz->radians 1.0)))
  5117. (pulse-ampf (make-env '(0.000 0.2 0.435 0.356 0.701 0.925 0.785 0.984 0.880 0.779 0.973 0.395 1.000 0.2) :duration pulse-dur)))
  5118. (do ((i start (+ i pulse-samps)))
  5119. ((>= i stop))
  5120. (let ((reset-stop (min stop (+ i pulse-samps))))
  5121. (do ((k i (+ k 1)))
  5122. ((= k reset-stop))
  5123. (outa k (* (env ampf)
  5124. (env pulse-ampf)
  5125. (polywave gen1 (+ (env pulse-frqf)
  5126. (env frqf))))))
  5127. (mus-reset pulse-ampf)
  5128. (mus-reset pulse-frqf)))))
  5129. ;; buzz2
  5130. (let ((dur 0.22)
  5131. (pulse-dur .022)
  5132. (start (seconds->samples (+ beg .2))))
  5133. (let ((stop (+ start (seconds->samples dur)))
  5134. (gen1 (make-polywave 0.0 '(1 .95 2 .05)))
  5135. (pulse-samps (seconds->samples pulse-dur))
  5136. (pulse-frqf (make-env '(0 5400 1 6700) :duration pulse-dur :scaler (hz->radians 1.0)))
  5137. (pulse-ampf (make-env '(0 0 .1 0 .7 1 1 0) :duration pulse-dur :base .1 :scaler (* .6 amp)))
  5138. (rnd (make-rand-interp 600 (hz->radians 100))))
  5139. (do ((i start (+ i pulse-samps)))
  5140. ((>= i stop))
  5141. (let ((reset-stop (min stop (+ i pulse-samps))))
  5142. (do ((k i (+ k 1)))
  5143. ((= k reset-stop))
  5144. (outa k (* (env pulse-ampf)
  5145. (polywave gen1 (+ (env pulse-frqf)
  5146. (rand-interp rnd))))))
  5147. (mus-reset pulse-ampf)
  5148. (mus-reset pulse-frqf)))))
  5149. ;; buzz3
  5150. (let ((dur 0.51)
  5151. (pulse-dur .051)
  5152. (start (seconds->samples (+ beg .425))))
  5153. (let ((stop (+ start (seconds->samples dur)))
  5154. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .005)))
  5155. (pulse-samps (seconds->samples 0.064))
  5156. (pulse-frqf (make-env '(0 5300 .1 5200 .2 5300 .3 6000 1 6000) :duration pulse-dur :scaler (hz->radians 1.0)))
  5157. (pulse-ampf (make-env '(0 0 .1 .5 .2 0 .3 1 .4 .9 .8 1 1 0) :duration pulse-dur :scaler amp))
  5158. (frqf (make-env '(0 100 .6 0 1 50) :duration dur :scaler (hz->radians 1.0)))
  5159. (ampf (make-env '(0 .6 1 1) :duration dur))
  5160. (rnd (make-rand-interp 600 (hz->radians 10))))
  5161. (do ((i start (+ i pulse-samps)))
  5162. ((>= i stop))
  5163. (let ((reset-stop (min stop (+ i pulse-samps))))
  5164. (do ((k i (+ k 1)))
  5165. ((= k reset-stop))
  5166. (outa k (* (env ampf)
  5167. (env pulse-ampf)
  5168. (polywave gen1 (+ (env pulse-frqf)
  5169. (env frqf)
  5170. (rand-interp rnd))))))
  5171. (mus-reset pulse-ampf)
  5172. (mus-reset pulse-frqf)))))
  5173. ;; 4 long pitches
  5174. (let ((dur 0.74)
  5175. (start (seconds->samples (+ beg .95))))
  5176. (let ((stop (+ start (seconds->samples dur)))
  5177. (gen1 (make-polywave 0.0 '(1 .99 2 .01)))
  5178. (frqf (make-env '(0.000 0.446 0.014 0.403 0.054 0.385 0.121 0.376 0.248 0.374 0.274 0.367 0.290 0.198
  5179. 0.308 0.166 0.339 0.159 0.418 0.162 0.545 0.162 0.674 0.162 0.714 0.164 0.718 0.458
  5180. 0.735 0.451 0.743 0.415 0.761 0.403 0.847 0.387 1.000 0.387)
  5181. :duration dur :scaler (hz->radians 22050.0)))
  5182. (ampf (make-env '(0.000 0.000 0.025 0.833 0.062 0.951 0.087 0.882 0.120 1.000 0.172 0.961 0.226 0.849
  5183. 0.238 0.666 0.253 0.000 0.299 0.000 0.319 0.689 0.329 0.679 0.346 0.000 0.409 0.000
  5184. 0.450 0.593 0.478 0.689 0.537 0.767 0.649 0.626 0.666 0.469 0.679 0.000 0.737 0.000
  5185. 0.771 0.816 0.784 0.698 0.795 0.911 0.828 0.895 0.853 0.774 0.882 0.734 0.942 0.603
  5186. 0.979 0.475 0.992 0.325 1.000 0.000)
  5187. :duration dur :scaler (* .9 amp))))
  5188. (do ((i start (+ i 1)))
  5189. ((= i stop))
  5190. (outa i (* (env ampf)
  5191. (polywave gen1 (env frqf)))))))
  5192. ;; last buzz
  5193. (let ((dur 0.32)
  5194. (start (seconds->samples (+ beg 1.73))))
  5195. (let ((stop (+ start (seconds->samples dur)))
  5196. (gen1 (make-oscil 3100.0))
  5197. (ampf (make-env '(0 0 1 1 2 1 3 0) :base .3 :duration dur :scaler (* .4 amp)))
  5198. (buzz (make-oscil 120))
  5199. (rnd (make-rand-interp 400 (hz->radians 100))))
  5200. (do ((i start (+ i 1)))
  5201. ((= i stop))
  5202. (outa i (* (env ampf)
  5203. (+ .25 (* .75 (abs (oscil buzz))))
  5204. (oscil gen1 (rand-interp rnd))))))))
  5205. ;; (with-sound (:play #t) (cassins-sparrow 0 .5))
  5206. ;;; --------------------------------------------------------------------------------
  5207. ;;;
  5208. ;;; Steller's jay
  5209. (define (stellers-jay beg1 amp1)
  5210. (defanimal (stellers-jay-1 beg amp)
  5211. (let ((dur .09))
  5212. (let ((start (seconds->samples beg))
  5213. (stop (seconds->samples (+ beg dur)))
  5214. (ampf (make-env '(0.000 0.000 0.171 0.175 0.268 0.475 0.314 0.294 0.433 1.000 0.502 0.306 0.671 0.586
  5215. 0.794 0.236 0.847 0.615 1.000 0.000)
  5216. :duration dur :scaler amp))
  5217. (frqf1 (make-env '(0.000 0.393 0.343 0.411 0.423 0.366 0.478 0.405 0.542 0.508 0.582 0.526 0.683 0.414
  5218. 0.849 0.417 0.957 0.218 1.000 0.196)
  5219. :duration dur :scaler (hz->radians 6050.0)))
  5220. (frqf2 (make-env '(0.000 0.405 0.213 0.405 0.277 0.311 0.391 0.290 0.497 0.275 0.558 0.242 0.635 0.242
  5221. 0.729 0.190 0.868 0.205 1.000 0.160)
  5222. :duration dur :scaler (hz->radians 6050.0)))
  5223. (gen1 (make-polywave 0.0 '(1 .95 2 .1 3 .1)))
  5224. (gen2 (make-polywave 0.0 '(1 .95 2 .03 3 .01)))
  5225. (ampf2 (make-env '(0 0 1 1 2 0) :duration dur :scaler .3))
  5226. (rnd (make-rand-interp 8000 ))
  5227. (frm1 (make-formant 2460 .99))
  5228. (frm2 (make-formant 5200 .98))
  5229. (frm3 (make-formant 8200 .97))
  5230. (fr1 (* 10 (sin (hz->radians 2460))))
  5231. (fr2 (* 10 (sin (hz->radians 5200))))
  5232. (fr3 (* 4 (sin (hz->radians 8200))))
  5233. (frmaf (make-env '(0 0 .6 .3 .9 .8 1 .5) :duration dur))
  5234. (frmaf-1 (make-env '(0 0 .6 .3 .9 .8 1 .5) :duration dur :offset 1.0 :scaler -1.0))
  5235. (frmf (make-env '(0 5200 .7 4900 .9 2200 1 2000) :scaler (hz->radians 1.0) :duration dur))
  5236. (frmf3 (make-env '(0 8200 .7 8400 .9 4000 1 4000) :scaler (hz->radians 1.0) :duration dur))
  5237. (frmf1 (make-env '(0 2460 .7 2400 .9 1400 1 1500) :scaler (hz->radians 1.0) :duration dur)))
  5238. (do ((i start (+ i 1)))
  5239. ((= i stop))
  5240. (let* ((val1 (* (env ampf)
  5241. (+ (polywave gen1 (env frqf1))
  5242. (* (env ampf2)
  5243. (polywave gen2 (env frqf2))))))
  5244. (frm-in (* val1 (rand-interp rnd))))
  5245. (outa i (+ (* 0.75 val1)
  5246. (* fr1 (env frmaf-1) (formant frm1 frm-in (env frmf1)))
  5247. (* fr2 (env frmaf) (formant frm2 frm-in (env frmf)))
  5248. (* fr3 (formant frm3 frm-in (env frmf3))))))))))
  5249. (do ((beg beg1 (+ beg .15))
  5250. (i 0 (+ i 1)))
  5251. ((= i 6))
  5252. (stellers-jay-1 beg amp1)))
  5253. ;; (with-sound (:statistics #t) (stellers-jay 0 .5))
  5254. ;;; --------------------------------------------------------------------------------
  5255. ;;;
  5256. ;;; Black rail
  5257. (defanimal (black-rail beg amp)
  5258. ;; notes 1 and 2
  5259. (let ((dur 0.2))
  5260. (let ((start (seconds->samples beg))
  5261. (stop (seconds->samples (+ beg dur)))
  5262. (ampf (make-env '(0.000 0.000 0.015 0.069 0.029 0.738 0.083 0.868 0.133 0.868 0.230 0.725 0.267 0.501
  5263. 0.324 0.000 0.694 0.000 0.716 1.000 0.778 0.975 0.850 0.906 0.898 0.814 0.939 0.585
  5264. 0.981 0.081 1.000 0.000)
  5265. :duration dur :scaler (* 0.9 amp)))
  5266. (frqf (make-env '(0.000 0.484 0.028 0.458 0.210 0.456 0.296 0.444 0.324 0.404 0.700 0.461 0.728 0.453
  5267. 0.916 0.453 1.000 0.390)
  5268. :duration dur :scaler (hz->radians (* 0.5 8150.0))))
  5269. (gen1 (make-polywave 0.0 '(1 .09 2 1 3 .07 4 .003 5 .01 6 .03 7 .005 9 .003)))
  5270. (buzz (make-oscil 240))
  5271. (buzz1 (make-oscil 240))
  5272. (scl (hz->radians 20)))
  5273. (do ((i start (+ i 1)))
  5274. ((= i stop))
  5275. (outa i (* (env ampf)
  5276. (+ .8 (* .2 (oscil buzz)))
  5277. (polywave gen1 (+ (env frqf)
  5278. (* scl (oscil buzz1)))))))))
  5279. ;; note 3
  5280. (let ((dur 0.21)
  5281. (start (seconds->samples (+ beg .254))))
  5282. (let ((stop (+ start (seconds->samples dur)))
  5283. (ampf (make-env '(0.000 0.000 0.031 0.980 0.106 0.725 0.141 0.811 0.182 0.567 0.225 0.779 0.272 0.473
  5284. 0.318 0.648 0.375 0.292 0.410 0.585 0.467 0.212 0.507 0.335 0.550 0.192 0.585 0.301
  5285. 0.643 0.155 0.678 0.261 0.721 0.152 0.756 0.201 0.811 0.172 0.845 0.052 0.879 0.140
  5286. 0.924 0.066 1.000 0.000)
  5287. :duration dur :scaler (* 0.4 amp)))
  5288. (frqf (make-env '(0.000 0.000 0.003 0.366 0.027 0.469 0.047 0.516 0.086 0.478 0.107 0.516 0.130 0.537
  5289. 0.155 0.507 0.178 0.472 0.201 0.510 0.227 0.528 0.249 0.501 0.273 0.463 0.291 0.496
  5290. 0.317 0.516 0.342 0.484 0.364 0.437 0.386 0.484 0.413 0.504 0.439 0.460 0.461 0.422
  5291. 0.482 0.466 0.507 0.493 0.528 0.451 0.547 0.398 0.569 0.434 0.599 0.469 0.619 0.431
  5292. 0.642 0.383 0.661 0.425 0.678 0.454 0.707 0.410 0.731 0.372 0.774 0.422 0.815 0.336
  5293. 0.867 0.372 0.905 0.319 1.000 0.304)
  5294. :duration dur :scaler (hz->radians (* 0.25 8040.0))))
  5295. (gen1 (make-polywave 0.0 '(1 .1 2 1 3 .4 4 .1 5 .03 6 .005 7 .005 10 .005))))
  5296. (do ((i start (+ i 1)))
  5297. ((= i stop))
  5298. (outa i (* (env ampf)
  5299. (polywave gen1 (env frqf))))))))
  5300. ;; (with-sound (:play #t) (black-rail 0 .5))
  5301. ;;; --------------------------------------------------------------------------------
  5302. ;;;
  5303. ;;; Pinyon jay
  5304. (defanimal (pinyon-jay beg amp)
  5305. (let ((dur 0.3))
  5306. (let ((start (seconds->samples beg))
  5307. (stop (seconds->samples (+ beg dur)))
  5308. (ampf (make-env '(0.000 0.000 0.008 0.035 0.013 0.118 0.024 0.032 0.087 0.596 0.111 0.617 0.159 0.460
  5309. 0.188 0.546 0.240 0.876 0.293 1.000 0.345 0.991 0.377 0.938 0.436 0.959 0.501 0.764
  5310. 0.537 0.534 0.628 0.442 0.718 0.466 0.812 0.386 0.858 0.316 0.903 0.342 0.949 0.094 1.000 0.000)
  5311. :duration dur :scaler amp))
  5312. (frqf (make-env '(0.000 0.100 0.075 0.163 0.130 0.185 0.192 0.207 0.327 0.245 0.385 0.256 0.558 0.200
  5313. 0.724 0.207 0.806 0.209 0.875 0.180 0.944 0.138 1.000 0.134)
  5314. :base .1 :duration dur :scaler (hz->radians (* 0.5 8160))))
  5315. (gen1 (make-polywave 0.0 '(1 .03 2 .8 3 .05 4 .01 5 .03 6 .075 7 .03 8 .008 9 .005 10 .005 11 .003)))
  5316. (gen2 (make-oscil 0.0 (* 0.5 pi)))
  5317. (ampf2 (make-env '(0 .2 .1 .2 .2 0 .4 .05 .8 .02 .9 .2 1 0) :duration dur :scaler 3))
  5318. (rnd (make-rand-interp 1000 (hz->radians 10))))
  5319. (do ((i start (+ i 1)))
  5320. ((= i stop))
  5321. (let ((frq (+ (env frqf)
  5322. (rand-interp rnd))))
  5323. (outa i (* (env ampf)
  5324. (+ (polywave gen1 frq)
  5325. (* (env ampf2)
  5326. (oscil gen2 (* 3.0 frq)))))))))))
  5327. ;; (with-sound (:play #t) (pinyon-jay 0 .5))
  5328. ;;; --------------------------------------------------------------------------------
  5329. ;;;
  5330. ;;; Sora
  5331. (defanimal (sora beg amp)
  5332. (let ((dur 0.41))
  5333. (let ((start (seconds->samples beg))
  5334. (stop (seconds->samples (+ beg dur)))
  5335. (ampf (make-env '(0.000 0.000 0.011 0.109 0.066 0.180 0.360 0.192 0.442 0.229 0.473 0.203 0.575 0.276
  5336. 0.621 0.345 0.702 0.361 0.751 0.661 0.792 0.713 0.839 0.606 0.885 0.873 0.904 0.788
  5337. 0.937 0.980 0.953 0.998 0.962 0.911 1.000 0.000)
  5338. :duration dur :scaler amp))
  5339. (frqf (make-env '(0.000 0.358 0.103 0.332 0.209 0.327 0.328 0.341 0.572 0.363 0.771 0.429 0.893 0.458
  5340. 0.965 0.462 1.000 0.448)
  5341. :duration dur :scaler (hz->radians (* 0.5 6020))))
  5342. (gen1 (make-polywave 0.0 '(1 .05 2 .9 3 .05 4 .005))))
  5343. (do ((i start (+ i 1)))
  5344. ((= i stop))
  5345. (outa i (* (env ampf)
  5346. (polywave gen1 (env frqf))))))))
  5347. ;; (with-sound (:play #t) (sora 0 .5))
  5348. ;;; --------------------------------------------------------------------------------
  5349. ;;;
  5350. ;;; Killdeer
  5351. (defanimal (killdeer beg amp)
  5352. (let ((dur 0.88))
  5353. (let ((start (seconds->samples beg))
  5354. (stop (seconds->samples (+ beg dur)))
  5355. (ampf (make-env '(0.000 0.000 0.015 0.477 0.028 0.499 0.054 0.172 0.078 0.107 0.184 0.199 0.212 0.177
  5356. 0.245 0.249 0.275 0.291 0.364 0.688 0.388 0.714 0.416 0.944 0.436 0.906 0.451 0.998
  5357. 0.478 0.000 0.535 0.000 0.551 0.976 0.564 1.000 0.582 0.981 0.610 0.838 0.634 0.908
  5358. 0.661 0.782 0.682 0.000 0.732 0.000 0.735 0.562 0.746 0.709 0.798 0.554 0.814 0.579
  5359. 0.825 0.472 0.837 0.000 0.910 0.000 0.915 0.392 0.920 0.554 0.947 0.458 0.962 0.341
  5360. 0.978 0.370 1.000 0.000)
  5361. :duration dur :scaler amp))
  5362. (frqf (make-env '(0.000 0.373 0.013 0.471 0.029 0.487 0.052 0.449 0.074 0.422 0.244 0.442 0.319 0.453
  5363. 0.353 0.456 0.412 0.458 0.454 0.464 0.471 0.442 0.477 0.389 0.537 0.378 0.539 0.436
  5364. 0.551 0.464 0.586 0.460 0.649 0.462 0.673 0.444 0.684 0.404 0.736 0.373 0.742 0.422
  5365. 0.758 0.440 0.820 0.440 0.835 0.416 0.839 0.382 0.911 0.353 0.912 0.393 0.924 0.420
  5366. 0.941 0.409 0.959 0.404 0.982 0.413 1.000 0.396)
  5367. :duration dur :scaler (hz->radians (* 0.25 10170.0))))
  5368. (gen1 (make-polywave 0.0 '(1 .04 2 1 3 .07 4 .04 5 .005)))
  5369. (gen2 (make-polywave 0.0 '(1 .01 2 .05 3 .03 4 1 5 .12 6 .1 7 .01 8 .05 9 .005)))
  5370. (ampf2 (make-env '(0 0 .53 0 .64 .7 .67 0 .73 .1 .9 0 .91 .07 .94 0 1 0) :duration dur)))
  5371. (do ((i start (+ i 1)))
  5372. ((= i stop))
  5373. (let ((frq (env frqf)))
  5374. (outa i (* (env ampf)
  5375. (+ (polywave gen1 (* 2.0 frq))
  5376. (* (env ampf2)
  5377. (polywave gen2 frq))))))))))
  5378. ;; (with-sound (:play #t) (killdeer 0 .5))
  5379. ;;; --------------------------------------------------------------------------------
  5380. ;;;
  5381. ;;; Oak titmouse
  5382. (define (oak-titmouse beg1 amp1)
  5383. (defanimal (oak-titmouse-1 beg amp)
  5384. (let ((dur 0.117))
  5385. (let ((start (seconds->samples beg))
  5386. (stop (seconds->samples (+ beg dur)))
  5387. (ampf (make-env '(0.000 0.000 0.019 0.149 0.034 0.099 0.058 0.121 0.067 0.041 0.099 0.032 0.117 0.061
  5388. 0.147 0.510 0.170 0.537 0.182 0.138 0.195 0.066 0.228 0.058 0.247 0.086 0.258 0.151
  5389. 0.269 0.701 0.290 0.382 0.305 0.537 0.319 0.128 0.341 0.041 0.363 0.077 0.383 0.173
  5390. 0.400 0.989 0.412 0.613 0.433 0.545 0.443 0.475 0.452 0.631 0.461 0.139 0.477 0.061
  5391. 0.501 0.086 0.516 0.149 0.530 0.979 0.548 0.601 0.558 0.504 0.576 0.524 0.589 0.183
  5392. 0.606 0.080 0.633 0.094 0.648 0.180 0.671 0.979 0.686 0.549 0.705 0.815 0.718 0.214
  5393. 0.731 0.131 0.757 0.100 0.773 0.146 0.788 0.315 0.805 0.876 0.822 0.606 0.834 0.503
  5394. 0.849 0.544 0.865 0.120 0.888 0.079 0.910 0.121 0.924 0.182 0.940 0.542 0.959 0.430
  5395. 0.972 0.183 1.000 0.000)
  5396. :duration dur :scaler amp))
  5397. (frqf (make-env '(0 7200 1 5200) :duration dur :scaler (hz->radians 1.0)))
  5398. (gen1 (make-polywave 0.0 '(1 .97 2 .03)))
  5399. (gen2 (make-oscil 63.5 (+ pi 1)))
  5400. (vib-amp (hz->radians 1200)))
  5401. (do ((i start (+ i 1)))
  5402. ((= i stop))
  5403. (outa i (* (env ampf)
  5404. (polywave gen1 (+ (env frqf)
  5405. (* vib-amp (oscil gen2))))))))))
  5406. (defanimal (oak-titmouse-2 beg amp)
  5407. (let ((dur 0.14))
  5408. (let ((start (seconds->samples beg))
  5409. (stop (seconds->samples (+ beg dur)))
  5410. (ampf (make-env '(0.000 0.000 0.027 0.067 0.088 0.113 0.129 0.322 0.175 0.718 0.244 0.987 0.283 0.941
  5411. 0.315 0.710 0.344 0.322 0.374 0.450 0.388 0.351 0.450 0.220 0.565 0.118 0.673 0.062
  5412. 0.725 0.070 0.789 0.126 0.836 0.209 0.870 0.177 0.892 0.233 0.908 0.475 .92 .1 1 0)
  5413. :duration dur :scaler amp))
  5414. (frqf (make-env '(0.000 0.125 .04 .125 0.070 0.214 0.1 0.296 0.146 0.333 0.2 0.329 0.263 0.300 0.322 0.264
  5415. 0.407 0.218 0.514 0.196 0.660 0.183 0.746 0.190 0.822 0.212 0.873 0.252 0.902 0.254 0.926 0.212 1.000 0.207)
  5416. :duration dur :scaler (hz->radians 10230.0)))
  5417. (gen1 (make-polywave 0.0 '(1 .9 2 .05 3 .01 4 .01 5 .005)))
  5418. (gen2 (make-polywave 0.0 '(2 1 3 .5 4 .1)))
  5419. (ampf2 (make-env '(0 1 .1 0 .8 0 1 1) :duration dur :scaler .5)))
  5420. (do ((i start (+ i 1)))
  5421. ((= i stop))
  5422. (let ((frq (env frqf)))
  5423. (outa i (* (env ampf)
  5424. (+ (polywave gen1 frq)
  5425. (* (env ampf2)
  5426. (polywave gen2 frq))))))))))
  5427. (do ((amps (vector .5 1.0 1.0 .9))
  5428. (i 0 (+ i 1))
  5429. (bg beg1 (+ bg .35)))
  5430. ((= i 4))
  5431. (oak-titmouse-1 bg (* amp1 (amps i)))
  5432. (oak-titmouse-2 (+ bg .156) (* amp1 (amps i)))))
  5433. ;; (with-sound (:play #t) (oak-titmouse 0 .5))
  5434. ;;; --------------------------------------------------------------------------------
  5435. ;;;
  5436. ;;; Macgillivray's warbler
  5437. (define (macgillivrays-warbler beg1 amp1)
  5438. ;; much more complex than it sounds -- like the Hermit Thrush, this has 2 independent sources
  5439. (defanimal (macgillivrays-warbler-1 beg amp)
  5440. ;; 5 of these to start
  5441. (let ((dur 0.137))
  5442. (let ((start (seconds->samples beg))
  5443. (stop (seconds->samples (+ beg dur)))
  5444. (ampf (make-env '(0.000 0.000 0.066 0.200 0.208 0.310 0.228 0.400 0.259 0.403 0.331 0.175 0.370 0.377
  5445. 0.414 0.166 0.462 0.639 0.475 0.149 0.495 0.648 0.612 0.992 0.647 0.924 0.700 0.473
  5446. 0.710 0.138 0.720 0.654 0.770 0.352 0.815 0.848 0.829 0.724 0.840 0.837 0.864 0.625
  5447. 0.891 0.715 0.937 0.687 0.989 0.456 1.000 0.000)
  5448. :duration dur :scaler (* .75 amp)))
  5449. (frqf1 (make-env '(0.000 0.515 0.096 0.506 0.193 0.475 0.287 0.421 0.358 0.362 0.470 0.346 0.495 0.588
  5450. 0.532 0.593 0.567 0.607 0.625 0.635 0.680 0.711 0.711 0.739 0.735 0.800 0.762 0.800
  5451. 0.785 0.645 0.808 0.565 0.851 0.551 1.000 0.544)
  5452. :duration dur :scaler (hz->radians 8830.0)))
  5453. (ampf1 (make-env '(0 1 .35 1 .356 0 .49 0 .494 1 .73 1 .735 .25 .8 .25 .81 1 1 1) :duration dur))
  5454. (gen1 (make-polywave 0.0 '(1 .97 2 .02 3 .005)))
  5455. (frqf2 (make-env '(0.000 0.515 0.326 0.522 0.370 0.454 0.413 0.416 0.419 0.492 0.427 0.586 0.451 0.534
  5456. 0.472 0.461 0.493 0.593 0.540 0.598 0.587 0.614 0.647 0.656 0.698 0.725 0.728 0.562
  5457. 0.758 0.492 0.788 0.468 0.803 0.501 0.814 0.555 1.000 0.544)
  5458. :duration dur :scaler (hz->radians 8830.0)))
  5459. (ampf2 (make-env '(0 0 .324 0 .327 .5 .73 .5 .735 1 .8 1 .81 0 1 0) :duration dur))
  5460. (gen2 (make-polywave 0.0 '(1 .97 2 .02 3 .005)))
  5461. (rnd (make-rand-interp 6000 .1)))
  5462. (do ((i start (+ i 1)))
  5463. ((= i stop))
  5464. (outa i (* (env ampf)
  5465. (+ .9 (rand-interp rnd))
  5466. (+ (* (env ampf1)
  5467. (polywave gen1 (env frqf1)))
  5468. (* (env ampf2)
  5469. (polywave gen2 (env frqf2))))))))))
  5470. (defanimal (macgillivrays-warbler-2 beg amp)
  5471. ;; 3 of these to end
  5472. (let ((dur 0.135))
  5473. (let ((start (seconds->samples beg))
  5474. (stop (seconds->samples (+ beg dur)))
  5475. (ampf (make-env '(0.000 0.000 0.031 0.052 0.184 0.078 0.275 0.254 0.311 0.285 0.327 0.461 0.377 0.635
  5476. 0.455 0.216 0.521 0.426 0.533 0.605 0.601 0.991 0.619 0.951 0.628 0.584 0.674 0.318
  5477. 0.711 0.440 0.732 0.680 0.771 0.581 0.806 0.315 0.857 0.256 0.892 0.132 0.949 0.108 1.000 0.000)
  5478. :duration dur :scaler amp))
  5479. (frqf1 (make-env '(0.000 0.202 0.048 0.277 0.077 0.289 0.106 0.268 0.130 0.286 0.152 0.275 0.169 0.232
  5480. 0.202 0.216 0.229 0.232 0.264 0.277 0.292 0.291 0.324 0.310 0.351 0.340 0.382 0.303
  5481. 0.430 0.329 0.470 0.366 0.533 0.408 0.612 0.479 0.638 0.575 0.712 0.343 0.730 0.286
  5482. 0.750 0.258 0.778 0.272 0.804 0.312 0.826 0.345 0.852 0.352 0.891 0.317 0.934 0.286 1.000 0.2)
  5483. :duration dur :scaler (hz->radians 9140.0)))
  5484. (ampf1 (make-env '(0 1 .1 .4 .3 .1 .5 .2 .63 .2 .64 0 .71 0 .72 .1 .8 1 1 1) :duration dur))
  5485. (gen1 (make-polywave 0.0 '(1 .6 2 .4 3 .005)))
  5486. (frqf2 (make-env '(0.000 0.357 0.196 0.357 0.275 0.373 0.310 0.413 0.350 0.446 0.385 0.484 0.425 0.538
  5487. 0.462 0.540 0.470 0.373 0.535 0.418 0.591 0.462 0.621 0.500 0.637 0.573 0.667 0.392
  5488. 0.712 0.406 0.744 0.455 0.778 0.462 0.833 0.556 1.000 0.32)
  5489. :duration dur :scaler (hz->radians 9140.0)))
  5490. (ampf2 (make-env '(0 0 .19 0 .195 1 .45 .1 .46 0 .47 1 .63 1 .64 0 .67 0 .68 1 .82 1 .83 0 1 0) :duration dur))
  5491. (gen2 (make-polywave 0.0 '(1 .99 2 .01)))
  5492. (rnd1 (make-rand-interp 600 (hz->radians 40)))
  5493. (rnd (make-rand-interp 6000 .1)))
  5494. (do ((i start (+ i 1)))
  5495. ((= i stop))
  5496. (outa i (* (env ampf)
  5497. (+ .9 (rand-interp rnd))
  5498. (+ (* (env ampf1)
  5499. (polywave gen1 (env frqf1)))
  5500. (* (env ampf2)
  5501. (polywave gen2 (+ (env frqf2)
  5502. (rand-interp rnd1)))))))))))
  5503. (do ((amps (vector .4 .6 .8 .9 1.0))
  5504. (note 0 (+ 1 note))
  5505. (bg beg1 (+ bg 0.18)))
  5506. ((= note 5))
  5507. (macgillivrays-warbler-1 bg (* amp1 (amps note))))
  5508. (do ((amps (vector 1.0 .9 .7))
  5509. (note 0 (+ 1 note))
  5510. (bg (+ beg1 0.93) (+ bg 0.17)))
  5511. ((= note 3))
  5512. (macgillivrays-warbler-2 bg (* amp1 (amps note)))))
  5513. ;; (with-sound (:play #t) (macgillivrays-warbler 0 .5))
  5514. ;;; --------------------------------------------------------------------------------
  5515. ;;;
  5516. ;;; Hutton's vireo
  5517. (defanimal (huttons-vireo beg amp)
  5518. (let ((dur 0.4))
  5519. (let ((start (seconds->samples beg))
  5520. (stop (seconds->samples (+ beg dur)))
  5521. (ampf (make-env '(0.000 0.000 0.054 0.080 0.063 0.040 0.078 0.086 0.113 0.107 0.136 0.061 0.148 0.086
  5522. 0.155 0.066 0.161 0.123 0.176 0.087 0.184 0.112 0.204 0.067 0.214 0.070 0.220 0.055
  5523. 0.226 0.077 0.233 0.034 0.239 0.083 0.246 0.032 0.254 0.081 0.260 0.038 0.265 0.067
  5524. 0.274 0.040 0.281 0.074 0.287 0.043 0.293 0.060 0.300 0.014 0.307 0.066 0.315 0.018
  5525. 0.320 0.074 0.330 0.021 0.335 0.070 0.342 0.025 0.351 0.069 0.355 0.017 0.360 0.051
  5526. 0.375 0.040 0.380 0.063 0.388 0.023 0.396 0.077 0.404 0.025 0.410 0.081 0.417 0.032
  5527. 0.425 0.089 0.428 0.058 0.435 0.047 0.441 0.093 0.447 0.041 0.456 0.116 0.463 0.044
  5528. 0.471 0.138 0.479 0.061 0.489 0.150 0.497 0.070 0.506 0.191 0.510 0.124 0.514 0.089
  5529. 0.521 0.211 0.526 0.138 0.530 0.121 0.537 0.234 0.547 0.103 0.556 0.263 0.561 0.204
  5530. 0.567 0.213 0.571 0.319 0.578 0.286 0.580 0.237 0.586 0.292 0.591 0.234 0.594 0.288
  5531. 0.600 0.132 0.602 0.217 0.606 0.262 0.611 0.420 0.614 0.357 0.617 0.162 0.630 0.472
  5532. 0.636 0.132 0.649 0.587 0.657 0.133 0.666 0.587 0.671 0.380 0.677 0.271 0.683 0.640
  5533. 0.692 0.343 0.696 0.248 0.704 0.680 0.711 0.358 0.715 0.288 0.721 0.779 0.731 0.204
  5534. 0.736 0.357 0.739 0.776 0.745 0.882 0.753 0.320 0.760 0.695 0.769 0.994 0.775 0.322
  5535. 0.781 0.662 0.789 0.856 0.794 0.582 0.797 0.240 0.801 0.608 0.809 0.825 0.816 0.877
  5536. 0.823 0.311 0.830 0.900 0.834 0.877 0.838 0.758 0.844 0.809 0.858 0.605 0.867 0.879
  5537. 0.879 0.819 0.883 0.968 0.890 0.969 0.898 0.885 0.912 0.862 0.919 0.776 0.934 0.769
  5538. 0.940 0.740 0.952 0.565 0.969 0.485 0.974 0.403 0.982 0.389 1.000 0.000)
  5539. :duration dur :scaler amp))
  5540. (frqf (make-env '(0.0000 0.4927 0.0133 0.5498 0.0177 0.6092 0.0275 0.8519 0.0276 0.5073 0.0413 0.8422
  5541. 0.0428 0.4454 0.0624 0.5510 0.0954 0.5534 0.1264 0.5570 0.1391 0.5194 0.1632 0.5522
  5542. 0.1750 0.4976 0.1912 0.5437 0.1996 0.4672 0.2055 0.5413 0.2134 0.4660 0.2207 0.5413
  5543. 0.2266 0.4454 0.2335 0.5388 0.2380 0.4357 0.2458 0.5352 0.2522 0.4357 0.2596 0.5243
  5544. 0.2635 0.4320 0.2699 0.5182 0.2788 0.4296 0.2842 0.5061 0.2935 0.4248 0.2999 0.5061
  5545. 0.3068 0.4260 0.3147 0.5000 0.3210 0.4248 0.3289 0.4939 0.3358 0.4187 0.3422 0.4782
  5546. 0.3500 0.4223 0.3569 0.4721 0.3658 0.4223 0.3736 0.4794 0.3800 0.4211 0.3884 0.4745
  5547. 0.3948 0.4199 0.4036 0.4745 0.4105 0.4126 0.4174 0.4721 0.4258 0.4090 0.4341 0.4733
  5548. 0.4410 0.4066 0.4489 0.4648 0.4577 0.4053 0.4656 0.4648 0.4730 0.3993 0.4823 0.4697
  5549. 0.4887 0.3993 0.4990 0.4709 0.5059 0.4005 0.5143 0.4769 0.5236 0.3968 0.5339 0.4879
  5550. 0.5393 0.3993 0.5521 0.4988 0.5590 0.4029 0.5674 0.5024 0.5777 0.4053 0.5870 0.5097
  5551. 0.5954 0.4090 0.6057 0.5146 0.6121 0.4150 0.6229 0.5303 0.6332 0.4187 0.6416 0.5437
  5552. 0.6529 0.4284 0.6618 0.5437 0.6711 0.4308 0.6814 0.5413 0.6868 0.4345 0.6986 0.5473
  5553. 0.7065 0.4393 0.7183 0.5510 0.7281 0.4430 0.7404 0.5558 0.7557 0.4490 0.7630 0.5595
  5554. 0.7763 0.4563 0.7861 0.5558 0.7984 0.4612 0.8117 0.5680 0.8265 0.5231 0.9641 0.5095
  5555. 0.9754 0.3944 0.9823 0.4); 1 .4)
  5556. :duration dur :scaler (hz->radians 7500.0)))
  5557. (gen1 (make-polywave 0.0 '(1 .95 2 .03 3 .005))))
  5558. (do ((i start (+ i 1)))
  5559. ((= i stop))
  5560. (outa i (* (env ampf)
  5561. (polywave gen1 (env frqf))))))))
  5562. ;; (with-sound (:play #t) (huttons-vireo 0 .5))
  5563. ;;; --------------------------------------------------------------------------------
  5564. ;;;
  5565. ;;; Western meadowlark
  5566. (define (western-meadowlark beg1 amp1)
  5567. ;; first sequence of notes
  5568. (defanimal (western-meadowlark-1 beg amp)
  5569. (let ((dur 1.075))
  5570. (let ((start (seconds->samples beg))
  5571. (stop (seconds->samples (+ beg dur)))
  5572. (ampf (make-env '(0.000 0.000 0.007 0.072 0.016 0.253 0.028 0.300 0.048 0.000 0.115 0.000 0.122 0.062
  5573. 0.132 0.437 0.148 0.462 0.162 0.444 0.188 0.000 0.365 0.000 0.392 0.050 0.397 0.017
  5574. 0.406 0.052 0.412 0.000 0.432 0.000 0.438 0.082 0.455 0.541 0.486 0.722 0.503 0.759
  5575. 0.518 0.744 0.529 0.774 0.547 0.700 0.570 0.000 0.635 0.000 0.656 0.715 0.680 0.963
  5576. 0.701 1.000 0.730 0.938 0.742 0.883 0.754 0.715 0.770 0.000 0.850 0.000 0.855 0.211
  5577. 0.857 0.072 0.858 0.360 0.861 0.112 0.862 0.568 0.864 0.181 0.866 0.742 0.867 0.290
  5578. 0.872 0.933 0.874 0.625 0.883 0.963 0.899 0.940 0.906 0.844 0.920 0.856 0.922 0.821
  5579. 0.929 0.891 0.935 0.844 0.949 0.911 0.970 0.861 0.981 0.667 0.993 0.104 1.000 0.000)
  5580. :duration dur :scaler amp))
  5581. (frqf (make-env '(0.000 0.280 0.069 0.288 0.125 0.280 0.185 0.275 0.258 0.280 0.366 0.184 0.394 0.179
  5582. 0.405 0.218 0.409 0.134 0.426 0.134 0.428 0.352 0.568 0.345 0.618 0.350 0.630 0.258
  5583. 0.765 0.261 0.828 0.258 0.848 0.454 1.000 0.452)
  5584. :duration dur :scaler (hz->radians 7470.0)))
  5585. (gen1 (make-oscil)))
  5586. (do ((i start (+ i 1)))
  5587. ((= i stop))
  5588. (outa i (* (env ampf)
  5589. (oscil gen1 (env frqf))))))))
  5590. ;; 2nd sequence of notes
  5591. (defanimal (western-meadowlark-2 beg amp)
  5592. (let ((dur 0.45))
  5593. (let ((start (seconds->samples beg))
  5594. (stop (seconds->samples (+ beg dur)))
  5595. (ampf (make-env '(0.000 0.000 0.014 0.080 0.030 0.297 0.036 0.100 0.043 0.109 0.050 0.436 0.055 0.191
  5596. 0.057 0.435 0.064 0.338 0.067 0.000 0.070 0.830 0.079 0.255 0.084 0.883 0.090 0.982
  5597. 0.099 0.000 0.100 0.553 0.102 0.626 0.113 0.035 0.118 0.261 0.129 0.047 0.151 0.000
  5598. 0.218 0.000 0.224 0.041 0.227 0.015 0.233 0.083 0.248 0.000 0.263 0.141 0.282 0.209
  5599. 0.310 0.389 0.331 0.377 0.354 0.148 0.383 0.829 0.393 0.733 0.406 0.294 0.412 0.559
  5600. 0.436 0.512 0.440 0.250 0.443 0.465 0.446 0.117 0.453 0.324 0.460 0.094 0.464 0.070
  5601. 0.470 0.192 0.477 0.058 0.483 0.023 0.490 0.686 0.501 0.788 0.509 0.756 0.532 0.129
  5602. 0.550 0.000 0.613 0.000 0.619 0.062 0.625 0.015 0.631 0.042 0.634 0.117 0.641 0.070
  5603. 0.659 0.102 0.675 0.067 0.687 0.000 0.730 0.000 0.734 0.118 0.745 0.139 0.746 0.252
  5604. 0.762 0.329 0.770 0.898 0.772 0.223 0.777 0.856 0.785 0.900 0.792 0.126 0.797 0.071
  5605. 0.803 0.742 0.809 0.688 0.824 0.179 0.832 0.197 0.836 0.294 0.880 0.017 0.895 0.041
  5606. 0.915 0.029 0.924 0.008 0.935 0.029 0.956 0.041 0.978 0.033 1.000 0.000)
  5607. :duration dur :scaler amp))
  5608. (frqf (make-env '(0.000 0.506 0.042 0.501 0.068 0.481 0.125 0.300 0.153 0.293 0.204 0.963 0.217 0.918
  5609. 0.223 0.720 0.235 0.588 0.353 0.553 0.358 0.328 0.400 0.323 0.412 0.293 0.418 0.318
  5610. 0.421 0.273 0.429 0.315 0.435 0.263 0.443 0.263 0.449 0.221 0.472 0.218 0.483 0.223
  5611. 0.487 0.320 0.499 0.266 0.530 0.266 0.545 0.253 0.550 0.201 0.622 0.211 0.635 0.241
  5612. 0.640 0.149 0.684 0.161 0.725 0.169 0.727 0.305 0.736 0.268 0.742 0.238 0.752 0.236
  5613. 0.757 0.310 0.759 0.166 0.773 0.400 0.777 0.350 0.791 0.347 0.803 0.303 0.829 0.303
  5614. 0.840 0.206 0.872 0.208 0.894 0.146 0.918 0.161 0.930 0.102 0.964 0.134 1.000 0.146)
  5615. :duration dur :scaler (hz->radians 7470.0)))
  5616. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  5617. (do ((i start (+ i 1)))
  5618. ((= i stop))
  5619. (outa i (* (env ampf)
  5620. (polywave gen1 (env frqf))))))))
  5621. (western-meadowlark-1 beg1 (* 0.6 amp1))
  5622. (western-meadowlark-2 (+ beg1 1.125) amp1))
  5623. ;; (with-sound (:play #t) (western-meadowlark 0 .5))
  5624. ;;; --------------------------------------------------------------------------------
  5625. ;;;
  5626. ;;; Northern beardless tyrannulet
  5627. ;;;
  5628. ;;; this should have used 4 calls on one note
  5629. (defanimal (northern-beardless-tyrannulet beg amp)
  5630. (let ((dur 1.91))
  5631. (let ((start (seconds->samples beg))
  5632. (stop (seconds->samples (+ beg dur)))
  5633. (ampf (make-env '(0.000 0.000 0.013 0.124 0.018 0.713 0.038 0.303 0.052 0.469 0.065 0.236 0.079 0.685
  5634. 0.084 0.483 0.089 0.666 0.094 0.545 0.101 0.638 0.107 0.542 0.113 0.671 0.123 0.531
  5635. 0.132 0.590 0.157 0.879 0.167 0.784 0.173 0.410 0.177 0.646 0.182 0.228 0.192 0.587
  5636. 0.203 0.000 0.238 0.000 0.240 0.010 0.248 0.843 0.255 0.404 0.266 0.952 0.281 1.000
  5637. 0.331 0.963 0.350 0.702 0.358 0.784 0.375 0.534 0.391 0.778 0.406 0.000 0.444 0.000
  5638. 0.446 0.010 0.457 0.899 0.464 0.334 0.473 1.000 0.492 0.854 0.499 0.610 0.506 0.730
  5639. 0.525 0.652 0.552 0.801 0.560 0.553 0.570 0.865 0.582 0.534 0.583 0.626 0.590 0.483
  5640. 0.595 0.570 0.611 0.000 0.649 0.000 0.651 0.010 0.662 0.899 0.671 0.654 0.679 0.969
  5641. 0.698 0.787 0.704 0.843 0.711 0.772 0.726 0.910 0.768 0.643 0.780 0.680 0.803 0.000
  5642. 0.845 0.000 0.847 0.010 0.856 0.770 0.863 0.492 0.866 0.860 0.873 0.890 0.883 0.680
  5643. 0.889 0.817 0.901 0.722 0.915 0.823 0.934 0.534 0.953 0.576 0.972 0.435 0.977 0.562
  5644. 0.990 0.101 1.000 0.000)
  5645. :duration dur :scaler amp))
  5646. (frqf (make-env '(0.000 0.396 0.021 0.439 0.188 0.431 0.197 0.340 0.247 0.375
  5647. 0.256 0.447 0.268 0.437 0.396 0.426 0.400 0.394 0.402 0.358 0.457 0.369
  5648. 0.461 0.426 0.469 0.447 0.484 0.437 0.599 0.418 0.607 0.394 0.611 0.345 0.658 0.361
  5649. 0.663 0.426 0.669 0.456 0.682 0.429 0.786 0.415 0.795 0.407 0.801 0.345 0.856 0.372
  5650. 0.861 0.420 0.865 0.450 0.875 0.431 0.982 0.407 0.990 0.361 1.000 0.278)
  5651. :duration dur :scaler (hz->radians 9230.0)))
  5652. (gen1 (make-polywave 0.0 '(1 .95 2 .005 3 .02 4 .005 5 .003)))
  5653. (noise (make-rand-interp 8000))
  5654. (noisef (make-env '(0 0 .011 1 .015 0
  5655. .236 0 .24 1 .245 0
  5656. .44 0 .445 1 .452 0
  5657. .647 0 .65 1 .657 0
  5658. .84 0 .845 1 .853 0
  5659. 1 0)
  5660. :duration dur :scaler .25)))
  5661. (do ((i start (+ i 1)))
  5662. ((= i stop))
  5663. (outa i (* (env ampf)
  5664. (polywave gen1 (+ (env frqf)
  5665. (* (env noisef) (rand-interp noise))))))))))
  5666. ;; (with-sound (:play #t) (northern-beardless-tyrannulet 0 .5))
  5667. ;;; --------------------------------------------------------------------------------
  5668. ;;;
  5669. ;;; Scott's oriole
  5670. (defanimal (scotts-oriole beg amp)
  5671. (let ((dur 1.83))
  5672. (let ((start (seconds->samples beg))
  5673. (stop (seconds->samples (+ beg dur)))
  5674. (ampf (make-env '(0.000 0.000 0.020 0.103 0.030 0.113 0.038 0.099 0.062 0.000 0.142 0.000 0.150 0.050
  5675. 0.160 0.326 0.170 0.333 0.178 0.309 0.200 0.050 0.207 0.076 0.218 0.282 0.238 0.018
  5676. 0.255 0.353 0.265 0.415 0.276 0.392 0.292 0.000 0.318 0.000 0.328 0.442 0.331 0.090
  5677. 0.335 0.408 0.339 0.279 0.342 0.545 0.357 0.000 0.405 0.000 0.413 0.250 0.419 0.281
  5678. 0.424 0.250 0.436 0.058 0.442 0.072 0.462 0.511 0.471 0.500 0.477 0.000 0.484 0.000
  5679. 0.487 0.980 0.505 0.514 0.521 0.304 0.530 0.000 0.601 0.000 0.616 0.559 0.622 0.599
  5680. 0.637 0.581 0.646 0.507 0.661 0.000 0.676 0.000 0.678 0.239 0.680 0.094 0.682 0.424
  5681. 0.687 0.096 0.689 0.374 0.693 0.000 0.702 0.000 0.716 0.698 0.725 0.763 0.735 0.000
  5682. 0.746 0.000 0.753 0.396 0.758 0.423 0.760 0.399 0.771 0.054 0.777 0.095 0.783 0.207
  5683. 0.786 0.227 0.800 0.142 0.823 0.072 0.828 0.000 0.851 0.000 0.853 0.243 0.856 0.087
  5684. 0.857 0.351 0.862 0.147 0.863 0.300 0.870 0.000 0.877 0.000 0.892 0.888 0.911 0.000
  5685. 0.920 0.000 0.926 0.353 0.933 0.406 0.943 0.059 0.948 0.025 0.962 0.167 0.970 0.174 1.000 0.000)
  5686. :duration dur :scaler amp))
  5687. (frqf (make-env '(0.000 0.560 0.023 0.489 0.052 0.487 0.079 0.487 0.138 0.556 0.150 0.556 0.162 0.487
  5688. 0.181 0.473 0.202 0.473 0.212 0.415 0.234 0.415 0.241 0.491 0.252 0.442 0.267 0.431
  5689. 0.285 0.438 0.319 0.455 0.322 0.533 0.328 0.634 0.332 0.467 0.338 0.775 0.348 0.839
  5690. 0.354 0.810 0.366 0.737 0.392 0.415 0.409 0.411 0.421 0.386 0.440 0.397 0.472 0.438
  5691. 0.477 0.531 0.485 0.607 0.495 0.507 0.508 0.408 0.527 0.406 0.587 0.406 0.607 0.491
  5692. 0.624 0.462 0.637 0.458 0.654 0.467 0.658 0.422 0.679 0.393 0.682 0.585 0.684 0.482
  5693. 0.686 0.643 0.690 0.420 0.700 0.576 0.706 0.621 0.710 0.583 0.730 0.612 0.751 0.413
  5694. 0.766 0.406 0.789 0.362 0.819 0.359 0.852 0.388 0.856 0.645 0.858 0.491 0.861 0.621
  5695. 0.864 0.435 0.867 0.576 0.873 0.565 0.879 0.600 0.887 0.576 0.896 0.596 0.903 0.654
  5696. 0.924 0.420 0.940 0.395 0.973 0.359 1.000 0.353)
  5697. :duration dur :scaler (hz->radians 5080.0)))
  5698. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .003 4 .007))))
  5699. (do ((i start (+ i 1)))
  5700. ((= i stop))
  5701. (outa i (* (env ampf)
  5702. (polywave gen1 (env frqf))))))))
  5703. ;; (with-sound (:play #t) (scotts-oriole 0 .5))
  5704. ;;; --------------------------------------------------------------------------------
  5705. ;;;
  5706. ;;; Wilson's warbler
  5707. (define (wilsons-warbler beg1 amp1)
  5708. ;; 3 different calls, 2(?) with 2 different tones
  5709. (defanimal (wilsons-warbler-1 beg dur amp)
  5710. (let ((start (seconds->samples beg))
  5711. (stop (seconds->samples (+ beg dur)))
  5712. (ampf (make-env '(0.000 0.000 0.101 0.169 0.138 0.169 0.179 0.297 0.226 0.377 0.269 0.092 0.318 0.513
  5713. 0.340 0.651 0.359 0.156 0.372 0.654 0.387 0.156 0.428 0.700 0.491 0.808 0.607 0.721
  5714. 0.659 0.923 0.747 0.995 0.909 0.813 0.965 0.528 1.000 0.000)
  5715. :duration dur :scaler amp))
  5716. (frqf1 (make-env '(0.000 0.692 0.038 0.698 0.077 0.647 0.136 0.614 0.258 0.606 0.275 0.575 0.314 0.571
  5717. 0.365 0.550 0.381 0.500 0.681 0.502 0.844 0.496 0.873 0.401 1.000 0.390)
  5718. :duration dur :scaler (hz->radians 10210.0)))
  5719. (gen1 (make-oscil))
  5720. (frqf2 (make-env '(0.000 0.692 0.038 0.698 0.077 0.647 0.136 0.614 0.258 0.606 0.275 0.575 0.314 0.571
  5721. 0.365 0.550 0.376 0.394 0.490 0.353 0.594 0.347 0.681 0.392 0.740 0.418 0.818 0.416
  5722. 0.886 0.399 1.000 0.390)
  5723. :duration dur :scaler (hz->radians 10210.0)))
  5724. (ampf1 (make-env '(0 1 .6 1 .8 0 1 0) :duration dur))
  5725. (gen2 (make-oscil))
  5726. (ampf2 (make-env '(0 .25 .35 .25 .36 0 .6 0 .7 1 1 1) :duration dur))
  5727. (rnd (make-rand-interp 4000 (hz->radians 300))))
  5728. (do ((i start (+ i 1)))
  5729. ((= i stop))
  5730. (outa i (* (env ampf)
  5731. (+ (* (env ampf1)
  5732. (oscil gen1 (+ (env frqf1) (rand-interp rnd))))
  5733. (* (env ampf2)
  5734. (oscil gen2 (env frqf2)))))))))
  5735. (defanimal (wilsons-warbler-2 beg dur frq amp)
  5736. (let ((start (seconds->samples beg))
  5737. (stop (seconds->samples (+ beg dur)))
  5738. (ampf (make-env '(0.000 0.000 0.049 0.091 0.109 0.276 0.129 0.280 0.149 0.164 0.157 0.388 0.179 0.677
  5739. 0.221 0.642 0.241 0.448 0.319 1.000 0.360 0.953 0.489 0.765 0.513 0.539 0.591 0.282
  5740. 0.619 0.345 0.727 0.244 0.762 0.446 0.828 0.442 0.925 0.313 0.982 0.136 1.000 0.000)
  5741. :duration dur :scaler amp))
  5742. (frqf (make-env '(0.000 0.909 0.050 0.838 0.080 0.799 0.119 0.786 0.162 0.752 0.225 0.692 0.262 0.634
  5743. 0.317 0.538 0.366 0.478 0.482 0.376 0.554 0.342 0.628 0.366 0.701 0.392 0.762 0.394
  5744. 0.832 0.373 1.000 0.3)
  5745. :duration dur :scaler (hz->radians (* frq 9780.0))))
  5746. (gen1 (make-oscil))
  5747. (rnd (make-rand-interp 4000 (hz->radians 200))))
  5748. (do ((i start (+ i 1)))
  5749. ((= i stop))
  5750. (outa i (* (env ampf)
  5751. (oscil gen1 (+ (env frqf)
  5752. (rand-interp rnd))))))))
  5753. (defanimal (wilsons-warbler-3 beg amp)
  5754. (let ((dur 0.07))
  5755. (let ((start (seconds->samples beg))
  5756. (stop (seconds->samples (+ beg dur)))
  5757. (ampf (make-env '(0.000 0.000 0.087 0.099 0.126 0.201 0.148 0.086 0.201 0.483 0.223 0.337 0.243 0.561
  5758. 0.257 0.384 0.269 0.658 0.282 0.332 0.292 0.428 0.311 0.211 0.357 0.290 0.390 0.601
  5759. 0.407 0.674 0.433 0.658 0.437 0.222 0.456 0.572 0.485 0.629 0.498 0.885 0.529 0.627
  5760. 0.552 0.807 0.642 0.689 0.658 0.836 0.683 0.877 0.704 0.543 0.733 0.634 0.837 0.428
  5761. 0.873 0.634 0.924 0.185 0.974 0.238 1.000 0.000)
  5762. :duration dur :scaler amp))
  5763. (frqf (make-env '(0.000 0.770 0.120 0.768 0.190 0.752 0.227 0.715 0.261 0.692 0.292 0.695 0.310 0.648
  5764. 0.334 0.629 0.423 0.616 0.477 0.561 0.510 0.554 0.534 0.501 0.645 0.413 0.690 0.402
  5765. 0.737 0.371 0.893 0.347 1.000 0.295)
  5766. :duration dur :scaler (hz->radians 9780.0)))
  5767. (gen1 (make-oscil))
  5768. (rnd (make-rand-interp 4000 (hz->radians 200))))
  5769. (do ((i start (+ i 1)))
  5770. ((= i stop))
  5771. (outa i (* (env ampf)
  5772. (oscil gen1 (+ (env frqf)
  5773. (rand-interp rnd)))))))))
  5774. (wilsons-warbler-1 beg1 .046 (* .05 amp1))
  5775. (wilsons-warbler-1 (+ beg1 .147) .05 (* .1 amp1))
  5776. (let ((durs2 (vector 0.067 0.07 0.075 0.08 0.086 0.084 0.08 0.08 0.078))
  5777. (frqs2 (vector 1.0 1.0 0.95 0.93 1.0 1.0 1.0 1.0 0.95))
  5778. (amps2 (vector .2 .4 .7 1 1 .8 1 1 1)))
  5779. (do ((i 0 (+ i 1)))
  5780. ((= i 9))
  5781. (wilsons-warbler-2 (+ beg1 0.285 (* i .13)) (durs2 i) (frqs2 i) (* amp1 (amps2 i)))))
  5782. (do ((i 0 (+ i 1)))
  5783. ((= i 3))
  5784. (wilsons-warbler-3 (+ beg1 1.45 (* i 0.12)) (* amp1 .9))))
  5785. ;; (with-sound (:play #t) (wilsons-warbler 0 .5))
  5786. ;;; --------------------------------------------------------------------------------
  5787. ;;;
  5788. ;;; Willow flycatcher
  5789. (defanimal (willow-flycatcher beg amp)
  5790. (let ((dur 0.65))
  5791. (let ((start (seconds->samples beg))
  5792. (stop (seconds->samples (+ beg dur)))
  5793. (ampf (make-env '(0.000 0.000 0.016 0.054 0.026 0.142 0.033 0.292 0.043 0.228 0.056 0.240 0.088 0.162
  5794. 0.107 0.218 0.125 0.105 0.130 0.019 0.196 0.012 0.208 0.053 0.215 0.031 0.221 0.086
  5795. 0.223 0.711 0.228 0.828 0.231 0.760 0.237 0.978 0.242 0.679 0.245 0.966 0.250 0.272
  5796. 0.253 0.177 0.262 0.131 0.264 0.000 0.405 0.000 0.417 0.069 0.426 0.174 0.431 0.402
  5797. 0.435 0.301 0.445 0.338 0.452 0.240 0.460 0.000 0.501 0.000 0.504 0.159 0.509 0.069
  5798. 0.519 0.096 0.521 0.228 0.524 0.000 0.536 0.000 0.539 0.336 0.541 0.103 0.547 0.449
  5799. 0.550 0.157 0.554 0.000 0.557 0.086 0.560 0.419 0.562 0.169 0.565 0.000 0.567 0.066
  5800. 0.568 0.174 0.569 0.419 0.572 0.123 0.574 0.027 0.576 0.167 0.577 0.537 0.582 0.056
  5801. 0.583 0.237 0.584 0.564 0.588 0.211 0.590 0.051 0.592 0.232 0.594 0.515 0.595 0.179
  5802. 0.597 0.041 0.599 0.177 0.601 0.426 0.603 0.153 0.606 0.029 0.609 0.172 0.612 0.395
  5803. 0.614 0.029 0.617 0.169 0.620 0.412 0.623 0.024 0.625 0.148 0.628 0.375 0.631 0.022
  5804. 0.634 0.148 0.636 0.336 0.640 0.031 0.644 0.150 0.646 0.348 0.650 0.041 0.654 0.165
  5805. 0.655 0.338 0.659 0.039 0.664 0.165 0.665 0.336 0.668 0.058 0.671 0.260 0.674 0.162
  5806. 0.677 0.321 0.680 0.218 0.682 0.343 0.684 0.167 0.696 0.265 0.702 0.348 0.708 0.326
  5807. 0.716 0.385 0.720 0.520 0.727 0.451 0.731 0.561 0.738 0.267 0.745 0.321 0.750 0.108
  5808. 0.772 0.118 0.782 0.167 0.792 0.282 0.802 0.409 0.811 0.257 0.816 0.083 0.833 0.069
  5809. 0.852 0.103 0.863 0.152 0.867 0.250 0.877 0.047 0.929 0.091 0.938 0.054 0.953 0.027 0.986 0.039 1.000 0.000)
  5810. :duration dur :scaler amp))
  5811. (frqf (make-env '(0.000 0.174 0.042 0.324 0.074 0.339 0.111 0.390 0.130 0.453 0.190 0.831 0.210 0.780
  5812. 0.225 0.605 0.227 0.504 0.240 0.489 0.248 0.453 0.251 0.346 0.262 0.165 0.412 0.155
  5813. 0.422 0.230 0.430 0.288 0.435 0.334 0.448 0.337 0.456 0.395 0.458 0.467 0.503 0.402
  5814. 0.506 0.235 0.513 0.213 0.520 0.240 0.524 0.443 0.537 0.441 0.540 0.298 0.544 0.262
  5815. 0.547 0.298 0.553 0.443 0.558 0.453 0.561 0.324 0.563 0.508 0.570 0.324 0.573 0.511
  5816. 0.577 0.329 0.581 0.482 0.585 0.332 0.590 0.479 0.594 0.332 0.598 0.467 0.602 0.320
  5817. 0.606 0.453 0.611 0.300 0.615 0.443 0.620 0.291 0.623 0.450 0.628 0.262 0.631 0.438
  5818. 0.637 0.259 0.640 0.436 0.646 0.264 0.649 0.436 0.655 0.257 0.659 0.438 0.664 0.247
  5819. 0.668 0.407 0.673 0.264 0.679 0.400 0.683 0.291 0.702 0.298 0.716 0.334 0.721 0.397
  5820. 0.728 0.370 0.733 0.402 0.738 0.438 0.742 0.375 0.748 0.249 0.755 0.232 0.766 0.264
  5821. 0.785 0.295 0.797 0.310 0.801 0.354 0.803 0.426 0.808 0.361 0.815 0.203 0.824 0.184
  5822. 0.834 0.225 0.852 0.254 0.861 0.293 0.867 0.349 0.881 0.157 0.889 0.155 0.895 0.184
  5823. 0.913 0.206 0.926 0.257 0.930 0.310 0.946 0.136 0.956 0.123 0.969 0.169 0.987 0.208 1.000 0.262)
  5824. :duration dur :scaler (hz->radians 10800.0)))
  5825. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01 4 .005)))
  5826. (gen2 (make-oscil))
  5827. (ampf2 (make-env '(0 0 .68 0 .9 1 1 1) :duration dur :scaler .2)))
  5828. (do ((i start (+ i 1)))
  5829. ((= i stop))
  5830. (let ((frq (env frqf)))
  5831. (outa i (* (env ampf)
  5832. (+ (polywave gen1 frq)
  5833. (* (env ampf2)
  5834. (oscil gen2 (* 2.0 frq)))))))))))
  5835. ;; (with-sound (:play #t) (willow-flycatcher 0 .5))
  5836. ;;; --------------------------------------------------------------------------------
  5837. ;;;
  5838. ;;; Black-necked stilt
  5839. (defanimal (black-necked-stilt beg amp)
  5840. (let ((dur 0.085))
  5841. (let ((start (seconds->samples beg))
  5842. (stop (seconds->samples (+ beg dur)))
  5843. (ampf (make-env '(0.000 0.000 0.034 0.133 0.121 0.287 0.210 0.586 0.358 0.950 0.419 1.000 0.514 1.000
  5844. 0.611 0.912 0.819 0.251 0.893 0.204 0.962 0.105 1.000 0.000)
  5845. :duration dur :scaler amp))
  5846. (frqf (make-env '(0.000 0.246 0.073 0.252 0.107 0.294 0.131 0.276 0.160 0.300 0.269 0.334 0.345 0.350
  5847. 0.451 0.361 0.548 0.359 0.692 0.352 0.765 0.328 0.803 0.300 0.832 0.318 0.865 0.285 1.000 0.266)
  5848. :duration dur :scaler (hz->radians (* 1/3 10100.0))))
  5849. (gen1 (make-polywave 0.0 (normalize-partials '(1 .05 2 .25 3 1 4 .5 5 .2 6 .01 8 .03 9 .03 10 .01 11 .005 12 .005))))
  5850. (gen2 (make-polywave 0.0 '(3 .03 5 .05 7 .1 9 .03 11 .04 13 .015 15 .01 17 .005 19 .005 21 .005 23 .005)))
  5851. (ampf2 (make-env '(0 1 .2 .1 .3 1 .5 0 .7 0 1 .5) :duration dur))
  5852. (rnd (make-rand-interp 4000 (hz->radians 500)))
  5853. (rndf (make-env '(0 1 .2 0 .9 0 1 1) :duration dur)))
  5854. (do ((i start (+ i 1)))
  5855. ((= i stop))
  5856. (let ((frq (+ (env frqf)
  5857. (* (env rndf)
  5858. (rand-interp rnd)))))
  5859. (outa i (* (env ampf)
  5860. (+ (polywave gen1 frq)
  5861. (* (env ampf2)
  5862. (polywave gen2 (* 0.5 frq)))))))))))
  5863. ;; (with-sound (:play #t) (black-necked-stilt 0 .5))
  5864. ;;; --------------------------------------------------------------------------------
  5865. ;;;
  5866. ;;; Bushtit
  5867. (defanimal (bushtit beg amp)
  5868. (let ((dur 0.368)
  5869. (pulse-dur .044)
  5870. (start (seconds->samples beg)))
  5871. (let ((stop (seconds->samples (+ beg dur)))
  5872. (frqf (make-env '(0 0 1 -1) :duration dur :scaler (hz->radians 500)))
  5873. (pulse-spacing (seconds->samples .064))
  5874. (pulse-samps (seconds->samples pulse-dur))
  5875. (pulse-ampf (make-env '(0.000 0.000 0.114 0.486 0.182 0.988 0.394 0.763 0.620 1.000 0.769 0.937 0.889 1.000 1.000 0.000)
  5876. :duration pulse-dur :scaler amp))
  5877. (pulse-frqf (make-env '(0.000 0.230 0.109 0.291 0.212 0.322 0.298 0.343 0.410 0.348 0.654 0.357 0.821 0.354 0.889 0.337 0.952 0.304 1.000 0.231)
  5878. :duration pulse-dur :scaler (hz->radians 22050.0)))
  5879. (gen1 (make-polywave 0.0 '(1 .99 2 .01)))
  5880. (gen2 (make-polywave 0.0 '(5 .9 7 .07 8 .02 9 .01 11 .02)))
  5881. (pulse-ampf2 (make-env '(0 0 .65 0 .8 1 .9 1 1 0)
  5882. :duration pulse-dur :scaler .4))
  5883. (pulse-frqf2 (make-env '(0 5400 .6 5400 .75 6300 1 5400)
  5884. :duration pulse-dur :scaler (hz->radians 0.2) :base .1)))
  5885. (let ((first-stop (+ start pulse-samps)))
  5886. (do ((i start (+ i 1)))
  5887. ((= i first-stop))
  5888. (outa i (* (env pulse-ampf)
  5889. (polywave gen1 (+ (env pulse-frqf)
  5890. (env frqf)))))))
  5891. (set! start (+ start pulse-spacing))
  5892. (mus-reset pulse-ampf)
  5893. (mus-reset pulse-frqf)
  5894. (do ((i start (+ i pulse-spacing)))
  5895. ((>= i stop))
  5896. (let ((reset-stop (min stop (+ i pulse-samps))))
  5897. (do ((k i (+ k 1)))
  5898. ((= k reset-stop))
  5899. (outa k (+ (* (env pulse-ampf)
  5900. (polywave gen1 (+ (env pulse-frqf)
  5901. (env frqf))))
  5902. (* (env pulse-ampf2)
  5903. (polywave gen2 (env pulse-frqf2))))))
  5904. (for-each mus-reset (vector pulse-ampf pulse-frqf pulse-ampf2 pulse-frqf2)))))))
  5905. ;; (with-sound (:play #t) (bushtit 0 .5))
  5906. ;;; --------------------------------------------------------------------------------
  5907. ;;;
  5908. ;;; Red-breasted nuthatch
  5909. (defanimal (red-breasted-nuthatch beg amp)
  5910. (let ((dur 0.287))
  5911. (let ((start (seconds->samples beg))
  5912. (stop (seconds->samples (+ beg dur)))
  5913. (ampf (make-env '(0.000 0.000 0.084 0.402 0.289 0.914 0.400 0.957 0.501 0.957 0.530 0.895 0.600 0.988
  5914. 0.680 1.000 0.786 0.926 0.860 0.984 0.912 0.969 0.962 0.855 1.000 0.000)
  5915. :duration dur :scaler amp))
  5916. (frqf (make-env '(0.000 0.257 0.029 0.306 0.061 0.322 0.101 0.318 0.965 0.361 1.000 0.316)
  5917. :duration dur :scaler (hz->radians (* 0.2 7510.0))))
  5918. (gen1 (make-polywave 0.0 '(1 .95 2 .03 3 .03)))
  5919. (mod1 (make-oscil))
  5920. (index (hz->radians (* 510 1.25)))
  5921. (rnd (make-rand-interp 100 (hz->radians 6))))
  5922. (do ((i start (+ i 1)))
  5923. ((= i stop))
  5924. (let ((frq (+ (env frqf)
  5925. (rand-interp rnd))))
  5926. (outa i (* (env ampf)
  5927. (polywave gen1 (+ (* 5.0 frq)
  5928. (* index (oscil mod1 frq)))))))))))
  5929. ;; (with-sound (:play #t) (red-breasted-nuthatch 0 .5))
  5930. ;;; --------------------------------------------------------------------------------
  5931. ;;;
  5932. ;;; White-breasted nuthatch
  5933. (defanimal (white-breasted-nuthatch beg amp)
  5934. (let ((dur 0.31))
  5935. (let ((start (seconds->samples beg))
  5936. (stop (seconds->samples (+ beg dur)))
  5937. (ampf (make-env '(0.000 0.000 0.157 0.871 0.386 1.000 0.728 0.759 0.951 0.306 1.000 0.000)
  5938. :duration dur :scaler amp))
  5939. (frqf (make-env '(0.000 0.318 0.045 0.392 0.160 0.418 0.254 0.418 0.517 0.404 0.816 0.367 1.000 0.310)
  5940. :duration dur :scaler (hz->radians (* 0.25 8900))))
  5941. (gen1 (make-polywave 0.0 '(1 .96 2 .02 3 .03)))
  5942. (gen2 (make-polywave 0.0 '(4 .005 5 .01)))
  5943. (ampf2 (make-env '(0 1 .65 1 .75 0 1 0) :duration dur))
  5944. (mod1 (make-oscil))
  5945. (index (hz->radians (* 800 0.4)))
  5946. (rnd (make-rand-interp 100 (hz->radians 16)))
  5947. (vib (make-oscil 40.0))
  5948. (vib-index (hz->radians 50)))
  5949. (do ((i start (+ i 1)))
  5950. ((= i stop))
  5951. (let* ((vb (oscil vib))
  5952. (frq (+ (env frqf)
  5953. (rand-interp rnd)
  5954. (* vib-index vb)))
  5955. (mfrq (+ (* 3.0 frq)
  5956. (* index (oscil mod1 frq)))))
  5957. (outa i (* (env ampf)
  5958. (+ .7 (* .3 (abs vb)))
  5959. (+ (polywave gen1 mfrq)
  5960. (* (env ampf2)
  5961. (polywave gen2 mfrq))))))))))
  5962. ;; (with-sound (:play #t) (white-breasted-nuthatch 0 .5))
  5963. ;;; --------------------------------------------------------------------------------
  5964. ;;;
  5965. ;;; Pygmy nuthatch
  5966. (defanimal (pygmy-nuthatch beg amp)
  5967. (let ((dur 0.12))
  5968. (let ((start (seconds->samples beg))
  5969. (stop (seconds->samples (+ beg dur)))
  5970. (ampf (make-env '(0.000 0.000 0.096 0.247 0.148 0.591 0.206 0.767 0.244 0.995 0.260 0.470 0.385 0.406
  5971. 0.406 0.240 0.425 0.370 0.475 0.244 0.488 0.324 0.511 0.326 0.528 0.258 0.544 0.336
  5972. 0.594 0.331 0.638 0.256 0.689 0.288 0.720 0.279 0.769 0.299 0.795 0.249 0.818 0.272
  5973. 0.841 0.242 0.856 0.292 0.865 0.205 0.876 0.304 0.897 0.304 0.932 0.126 1.000 0.000)
  5974. :duration dur :scaler amp))
  5975. (frqf (make-env '(0.000 0.096 0.063 0.174 0.090 0.199 0.127 0.205 0.25 0.210 0.26 0.237 0.733 0.222
  5976. 0.865 0.210 0.890 0.195 0.912 0.159 0.930 0.145 1.000 0.138)
  5977. :duration dur :scaler (hz->radians 21500.0)))
  5978. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01))))
  5979. (do ((i start (+ i 1)))
  5980. ((= i stop))
  5981. (outa i (* (env ampf)
  5982. (polywave gen1 (env frqf))))))))
  5983. ;; (with-sound (:play #t) (pygmy-nuthatch 0 .5))
  5984. ;;; --------------------------------------------------------------------------------
  5985. ;;;
  5986. ;;; Flammulated owl
  5987. (defanimal (flammulated-owl beg amp)
  5988. (let ((dur 0.25))
  5989. (let ((start (seconds->samples beg))
  5990. (stop (seconds->samples (+ beg dur)))
  5991. (ampf (make-env '(0.000 0.000 0.146 0.603 0.286 0.858 0.455 0.992 0.629 0.983 0.789 0.819 0.907 0.473 0.946 0.445 1.000 0.000)
  5992. :duration dur :scaler amp))
  5993. (frqf (make-env '(0 340 .1 400 .15 410 .9 420 1 380) :duration dur :scaler (hz->radians 1.0)))
  5994. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .005))))
  5995. (do ((i start (+ i 1)))
  5996. ((= i stop))
  5997. (outa i (* (env ampf)
  5998. (polywave gen1 (env frqf))))))))
  5999. ;; (with-sound (:play #t) (flammulated-owl 0 .5))
  6000. ;;; --------------------------------------------------------------------------------
  6001. ;;;
  6002. ;;; Song sparrow
  6003. (define (song-sparrow beg1 amp1)
  6004. (defanimal (song-sparrow-big-buzz beg amp)
  6005. (let ((dur 0.25))
  6006. (let ((start (seconds->samples beg))
  6007. (stop (seconds->samples (+ beg dur)))
  6008. (ampf (make-env '(0.000 0.000 0.106 0.826 0.190 0.996 0.418 0.818 0.688 0.458 0.897 0.447 0.962 0.348 1.000 0.000)
  6009. :duration dur :scaler amp))
  6010. (frqf (make-env '(0 4400 .4 4200 1 4300) :duration dur :scaler (hz->radians 1.0)))
  6011. (gen-up (make-polywave 0.0 #(1 .95 2 .03 3 .02)))
  6012. (gen-down (make-polywave 0.0 #(1 .95 2 .03 3 .02)))
  6013. (mod-up (make-oscil 142.0))
  6014. (mod-down (make-oscil 142.0))
  6015. (pulse-samps (seconds->samples (/ 1.0 142.0)))
  6016. (ampf-up (make-env '(0 .1 .23 .01 .27 .01 .6 .5 .75 1 .8 .4 1 .1) :duration (/ 1.0 142.0)))
  6017. (ampf-down (make-env '(0 .1 .2 .6 .25 1 .6 .1 .75 .001 1 .1) :duration (/ 1.0 142.0)))
  6018. (ampf2 (make-env '(0 1 1 0) :duration dur :scaler 0.7))
  6019. (rnd (make-rand-interp 6000 (hz->radians 300)))
  6020. (h700 (hz->radians 700.0))
  6021. (h800 (hz->radians 800.0))
  6022. (h600 (hz->radians -600.0)))
  6023. (do ((i start (+ i pulse-samps)))
  6024. ((>= i stop))
  6025. (set! (mus-location frqf) (- i start))
  6026. (set! (mus-location ampf) (- i start))
  6027. (set! (mus-location ampf2) (- i start))
  6028. (let ((reset-stop (min stop (+ i pulse-samps)))
  6029. (pulse-amp (env ampf))
  6030. (pulse-amp2 (env ampf2))
  6031. (pulse-frq (env frqf)))
  6032. (do ((k i (+ k 1)))
  6033. ((= k reset-stop))
  6034. (let ((frq (+ pulse-frq (rand-interp rnd))))
  6035. (outa k (* pulse-amp
  6036. (+ (* (env ampf-up)
  6037. (polywave gen-up (+ frq h700 (* h800 (oscil mod-up)))))
  6038. (* pulse-amp2
  6039. (env ampf-down)
  6040. (polywave gen-down (+ frq h600 (* h800 (oscil mod-down))))))))))
  6041. (mus-reset ampf-up)
  6042. (mus-reset ampf-down))))))
  6043. (defanimal (song-sparrow-clear-tone beg frq amp)
  6044. (let ((dur 0.062))
  6045. (let ((start (seconds->samples beg))
  6046. (stop (seconds->samples (+ beg dur)))
  6047. (ampf (make-env '(0.000 0.000 0.054 0.208 0.138 0.327 0.162 0.292 0.306 0.659 0.352 0.698 0.400 0.835
  6048. 0.468 0.894 0.507 0.808 0.548 0.906 0.593 0.833 0.623 0.939 0.668 0.902 0.710 0.971
  6049. 0.735 0.678 0.759 0.937 0.777 1.000 0.792 0.820 0.800 0.922 0.847 0.806 1.000 0.000)
  6050. :duration dur :scaler amp))
  6051. (frqf (make-env '(0.000 0.203 0.043 0.253 0.118 0.276 0.446 0.263 0.575 0.251 0.707 0.226 0.883 0.187 1.000 0.153)
  6052. :duration dur :scaler (hz->radians (* frq 22050.0))))
  6053. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01))))
  6054. (do ((i start (+ i 1)))
  6055. ((= i stop))
  6056. (outa i (* (env ampf)
  6057. (polywave gen1 (env frqf))))))))
  6058. (defanimal (song-sparrow-sweep-tone beg amp)
  6059. (let ((dur 0.036))
  6060. (let ((start (seconds->samples beg))
  6061. (stop (seconds->samples (+ beg dur)))
  6062. (ampf (make-env '(0.000 0.000 0.048 0.158 0.098 0.474 0.201 0.574 0.235 0.206 0.357 0.206 0.419 0.366
  6063. 0.468 0.331 0.489 0.173 0.519 0.579 0.567 0.639 0.604 0.972 0.647 0.556 0.697 0.391 0.75 0.0)
  6064. :duration dur :scaler amp))
  6065. (frqf (make-env '(0.000 0.358 0.033 0.355 0.060 0.321 0.078 0.240 0.098 0.214 0.120 0.257 0.153 0.364
  6066. 0.187 0.420 0.242 0.428 0.289 0.418 0.348 0.390 0.465 0.381 0.531 0.360 0.571 0.338
  6067. 0.609 0.306 0.668 0.246 0.75 0.223)
  6068. :duration dur :scaler (hz->radians 22050.0)))
  6069. (gen1 (make-polywave 0.0 '(1 .95 2 .05))))
  6070. (do ((i start (+ i 1)))
  6071. ((= i stop))
  6072. (outa i (* (env ampf)
  6073. (polywave gen1 (env frqf))))))))
  6074. (defanimal (song-sparrow-sweep-caw beg amp)
  6075. (let ((dur 0.025))
  6076. (let ((start (seconds->samples beg))
  6077. (stop (seconds->samples (+ beg dur)))
  6078. (ampf (make-env '(0.000 0.000 0.155 0.364 0.185 0.154 0.242 0.542 0.283 0.526 0.321 0.660 0.386 0.846
  6079. 0.451 0.292 0.481 1.000 0.546 0.881 0.584 0.676 0.636 0.798 0.685 0.269 0.755 0.640
  6080. 0.791 0.316 0.957 0.115 1.000 0.000)
  6081. :duration dur :scaler amp))
  6082. (frqf (make-env '(0.000 0.210 0.170 0.232 0.187 0.164 0.453 0.212 0.462 0.159 0.668 0.201 0.699 0.147
  6083. 0.905 0.181 1.000 0.164)
  6084. :duration dur :scaler (* .5 (hz->radians 22050.0))))
  6085. (gen (make-polywave 0.0 '(2 .92 3 .02 4 .01 5 .005)))
  6086. (rnd (make-rand-interp 4000 (hz->radians 500))))
  6087. (do ((i start (+ i 1)))
  6088. ((= i stop))
  6089. (outa i (* (env ampf) (polywave gen (+ (env frqf) (rand-interp rnd)))))))))
  6090. (defanimal (song-sparrow-little-buzz beg amp)
  6091. (let ((dur 0.17))
  6092. (let ((start (seconds->samples beg))
  6093. (stop (seconds->samples (+ beg dur)))
  6094. (ampf (make-env '(0 0 1 1 2 1 4 0) :duration dur :scaler amp))
  6095. (frqf (make-env '(0 0 1 1) :duration dur :scaler (hz->radians 20)))
  6096. (gen (make-polywave 610.0 (normalize-partials '(3 .4 4 1 5 .01 6 .2 7 .03 8 .02 9 .01 10 .01 11 .01 12 .005))))
  6097. (rnd (make-rand-interp 4000 (hz->radians 50)))
  6098. (tri (make-triangle-wave 60 0.6)))
  6099. (do ((i start (+ i 1)))
  6100. ((= i stop))
  6101. (outa i (* (env ampf)
  6102. (+ .4 (abs (triangle-wave tri)))
  6103. (polywave gen (+ (env frqf)
  6104. (rand-interp rnd)))))))))
  6105. (defanimal (song-sparrow-sweep-down beg amp)
  6106. (let ((dur 0.186))
  6107. (let ((start (seconds->samples beg))
  6108. (stop (seconds->samples (+ beg dur)))
  6109. (ampf (make-env '(0.000 0.000 0.125 0.212 0.164 1.000 0.206 0.218 0.231 0.278 0.243 0.470 0.273 0.136
  6110. 0.301 0.419 0.311 0.691 0.329 0.530 0.341 0.501 0.354 0.295 0.373 0.382 0.383 0.193
  6111. 0.397 0.232 0.403 0.127 0.415 0.238 0.426 0.173 0.433 0.238 0.452 0.088 0.528 0.286
  6112. 0.552 0.150 0.564 0.309 0.590 0.133 0.608 0.303 0.635 0.204 0.659 0.215 0.673 0.275
  6113. 0.709 0.380 0.718 0.292 0.727 0.354 0.749 0.235 0.800 0.139 0.831 0.153 0.853 0.232
  6114. 0.886 0.130 0.911 0.337 0.932 0.147 0.949 0.224 0.965 0.082 1.000 0.000)
  6115. :duration dur :scaler amp))
  6116. (frqf (make-env '(0 9000 .08 7900 .164 7385 .2 7000 1 6960) :duration dur :scaler (hz->radians 1.0)))
  6117. (gen1 (make-polywave 0.0 '(1 .95 2 .05))))
  6118. (do ((i start (+ i 1)))
  6119. ((= i stop))
  6120. (outa i (* (env ampf)
  6121. (polywave gen1 (env frqf))))))))
  6122. (defanimal (song-sparrow-sweep-up beg amp)
  6123. (let ((dur 0.076))
  6124. (let ((start (seconds->samples beg))
  6125. (stop (seconds->samples (+ beg dur)))
  6126. (ampf (make-env '(0 0 1 1 2 1 3 0) :base .1
  6127. :duration dur :scaler amp))
  6128. (frqf (make-env '(0 2260 .3 3000 .9 3100 1 3300)
  6129. :duration dur :scaler (hz->radians 1.0)))
  6130. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01 4 .005))))
  6131. (do ((i start (+ i 1)))
  6132. ((= i stop))
  6133. (outa i (* (env ampf)
  6134. (polywave gen1 (env frqf))))))))
  6135. (defanimal (song-sparrow-2nd-buzz beg amp)
  6136. (let ((dur 0.053))
  6137. (let ((start (seconds->samples beg))
  6138. (stop (seconds->samples (+ beg dur)))
  6139. (ampf (make-env '(0.000 0.000 0.101 0.110 0.174 0.229 0.206 0.229 0.220 0.153 0.231 0.285 0.263 0.449
  6140. 0.293 0.424 0.315 0.698 0.374 0.661 0.416 0.884 0.554 0.785 0.587 0.661 0.600 0.037
  6141. 0.608 0.859 0.685 0.554 0.692 0.034 0.705 0.734 0.729 0.602 0.741 0.079 0.753 0.695
  6142. 0.787 0.737 0.803 0.110 0.813 0.520 0.841 0.757 0.868 0.085 0.882 0.398 0.899 0.514
  6143. 0.922 0.172 0.952 0.280 0.962 0.150 0.993 0.198 1.000 0.000)
  6144. :duration dur :scaler amp))
  6145. (frqf (make-env '(0 3100 .4 3430 1 3140)
  6146. :duration dur :offset (hz->radians 40) :scaler (hz->radians 0.5)))
  6147. (gen1 (make-polywave 0.0 '(1 .1 2 .5 3 .2 4 .1 6 .05 8 .03)))
  6148. (vib (make-blackman 320 4))
  6149. (scl (hz->radians 200)))
  6150. (do ((i start (+ i 1)))
  6151. ((= i stop))
  6152. (let ((vb (blackman vib)))
  6153. (outa i (* (env ampf)
  6154. (+ .4 (* .6 vb))
  6155. (polywave gen1 (+ (env frqf)
  6156. (* scl vb))))))))))
  6157. (defanimal (song-sparrow-chiff beg amp)
  6158. (let ((dur 0.019))
  6159. (let ((start (seconds->samples beg))
  6160. (stop (seconds->samples (+ beg dur)))
  6161. (ampf (make-env '(0 0 1 1 2 0) :duration dur :scaler amp))
  6162. (frqf (make-env '(0 4800 .4 5500 .6 6060 .9 4200 1 4100)
  6163. :duration dur :scaler (hz->radians 0.32)))
  6164. (gen1 (make-polywave 0.0 '(3 .7 4 .3 7 .01))))
  6165. (do ((i start (+ i 1)))
  6166. ((= i stop))
  6167. (outa i (* (env ampf)
  6168. (polywave gen1 (env frqf))))))))
  6169. (song-sparrow-little-buzz beg1 (* .25 amp1))
  6170. (song-sparrow-clear-tone (+ beg1 0.2) 1.0 (* 0.9 amp1))
  6171. (song-sparrow-little-buzz (+ beg1 .37) (* .4 amp1))
  6172. (song-sparrow-clear-tone (+ beg1 0.57) 1.0 amp1)
  6173. (do ((amps (vector .14 .33 .37 .37 .30 .30 .30))
  6174. (i 0 (+ i 1))
  6175. (x 0.68 (+ x .1)))
  6176. ((= i 7))
  6177. (song-sparrow-sweep-tone (+ beg1 x) (* (amps i) amp1))
  6178. (song-sparrow-sweep-caw (+ beg1 x .05) (* 0.5 amp1)))
  6179. (song-sparrow-sweep-tone (+ beg1 1.37) (* .27 amp1))
  6180. (song-sparrow-big-buzz (+ beg1 1.44) (* 0.75 amp1))
  6181. (song-sparrow-2nd-buzz (+ 1.73 beg1) (* .25 amp1))
  6182. (song-sparrow-sweep-up (+ 1.8 beg1) (* .5 amp1))
  6183. (song-sparrow-chiff (+ 1.92 beg1) (* .3 amp1))
  6184. (song-sparrow-sweep-down (+ beg1 1.96) (* .3 amp1))
  6185. (song-sparrow-clear-tone (+ beg1 2.22) 0.86 (* .8 amp1)))
  6186. ;; (with-sound (:play #t) (song-sparrow 0 .5))
  6187. ;;; --------------------------------------------------------------------------------
  6188. ;;;
  6189. ;;; Burrowing owl
  6190. (defanimal (burrowing-owl beg amp)
  6191. (let ((dur 0.6))
  6192. (let ((start (seconds->samples beg))
  6193. (stop (seconds->samples (+ beg dur)))
  6194. (ampf (make-env '(0.000 0.000 0.038 0.510 0.060 0.743 0.082 0.822 0.114 0.775 0.125 0.692 0.204 0.000
  6195. 0.416 0.000 0.465 0.858 0.500 1.000 0.571 0.921 0.611 0.937 0.927 0.526 1.000 0.000)
  6196. :duration dur :scaler amp))
  6197. (frqf (make-env '(0.000 0.029 0.035 0.108 0.045 0.133 0.091 0.135 0.129 0.132 0.176 0.107 0.190 0.043
  6198. 0.424 0.046 0.446 0.110 0.468 0.133 0.75 .133 0.8 .129 0.936 0.127 0.973 0.104 1.000 0.035)
  6199. :duration dur :scaler (hz->radians 6800.0)))
  6200. (rnd (make-rand-interp 200 (hz->radians 5)))
  6201. (gen1 (make-polywave 0.0 '(1 .92 2 .08)))
  6202. (gen2 (make-polywave 0.0 '(3 .01 4 .01 6 .005 7 .007 8 .002 9 .002 10 .002 12 .001)))
  6203. (ampf2 (make-env '(0 0 .05 0 .09 1 .13 1 .2 0 .45 0 .5 1 .9 1 1 0) :duration dur))
  6204. (gen3 (make-oscil))
  6205. (ampf3 (make-env '(0 0 .08 0 .12 .4 .2 0 .46 0 .5 .5 .6 0 .65 0 .8 1 .9 1 1 0) :duration dur :scaler .015)))
  6206. (do ((i start (+ i 1)))
  6207. ((= i stop))
  6208. (let ((frq (+ (env frqf)
  6209. (rand-interp rnd))))
  6210. (outa i (* (env ampf)
  6211. (+ (polywave gen1 frq)
  6212. (* (env ampf2)
  6213. (polywave gen2 frq))
  6214. (* (env ampf3)
  6215. (oscil gen3 (* 5.0 frq)))))))))))
  6216. ;; (with-sound (:play #t) (burrowing-owl 0 .5))
  6217. ;;; --------------------------------------------------------------------------------
  6218. ;;;
  6219. ;;; Gray vireo
  6220. ;;;
  6221. ;;; (I didn't really intend to do 5 of these calls)
  6222. (defanimal (gray-vireo-1 beg amp)
  6223. (let ((dur 0.23))
  6224. (let ((start (seconds->samples beg))
  6225. (stop (seconds->samples (+ beg dur)))
  6226. (ampf (make-env '(0.000 0.000 0.059 0.052 0.078 0.132 0.085 0.076 0.099 0.100 0.108 0.260 0.125 0.102
  6227. 0.134 0.280 0.143 0.254 0.146 0.306 0.158 0.197 0.184 0.403 0.193 0.403 0.201 0.180
  6228. 0.208 0.239 0.217 0.375 0.222 0.000 0.229 0.232 0.237 0.158 0.254 0.800 0.263 0.846
  6229. 0.307 0.785 0.322 0.850 0.334 1.000 0.350 0.731 0.357 0.822 0.369 0.599 0.378 0.711
  6230. 0.384 0.375 0.389 0.688 0.393 0.315 0.396 0.657 0.410 0.291 0.419 0.414 0.491 0.412
  6231. 0.566 0.258 0.593 0.06 0.659 0.01 0.754 0.06 0.772 0.245 0.854 0.523 0.892 0.330
  6232. 0.932 0.436 0.947 0.182 0.957 0.228 0.981 0.063 1.000 0.000)
  6233. :duration dur :scaler amp))
  6234. (frqf (make-env '(0.000 0.203 0.033 0.198 0.051 0.218 0.064 0.189 0.085 0.226 0.101 0.187 0.116 0.214
  6235. 0.133 0.183 0.199 0.172 0.216 0.186 0.242 0.288 0.256 0.330 0.297 0.330 0.324 0.316
  6236. 0.441 0.243 0.506 0.215 0.556 0.206 0.690 0.107 0.721 0.104 0.739 0.136 0.769 0.215
  6237. 0.796 0.266 0.833 0.282 1.000 0.29)
  6238. :duration dur :scaler (hz->radians 10250.0)))
  6239. (gen1 (make-oscil))
  6240. (gen2 (make-oscil))
  6241. (interpf (make-env '(0 .5 .2 .1 .25 .99 .6 .95 .7 .3 .75 .99 1 .99) :duration dur))
  6242. (interpf-1 (make-env '(0 .5 .2 .1 .25 .99 .6 .95 .7 .3 .75 .99 1 .99) :duration dur :offset 1.0 :scaler -1.0)))
  6243. (do ((i start (+ i 1)))
  6244. ((= i stop))
  6245. (let ((frq (env frqf)))
  6246. (outa i (* (env ampf)
  6247. (+ (* (env interpf) (oscil gen1 frq))
  6248. (* (env interpf-1) (oscil gen2 (* 2.0 frq)))))))))))
  6249. ;; (with-sound (:play #t) (gray-vireo-1 0 .5))
  6250. (defanimal (gray-vireo-2 beg amp)
  6251. ;; probably calif2 18 4
  6252. (let ((dur 0.23))
  6253. (let ((start (seconds->samples beg))
  6254. (stop (seconds->samples (+ beg dur)))
  6255. (ampf (make-env '(0.000 0.000 0.026 0.099 0.067 0.176 0.097 0.111 0.110 0.199 0.147 0.096 0.186 0.110
  6256. 0.214 0.068 0.228 0.113 0.245 0.069 0.254 0.097 0.264 0.209 0.274 0.143 0.291 0.096
  6257. 0.301 0.250 0.315 0.347 0.332 0.166 0.343 0.144 0.353 0.369 0.364 0.446 0.371 0.429
  6258. 0.390 0.196 0.403 0.383 0.411 0.495 0.434 0.372 0.442 0.192 0.456 0.449 0.471 0.364
  6259. 0.479 0.505 0.486 0.487 0.492 0.413 0.500 0.455 0.509 0.323 0.515 0.361 0.519 0.212
  6260. 0.524 0.259 0.529 0.469 0.548 0.549 0.562 0.235 0.565 0.316 0.576 0.385 0.582 0.488
  6261. 0.594 0.493 0.600 0.402 0.612 0.355 0.616 0.414 0.624 0.306 0.636 0.289 0.641 0.223
  6262. 0.648 0.349 0.655 0.287 0.674 0.325 0.682 0.270 0.691 0.133 0.712 0.275 0.726 0.319
  6263. 0.743 0.578 0.765 0.722 0.776 0.651 0.796 1.000 0.808 0.686 0.816 0.556 0.825 0.826
  6264. 0.833 0.527 0.835 0.725 0.848 0.281 0.855 0.639 0.861 0.405 0.863 0.485 0.869 0.250
  6265. 0.871 0.414 0.876 0.193 0.882 0.468 0.886 0.443 0.894 0.141 0.897 0.312 0.901 0.181
  6266. 0.903 0.435 0.907 0.339 0.910 0.432 0.937 0.399 0.949 0.234 0.974 0.243 0.993 0.159 1.000 0.000)
  6267. :duration dur :scaler amp))
  6268. (frqf (make-env '(0.000 0.260 0.040 0.245 0.091 0.203 0.122 0.174 0.152 0.221 0.174 0.240 0.190 0.297
  6269. 0.211 0.232 0.227 0.284 0.248 0.250 0.261 0.331 0.289 0.260 0.304 0.333 0.321 0.336
  6270. 0.337 0.286 0.356 0.349 0.371 0.346 0.386 0.299 0.406 0.359 0.422 0.359 0.439 0.307
  6271. 0.460 0.383 0.474 0.380 0.489 0.352 0.513 0.414 0.533 0.378 0.546 0.385 0.564 0.432
  6272. 0.582 0.383 0.598 0.393 0.609 0.435 0.678 0.430 0.719 0.466 0.780 0.518 0.821 0.560
  6273. 0.856 0.620 0.922 0.677 1.000 0.701)
  6274. :duration dur :scaler (hz->radians 6030.0)))
  6275. (gen1 (make-oscil))
  6276. (gen2 (make-oscil))
  6277. (gen3 (make-oscil))
  6278. (interpf (make-env '(0 .1 .2 .1 .3 .99 1 .99) :duration dur))
  6279. (interpf-1 (make-env '(0 .1 .2 .1 .3 .99 1 .99) :duration dur :offset 1.0 :scaler -0.5)))
  6280. (do ((i start (+ i 1)))
  6281. ((= i stop))
  6282. (let ((frq (env frqf)))
  6283. (outa i (* (env ampf)
  6284. (+ (* (env interpf) (oscil gen1 frq))
  6285. (* (env interpf-1)
  6286. (+ (oscil gen2 (* 2.0 frq))
  6287. (oscil gen3 (* 3.0 frq))))))))))))
  6288. ;; (with-sound (:play #t) (gray-vireo-2 0 .5))
  6289. (defanimal (gray-vireo-3 beg amp)
  6290. ;; south 44 4
  6291. ;; part 1 -- I could not find a way to get this right short of brute force additive synthesis
  6292. (let ((dur 0.1))
  6293. (let ((start (seconds->samples beg))
  6294. (stop (seconds->samples (+ beg dur)))
  6295. (ampf (make-env '(0.000 0.000 0.167 0.561 0.210 0.243 0.245 0.298 0.272 0.793 0.437 0.171 0.572 0.296
  6296. 0.604 0.202 0.734 0.599 0.759 0.597 0.829 0.425 0.881 0.843 1.000 0.000)
  6297. :duration dur :scaler (* 0.2 amp)))
  6298. (frqf (make-env '(0.000 0.260 0.060 0.301 0.100 0.371 0.151 0.442 0.191 0.465 0.251 0.447 0.313 0.365
  6299. 0.381 0.266 0.458 0.228 0.546 0.231 0.632 0.243 0.708 0.275 0.792 0.310 0.855 0.339
  6300. 0.899 0.389 0.934 0.404 0.964 0.398 1.000 0.363)
  6301. :duration dur :scaler (hz->radians (* 1/3 11500.0))))
  6302. (ampfs (make-vector 5)))
  6303. (set! (ampfs 0) (make-env '(0.000 0.000 0.061 0.000 0.201 0.997 0.278 0.997 0.441 0.000 0.662 0.000
  6304. 0.783 0.456 0.864 0.459 0.970 0.000 1.000 0.000)
  6305. :duration dur :scaler .1))
  6306. (set! (ampfs 1) (make-env '(0.000 0.000 0.153 0.639 0.307 0.639 0.457 0.109 0.617 0.107 0.739 1.000
  6307. 0.913 1.000 1.000 0.298)
  6308. :duration dur :scaler .4))
  6309. (set! (ampfs 2) (make-env '(0.000 0.000 0.190 0.842 0.266 0.514 0.297 1.000 0.456 0.257 0.599 0.260
  6310. 0.670 0.702 0.707 0.579 0.739 0.710 0.808 0.325 0.865 0.519 1.000 0.402)
  6311. :duration dur :scaler .2))
  6312. (set! (ampfs 3) (make-env '(0.000 0.000 0.064 0.077 0.157 0.653 0.255 0.699 0.311 0.995 0.352 0.615
  6313. 0.389 0.986 0.458 0.178 0.667 0.363 0.750 0.000 1.000 0.000)
  6314. :duration dur :scaler .07))
  6315. (set! (ampfs 4) (make-env '(0.000 0.000 0.159 0.995 0.314 0.997 0.598 0.000 1.000 0.000)
  6316. :duration dur :scaler .01))
  6317. (let ((frqs (make-float-vector 5))
  6318. (amps (make-float-vector 5)))
  6319. (let ((obank (make-oscil-bank frqs (make-float-vector 5) amps)))
  6320. (do ((i start (+ i 1)))
  6321. ((= i stop))
  6322. (let ((frq (env frqf)))
  6323. (do ((k 0 (+ k 1))
  6324. (f frq (+ f frq)))
  6325. ((= k 5))
  6326. (set! (amps k) (env (vector-ref ampfs k)))
  6327. (set! (frqs k) f))
  6328. (outa i (* (env ampf) (oscil-bank obank)))))))))
  6329. ;; part 2
  6330. (let ((dur 0.137))
  6331. (let ((start (seconds->samples (+ beg 0.1)))
  6332. (stop (seconds->samples (+ beg 0.1 dur)))
  6333. (ampf (make-env '(0.000 0.000 0.042 0.123 0.086 0.399 0.155 0.626 0.176 0.169 0.190 0.691 0.205 0.877
  6334. 0.224 0.552 0.246 0.828 0.274 0.978 0.319 0.937 0.356 0.893 0.410 0.866 0.461 0.956
  6335. 0.565 0.784 0.622 0.311 0.648 0.423 0.671 0.279 0.688 0.096 0.705 0.328 0.713 0.284
  6336. 0.725 0.096 0.807 0.254 0.844 0.134 1.000 0.000)
  6337. :duration dur :scaler amp))
  6338. (frqf (make-env '(0.000 0.493 0.034 0.542 0.048 0.550 0.066 0.515 0.102 0.485 0.151 0.463 0.168 0.431
  6339. 0.181 0.455 0.198 0.450 0.216 0.436 0.232 0.439 0.444 0.439 0.572 0.444 0.703 0.463
  6340. 0.800 0.472 1.000 0.458)
  6341. :duration dur :scaler (hz->radians 7300.0)))
  6342. (gen1 (make-polywave 0.0 '(1 .95 2 .01 3 .02 4 .005))))
  6343. (do ((i start (+ i 1)))
  6344. ((= i stop))
  6345. (outa i (* (env ampf)
  6346. (polywave gen1 (env frqf))))))))
  6347. ;; (with-sound (:play #t) (gray-vireo-3 0 .5))
  6348. (defanimal (gray-vireo-4 beg amp)
  6349. (let ((dur 0.23))
  6350. (let ((start (seconds->samples beg))
  6351. (stop (seconds->samples (+ beg dur)))
  6352. (ampf (make-env '(0.000 0.000 0.081 0.163 0.123 0.184 0.185 0.447 0.204 0.081 0.230 0.626 0.245 0.607
  6353. 0.271 0.398 0.293 0.130 0.305 0.347 0.326 0.444 0.339 0.279 0.349 0.382 0.366 0.751
  6354. 0.388 0.347 0.405 0.965 0.417 0.783 0.435 0.992 0.452 0.737 0.471 0.916 0.523 0.702
  6355. 0.534 0.526 0.543 0.770 0.563 0.496 0.581 0.558 0.625 0.393 0.646 0.439 0.712 0.388
  6356. 0.761 0.455 0.832 0.141 0.845 0.081 0.875 0.106 0.911 0.068 0.959 0.154 1.000 0.000)
  6357. :duration dur :scaler amp))
  6358. (frqf (make-env '(0.000 0.534 0.054 0.509 0.089 0.480 0.128 0.447 0.168 0.477 0.195 0.531 0.224 0.661
  6359. 0.240 0.507 0.278 0.350 0.304 0.295 0.319 0.333 0.334 0.409 0.352 0.369 0.370 0.442
  6360. 0.398 0.431 0.414 0.504 0.485 0.493 0.563 0.458 0.621 0.431 0.697 0.423 0.814 0.409
  6361. 1.000 0.420)
  6362. :duration dur :scaler (hz->radians 6230.0)))
  6363. (gen1 (make-polywave 0.0 '(1 .98 2 .003 3 .007)))
  6364. (ampf1 (make-env '(0 0 .22 0 .23 1 1 1) :duration dur))
  6365. (gen2 (make-polywave 0.0 '(1 .05 2 .9 3 .1 4 .07)))
  6366. (ampf2 (make-env '(0 1 .2 1 .22 0 1 0) :duration dur)))
  6367. (do ((i start (+ i 1)))
  6368. ((= i stop))
  6369. (let ((frq (env frqf)))
  6370. (outa i (* (env ampf)
  6371. (+ (* (env ampf1)
  6372. (polywave gen1 frq))
  6373. (* (env ampf2)
  6374. (polywave gen2 (* 0.5 frq)))))))))))
  6375. ;; (with-sound (:play #t) (gray-vireo-4 0 .5))
  6376. (defanimal (gray-vireo-5 beg amp)
  6377. (let ((dur 0.256))
  6378. (let ((start (seconds->samples beg))
  6379. (stop (seconds->samples (+ beg dur)))
  6380. (ampf (make-env '(0.000 0.000 0.010 0.160 0.025 0.133 0.044 0.301 0.060 0.314 0.072 0.724 0.085 0.678
  6381. 0.088 0.374 0.106 0.634 0.114 0.930 0.127 0.718 0.141 1.000 0.175 0.233 0.220 0.528
  6382. 0.244 0.496 0.270 0.648 0.320 0.564 0.353 0.393 0.376 0.667 0.443 0.623 0.493 0.447
  6383. 0.524 0.474 0.570 0.287 0.583 0.320 0.682 0.117 0.856 0.079 0.933 0.057 1.000 0.000)
  6384. :duration dur :scaler amp))
  6385. (frqf (make-env '(0.000 0.371 0.029 0.393 0.047 0.428 0.074 0.425 0.097 0.333 0.116 0.206 0.149 0.168
  6386. 0.192 0.190 0.242 0.214 0.314 0.217 0.437 0.198 0.876 0.165 1.000 0.146)
  6387. :duration dur :scaler (hz->radians 11150.0)))
  6388. (gen1 (make-polywave 0.0 '(1 .98 2 .01 4 .005)))
  6389. (ampf1 (make-env '(0 1 .09 1 .14 .1 .2 1 .6 .8 .9 .8 1 1) :duration dur))
  6390. (gen2 (make-oscil))
  6391. (ampf2 (make-env '(0 0 .09 0 .14 1 .18 1 .23 0 .6 0 .7 .4 1 0) :duration dur :scaler .5))
  6392. (gen3 (make-oscil))
  6393. (ampf3 (make-env '(0 0 .2 0 .25 1 .5 1 .6 0 1 0) :duration dur :scaler .01)))
  6394. (do ((i start (+ i 1)))
  6395. ((= i stop))
  6396. (let ((frq (env frqf)))
  6397. (outa i (* (env ampf)
  6398. (+ (* (env ampf1)
  6399. (polywave gen1 frq))
  6400. (* (env ampf2)
  6401. (oscil gen2 (* frq 2)))
  6402. (* (env ampf3)
  6403. (oscil gen3 (* frq 3)))))))))))
  6404. ;; (with-sound (:play #t) (gray-vireo-5 0 .5))
  6405. (define (gray-vireo beg amp)
  6406. (gray-vireo-3 beg amp)
  6407. (gray-vireo-4 (+ beg 1.1) amp)
  6408. (gray-vireo-5 (+ beg 2.1) amp))
  6409. ;; (with-sound (:play #t) (gray-vireo 0 .5))
  6410. ;;; --------------------------------------------------------------------------------
  6411. ;;;
  6412. ;;; Bald eagle
  6413. (define (bald-eagle beg amp)
  6414. (defanimal (bald-eagle-1 beg amp)
  6415. (let ((dur 0.153))
  6416. (let ((start (seconds->samples beg))
  6417. (stop (seconds->samples (+ beg dur)))
  6418. (ampf (make-env '(0.000 0.000 0.016 0.145 0.042 0.773 0.084 0.471 0.097 0.265 0.112 0.124 0.123 0.297
  6419. 0.134 0.937 0.151 0.665 0.166 0.810 0.194 0.733 0.228 0.218 0.244 0.059 0.269 0.373
  6420. 0.280 0.621 0.292 0.597 0.314 0.681 0.368 0.241 0.389 0.332 0.411 0.688 0.431 0.674
  6421. 0.447 0.539 0.477 0.452 0.517 0.572 0.534 0.550 0.555 0.455 0.576 0.457 0.597 0.494
  6422. 0.613 0.391 0.630 0.073 0.648 0.164 0.671 0.119 0.680 0.014 0.700 0.077 0.737 0.045
  6423. 0.757 0.075 0.803 0.024 0.817 0.065 0.855 0.028 0.866 0.063 0.906 0.033 0.973 0.042 1.000 0.000)
  6424. :duration dur :scaler amp))
  6425. (frqf1 (make-env '(0.000 0.268 0.042 0.273 0.132 0.280 0.281 0.280 0.409 0.273 0.609 0.282 0.686 0.289 1.000 0.273)
  6426. :duration dur :scaler (hz->radians 10000.0)))
  6427. (frqf2 (make-env '(0.000 0.541 0.050 0.543 0.130 0.555 0.202 0.559 0.271 0.568 0.413 0.534 0.522 0.543
  6428. 0.586 0.559 0.638 0.582 0.706 0.566 0.791 0.539 0.852 0.516 0.922 0.466 0.962 0.400 1.000 0.309)
  6429. :duration dur :scaler (hz->radians 10000.0)))
  6430. (gen1 (make-polywave 0.0 '(1 .98 3 .02)))
  6431. (gen2 (make-polywave 0.0 '(1 .95 2 .05)))
  6432. (intrpf (make-env '(0 .9 .6 .9 .7 .5 1 .5) :duration dur))
  6433. (intrpf-1 (make-env '(0 .9 .6 .9 .7 .5 1 .5) :duration dur :offset 1.0 :scaler -1.0))
  6434. (rnd (make-rand-interp 2000 ))
  6435. (rndf (make-env '(0 0 .02 0 .04 1 .06 0 .13 0 .135 1 .14 0 .27 0 .276 1 .28 0 .4 0 .405 1 .41 0 .678 0 .682 1 1 1)
  6436. :duration dur :offset (hz->radians 40) :scaler (hz->radians 100))))
  6437. (do ((i start (+ i 1)))
  6438. ((= i stop))
  6439. (let ((noise (* (env rndf) (rand-interp rnd))))
  6440. (outa i (* (env ampf)
  6441. (+ (* (env intrpf) (polywave gen1 (+ (env frqf1) noise)))
  6442. (* (env intrpf-1) (polywave gen2 (+ (env frqf2) (* 2.0 noise))))))))))))
  6443. (defanimal (bald-eagle-2 beg amp)
  6444. (let ((dur 0.074))
  6445. (let ((start (seconds->samples beg))
  6446. (stop (seconds->samples (+ beg dur)))
  6447. (ampf (make-env '(0.000 0.000 0.045 0.084 0.073 0.223 0.176 0.395 0.207 1.000 0.245 0.616 0.276 0.093
  6448. 0.301 0.325 0.349 0.316 0.396 0.211 0.445 0.075 0.643 0.145 0.777 0.170 0.804 0.291
  6449. 0.848 0.164 1.000 0.000)
  6450. :duration dur :scaler amp))
  6451. (frqf (make-env '(0.000 0.752 0.065 0.617 0.116 0.597 0.140 0.513 0.158 0.420 0.177 0.273 0.255 0.285
  6452. 0.351 0.285 0.393 0.285 0.467 0.287 0.518 0.293 0.582 0.301 0.638 0.163 0.690 0.225
  6453. 0.752 0.282 0.800 0.262 0.875 0.268 1.000 0.290)
  6454. :duration dur :scaler (hz->radians 10100.0)))
  6455. (gen1 (make-polywave 0.0 '(1 .99 2 .01)))
  6456. (rnd (make-rand-interp 2000))
  6457. (rndf (make-env '(0 0 .16 0 .25 1 1 .5) :duration dur :offset (hz->radians 100) :scaler (hz->radians 500))))
  6458. (do ((i start (+ i 1)))
  6459. ((= i stop))
  6460. (outa i (* (env ampf)
  6461. (polywave gen1 (+ (env frqf)
  6462. (* (env rndf)
  6463. (rand-interp rnd))))))))))
  6464. (defanimal (bald-eagle-3 beg amp)
  6465. (let ((dur 0.074))
  6466. (let ((start (seconds->samples beg))
  6467. (stop (seconds->samples (+ beg dur)))
  6468. (ampf (make-env '(0.000 0.000 0.048 0.225 0.130 0.273 0.170 0.507 0.190 1.000 0.204 0.775 0.259 0.761
  6469. 0.318 0.349 0.361 0.501 0.447 0.045 0.476 0.375 0.539 0.476 0.560 0.679 0.593 0.670
  6470. 0.613 0.583 0.668 0.028 0.684 0.177 0.727 0.068 0.741 0.400 0.766 0.504 0.784 0.372
  6471. 0.826 0.400 0.857 0.318 0.879 0.085 0.937 0.045 0.979 0.073 1.000 0.000)
  6472. :duration dur :scaler amp))
  6473. (frqf (make-env '(0.000 0.449 0.076 0.410 0.122 0.325 0.150 0.195 0.190 0.195 0.255 0.198 0.371 0.198
  6474. 0.436 0.198 0.465 0.215 0.521 0.203 0.745 0.198 1.000 0.195)
  6475. :duration dur :scaler (hz->radians 14000.0)))
  6476. (gen1 (make-polywave 0.0 '(1 .99 3 .01)))
  6477. (gen2 (make-polywave 0.0 '(1 .9 2 .1)))
  6478. (ampf2 (make-env '(0 0 .2 0 .25 1 .3 1 .35 0 .5 0 .55 1 .6 1 .65 0 .75 0 .8 .5 .9 0 1 0) :scaler .1 :duration dur))
  6479. (rnd (make-rand-interp 2000 (hz->radians 200))))
  6480. (do ((i start (+ i 1)))
  6481. ((= i stop))
  6482. (let ((frq (+ (env frqf)
  6483. (rand-interp rnd))))
  6484. (outa i (* (env ampf)
  6485. (+ (polywave gen1 frq)
  6486. (* (env ampf2)
  6487. (polywave gen2 (* 2.0 frq)))))))))))
  6488. (defanimal (bald-eagle-4 beg frqscl amp)
  6489. (let ((dur 0.056))
  6490. (let ((start (seconds->samples beg))
  6491. (stop (seconds->samples (+ beg dur)))
  6492. (ampf (make-env '(0.000 0.000 0.079 0.116 0.125 0.198 0.154 0.867 0.190 0.994 0.214 0.743 0.260 0.867
  6493. 0.282 0.802 0.315 0.825 0.330 0.636 0.371 0.678 0.423 0.825 0.468 0.734 0.504 0.542
  6494. 0.549 0.619 0.595 0.960 0.637 0.686 0.669 0.130 0.772 0.418 0.823 0.147 0.890 0.056
  6495. 0.929 0.090 1.000 0.000)
  6496. :duration dur :scaler amp))
  6497. (frqf (make-env '(0.000 0.215 0.035 0.243 0.060 0.285 0.086 0.268 0.121 0.198 0.135 0.137 0.154 0.167
  6498. 0.218 0.186 0.880 0.181 1.000 0.192)
  6499. :duration dur :scaler (hz->radians (* frqscl 13920))))
  6500. (gen1 (make-polywave 0.0 '(1 .96 2 .04 3 .007 4 .002)))
  6501. (rnd (make-rand-interp 4000 (hz->radians 100))))
  6502. (do ((i start (+ i 1)))
  6503. ((= i stop))
  6504. (outa i (* (env ampf) (polywave gen1 (+ (env frqf) (rand-interp rnd)))))))))
  6505. (bald-eagle-1 beg (* amp .8))
  6506. (bald-eagle-2 (+ beg .195) (* amp .7))
  6507. (bald-eagle-3 (+ beg .32) (* amp .7))
  6508. (bald-eagle-4 (+ beg .47) 1.1 amp)
  6509. (bald-eagle-4 (+ beg .63) 1.05 amp)
  6510. (bald-eagle-4 (+ beg .806) 1.0 amp))
  6511. ;; (with-sound (:play #t) (bald-eagle 0 .5))
  6512. ;;; --------------------------------------------------------------------------------
  6513. ;;;
  6514. ;;; Eastern meadowlark
  6515. (defanimal (eastern-meadowlark beg amp)
  6516. (let ((dur 1.65))
  6517. (let ((start (seconds->samples beg))
  6518. (stop (seconds->samples (+ beg dur)))
  6519. (ampf (make-env '(0.000 0.000 0.011 0.304 0.022 0.310 0.032 0.162 0.039 0.000 0.121 0.000 0.136 0.148
  6520. 0.145 0.138 0.152 0.184 0.170 0.430 0.188 0.406 0.213 0.556 0.244 0.700 0.273 0.999
  6521. 0.280 0.992 0.293 0.000 0.335 0.000 0.341 0.169 0.356 0.786 0.369 0.941 0.389 0.689
  6522. 0.399 0.622 0.430 0.515 0.480 0.426 0.494 0.000 0.518 0.000 0.524 0.383 0.528 0.017
  6523. 0.540 0.446 0.549 0.000 0.585 0.000 0.591 0.113 0.610 0.134 0.631 0.175 0.644 0.261
  6524. 0.656 0.212 0.665 0.282 0.680 0.196 0.691 0.233 0.702 0.182 0.715 0.226 0.726 0.281
  6525. 0.733 0.268 0.747 0.370 0.753 0.328 0.760 0.450 0.767 0.402 0.770 0.469 0.777 0.412
  6526. 0.795 0.714 0.812 0.515 0.825 0.444 0.839 0.250 0.843 0.015 0.852 0.295 0.856 0.254
  6527. 0.858 0.045 0.863 0.008 0.867 0.075 0.870 0.279 0.878 0.304 0.891 0.189 0.910 0.115
  6528. 0.932 0.068 0.960 0.034 1.000 0.000)
  6529. :duration dur :scaler amp))
  6530. (frqf (make-env '(0.000 0.197 0.051 0.192 0.097 0.437 0.129 0.421 0.201 0.371 0.285 0.332 0.325 0.343
  6531. 0.341 0.358 0.386 0.269 0.410 0.245 0.481 0.231 0.524 0.229 0.533 0.214 0.557 0.214
  6532. 0.576 0.231 0.579 0.725 0.588 0.710 0.594 0.635 0.606 0.596 0.644 0.509 0.724 0.439
  6533. 0.756 0.397 0.800 0.297 0.825 0.264 0.851 0.271 0.870 0.275 0.892 0.214 0.925 0.194 1.000 0.197)
  6534. :duration dur :scaler (hz->radians 10280.0)))
  6535. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01 4 .005 5 .002)))
  6536. (buzz (make-oscil 350))
  6537. (buzzf (make-env '(0 0 .59 0 .6 1 .61 1 .64 0 1 0) :duration dur :scaler (hz->radians 300))))
  6538. (do ((i start (+ i 1)))
  6539. ((= i stop))
  6540. (outa i (* (env ampf)
  6541. (polywave gen1 (+ (env frqf)
  6542. (* (env buzzf)
  6543. (oscil buzz))))))))))
  6544. ;; (with-sound (:play #t) (eastern-meadowlark 0 .5))
  6545. ;;; --------------------------------------------------------------------------------
  6546. ;;;
  6547. ;;; Yellow-green vireo
  6548. (defanimal (yellow-green-vireo beg amp)
  6549. ;; south 48 3.5
  6550. (let ((dur 0.22))
  6551. (let ((start (seconds->samples beg))
  6552. (stop (seconds->samples (+ beg dur)))
  6553. (ampf (make-env '(0.000 0.000 0.054 0.070 0.083 0.403 0.109 0.142 0.137 0.558 0.155 0.682 0.173 0.408
  6554. 0.183 0.915 0.213 0.879 0.236 1.000 0.290 0.938 0.309 0.257 0.311 0.800 0.321 0.384
  6555. 0.329 0.607 0.337 0.117 0.345 0.930 0.357 0.155 0.390 0.329 0.395 0.486 0.418 0.359
  6556. 0.436 0.274 0.493 0.384 0.518 0.363 0.529 0.276 0.542 0.471 0.567 0.490 0.573 0.361
  6557. 0.587 0.618 0.595 0.380 0.600 0.722 0.609 0.365 0.622 0.845 0.652 0.193 0.665 0.913
  6558. 0.715 0.713 0.731 0.837 0.745 0.486 0.753 0.826 0.764 0.713 0.780 0.204 0.787 0.437
  6559. 0.799 0.053 0.816 0.255 0.859 0.501 0.885 0.735 0.910 0.378 0.924 0.724 0.958 0.098
  6560. 0.966 0.197 1.000 0.000)
  6561. :duration dur :scaler amp))
  6562. (frqf (make-env '(0.000 0.310 0.043 0.321 0.074 0.470 0.095 0.523 0.113 0.544 0.138 0.513 0.170 0.451
  6563. 0.224 0.413 0.291 0.418 0.314 0.451 0.330 0.392 0.348 0.340 0.369 0.298 0.392 0.278
  6564. 0.442 0.262 0.515 0.266 0.574 0.295 0.617 0.338 0.647 0.380 0.672 0.418 0.692 0.439
  6565. 0.738 0.454 0.793 0.464 0.843 0.464 0.890 0.477 0.923 0.490 0.955 0.494 0.978 0.475
  6566. 1.000 0.433)
  6567. :duration dur :scaler (hz->radians 10000.0)))
  6568. (gen1 (make-polywave 0.0 '(1 .98 2 .003 3 .02))))
  6569. (do ((i start (+ i 1)))
  6570. ((= i stop))
  6571. (outa i (* (env ampf)
  6572. (polywave gen1 (env frqf))))))))
  6573. ;; (with-sound (:play #t) (yellow-green-vireo 0 .5))
  6574. ;;; --------------------------------------------------------------------------------
  6575. ;;;
  6576. ;;; Magnolia warbler
  6577. (defanimal (magnolia-warbler beg amp)
  6578. ;; east 13 3
  6579. (let ((dur 0.96))
  6580. (let ((start (seconds->samples beg))
  6581. (stop (seconds->samples (+ beg dur)))
  6582. (ampf (make-env '(0.000 0.000 0.018 0.030 0.034 0.085 0.060 0.000 0.071 0.040 0.087 0.058 0.105 0.137
  6583. 0.110 0.027 0.118 0.000 0.176 0.000 0.211 0.076 0.226 0.218 0.229 0.366 0.240 0.419
  6584. 0.252 0.088 0.261 0.000 0.300 0.000 0.321 0.391 0.325 0.340 0.330 0.490 0.336 0.516
  6585. 0.338 0.482 0.342 0.620 0.344 0.364 0.346 0.600 0.357 0.562 0.365 0.000 0.370 0.059
  6586. 0.384 0.542 0.387 0.484 0.393 0.626 0.406 0.788 0.422 0.000 0.458 0.000 0.474 0.186
  6587. 0.490 0.246 0.498 0.275 0.511 0.541 0.513 0.475 0.526 0.917 0.536 0.633 0.539 0.698
  6588. 0.554 0.000 0.593 0.000 0.610 0.414 0.613 0.794 0.617 0.689 0.619 0.847 0.625 0.942
  6589. 0.628 0.480 0.631 0.904 0.636 0.814 0.653 0.000 0.657 0.083 0.671 0.768 0.675 0.655
  6590. 0.679 0.801 0.686 0.999 0.695 0.818 0.704 0.000 0.734 0.000 0.750 0.657 0.756 0.797
  6591. 0.762 0.750 0.768 0.581 0.772 0.970 0.778 0.869 0.783 0.710 0.789 0.573 0.796 0.549
  6592. 0.805 0.251 0.807 0.524 0.816 0.199 0.823 0.257 0.831 0.541 0.841 0.565 0.847 0.847
  6593. 0.852 0.653 0.856 0.511 0.861 0.429 0.866 0.472 0.871 0.285 0.876 0.463 0.882 0.216
  6594. 0.887 0.387 0.891 0.311 0.895 0.369 0.902 0.301 0.905 0.359 0.912 0.326 0.915 0.410
  6595. 0.919 0.369 0.924 0.394 0.925 0.357 0.932 0.398 0.952 0.277 0.973 0.064 1.000 0.000)
  6596. :duration dur :scaler amp))
  6597. (frqf (make-env '(0.000 0.530 0.020 0.591 0.048 0.447 0.055 0.754 0.073 0.660 0.101 0.579 0.108 0.519
  6598. 0.180 0.349 0.196 0.348 0.212 0.359 0.223 0.440 0.233 0.499 0.243 0.414 0.258 0.268
  6599. 0.287 0.268 0.297 0.523 0.306 0.532 0.317 0.558 0.328 0.575 0.341 0.512 0.353 0.458
  6600. 0.365 0.773 0.379 0.660 0.392 0.606 0.411 0.543 0.455 0.353 0.495 0.353 0.524 0.486
  6601. 0.540 0.386 0.553 0.272 0.571 0.274 0.588 0.471 0.605 0.518 0.620 0.551 0.642 0.425
  6602. 0.650 0.739 0.673 0.628 0.687 0.562 0.700 0.536 0.740 0.433 0.768 0.527 0.800 0.702
  6603. 0.804 0.636 0.811 0.516 0.821 0.421 0.833 0.490 0.845 0.532 0.855 0.621 0.870 0.702
  6604. 0.875 0.638 0.888 0.455 1.000 0.301)
  6605. :duration dur :scaler (hz->radians 10000.0)))
  6606. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01))))
  6607. (do ((i start (+ i 1)))
  6608. ((= i stop))
  6609. (outa i (* (env ampf)
  6610. (polywave gen1 (env frqf))))))))
  6611. ;; (with-sound (:play #t) (magnolia-warbler 0 .5))
  6612. ;;; --------------------------------------------------------------------------------
  6613. ;;;
  6614. ;;; Eastern bluebird
  6615. (define (eastern-bluebird beg1 amp1)
  6616. ;; east 75 10
  6617. (defanimal (eastern-bluebird-1 beg amp)
  6618. (let ((dur 0.285))
  6619. (let ((start (seconds->samples beg))
  6620. (stop (seconds->samples (+ beg dur)))
  6621. (ampf (make-env '(0.000 0.000 0.067 0.103 0.083 0.145 0.134 0.636 0.152 0.615 0.197 0.872 0.238 1.000
  6622. 0.272 1.000 0.298 0.842 0.340 0.889 0.415 0.820 0.455 0.194 0.464 0.400 0.500 0.243
  6623. 0.559 0.267 0.589 0.229 0.635 0.274 0.687 0.835 0.712 0.896 0.805 0.811 0.926 0.759
  6624. 0.972 0.225 1.000 0.000)
  6625. :duration dur :scaler amp))
  6626. (frqf (make-env '(0.000 0.103 0.049 0.138 0.119 0.200 0.198 0.229 0.251 0.234 0.317 0.247 0.422 0.250
  6627. 0.540 0.250 0.643 0.235 0.722 0.229 0.902 0.217 0.936 0.207 0.970 0.150 1.000 0.136)
  6628. :duration dur :scaler (hz->radians 10200.0)))
  6629. (gen1 (make-polywave 0.0 '(1 .8 2 .01 3 .05 4 .01 5 .005)))
  6630. (gen2 (make-polywave 0.0 '(1 .92 2 .01 3 .05 4 .01 5 .005)))
  6631. (ampf2 (make-env '(0 1 .2 0 1 0) :duration dur))
  6632. (rnd (make-nrxysin 200 :n 2 :r .5))
  6633. (rndf (make-env '(0 0 .1 1 .25 0 .45 0 .5 1 .6 0 1 0) :duration dur :scaler (hz->radians 200)))
  6634. (rndfrqf (make-env '(0 1 .45 1 .5 .2 .6 .2 1 0) :duration dur :scaler (hz->radians 200))))
  6635. (do ((i start (+ i 1)))
  6636. ((= i stop))
  6637. (let ((frq (+ (env frqf)
  6638. (* (env rndf)
  6639. (nrxysin rnd (env rndfrqf))))))
  6640. (outa i (* (env ampf)
  6641. (+ (polywave gen1 frq)
  6642. (* (env ampf2)
  6643. (polywave gen2 (* 1.5 frq)))))))))))
  6644. (defanimal (eastern-bluebird-2 beg amp)
  6645. (let ((dur 0.33))
  6646. (let ((start (seconds->samples beg))
  6647. (stop (seconds->samples (+ beg dur)))
  6648. (ampf (make-env '(0.000 0.000 0.023 0.324 0.046 0.438 0.089 0.551 0.136 0.994 0.248 0.978 0.470 0.452
  6649. 0.506 0.432 0.556 0.479 0.629 0.197 0.681 0.211 0.746 0.330 0.791 0.161 0.814 0.180
  6650. 0.828 0.127 0.916 0.291 0.959 0.102 1.000 0.000)
  6651. :duration dur :scaler amp))
  6652. (frqf (make-env '(0.000 0.195 0.019 0.246 0.042 0.294 0.066 0.308 0.093 0.294 0.122 0.254 0.202 0.246
  6653. 0.554 0.237 0.604 0.206 0.643 0.175 0.673 0.184 0.707 0.206 0.743 0.220 0.791 0.201
  6654. 0.832 0.167 0.856 0.198 0.879 0.212 0.918 0.234 0.942 0.209 0.960 0.186 1.000 0.158)
  6655. :duration dur :scaler (hz->radians 10000.0)))
  6656. (gen1 (make-polywave 0.0 '(1 .8 2 .01 3 .05 4 .01 5 .005)))
  6657. (gen2 (make-polywave 0.0 '(2 .01 4 .7 5 .01 6 .01 7 .01 8 .05 9 .01 10 .01 11 .01 12 .005 13 .01 14 .10 15 .10 16 .01)))
  6658. (frqf2 (make-env '(0.000 0.345 0.052 0.393 0.098 0.345 0.271 0.311 0.443 0.305 0.506 0.319 0.559 0.339
  6659. 0.613 0.322 0.661 0.294 0.705 0.314 0.738 0.353 0.769 0.364 0.797 0.356 0.818 0.316
  6660. 0.845 0.285 0.882 0.339 0.905 0.362 0.928 0.364 0.960 0.319 1.000 0.209)
  6661. :duration dur :scaler (hz->radians 2500.0)))
  6662. (ampf2 (make-env '(0 0 .1 0 .2 1 1 1) :scaler .3 :duration dur)))
  6663. (do ((i start (+ i 1)))
  6664. ((= i stop))
  6665. (outa i (* (env ampf)
  6666. (+ (polywave gen1 (env frqf))
  6667. (* (env ampf2)
  6668. (polywave gen2 (env frqf2))))))))))
  6669. (eastern-bluebird-1 beg1 amp1)
  6670. (eastern-bluebird-2 (+ beg1 0.33) amp1))
  6671. ;; (with-sound (:play #t) (eastern-bluebird 0 .5))
  6672. ;;; --------------------------------------------------------------------------------
  6673. ;;;
  6674. ;;; Greater roadrunner
  6675. (defanimal (greater-roadrunner beg amp)
  6676. ;; south 13 3
  6677. (let ((dur 4.36))
  6678. (let ((start (seconds->samples beg))
  6679. (stop (seconds->samples (+ beg dur)))
  6680. (ampf (make-env '(0.000 0.000 0.043 0.623 0.069 0.901 0.079 0.000 0.155 0.000 0.168 0.292 0.193 0.771
  6681. 0.231 0.947 0.240 0.000 0.310 0.000 0.317 0.327 0.369 0.947 0.385 0.894 0.401 0.000
  6682. 0.458 0.000 0.491 0.620 0.510 0.810 0.538 0.757 0.563 0.000 0.627 0.000 0.646 0.408
  6683. 0.691 0.680 0.709 0.148 0.750 0.000 0.813 0.004 0.825 0.201 0.847 0.317 0.867 0.211
  6684. 0.881 0.067 1.000 0.000)
  6685. :duration dur :scaler amp))
  6686. (frqf (make-env '(0.000 0.215 0.075 0.178 0.114 0.172 0.137 0.231 0.166 0.215 0.188 0.190 0.230 0.178
  6687. 0.265 0.176 0.284 0.217 0.316 0.201 0.349 0.183 0.388 0.174 0.421 0.174 0.443 0.211
  6688. 0.465 0.197 0.503 0.176 0.542 0.169 0.556 0.137 0.591 0.142 0.600 0.195 0.638 0.185
  6689. 0.674 0.174 0.697 0.167 0.709 0.140 0.733 0.137 0.766 0.130 0.793 0.174 0.820 0.169
  6690. 0.868 0.162 0.879 0.133 1.000 0.089)
  6691. :duration dur :scaler (hz->radians 3000.0)))
  6692. (gen1 (make-polywave 0.0 '(1 .95 2 .03 3 .01 4 .005 5 .005 7 .005)))
  6693. (rnd (make-rand-interp 200 .3)))
  6694. (do ((i start (+ i 1)))
  6695. ((= i stop))
  6696. (outa i (* (env ampf)
  6697. (+ .7 (abs (rand-interp rnd)))
  6698. (polywave gen1 (env frqf))))))))
  6699. ;; (with-sound (:play #t) (greater-roadrunner 0 .5))
  6700. ;;; --------------------------------------------------------------------------------
  6701. ;;;
  6702. ;;; Evening grosbeak
  6703. (defanimal (evening-grosbeak beg amp)
  6704. ;; east 98 7.5
  6705. (let ((dur 0.17))
  6706. (let ((start (seconds->samples beg))
  6707. (stop (seconds->samples (+ beg dur)))
  6708. (ampf (make-env '(0.000 0.000 0.050 0.121 0.068 0.000 0.081 0.000 0.097 0.329 0.109 0.000 0.125 0.451
  6709. 0.135 0.344 0.144 0.462 0.162 0.000 0.171 0.058 0.177 0.688 0.188 0.558 0.208 0.477
  6710. 0.220 0.283 0.246 0.373 0.265 0.373 0.277 0.566 0.303 0.775 0.328 0.824 0.360 0.711
  6711. 0.383 0.838 0.405 0.835 0.413 0.711 0.443 0.939 0.514 0.948 0.576 1.000 0.626 0.942
  6712. 0.658 0.951 0.707 0.864 0.742 0.728 0.777 0.682 0.820 0.610 0.926 0.260 0.949 0.072
  6713. 0.978 0.107 1.000 0.000)
  6714. :duration dur :scaler amp))
  6715. (frqf (make-env '(0.000 0.196 0.021 0.259 0.038 0.355 0.055 0.322 0.066 0.276 0.096 0.255 0.116 0.287
  6716. 0.124 0.371 0.134 0.390 0.146 0.325 0.158 0.371 0.181 0.386 0.203 0.397 0.227 0.449
  6717. 0.262 0.451 0.283 0.437 0.465 0.388 0.599 0.374 0.701 0.350 0.834 0.327 1.000 0.243)
  6718. :duration dur :scaler (hz->radians 10200.0)))
  6719. (gen1 (make-polywave 0.0 '(1 .97 2 .01 3 .015 4 .004)))
  6720. (vib (make-oscil 300))
  6721. (vibf (make-env '(0 0 .25 0 .3 1 1 1) :duration dur :scaler (hz->radians 200)))
  6722. (emph (make-oscil))
  6723. (emphf (make-env '(0 0 .3 1 .4 0 1 0) :duration dur :scaler .2)))
  6724. (do ((i start (+ i 1)))
  6725. ((= i stop))
  6726. (let ((frq (+ (env frqf)
  6727. (* (env vibf)
  6728. (oscil vib)))))
  6729. (outa i (* (env ampf)
  6730. (+ (polywave gen1 frq)
  6731. (* (env emphf)
  6732. (oscil emph (* 2.0 frq)))))))))))
  6733. ;; (with-sound (:play #t) (evening-grosbeak 0 .5))
  6734. ;;; --------------------------------------------------------------------------------
  6735. ;;;
  6736. ;;; Dark-eyed junco
  6737. (define (dark-eyed-junco beg1 amp1)
  6738. ;; calif 49 3
  6739. (defanimal (dark-eyed-junco-1 beg amp)
  6740. (let ((dur 0.11))
  6741. (let ((start (seconds->samples beg))
  6742. (stop (seconds->samples (+ beg dur)))
  6743. (ampf (make-env '(0.000 0.000 0.042 0.085 0.115 0.572 0.161 0.288 0.192 0.604 0.214 0.661 0.241 1.000
  6744. 0.289 0.085 0.316 0.748 0.345 0.950 0.387 0.307 0.413 0.082 0.431 0.497 0.459 0.481
  6745. 0.486 0.133 0.552 0.078 0.710 0.382 0.777 0.236 0.795 0.291 0.872 0.156 0.899 0.169 1.000 0.000)
  6746. :duration dur :scaler amp))
  6747. (frqf (make-env '(0.000 0.578 0.069 0.569 0.119 0.535 0.173 0.427 0.175 0.575 0.204 0.566 0.235 0.536
  6748. 0.273 0.473 0.299 0.401 0.304 0.535 0.327 0.547 0.358 0.513 0.404 0.416 0.415 0.555
  6749. 0.445 0.549 0.482 0.493 0.520 0.396 0.549 0.367 0.695 0.369 0.846 0.330 0.934 0.297 1.000 0.243)
  6750. :duration dur :scaler (hz->radians 10050.0)))
  6751. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  6752. (do ((i start (+ i 1)))
  6753. ((= i stop))
  6754. (outa i (* (env ampf)
  6755. (polywave gen1 (env frqf))))))))
  6756. (let ((amps (vector .3 .5 .8 .8 .8 .8 .8 1.0 .8 .8 .4)))
  6757. (do ((call 0 (+ call 1)))
  6758. ((= call 11))
  6759. (dark-eyed-junco-1 (+ beg1 (* call .122)) (* amp1 (amps call))))))
  6760. ;; (with-sound (:play #t) (dark-eyed-junco 0 .5))
  6761. ;;; --------------------------------------------------------------------------------
  6762. ;;;
  6763. ;;; Groove-billed ani
  6764. (defanimal (groove-billed-ani beg amp)
  6765. ;; south 14 17
  6766. ;; first note
  6767. (let ((dur 0.067))
  6768. (let ((start (seconds->samples beg))
  6769. (stop (seconds->samples (+ beg dur)))
  6770. (ampf (make-env '(0.000 0.000 0.110 0.124 0.121 0.469 0.137 0.323 0.149 0.524 0.195 0.654 0.212 0.906
  6771. 0.226 0.204 0.245 0.744 0.317 0.991 0.481 0.824 0.517 0.558 0.556 0.746 0.573 0.446
  6772. 0.581 0.590 0.597 0.668 0.606 0.231 0.622 0.698 0.653 0.686 0.718 0.185 0.884 0.046 1.000 0.000)
  6773. :duration dur :scaler amp))
  6774. (frqf (make-env '(0.000 0.112 0.058 0.098 0.114 0.098 0.18 0.143 0.208 0.309 0.339 0.325 0.445 0.327
  6775. 0.597 0.318 0.636 0.297 0.673 0.240 0.744 0.229 0.775 0.160 0.801 0.117 0.838 0.082 0.884 0.082 .95 0.059 )
  6776. :duration dur :scaler (hz->radians 17100.0)))
  6777. (gen1 (make-polywave 0.0 '(1 .96 2 .04 3 .005)))
  6778. (gen2 (make-polywave 0.0 '(1 .1 2 .7 3 .1 4 .005 5 .005 6 .002)))
  6779. (ampf2 (make-env '(0 0 .025 1 .2 0 .7 0 .9 1 1 0) :duration dur))
  6780. (rnd (make-rand-interp 400 (hz->radians 100))))
  6781. (do ((i start (+ i 1)))
  6782. ((= i stop))
  6783. (let ((frq (+ (env frqf)
  6784. (rand-interp rnd))))
  6785. (outa i (* (env ampf)
  6786. (+ (polywave gen1 frq)
  6787. (* (env ampf2)
  6788. (polywave gen2 frq)))))))))
  6789. ;; second note
  6790. (let ((dur 0.265)
  6791. (start (seconds->samples (+ beg 0.27))))
  6792. (let ((stop (+ start (seconds->samples dur)))
  6793. (ampf (make-env '(0.000 0.000 0.020 0.160 0.091 0.182 0.138 0.132 0.174 0.162 0.239 0.120 0.390 0.297
  6794. 0.427 0.216 0.474 0.530 0.521 1.000 0.565 0.893 0.590 0.498 0.605 0.656 0.634 0.171
  6795. 0.676 0.209 0.696 0.130 0.754 0.222 0.786 0.173 0.818 0.214 0.835 0.177 0.884 0.199
  6796. 0.911 0.107 0.922 0.158 0.961 0.071 0.978 0.378 1.000 0.000)
  6797. :duration dur :scaler (* .4 amp)))
  6798. (frqf (make-env '(0.000 0.125 0.048 0.142 0.139 0.133 0.303 0.131 0.443 0.150 0.495 0.156 0.508 0.206
  6799. 0.568 0.200 0.612 0.219 0.621 0.289 0.627 0.439 0.690 0.458 0.752 0.464 0.823 0.464
  6800. 0.900 0.450 0.947 0.425 0.975 0.194 1.000 0.2 )
  6801. :duration dur :scaler (hz->radians 10300.0)))
  6802. (gen1 (make-oscil))
  6803. (gen2 (make-oscil))
  6804. (gen3 (make-oscil))
  6805. (ampf1 (make-env '(0 1 .63 1 .65 .1 .94 .1 1 1) :scaler .95 :duration dur))
  6806. (ampf2 (make-env '(0 .5 .6 1 .9 1 1 .5) :scaler .1 :duration dur))
  6807. (ampf3 (make-env '(0 1 .59 1 .6 0 .65 0 .66 1 .8 1 .9 0 1 0) :scaler .05 :duration dur))
  6808. (rnd (make-rand-interp 400 (hz->radians 30))))
  6809. (do ((i start (+ i 1)))
  6810. ((= i stop))
  6811. (let ((frq (+ (env frqf)
  6812. (rand-interp rnd))))
  6813. (outa i (* (env ampf)
  6814. (+ (* (env ampf1)
  6815. (oscil gen1 frq))
  6816. (* (env ampf2)
  6817. (oscil gen2 (* 2.0 frq)))
  6818. (* (env ampf3)
  6819. (oscil gen3 (* 3.0 frq)))))))))))
  6820. ;; (with-sound (:play #t) (groove-billed-ani 0 .5))
  6821. ;;; --------------------------------------------------------------------------------
  6822. ;;;
  6823. ;;; Common pauraque
  6824. (defanimal (common-pauraque beg amp)
  6825. ;; south 20 1.7
  6826. (let ((dur 0.65))
  6827. (let ((start (seconds->samples beg))
  6828. (stop (seconds->samples (+ beg dur)))
  6829. (ampf (make-env '(0.000 0.000 0.134 0.124 0.181 0.079 0.203 0.169 0.275 0.160 0.341 0.494 0.390 0.850
  6830. 0.443 0.561 0.462 0.783 0.502 0.768 0.535 1.000 0.587 0.795 0.742 0.802 0.821 0.702
  6831. 0.856 0.458 0.884 0.263 0.926 0.241 1.000 0.000 )
  6832. :duration dur :scaler amp))
  6833. (frqf (make-env '(0.000 0.168 0.175 0.190 0.328 0.225 0.399 0.237 0.472 0.310 0.504 0.342 0.539 0.345
  6834. 0.572 0.326 0.594 0.294 0.644 0.275 0.731 0.259 0.797 0.244 0.832 0.231 0.868 0.212 1.000 0.155 )
  6835. :duration dur :scaler (hz->radians 7700.0)))
  6836. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .015)))
  6837. (vib (make-oscil 120))
  6838. (vibf (make-env '(0 0 .25 0 .4 .3 .5 .1 .6 1 1 0) :duration dur :scaler (hz->radians 100))))
  6839. (do ((i start (+ i 1)))
  6840. ((= i stop))
  6841. (outa i (* (env ampf)
  6842. (polywave gen1 (+ (env frqf)
  6843. (* (env vibf)
  6844. (oscil vib))))))))))
  6845. ;; (with-sound (:play #t) (common-pauraque 0 .5))
  6846. ;;; --------------------------------------------------------------------------------
  6847. ;;;
  6848. ;;; Hammond's flycatcher
  6849. (defanimal (hammonds-flycatcher beg amp)
  6850. ;; calif2 5 8.2
  6851. (let ((dur 0.23))
  6852. (let ((start (seconds->samples beg))
  6853. (stop (seconds->samples (+ beg dur)))
  6854. (ampf (make-env '(0.000 0.000 0.090 0.518 0.153 0.872 0.167 0.795 0.190 0.952 0.251 0.000 0.453 0.000
  6855. 0.502 0.434 0.521 0.295 0.542 0.053 0.580 0.051 0.606 0.000 0.691 0.000 0.701 0.062
  6856. 0.731 0.089 0.735 0.000 0.746 0.000 0.754 0.212 0.764 0.119 0.784 0.110 0.794 0.148
  6857. 0.800 0.007 0.815 0.080 0.823 0.301 0.834 0.126 0.854 0.151 0.862 0.062 0.873 0.009
  6858. 0.880 0.075 0.890 0.297 0.910 0.205 0.921 0.078 0.934 0.032 0.948 0.208 0.959 0.285
  6859. 0.971 0.260 0.984 0.091 1.000 0.000)
  6860. :duration dur :scaler amp))
  6861. (frqf (make-env '(0.000 0.401 0.037 0.480 0.073 0.538 0.109 0.596 0.142 0.628 0.175 0.697 0.206 0.794
  6862. 0.218 0.812 0.233 0.800 0.240 0.773 0.260 0.693 0.404 0.381 0.416 0.356 0.437 0.347
  6863. 0.460 0.359 0.482 0.439 0.497 0.532 0.529 0.659 0.546 0.836 0.587 0.614 0.690 0.460
  6864. 0.700 0.282 0.713 0.247 0.725 0.285 0.727 0.525 0.739 0.594 0.756 0.314 0.769 0.276
  6865. 0.784 0.280 0.788 0.329 0.796 0.736 0.811 0.543 0.828 0.301 0.843 0.282 0.851 0.325
  6866. 0.861 0.780 0.887 0.377 0.899 0.321 0.909 0.370 0.926 0.681 0.944 0.449 0.959 0.421
  6867. 0.977 0.433 1.000 0.471)
  6868. :duration dur :scaler (hz->radians 9000.0)))
  6869. (gen1 (make-polywave 0.0 '(1 .99 2 .01 3 .005))))
  6870. (do ((i start (+ i 1)))
  6871. ((= i stop))
  6872. (outa i (* (env ampf)
  6873. (polywave gen1 (env frqf))))))))
  6874. ;; (with-sound (:play #t) (hammonds-flycatcher 0 .5))
  6875. ;;; --------------------------------------------------------------------------------
  6876. ;;;
  6877. ;;; Barn owl
  6878. ;;;
  6879. ;;; not as good as some of the others -- ending slightly wrong, formants need tuning a bit, etc
  6880. (defanimal (barn-owl beg amp)
  6881. ;; calif 50 2.9
  6882. (let ((dur 0.9))
  6883. (let ((start (seconds->samples beg))
  6884. (stop (seconds->samples (+ beg dur)))
  6885. (ampf (make-env '(0 0 1 1 20 1 21 0) :duration dur :scaler (* 0.5 amp) :base 3))
  6886. (ampf1 (make-env '(0 1 19 1 21 0 22 0) :base 10 :duration dur))
  6887. (gen1 (make-polywave 1110.0 '(2 .6 3 .2 4 .1 5 .1 6 .05 7 .1 9 .01)))
  6888. (ampf2 (make-env '(0 0 19 0 20 .5 22 0) :base 10 :duration dur))
  6889. (frqf2 (make-env '(0 1550 18 1550 19 1200 20 1700 22 1500) :scaler (hz->radians 1.0) :duration dur :base 10))
  6890. (gen2 (make-polywave 0.0 '(1 .2 2 .01 3 .8 4 .3 5 .1 6 .01)))
  6891. (rnd (make-rand-interp 10000 (hz->radians 400)))
  6892. (rndf (make-env '(0 1 19 1 20 .1 22 .01) :duration dur))
  6893. (trem (make-rand-interp 120 .6))
  6894. (frm1 (make-formant 2800 .98))
  6895. (frm2 (make-formant 4400 .92))
  6896. (frm4 (make-formant 6000 .97))
  6897. (frm5 (make-formant 7500 .96))
  6898. (frm3 (make-formant 9000 .96))
  6899. (fr1 (* 14 (sin (hz->radians 2800))))
  6900. (fr2 (* 6 (sin (hz->radians 4400))))
  6901. (fr3 (sin (hz->radians 9000)))
  6902. (fr4 (* 6 (sin (hz->radians 6000))))
  6903. (fr5 (* 2 (sin (hz->radians 7500)))))
  6904. (let ((fb (vector frm1 frm2 frm3 frm4 frm5))
  6905. (fs (float-vector fr1 fr2 fr3 fr4 fr5)))
  6906. (set! fb (make-formant-bank fb fs))
  6907. (do ((i start (+ i 1)))
  6908. ((= i stop))
  6909. (outa i (* (env ampf)
  6910. (formant-bank fb (* (+ .4 (abs (rand-interp trem)))
  6911. (+ (* (env ampf1)
  6912. (polywave gen1 (* (env rndf) (rand-interp rnd))))
  6913. (* (env ampf2)
  6914. (polywave gen2 (env frqf2)))))))))))))
  6915. ;; (with-sound (:play #t :statistics #t) (barn-owl 0 .5))
  6916. ;;; --------------------------------------------------------------------------------
  6917. ;;;
  6918. ;;; Long-eared owl
  6919. (defanimal (long-eared-owl beg amp)
  6920. (let ((dur 0.37))
  6921. (let ((start (seconds->samples beg))
  6922. (stop (seconds->samples (+ beg dur)))
  6923. (ampf (make-env '(0.000 0.000 0.119 0.319 0.193 0.682 0.251 0.767 0.309 0.958 0.485 0.930 0.505 1.000
  6924. 0.574 0.895 0.698 0.901 0.902 0.767 0.965 0.401 1.000 0.000)
  6925. :duration dur :scaler amp))
  6926. (frqf (make-env '(0.000 0.276 0.185 0.328 0.273 0.338 0.462 0.343 0.735 0.340 0.894 0.337 0.938 0.305 1.000 0.231)
  6927. :duration dur :scaler (hz->radians 980.0)))
  6928. (gen1 (make-polywave 0.0 '(1 1 2 .23 3 .034 4 .008 5 .005 7 .003))))
  6929. (do ((i start (+ i 1)))
  6930. ((= i stop))
  6931. (outa i (* (env ampf)
  6932. (polywave gen1 (env frqf))))))))
  6933. ;; (with-sound (:play #t) (long-eared-owl 0 .5))
  6934. ;;; --------------------------------------------------------------------------------
  6935. ;;;
  6936. ;;; Summer tanager
  6937. (define (summer-tanager beg1 amp1)
  6938. ;; calif 24 18
  6939. (defanimal (summer-tanager-1 beg dur amp ampl frq frql rndl)
  6940. (let ((start (seconds->samples beg))
  6941. (stop (seconds->samples (+ beg dur)))
  6942. (ampf (make-env ampl :duration dur :scaler amp))
  6943. (frqf (make-env frql :duration dur :scaler (hz->radians frq)))
  6944. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .006 4 .008 5 .004)))
  6945. (rndf (make-env rndl :duration dur))
  6946. (rnd (make-rand-interp 600)))
  6947. (do ((i start (+ i 1)))
  6948. ((= i stop))
  6949. (let ((rf (env rndf)))
  6950. (outa i (* (env ampf)
  6951. (- (+ 1.0 (* rf (rand-interp rnd))) rf)
  6952. (polywave gen1 (env frqf))))))))
  6953. (summer-tanager-1 beg1 .29 (* .4 amp1)
  6954. '(0.000 0.000 0.123 0.450 0.194 0.404 0.210 0.055 0.232 0.437 0.251 0.193 0.277 0.263
  6955. 0.292 0.135 0.349 0.202 0.369 0.156 0.381 0.291 0.458 0.177 0.554 0.153 0.682 0.875
  6956. 0.734 0.988 0.768 1.000 0.802 0.722 0.829 0.887 0.918 0.251 1.000 0.000)
  6957. 6070
  6958. '(0.000 0.583 0.035 0.583 0.116 0.452 0.145 0.452 0.179 0.345 0.200 0.414 0.224 0.313
  6959. 0.241 0.400 0.260 0.299 0.289 0.348 0.311 0.304 0.332 0.359 0.343 0.299 0.362 0.394
  6960. 0.376 0.328 0.399 0.409 0.417 0.426 0.431 0.475 0.620 0.452 0.750 0.412 0.888 0.423
  6961. 0.924 0.371 0.934 0.429 0.958 0.391 0.974 0.429 1.000 0.403)
  6962. '(0 .3 .2 .3 .45 .8 .6 .1 1 .1))
  6963. (summer-tanager-1 (+ beg1 .56) .13 (* .6 amp1)
  6964. '(0.000 0.000 0.105 0.113 0.172 0.052 0.243 0.128 0.449 0.980 0.485 0.980 0.518 0.855
  6965. 0.603 0.983 0.671 0.745 0.708 0.858 0.786 0.041 0.885 0.203 1.000 0.000)
  6966. 10800
  6967. '(0.000 0.300 0.302 0.269 1.000 0.273)
  6968. '(0 .2 .3 .2 .4 0 1 0))
  6969. (summer-tanager-1 (+ beg1 .71) .24 (* .9 amp1)
  6970. '(0.000 0.000 0.056 0.292 0.072 0.209 0.086 0.439 0.103 0.379 0.114 0.565 0.134 0.644
  6971. 0.215 0.190 0.276 0.107 0.334 0.237 0.367 0.715 0.416 0.988 0.457 0.889 0.533 0.462
  6972. 0.624 0.186 0.668 0.245 0.697 0.356 0.750 0.474 0.902 0.107 1.000 0.000)
  6973. 6700
  6974. '(0.000 0.506 0.072 0.450 0.133 0.390 0.190 0.307 0.255 0.251 0.327 0.259 0.377 0.335
  6975. 0.416 0.386 0.539 0.398 0.676 0.382 0.717 0.371 0.761 0.335 0.840 0.283 0.930 0.263 1.000 0.307)
  6976. '(0 .3 .3 .3 .4 .1 .75 .1 .8 .8 1 .5))
  6977. (summer-tanager-1 (+ beg1 1.28) .25 amp1
  6978. '(0.000 0.000 0.043 0.092 0.098 0.442 0.163 0.622 0.204 0.649 0.271 0.562 0.289 0.398
  6979. 0.306 0.295 0.316 0.371 0.340 0.191 0.371 0.414 0.420 0.363 0.437 0.610 0.449 0.442
  6980. 0.460 0.745 0.485 0.641 0.522 0.777 0.531 0.534 0.558 1.000 0.583 0.713 0.631 0.801
  6981. 0.646 0.462 0.661 0.773 0.669 0.510 0.677 0.733 0.688 0.335 0.699 0.494 0.711 0.514
  6982. 0.716 0.299 0.735 0.653 0.758 0.546 0.786 0.562 0.808 0.227 0.825 0.386 0.845 0.367
  6983. 0.878 0.096 1.000 0.000)
  6984. 6160
  6985. '(0.000 0.333 0.056 0.369 0.097 0.452 0.160 0.448 0.238 0.401 0.284 0.389 0.365 0.381
  6986. 0.394 0.476 0.439 0.508 0.491 0.536 0.555 0.548 0.615 0.552 0.733 0.484 0.853 0.464 1.000 0.464)
  6987. '(0 0 .3 .1 .6 .1 .7 .3 1 .4))
  6988. (summer-tanager-1 (+ beg1 1.86) .27 (* .9 amp1)
  6989. '(0.000 0.000 0.053 0.142 0.152 0.943 0.200 0.880 0.223 0.983 0.267 0.844 0.314 0.875
  6990. 0.369 0.679 0.412 0.361 0.462 0.236 0.477 0.132 0.513 0.073 0.684 0.172 0.759 0.351
  6991. 0.871 0.233 1.000 0.000)
  6992. 6700
  6993. '(0.000 0.375 0.027 0.427 0.051 0.364 0.068 0.451 0.090 0.364 0.107 0.472 0.132 0.364
  6994. 0.152 0.441 0.177 0.369 0.202 0.412 0.259 0.409 0.326 0.385 0.410 0.311 0.466 0.272
  6995. 0.526 0.256 0.570 0.296 0.588 0.280 0.597 0.354 0.616 0.280 0.630 0.359 0.645 0.288
  6996. 0.665 0.354 0.684 0.280 0.706 0.351 0.724 0.277 0.740 0.364 0.758 0.285 0.773 0.361
  6997. 0.799 0.317 1.000 0.251)
  6998. '(0 0 .3 0 .4 .3 .6 .3 .7 0 1 0))
  6999. (summer-tanager-1 (+ beg1 2.42) .11 (* .9 amp1)
  7000. '(0.000 0.000 0.079 0.182 0.187 0.604 0.222 0.544 0.261 0.710 0.291 0.169 0.309 0.921
  7001. 0.326 0.982 0.387 0.596 0.440 1.000 0.470 0.628 0.523 0.836 0.616 0.615 0.685 0.164
  7002. 0.719 0.346 0.752 0.119 0.767 0.185 0.877 0.024 0.948 0.069 1.000 0.000)
  7003. 6750
  7004. '(0.000 0.504 0.143 0.441 0.197 0.425 0.265 0.443 0.312 0.483 0.375 0.557 0.440 0.520 1.000 0.520)
  7005. '(0 0 .3 0 .5 .4 .7 0 1 0))
  7006. (summer-tanager-1 (+ beg1 2.61) .16 (* .9 amp1)
  7007. '(0.000 0.000 0.196 0.778 0.231 0.528 0.256 0.628 0.295 0.354 0.331 0.530 0.397 0.332
  7008. 0.425 0.776 0.442 0.074 0.453 0.649 0.463 0.298 0.474 0.620 0.498 0.781 0.513 0.694
  7009. 0.539 0.683 0.551 0.406 0.597 0.868 0.617 0.815 0.653 0.984 0.672 0.815 0.700 0.966
  7010. 0.718 0.905 0.727 0.734 0.748 0.834 0.780 0.570 0.793 0.683 0.817 0.602 0.835 0.406
  7011. 0.855 0.609 0.865 0.483 0.886 0.530 0.900 0.412 0.923 0.412 1.000 0.000)
  7012. 6750
  7013. '(0.000 0.438 0.193 0.443 0.367 0.446 0.409 0.425 0.433 0.501 0.462 0.388 0.489 0.472
  7014. 0.511 0.433 0.526 0.367 0.552 0.454 0.579 0.367 0.609 0.409 0.666 0.385 0.728 0.377
  7015. 0.865 0.348 1.000 0.346)
  7016. '(0 0 .5 .1 .9 .5 1 .4))
  7017. (summer-tanager-1 (+ beg1 3.14) .23 (* .9 amp1)
  7018. '(0.000 0.000 0.268 0.594 0.365 0.153 0.412 0.040 0.520 0.475 0.578 0.918 0.614 0.736
  7019. 0.629 0.491 0.654 0.997 0.682 0.794 0.693 0.660 0.716 0.887 0.740 0.786 0.762 0.897
  7020. 0.827 0.792 0.890 0.446 1.000 0.000)
  7021. 6750
  7022. '(0.000 0.306 0.025 0.322 0.048 0.425 0.079 0.325 0.101 0.375 0.131 0.314 0.156 0.346
  7023. 0.269 0.369 0.388 0.369 0.427 0.456 0.465 0.449 0.510 0.464 0.623 0.427 0.768 0.420 1.000 0.4)
  7024. '(0 0 .5 0 .6 .3 1 0))
  7025. (summer-tanager-1 (+ beg1 3.54) .18 (* .5 amp1)
  7026. '(0.000 0.000 0.087 0.327 0.198 0.834 0.235 0.805 0.283 0.995 0.313 0.778 0.379 0.678
  7027. 0.471 0.235 0.509 0.369 0.525 0.288 0.574 0.631 0.626 0.863 0.663 0.770 0.708 0.852
  7028. 0.732 0.533 0.748 0.739 0.770 0.633 0.791 0.757 0.808 0.636 0.823 0.699 0.869 0.636
  7029. 0.937 0.393 1.000 0.000)
  7030. 6750
  7031. '(0.000 0.406 0.200 0.396 0.299 0.412 0.462 0.401 0.579 0.396 0.804 0.348 1.000 0.356)
  7032. '(0 .1 1 .1)))
  7033. ;; (with-sound (:play #t) (summer-tanager 0 .5))
  7034. ;;; --------------------------------------------------------------------------------
  7035. ;;;
  7036. ;;; Whooping crane
  7037. (defanimal (whooping-crane beg amp)
  7038. ;; east 63 53 (is this 2 birds?)
  7039. (let ((dur 0.68))
  7040. (let ((start (seconds->samples beg))
  7041. (stop (seconds->samples (+ beg dur)))
  7042. (ampf (make-env '(0.000 0.000 0.036 0.069 0.052 0.000 0.115 0.000 0.127 0.343 0.137 0.254 0.143 0.400
  7043. 0.162 0.000 0.184 0.000 0.191 0.524 0.202 0.772 0.224 0.131 0.241 0.392 0.259 0.770
  7044. 0.274 0.699 0.305 0.692 0.362 0.852 0.432 0.768 0.449 0.985 0.484 1.000 0.604 0.969
  7045. 0.640 0.783 0.672 0.489 0.687 0.752 0.725 0.290 0.742 0.376 0.801 0.281 0.906 0.197
  7046. 0.928 0.128 0.943 0.192 0.950 0.365 0.977 0.086 1.000 0.000)
  7047. :duration dur :scaler (* 0.33 amp)))
  7048. (frqf1 (make-env '(0.000 0.158 0.120 0.175 0.137 0.227 0.145 0.180 0.190 0.173 0.204 0.249 0.219 0.230
  7049. 0.324 0.237 0.428 0.242 0.585 0.240 0.655 0.232 0.689 0.215 0.958 0.205 0.966 0.128 1.000 0.123)
  7050. :duration dur :scaler (hz->radians 5000.0)))
  7051. (frqf2 (make-env '(0.000 0.104 0.342 0.121 0.376 0.136 0.435 0.128 0.447 0.175 0.498 0.173 1.000 0.170)
  7052. :duration dur :scaler (hz->radians 5000.0)))
  7053. (ampf1 (make-env '(0 1 .65 1 .70 0 1 0) :duration dur))
  7054. (ampf2 (make-env '(0 0 .32 0 .48 1 .68 1 .75 0 1 0) :duration dur))
  7055. (ampf3 (make-env '(0 0 .6 0 .65 1 1 1) :duration dur))
  7056. (gen1 (make-polywave 0.0 (normalize-partials '(1 .3 2 1 3 -.8 4 .25 5 .45 6 .22 7 .13 8 .05 9 .02 10 .005 11 .005))))
  7057. (gen2 (make-polywave 0.0 (normalize-partials '(1 .91 2 .17 3 -.77 4 .25 5 .2 6 .2 7 .18 8 .1 10 .01))))
  7058. (gen3 (make-polywave 0.0 (normalize-partials '(1 -1 2 .11 3 .45 4 .44 5 .62 6 .27 7 .02 8 .005))))
  7059. (rnd (make-rand-interp 2000 (hz->radians 200)))
  7060. (rndf1 (make-env '(0 1 .2 1 .3 0 .65 0 .7 1 .8 0 1 0) :duration dur))
  7061. (rndf2 (make-env '(0 0 .32 0 .48 1 .5 0 .7 0 .75 1 .8 0 1 0) :duration dur))
  7062. (rndf3 (make-env '(0 0 .6 0 .65 1 .7 0 .9 0 1 1) :duration dur)))
  7063. (do ((i start (+ i 1)))
  7064. ((= i stop))
  7065. (let ((frq1 (env frqf1))
  7066. (rn (rand-interp rnd)))
  7067. (outa i (* (env ampf)
  7068. (+ (* (env ampf1)
  7069. (polywave gen1 (+ frq1
  7070. (* rn (env rndf1)))))
  7071. (* (env ampf2)
  7072. (polywave gen2 (+ (env frqf2)
  7073. (* rn (env rndf2)))))
  7074. (* (env ampf3)
  7075. (polywave gen3 (+ frq1
  7076. (* rn (env rndf3)))))))))))))
  7077. ;; (with-sound (:play #t) (whooping-crane 0 .5))
  7078. ;;; --------------------------------------------------------------------------------
  7079. ;;;
  7080. ;;; Sandhill crane
  7081. (defanimal (sandhill-crane beg amp)
  7082. ;; calif 30 13
  7083. (let ((dur 0.64))
  7084. (let ((start (seconds->samples beg))
  7085. (stop (seconds->samples (+ beg dur)))
  7086. (ampf (make-env '(0.000 0.000 0.042 0.100 0.130 0.108 0.175 0.155 0.183 0.052 0.200 0.000 0.230 0.000
  7087. 0.240 0.052 0.244 0.681 0.252 0.545 0.260 0.602 0.264 0.000 0.269 0.397 0.277 0.845
  7088. 0.288 0.547 0.292 0.734 0.304 0.624 0.313 0.453 0.320 0.215 0.324 0.373 0.328 0.359
  7089. 0.335 0.143 0.344 0.282 0.371 0.291 0.380 0.256 0.386 0.333 0.390 0.773 0.404 0.428
  7090. 0.409 0.577 0.417 0.612 0.424 0.374 0.427 0.562 0.433 0.405 0.436 0.452 0.442 0.285
  7091. 0.446 0.417 0.460 0.034 0.468 0.319 0.480 0.036 0.485 0.852 0.493 0.606 0.498 0.636
  7092. 0.503 0.526 0.519 0.471 0.525 0.980 0.532 0.134 0.535 0.467 0.546 0.236 0.550 0.044
  7093. 0.561 0.069 0.565 0.276 0.576 0.739 0.584 0.581 0.592 0.797 0.605 0.168 0.606 0.268
  7094. 0.613 0.076 0.620 0.145 0.631 0.035 0.635 0.164 0.639 0.080 0.643 0.939 0.656 0.508
  7095. 0.664 0.623 0.672 0.165 0.678 0.040 0.681 0.157 0.687 0.187 0.695 0.038 0.700 0.293
  7096. 0.704 0.155 0.709 0.719 0.715 0.701 0.720 0.420 0.724 0.559 0.728 0.249 0.737 0.069
  7097. 0.741 0.168 0.748 0.103 0.751 0.051 0.757 0.072 0.758 0.196 0.763 0.129 0.769 0.666
  7098. 0.778 0.515 0.785 0.126 0.791 0.108 0.800 0.029 0.809 0.087 0.821 0.016 0.826 0.327
  7099. 0.832 0.135 0.840 0.084 0.848 0.025 0.858 0.440 0.866 0.168 0.873 0.123 0.878 0.033
  7100. 0.886 0.055 0.900 0.008 0.907 0.593 0.918 0.102 0.923 0.463 0.930 0.361 0.940 0.343
  7101. 0.947 0.182 0.953 0.236 0.964 0.025 0.967 0.061 1.000 0.000)
  7102. :duration dur :scaler amp))
  7103. (frqf (make-env '(0.000 0.063 0.163 0.065 0.171 0.092 0.182 0.063 0.238 0.090 0.244 0.115 0.251 0.094
  7104. 0.267 0.092 0.285 0.094 0.381 0.096 0.387 0.129 0.398 0.092 0.427 0.094 0.438 0.069
  7105. 0.445 0.094 0.473 0.092 0.483 0.100 0.492 0.092 0.523 0.096 0.559 0.094 0.571 0.104
  7106. 0.581 0.092 0.618 0.096 0.633 0.096 0.645 0.100 0.661 0.085 0.673 0.096 0.708 0.096
  7107. 0.723 0.085 0.768 0.090 0.791 0.090 0.824 0.075 0.850 0.083 0.853 0.117 0.863 0.094
  7108. 0.888 0.094 0.906 0.115 0.920 0.110 0.931 0.085 1.000 0.087 )
  7109. :duration dur :scaler (hz->radians 8300.0)))
  7110. (gen1 (make-polywave 0.0 '(1 .6 2 -.1 3 .01 4 .05 5 .03 6 .01 7 .01 8 .005)))
  7111. (rnd (make-rand-interp 3000 (hz->radians 100))))
  7112. (do ((i start (+ i 1)))
  7113. ((= i stop))
  7114. (outa i (* (env ampf)
  7115. (polywave gen1 (+ (env frqf)
  7116. (rand-interp rnd)))))))))
  7117. ;; (with-sound (:play #t) (sandhill-crane 0 .5))
  7118. ;;; --------------------------------------------------------------------------------
  7119. ;;;
  7120. ;;; Gray-crowned rosy-finch
  7121. (defanimal (gray-crowned-rosy-finch beg amp)
  7122. ;; calif 64 5.1
  7123. (let ((dur 0.15))
  7124. (let ((start (seconds->samples beg))
  7125. (stop (seconds->samples (+ beg dur)))
  7126. (ampf (make-env '(0.000 0.000 0.339 0.937 0.454 0.992 0.609 0.860 0.807 0.575 1.000 0.000) :duration dur :scaler amp))
  7127. (ampf2 (make-env '(0 1 .5 1 .55 0 1 0) :duration dur :scaler .2))
  7128. (frqf1 (make-env '(0.000 0.000 0.004 0.271 0.031 0.299 0.085 0.313 0.167 0.318 0.227 0.317 0.243 0.326
  7129. 0.281 0.296 0.299 0.318 0.309 0.299 0.325 0.299 0.338 0.285 0.356 0.321 0.369 0.301
  7130. 0.387 0.294 0.396 0.280 0.415 0.313 0.430 0.282 0.452 0.283 0.462 0.263 0.483 0.304
  7131. 0.497 0.280 0.517 0.288 0.534 0.249 0.550 0.293 0.568 0.254 0.587 0.285 0.611 0.222
  7132. 0.627 0.274 0.647 0.238 0.662 0.263 0.677 0.247 0.696 0.203 0.708 0.219 0.715 0.250
  7133. 0.734 0.230 0.755 0.246 0.781 0.198 0.800 0.250 0.811 0.228 0.834 0.250 0.869 0.191
  7134. 0.893 0.252 0.915 0.220 0.939 0.244 0.967 0.220 1.000 0.222)
  7135. :duration dur :scaler (hz->radians 13400.0)))
  7136. (frqf2 (make-env '(0.000 0.328 0.086 0.397 0.158 0.441 0.219 0.446 0.232 0.420 0.258 0.430 0.281 0.387
  7137. 0.307 0.419 0.330 0.400 0.344 0.369 0.357 0.395 0.382 0.397 0.396 0.365 0.416 0.398
  7138. 0.442 0.402 0.460 0.354 0.480 0.397 0.504 0.384 0.526 0.329 0.550 0.294 1.000 0.288)
  7139. :duration dur :scaler (hz->radians 13400.0)))
  7140. (gen1 (make-polywave 0.0 '(1 .99 2 .005)))
  7141. (gen2 (make-oscil))
  7142. (rnd (make-rand-interp 400 .5))
  7143. (rnd1 (make-rand-interp 2000 (hz->radians 100))))
  7144. (do ((i start (+ i 1)))
  7145. ((= i stop))
  7146. (let ((rn (rand-interp rnd1)))
  7147. (outa i (* (env ampf)
  7148. (+ .5 (abs (rand-interp rnd)))
  7149. (+ (polywave gen1 (+ rn (env frqf1)))
  7150. (* (env ampf2)
  7151. (oscil gen2 (+ rn (env frqf2))))))))))))
  7152. ;; (with-sound (:play #t) (gray-crowned-rosy-finch 0 .5))
  7153. ;;; --------------------------------------------------------------------------------
  7154. ;;;
  7155. ;;; Virginia rail
  7156. (define (virginia-rail beg amp)
  7157. ;; calif 28 20
  7158. (defanimal (virginia-rail-1 beg amp)
  7159. (let ((dur 0.048))
  7160. (let ((start (seconds->samples beg))
  7161. (stop (seconds->samples (+ beg dur)))
  7162. (ampf (make-env '(0.000 0.000 0.021 0.076 0.040 0.233 0.058 0.307 0.075 0.254 0.099 0.000 0.118 0.213
  7163. 0.131 0.118 0.180 0.935 0.217 0.207 0.224 0.315 0.253 0.142 0.274 1.000 0.290 0.956
  7164. 0.305 0.247 0.321 0.203 0.332 0.070 0.362 0.896 0.376 0.706 0.384 0.237 0.402 0.292
  7165. 0.417 0.556 0.431 0.607 0.438 0.767 0.469 0.858 0.480 0.729 0.492 0.080 0.503 0.355
  7166. 0.510 0.256 0.539 0.706 0.549 0.641 0.574 0.104 0.591 0.285 0.637 0.004 0.670 0.154
  7167. 0.683 0.146 0.699 0.087 1.000 0.000)
  7168. :duration dur :scaler amp))
  7169. (gen1 (make-polywave 2700 (list 1 (* .55 .98) 2 (* .55 .01) 3 (* .55 .05) 5 (* .55 .005))))
  7170. (gen2 (make-polywave 2400 (list 1 (* .45 .98) 2 (* .45 .01) 3 (* .45 .03) 5 (* .45 .005))))
  7171. (rnd (make-rand-interp 4000 (hz->radians 300))))
  7172. (do ((i start (+ i 1)))
  7173. ((= i stop))
  7174. (outa i (* (env ampf)
  7175. (+ (polywave gen1 (rand-interp rnd))
  7176. (polywave gen2))))))))
  7177. (defanimal (virginia-rail-2 beg amp)
  7178. (let ((dur 0.048))
  7179. (let ((start (seconds->samples beg))
  7180. (stop (seconds->samples (+ beg dur)))
  7181. (ampf (make-env '(0.000 0.000 0.042 0.141 0.071 0.749 0.087 0.659 0.104 0.283 0.118 0.150 0.133 0.229
  7182. 0.146 0.147 0.153 0.385 0.172 0.503 0.195 0.950 0.219 0.075 0.227 0.257 0.245 0.101
  7183. 0.264 0.193 0.282 0.976 0.312 0.815 0.346 0.437 0.387 0.888 0.406 0.622 0.434 0.767
  7184. 0.451 0.277 0.463 0.363 0.486 0.106 0.497 0.690 0.507 0.727 0.523 0.338 0.540 0.910
  7185. 0.555 0.892 0.563 0.582 0.578 0.716 0.588 0.637 0.605 0.171 0.631 0.939 0.646 0.862
  7186. 0.664 0.413 0.687 0.061 0.703 0.171 0.724 0.072 0.743 0.150 0.776 0.103 0.801 0.139
  7187. 0.828 0.066 0.909 0.029 0.957 0.061 1.000 0.000)
  7188. :duration dur :scaler amp))
  7189. (gen1 (make-polywave 2700 (list 1 (* .45 .98) 2 (* .45 .01) 3 (* .45 .05) 5 (* .45 .005))))
  7190. (gen2 (make-polywave 2400 (list 1 (* .55 .98) 2 (* .55 .01) 3 (* .55 .05) 5 (* .55 .005))))
  7191. (rnd (make-rand-interp 4000 (hz->radians 200))))
  7192. (do ((i start (+ i 1)))
  7193. ((= i stop))
  7194. (let ((frq (rand-interp rnd)))
  7195. (outa i (* (env ampf)
  7196. (+ (polywave gen1 frq)
  7197. (polywave gen2 frq)))))))))
  7198. (defanimal (virginia-rail-3 beg amp)
  7199. (let ((dur 0.048))
  7200. (let ((start (seconds->samples beg))
  7201. (stop (seconds->samples (+ beg dur)))
  7202. (ampf (make-env '(0.000 0.000 0.062 0.158 0.095 0.921 0.127 0.411 0.237 0.954 0.260 0.382 0.294 0.993
  7203. 0.315 0.473 0.326 0.583 0.353 0.217 0.406 0.991 0.428 0.437 0.449 0.769 0.498 0.305
  7204. 0.526 0.883 0.548 0.367 0.562 0.892 0.578 0.347 0.597 0.316 0.612 0.890 0.637 0.717
  7205. 0.665 0.235 0.696 0.545 0.711 0.233 0.754 0.754 0.818 0.099 0.854 0.123 0.910 0.033
  7206. 0.940 0.117 1.000 0.000)
  7207. :duration dur :scaler amp))
  7208. (gen1 (make-polywave 2700 (list 1 (* .5 .98) 2 (* .5 .01) 3 (* .5 .05) 5 (* .5 .005))))
  7209. (gen2 (make-polywave 2500 (list 1 (* .4 .98) 2 (* .4 .01) 3 (* .4 .05) 5 (* .4 .005))))
  7210. (gen3 (make-polywave 3000 (list 1 (* .1 .98) 2 (* .1 .01) 3 (* .1 .05) 5 (* .1 .005))))
  7211. (rnd (make-rand-interp 4000 (hz->radians 300))))
  7212. (do ((i start (+ i 1)))
  7213. ((= i stop))
  7214. (let ((frq (rand-interp rnd)))
  7215. (outa i (* (env ampf)
  7216. (+ (polywave gen1 frq)
  7217. (polywave gen2 frq)
  7218. (polywave gen3 frq)))))))))
  7219. (virginia-rail-1 beg amp)
  7220. (virginia-rail-2 (+ beg .46) amp)
  7221. (virginia-rail-3 (+ beg .55) amp)
  7222. (virginia-rail-2 (+ beg .95) amp)
  7223. (virginia-rail-3 (+ beg 1.03) amp)
  7224. (virginia-rail-2 (+ beg 1.41) amp)
  7225. (virginia-rail-3 (+ beg 1.48) amp)
  7226. (virginia-rail-2 (+ beg 1.88) amp)
  7227. (virginia-rail-3 (+ beg 1.97) amp)
  7228. (virginia-rail-1 (+ beg 2.06) amp))
  7229. ;; (with-sound (:play #t) (virginia-rail 0 .5))
  7230. ;;; --------------------------------------------------------------------------------
  7231. ;;;
  7232. ;;; Sage Sparrow
  7233. ;;;
  7234. ;;; this is one of the best so far
  7235. (defanimal (sage-sparrow beg amp)
  7236. ;; calif 39 4
  7237. ;; first 4 pure tones
  7238. (let ((dur 0.23))
  7239. (let ((start (seconds->samples beg))
  7240. (stop (seconds->samples (+ beg dur)))
  7241. (ampf (make-env '(0.000 0.000 0.038 0.048 0.075 0.162 0.185 0.000 0.262 0.000 0.284 0.118 0.333 0.592
  7242. 0.363 0.526 0.429 0.000 0.502 0.000 0.528 0.184 0.579 0.912 0.613 0.846 0.665 0.140
  7243. 0.688 0.000 0.766 0.000 0.786 0.250 0.831 1.000 0.871 0.961 0.933 0.276 1.000 0.000)
  7244. :duration dur :scaler (* .7 amp)))
  7245. (gen1 (make-polywave 3800.0 '(1 .995 2 .005))))
  7246. (do ((i start (+ i 1)))
  7247. ((= i stop))
  7248. (outa i (* (env ampf)
  7249. (polywave gen1))))))
  7250. ;; 3 buzzes
  7251. (let ((dur 0.23)
  7252. (start (seconds->samples (+ beg 0.264))))
  7253. (let ((stop (+ start (seconds->samples dur)))
  7254. (ampf (make-env '(0.000 0.000 0.055 0.118 0.071 0.099 0.079 0.329 0.107 0.208 0.114 0.248 0.125 0.568
  7255. 0.153 0.202 0.159 0.224 0.173 0.532 0.200 0.199 0.213 0.226 0.226 0.467 0.255 0.128
  7256. 0.270 0.348 0.299 0.106 0.313 0.138 0.351 0.000 0.454 0.000 0.464 0.052 0.471 0.021
  7257. 0.481 0.046 0.485 0.138 0.496 0.058 0.502 0.104 0.507 0.322 0.515 0.163 0.523 0.124
  7258. 0.534 0.584 0.537 0.350 0.544 0.230 0.549 0.411 0.555 0.825 0.560 0.439 0.569 0.323
  7259. 0.573 0.421 0.579 1.000 0.591 0.348 0.603 0.981 0.612 0.433 0.618 0.235 0.628 0.981
  7260. 0.636 0.425 0.643 0.301 0.649 0.432 0.653 0.799 0.666 0.185 0.671 0.286 0.680 0.660
  7261. 0.691 0.061 0.698 0.139 0.704 0.334 0.719 0.093 0.769 0.038 0.805 0.026 0.838 0.060
  7262. 0.854 0.139 0.865 0.046 0.872 0.201 0.880 0.004 0.891 0.174 0.899 0.042 0.907 0.201
  7263. 0.918 0.029 0.926 0.113 0.936 0.019 0.943 0.068 0.957 0.013 0.960 0.074 0.971 0.021 1.000 0.000 )
  7264. :duration dur :scaler (* .4 amp)))
  7265. (frqf (make-env '(0.000 0.609 0.026 0.606 0.056 0.316 0.060 0.568 0.080 0.455 0.096 0.309 0.101 0.574
  7266. 0.128 0.451 0.144 0.300 0.150 0.563 0.176 0.451 0.194 0.281 0.199 0.549 0.223 0.465
  7267. 0.244 0.295 0.256 0.506 0.274 0.435 0.289 0.291 0.307 0.487 0.335 0.284 0.456 0.373
  7268. 0.467 0.584 0.480 0.435 0.490 0.604 0.507 0.426 0.512 0.606 0.529 0.416 0.532 0.510
  7269. 0.537 0.597 0.551 0.412 0.554 0.508 0.560 0.597 0.576 0.426 0.579 0.519 0.586 0.600
  7270. 0.598 0.442 0.608 0.584 0.623 0.449 0.633 0.588 0.649 0.442 0.655 0.570 0.673 0.453
  7271. 0.681 0.563 0.700 0.396 0.706 0.570 0.819 0.469 0.829 0.307 0.835 0.471 0.847 0.307
  7272. 0.854 0.515 0.865 0.323 0.871 0.522 0.881 0.314 0.886 0.398 0.889 0.531 0.904 0.304
  7273. 0.909 0.494 0.920 0.311 0.925 0.499 0.942 0.284 0.943 0.428 0.957 0.371 0.958 0.513 1.000 0.508 )
  7274. :duration dur :scaler (hz->radians 4300.0) :offset (hz->radians 1000)))
  7275. (gen1 (make-polywave 0.0 '(1 .99 2 .005 3 .005))))
  7276. (do ((i start (+ i 1)))
  7277. ((= i stop))
  7278. (outa i (* (env ampf)
  7279. (polywave gen1 (env frqf)))))))
  7280. ;; next pure tone (overlaps next)
  7281. (let ((dur (* 3 0.088))
  7282. (start (seconds->samples (+ beg 0.517))))
  7283. (let ((stop (+ start (seconds->samples dur)))
  7284. (ampf (make-env '(0.000 0.000 0.079 0.082 0.202 0.616 0.333 0.966 0.423 1.000 0.548 0.851 0.831 0.146 1.000 0.050 3 0)
  7285. :duration dur :scaler amp))
  7286. (gen1 (make-polywave 3900.0 '(1 .985 2 .005 3 .01))))
  7287. (do ((i start (+ i 1)))
  7288. ((= i stop))
  7289. (outa i (* (env ampf)
  7290. (polywave gen1))))))
  7291. ;; another buzz
  7292. (let ((dur 0.236)
  7293. (start (seconds->samples (+ beg 0.627))))
  7294. (let ((stop (+ start (seconds->samples dur)))
  7295. (ampf (make-env '(0.000 0.000 0.020 0.352 0.045 0.261 0.068 0.462 0.086 0.256 0.109 0.295 0.130 0.506
  7296. 0.152 0.151 0.176 0.705 0.192 0.359 0.202 0.169 0.230 0.666 0.247 0.293 0.263 0.190
  7297. 0.282 0.652 0.307 0.124 0.323 0.259 0.343 0.723 0.353 0.364 0.368 0.167 0.384 0.293
  7298. 0.397 0.785 0.405 0.380 0.421 0.128 0.437 0.256 0.452 0.762 0.466 0.300 0.481 0.112
  7299. 0.490 0.245 0.507 0.826 0.522 0.334 0.529 0.165 0.539 0.103 0.563 0.762 0.575 0.309
  7300. 0.593 0.192 0.608 0.318 0.617 0.945 0.645 0.098 0.663 0.256 0.677 0.906 0.691 0.384
  7301. 0.707 0.092 0.721 0.334 0.736 1.000 0.757 0.316 0.760 0.144 0.769 0.080 0.777 0.297
  7302. 0.794 0.771 0.825 0.108 0.837 0.277 0.854 0.867 0.864 0.263 0.881 0.085 0.899 0.204
  7303. 0.913 0.753 0.944 0.098 0.958 0.130 0.974 0.563 1.000 0.000 )
  7304. :duration dur :scaler (* .125 amp)))
  7305. (frqf (make-env '(0.000 0.403 0.030 0.502 0.034 0.369 0.067 0.433 0.084 0.556 0.087 0.375 0.104 0.386
  7306. 0.121 0.457 0.131 0.512 0.135 0.345 0.147 0.372 0.168 0.437 0.184 0.509 0.189 0.362
  7307. 0.214 0.416 0.238 0.505 0.242 0.358 0.265 0.403 0.290 0.509 0.295 0.352 0.317 0.396
  7308. 0.345 0.509 0.350 0.345 0.377 0.416 0.401 0.509 0.404 0.362 0.428 0.403 0.456 0.505
  7309. 0.461 0.362 0.482 0.406 0.508 0.509 0.513 0.355 0.524 0.354 0.539 0.399 0.563 0.505
  7310. 0.568 0.358 0.581 0.364 0.624 0.505 0.627 0.352 0.638 0.354 0.652 0.399 0.682 0.495
  7311. 0.687 0.355 0.699 0.371 0.715 0.416 0.741 0.512 0.745 0.352 0.757 0.361 0.772 0.403
  7312. 0.797 0.495 0.802 0.354 0.814 0.364 0.834 0.416 0.858 0.519 0.862 0.358 0.884 0.406
  7313. 0.914 0.498 0.923 0.369 0.940 0.381 0.955 0.435 0.976 0.493 0.982 0.361 1.000 0.364)
  7314. :duration dur :scaler (hz->radians 6100)))
  7315. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  7316. (do ((i start (+ i 1)))
  7317. ((= i stop))
  7318. (outa i (* (env ampf)
  7319. (polywave gen1 (env frqf)))))))
  7320. ;; 2 more buzzes
  7321. (let ((dur 0.22)
  7322. (start (seconds->samples (+ beg 0.897))))
  7323. (let ((stop (+ start (seconds->samples dur)))
  7324. (ampf (make-env '(0.000 0.000 0.024 0.034 0.032 0.018 0.042 0.059 0.047 0.029 0.057 0.101 0.062 0.043
  7325. 0.072 0.146 0.079 0.016 0.087 0.183 0.095 0.031 0.103 0.194 0.109 0.050 0.117 0.241
  7326. 0.125 0.031 0.132 0.268 0.140 0.038 0.148 0.335 0.155 0.050 0.164 0.351 0.170 0.068
  7327. 0.182 0.401 0.187 0.151 0.194 0.511 0.203 0.187 0.212 0.531 0.218 0.273 0.227 0.662
  7328. 0.233 0.473 0.242 0.775 0.249 0.604 0.268 0.919 0.279 0.878 0.289 1.000 0.301 0.795
  7329. 0.313 0.775 0.331 0.563 0.341 0.561 0.375 0.236 0.407 0.124 0.426 0.108 0.436 0.000
  7330. 0.591 0.000 0.618 0.052 0.626 0.032 0.649 0.122 0.657 0.076 0.676 0.270 0.687 0.205
  7331. 0.704 0.469 0.713 0.360 0.721 0.442 0.728 0.227 0.735 0.585 0.751 0.518 0.757 0.272
  7332. 0.768 0.694 0.780 0.592 0.790 0.324 0.799 0.712 0.811 0.680 0.821 0.286 0.833 0.718
  7333. 0.840 0.687 0.850 0.216 0.861 0.656 0.874 0.592 0.881 0.194 0.892 0.477 0.901 0.468
  7334. 0.914 0.153 0.924 0.349 0.939 0.085 1.000 0.000)
  7335. :duration dur :scaler (* .8 amp)))
  7336. (frqf (make-env '(0.000 0.600 0.214 0.619 0.258 0.609 0.298 0.534 0.391 0.427 0.629 0.483 0.646 0.613
  7337. 0.660 0.513 0.678 0.623 0.694 0.508 0.708 0.628 0.724 0.529 0.737 0.642 0.753 0.527
  7338. 0.769 0.634 0.783 0.527 0.800 0.642 0.814 0.521 0.831 0.648 0.845 0.523 0.862 0.644
  7339. 0.876 0.536 0.893 0.640 0.908 0.531 0.923 0.642 1.000 0.563)
  7340. :duration dur :scaler (hz->radians 5950)))
  7341. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .006 4 .004))))
  7342. (do ((i start (+ i 1)))
  7343. ((= i stop))
  7344. (outa i (* (env ampf)
  7345. (polywave gen1 (env frqf)))))))
  7346. ;; two tones
  7347. (let ((dur 0.145)
  7348. (start (seconds->samples (+ beg 1.123))))
  7349. (let ((stop (+ start (seconds->samples dur)))
  7350. (ampf (make-env '(0.000 0.000 0.060 0.075 0.110 0.186 0.159 0.285 0.209 0.328 0.268 0.305 0.384 0.002
  7351. 0.461 0.000 0.497 0.144 0.572 0.851 0.631 1.000 0.661 0.989 0.712 0.835 0.768 0.540
  7352. 0.822 0.136 0.861 0.061 0.915 0.044 0.942 0.069 1.000 0.000)
  7353. :duration dur :scaler (* .6 amp)))
  7354. (frqf (make-env '(0.000 0.313 0.164 0.305 0.379 0.289 0.421 0.292 0.432 0.411 0.642 0.398 1.000 0.401)
  7355. :duration dur :scaler (hz->radians 7900)))
  7356. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01 4 .005))))
  7357. (do ((i start (+ i 1)))
  7358. ((= i stop))
  7359. (outa i (* (env ampf)
  7360. (polywave gen1 (env frqf)))))))
  7361. ;; last buzz
  7362. (let ((dur 0.321)
  7363. (start (seconds->samples (+ beg 1.25))))
  7364. (let ((stop (+ start (seconds->samples dur)))
  7365. (ampf (make-env '(0.000 0.000 0.011 0.132 0.016 0.059 0.027 0.220 0.034 0.078 0.044 0.323 0.051 0.080
  7366. 0.059 0.561 0.065 0.103 0.072 0.674 0.085 0.028 0.094 0.072 0.102 0.654 0.108 0.088
  7367. 0.118 0.922 0.139 0.031 0.145 0.109 0.149 0.579 0.156 0.134 0.165 0.917 0.173 0.770
  7368. 0.179 0.222 0.185 0.023 0.189 0.096 0.196 0.690 0.201 0.039 0.209 0.961 0.217 0.842
  7369. 0.225 0.031 0.238 0.067 0.244 0.566 0.249 0.129 0.257 0.904 0.262 0.801 0.270 0.147
  7370. 0.278 0.049 0.283 0.140 0.288 0.612 0.294 0.036 0.301 0.979 0.309 0.925 0.318 0.124
  7371. 0.329 0.052 0.334 0.432 0.339 0.041 0.348 0.718 0.354 0.879 0.366 0.065 0.377 0.080
  7372. 0.380 0.494 0.387 0.103 0.401 0.817 0.413 0.054 0.423 0.088 0.429 0.447 0.434 0.057
  7373. 0.446 0.824 0.450 0.708 0.459 0.070 0.470 0.059 0.473 0.279 0.478 0.044 0.489 0.760
  7374. 0.494 0.726 0.507 0.072 0.514 0.044 0.520 0.276 0.527 0.052 0.535 0.506 0.539 0.592
  7375. 0.552 0.054 0.559 0.078 0.564 0.245 0.573 0.052 0.584 0.633 0.589 0.483 0.596 0.088
  7376. 0.605 0.065 0.611 0.258 0.616 0.067 0.625 0.488 0.628 0.545 0.642 0.054 0.653 0.085
  7377. 0.656 0.227 0.665 0.049 0.670 0.401 0.674 0.468 0.679 0.416 0.687 0.062 0.696 0.072
  7378. 0.701 0.147 0.708 0.078 0.715 0.444 0.719 0.514 0.734 0.052 0.741 0.031 0.748 0.142
  7379. 0.753 0.065 0.764 0.442 0.780 0.065 0.787 0.052 0.794 0.147 0.801 0.054 0.811 0.370
  7380. 0.815 0.331 0.825 0.054 0.834 0.041 0.840 0.140 0.846 0.049 0.858 0.362 0.863 0.279
  7381. 0.870 0.044 0.882 0.034 0.885 0.109 0.892 0.052 0.897 0.072 0.902 0.209 0.908 0.269
  7382. 0.916 0.044 0.930 0.021 0.934 0.085 0.942 0.026 0.958 0.129 0.972 0.039 1.000 0.000)
  7383. :duration dur :scaler (* .25 amp)))
  7384. (frqf (make-env '(0.000 0.592 0.013 0.550 0.023 0.615 0.035 0.548 0.043 0.612 0.054 0.530 0.063 0.646
  7385. 0.071 0.556 0.098 0.545 0.103 0.654 0.113 0.558 0.143 0.550 0.150 0.664 0.155 0.550
  7386. 0.178 0.556 0.185 0.641 0.191 0.556 0.227 0.563 0.234 0.643 0.238 0.550 0.270 0.553
  7387. 0.276 0.630 0.280 0.553 0.310 0.550 0.317 0.620 0.322 0.550 0.356 0.548 0.363 0.612
  7388. 0.367 0.548 0.402 0.550 0.407 0.628 0.413 0.553 0.445 0.550 0.449 0.607 0.453 0.537
  7389. 0.485 0.540 0.492 0.615 0.497 0.545 0.529 0.543 0.537 0.612 0.542 0.537 0.572 0.532
  7390. 0.579 0.581 0.583 0.537 0.613 0.537 0.617 0.597 0.623 0.522 0.656 0.525 0.662 0.589
  7391. 0.668 0.535 0.703 0.535 0.706 0.597 0.712 0.530 0.742 0.530 0.747 0.581 0.757 0.540
  7392. 0.786 0.540 0.791 0.602 0.797 0.537 0.832 0.537 0.836 0.605 0.843 0.532 0.859 0.587
  7393. 0.891 0.491 0.901 0.594 1.000 0.545)
  7394. :duration dur :scaler (hz->radians 5400)))
  7395. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  7396. (do ((i start (+ i 1)))
  7397. ((= i stop))
  7398. (outa i (* (env ampf)
  7399. (polywave gen1 (env frqf))))))))
  7400. ;; (with-sound (:play #t) (sage-sparrow 0 .5))
  7401. ;;; --------------------------------------------------------------------------------
  7402. ;;;
  7403. ;;; Hairy woodpecker
  7404. (defanimal (hairy-woodpecker beg amp)
  7405. ;; calif 81 10
  7406. (let ((dur 0.08))
  7407. (let ((start (seconds->samples beg))
  7408. (stop (seconds->samples (+ beg dur)))
  7409. (ampf (make-env '(0.000 0.000 0.099 0.188 0.152 0.148 0.211 0.558 0.242 0.267 0.278 0.519 0.434 0.472
  7410. 0.527 0.543 0.612 0.479 0.792 0.941 0.831 0.523 0.854 1.000 0.913 0.422 0.927 0.200
  7411. 0.946 0.430 0.971 0.304 1.000 0.000 )
  7412. :duration dur :scaler amp))
  7413. (frqf (make-env '(0.000 0.180 0.056 0.213 0.135 0.241 0.167 0.305 0.191 0.396 0.212 0.402 0.242 0.485
  7414. 0.288 0.506 0.390 0.524 0.509 0.530 0.637 0.537 0.732 0.530 0.770 0.503 0.808 0.503
  7415. 0.826 0.427 0.848 0.366 0.889 0.345 0.913 0.232 1.000 0.198)
  7416. :duration dur :scaler (hz->radians 10000.0)))
  7417. (gen1 (make-polywave 0.0 '(1 .9 2 .09 3 .01)))
  7418. (gen2 (make-polywave 0.0 '(1 .2 2 .1 3 .1 4 .1 5 .1 6 .05 7 .01)))
  7419. (ampf2 (make-env '(0 1 .3 1 .4 0 .75 0 .8 1 1 1) :duration dur :scaler 1.0)))
  7420. (do ((i start (+ i 1)))
  7421. ((= i stop))
  7422. (let ((frq (env frqf)))
  7423. (outa i (* (env ampf)
  7424. (+ (polywave gen1 frq)
  7425. (* (env ampf2)
  7426. (polywave gen2 (* 0.5 frq)))))))))))
  7427. ;; (with-sound (:play #t) (hairy-woodpecker 0 .5))
  7428. ;;; --------------------------------------------------------------------------------
  7429. ;;;
  7430. ;;; Pacific-slope flycatcher
  7431. (defanimal (pacific-slope-flycatcher beg amp)
  7432. ;; calif 8 22
  7433. (let ((dur 0.3))
  7434. (let ((start (seconds->samples beg))
  7435. (stop (seconds->samples (+ beg dur)))
  7436. (ampf (make-env '(0.000 0.000 0.015 0.088 0.017 0.256 0.032 0.345 0.054 0.354 0.082 0.210 0.101 0.000
  7437. 0.161 0.000 0.232 0.860 0.320 1.000 0.368 0.848 0.401 0.927 0.466 0.000 0.486 0.000
  7438. 0.528 0.463 0.687 0.643 0.708 0.515 0.719 0.686 0.812 0.787 0.863 0.707 0.896 0.497
  7439. 0.939 0.500 0.970 0.396 1.000 0.000)
  7440. :duration dur :scaler amp))
  7441. (frqf (make-env '(0.000 0.266 0.014 0.487 0.023 0.451 0.033 0.528 0.042 0.480 0.058 0.480 0.076 0.420
  7442. 0.102 0.511 0.172 0.618 0.212 0.663 0.252 0.694 0.295 0.709 0.351 0.775 0.382 0.771
  7443. 0.397 0.726 0.406 0.671 0.433 0.443 0.455 0.318 0.491 0.250 0.532 0.451 0.547 0.486
  7444. 0.565 0.503 0.678 0.520 0.753 0.539 0.818 0.570 0.951 0.661 1.000 0.672)
  7445. :duration dur :scaler (hz->radians 10100.0)))
  7446. (gen1 (make-polywave 0.0 '(1 .98 2 .005 3 .01))))
  7447. (do ((i start (+ i 1)))
  7448. ((= i stop))
  7449. (outa i (* (env ampf)
  7450. (polywave gen1 (env frqf))))))))
  7451. ;; (with-sound (:play #t) (pacific-slope-flycatcher 0 .5))
  7452. ;;; --------------------------------------------------------------------------------
  7453. ;;;
  7454. ;;; Dusky flycatcher
  7455. (defanimal (dusky-flycatcher beg amp)
  7456. ;; calif 7 20.4
  7457. (let ((dur 0.125))
  7458. (let ((start (seconds->samples beg))
  7459. (stop (seconds->samples (+ beg dur)))
  7460. (ampf (make-env '(0.000 0.000 0.018 0.291 0.036 0.414 0.103 0.559 0.131 0.572 0.212 0.748 0.279 1.000
  7461. 0.297 0.994 0.354 0.272 0.400 0.102 0.417 0.000 0.580 0.000 0.588 0.089 0.619 0.164
  7462. 0.647 0.362 0.660 0.364 0.687 0.042 0.700 0.091 0.731 0.692 0.746 0.659 0.766 0.385
  7463. 0.779 0.314 0.794 0.071 0.812 0.042 0.844 0.374 0.868 0.333 0.891 0.177 0.924 0.069 1.000 0.000)
  7464. :duration dur :scaler amp))
  7465. (frqf (make-env '(0.000 0.535 0.036 0.500 0.087 0.460 0.145 0.451 0.229 0.458 0.288 0.470 0.335 0.507
  7466. 0.386 0.533 0.416 0.521 0.583 0.314 0.656 0.353 0.677 0.398 0.682 0.537 0.696 0.567
  7467. 0.711 0.540 0.723 0.414 0.751 0.419 0.788 0.470 0.796 0.567 0.809 0.600 0.829 0.574
  7468. 0.841 0.460 0.864 0.460 0.892 0.505 0.924 0.528 0.971 0.516 1.000 0.495)
  7469. :duration dur :scaler (hz->radians 10100.0)))
  7470. (gen1 (make-polywave 0.0 '(1 .99 2 .01 3 .005))))
  7471. (do ((i start (+ i 1)))
  7472. ((= i stop))
  7473. (outa i (* (env ampf)
  7474. (polywave gen1 (env frqf))))))))
  7475. ;; (with-sound (:play #t) (dusky-flycatcher 0 .5))
  7476. ;;; --------------------------------------------------------------------------------
  7477. ;;;
  7478. ;;; Inca dove
  7479. (defanimal (inca-dove-1 beg amp)
  7480. ;; south 11 9.6
  7481. (let ((dur 0.76))
  7482. (let ((start (seconds->samples beg))
  7483. (stop (seconds->samples (+ beg dur)))
  7484. (ampf (make-env '(0.000 0.000 0.022 0.506 0.046 0.664 0.079 0.889 0.109 0.684 0.136 0.980 0.166 0.806
  7485. 0.264 0.779 0.427 0.000 0.674 0.000 0.707 0.751 0.750 0.609 0.777 0.747 0.791 0.403
  7486. 0.815 0.680 0.842 0.368 0.875 0.285 1.000 0.000)
  7487. :duration dur :scaler amp))
  7488. (frqf (make-env '(0.000 0.268 0.048 0.323 0.106 0.338 0.184 0.331 0.247 0.321 0.284 0.294 0.314 0.296
  7489. 0.419 0.287 0.435 0.254 0.683 0.237 0.696 0.285 0.715 0.323 0.748 0.321 0.781 0.306
  7490. 0.830 0.300 0.875 0.277 0.922 0.264 1.000 0.208)
  7491. :duration dur :scaler (hz->radians 2850.0)))
  7492. (gen1 (make-polywave 0.0 '(1 .99 3 .01)))
  7493. (rndf (make-env '(0 0 .3 0 .4 1 .5 0 .65 0 .7 .1 .85 .1 1 1) :duration dur))
  7494. (rnd (make-rand-interp 400 (hz->radians 100))))
  7495. (do ((i start (+ i 1)))
  7496. ((= i stop))
  7497. (outa i (* (env ampf)
  7498. (polywave gen1 (+ (env frqf)
  7499. (* (env rndf)
  7500. (rand-interp rnd))))))))))
  7501. ;; (with-sound (:play #t) (inca-dove-1 0 .5))
  7502. (defanimal (inca-dove-2 beg amp)
  7503. ;; south 11 11.3 ("what the hell")
  7504. (let ((pitch (hz->radians 5150))
  7505. (dur1 .1)
  7506. (dur2 .07)
  7507. (dur3 .29)
  7508. (start1 (seconds->samples beg)))
  7509. (let ((stop1 (+ start1 (seconds->samples dur1)))
  7510. (ampf1 (make-env '(0.000 0.000 0.354 0.256 0.417 0.212 0.543 0.031 0.579 0.101 0.608 0.606 0.635 0.822
  7511. 0.666 0.744 0.724 0.046 0.749 0.637 0.783 0.981 0.821 0.966 0.869 0.660 0.905 0.746
  7512. 0.930 0.702 0.972 0.197 1.000 0.000)
  7513. :duration dur1 :scaler amp))
  7514. (frqf1 (make-env '(0.000 0.092 0.082 0.115 0.201 0.137 0.351 0.143 0.477 0.140 0.553 0.162 0.624 0.166
  7515. 0.675 0.159 0.770 0.166 0.838 0.162 0.933 0.156 1.000 0.156)
  7516. :duration dur1 :scaler pitch))
  7517. (start2 (seconds->samples (+ beg .2))))
  7518. (let ((stop2 (+ start2 (seconds->samples dur2)))
  7519. (ampf2 (make-env '(0.000 0.000 0.254 0.252 0.513 0.997 0.612 0.943 0.675 0.990 0.851 0.809 0.906 0.608 1.000 0.000)
  7520. :duration dur2 :scaler amp))
  7521. (frqf2 (make-env '(0.000 0.129 0.158 0.154 0.369 0.173 0.450 0.173 0.867 0.164 1.000 0.138)
  7522. :duration dur2 :scaler pitch))
  7523. (start3 (seconds->samples (+ beg .3))))
  7524. (let ((stop3 (+ start3 (seconds->samples dur3)))
  7525. (ampf3 (make-env '(0.000 0.000 0.017 0.084 0.043 1.000 0.049 0.964 0.065 0.202 0.071 0.311 0.084 1.000
  7526. 0.096 0.851 0.109 0.363 0.123 0.920 0.140 0.790 0.150 0.308 0.162 0.931 0.166 0.896
  7527. 0.177 0.414 0.186 0.859 0.190 0.794 0.197 0.264 0.204 0.890 0.209 0.858 0.216 0.218
  7528. 0.228 0.934 0.233 0.885 0.243 0.331 0.248 0.776 0.253 0.877 0.264 0.372 0.274 0.881
  7529. 0.277 0.869 0.287 0.128 0.290 0.481 0.292 0.789 0.296 0.848 0.302 0.660 0.307 0.182
  7530. 0.311 0.478 0.313 0.831 0.318 0.950 0.322 0.881 0.330 0.175 0.334 0.559 0.338 0.896
  7531. 0.341 0.953 0.350 0.438 0.356 0.829 0.362 0.952 0.364 0.887 0.374 0.309 0.387 0.942
  7532. 0.391 0.930 0.396 0.796 0.407 0.912 0.421 0.272 0.428 0.633 0.431 0.847 0.436 0.878
  7533. 0.446 0.222 0.452 0.811 0.459 0.967 0.468 0.825 0.475 0.942 0.480 0.896 0.491 0.153
  7534. 0.506 0.919 0.512 0.867 0.523 0.482 0.532 0.581 0.544 0.402 0.551 0.633 0.559 0.767
  7535. 0.563 0.740 0.575 0.485 0.587 0.638 0.597 0.656 0.606 0.590 0.616 0.477 0.627 0.025
  7536. 0.634 0.213 0.642 0.301 0.665 0.251 0.673 0.156 0.687 0.276 0.717 0.159 0.725 0.207
  7537. 0.735 0.094 0.749 0.157 0.769 0.108 0.799 0.155 0.827 0.115 0.858 0.142 0.876 0.070 1.000 0.000)
  7538. :duration dur3 :scaler amp))
  7539. (frqf3 (make-env '(0.000 0.172 0.135 0.191 0.199 0.192 0.266 0.176 0.325 0.173 0.384 0.182 0.423 0.186
  7540. 0.614 0.173 0.896 0.145 1.000 0.138)
  7541. :duration dur3 :scaler pitch))
  7542. (gen1 (make-polywave 0.0 '(1 .99 3 .01)))
  7543. (rnd (make-rand-interp 300 (hz->radians 50))))
  7544. (do ((i start1 (+ i 1)))
  7545. ((= i stop1))
  7546. (outa i (* (env ampf1) (polywave gen1 (env frqf1)))))
  7547. (do ((i start2 (+ i 1)))
  7548. ((= i stop2))
  7549. (outa i (* (env ampf2) (polywave gen1 (env frqf2)))))
  7550. (do ((i start3 (+ i 1)))
  7551. ((= i stop3))
  7552. (outa i (* (env ampf3) (polywave gen1 (+ (env frqf3)
  7553. (rand-interp rnd)))))))))))
  7554. ;; (with-sound (:play #t) (inca-dove-2 0 .5))
  7555. ;;; --------------------------------------------------------------------------------
  7556. ;;;
  7557. ;;; Great kiskadee
  7558. (defanimal (great-kiskadee beg amp)
  7559. ;; south 37 16.5
  7560. ;; note #1
  7561. (let ((dur 0.123))
  7562. (let ((start (seconds->samples beg))
  7563. (stop (seconds->samples (+ beg dur)))
  7564. (ampf (make-env '(0.000 0.000 0.013 0.068 0.026 0.000 0.048 0.030 0.053 0.211 0.068 0.000 0.083 0.000
  7565. 0.093 0.184 0.098 0.479 0.114 0.000 0.125 0.000 0.135 0.216 0.140 0.526 0.159 0.000
  7566. 0.172 0.000 0.174 0.159 0.179 0.252 0.185 0.625 0.190 0.578 0.205 0.000 0.218 0.066
  7567. 0.225 0.301 0.230 0.715 0.240 0.592 0.250 0.000 0.260 0.077 0.280 0.800 0.295 0.000
  7568. 0.305 0.099 0.324 0.822 0.341 0.000 0.351 0.137 0.370 0.855 0.377 0.660 0.389 0.000
  7569. 0.396 0.110 0.405 0.397 0.414 0.868 0.422 0.751 0.442 0.071 0.457 0.562 0.461 0.827
  7570. 0.470 0.759 0.488 0.438 0.496 0.863 0.506 0.822 0.519 0.666 0.538 0.737 0.553 0.737
  7571. 0.567 0.871 0.619 0.973 0.650 0.847 0.694 0.375 0.766 0.238 0.789 0.353 1.000 0.000)
  7572. :duration dur :scaler amp))
  7573. (frqf (make-env '(0.000 0.357 0.048 0.353 0.056 0.407 0.098 0.353 0.105 0.395 0.142 0.347 0.145 0.390
  7574. 0.183 0.353 0.194 0.403 0.231 0.374 0.240 0.420 0.273 0.372 0.285 0.434 0.317 0.388
  7575. 0.332 0.438 0.364 0.376 0.382 0.438 0.406 0.384 0.427 0.447 0.454 0.370 0.472 0.432
  7576. 0.489 0.436 0.500 0.399 0.527 0.418 0.561 0.420 0.647 0.359 0.711 0.317 0.736 0.313
  7577. .9 .2 .95 .15)
  7578. :duration dur :scaler (hz->radians (* 0.5 8280.0))))
  7579. (gen1 (make-polywave 0.0 (normalize-partials '(1 .17 3 .1 4 .1 5 .14 6 .01))))
  7580. (ampf1 (make-env '(0 .1 .3 1 .5 1 .8 0 1 0) :duration dur))
  7581. (gen2 (make-polywave 0.0 (normalize-partials '(2 .95 3 .04 4 .03)))))
  7582. (do ((i start (+ i 1)))
  7583. ((= i stop))
  7584. (let ((frq (env frqf)))
  7585. (outa i (* (env ampf)
  7586. (+ (* (env ampf1)
  7587. (polywave gen1 frq))
  7588. (polywave gen2 frq))))))))
  7589. ;; note #2
  7590. (let ((dur 0.38))
  7591. (let ((start (seconds->samples (+ beg .2)))
  7592. (stop (seconds->samples (+ beg dur)))
  7593. (ampf (make-env '(0.000 0.000 0.024 0.225 0.147 0.534 0.263 0.731 0.406 0.881 0.597 0.873 0.772 0.754
  7594. 0.897 0.503 0.926 0.582 1.000 0.000)
  7595. :duration dur :scaler (* 0.8 amp)))
  7596. (frqf (make-env '(0.000 0.195 0.066 0.286 0.086 0.305 0.120 0.365 0.187 0.417 0.345 0.461 0.525 0.483
  7597. 0.748 0.450 0.853 0.429 0.919 0.392 0.957 0.328 0.971 0.253 1.000 0.214)
  7598. :duration dur :scaler (hz->radians (* 0.5 5500.0))))
  7599. (gen1 (make-polywave 0.0 (normalize-partials '(3 .01 4 .01 5 .01 6 .01))))
  7600. (gen2 (make-polywave 0.0 (normalize-partials '(1 .08 2 1.0 3 .06 5 .02 7 .007 8 .003 10 .001))))
  7601. (ampf1 (make-env '(0 1 .07 1 .15 .1 .85 .1 .9 1 1 1) :duration dur))
  7602. (ampf2 (make-env '(0 0 .3 1 .8 1 1 0) :duration dur)))
  7603. (do ((i start (+ i 1)))
  7604. ((= i stop))
  7605. (let ((frq (env frqf)))
  7606. (outa i (* (env ampf)
  7607. (+ (* (env ampf1)
  7608. (polywave gen1 frq))
  7609. (* (env ampf2)
  7610. (polywave gen2 frq))))))))))
  7611. ;; (with-sound (:play #t) (great-kiskadee 0 .5))
  7612. ;;; --------------------------------------------------------------------------------
  7613. ;;;
  7614. ;;; Chestnut-sided warbler
  7615. (define (chestnut-sided-warbler beg1 amp1)
  7616. ;; east 12 3.5
  7617. (defanimal (chestnut-sided-warbler-1 beg amp)
  7618. ;; first 6 notes
  7619. (let ((dur 0.11))
  7620. (let ((start (seconds->samples beg))
  7621. (stop (seconds->samples (+ beg dur)))
  7622. (ampf (make-env '(0.000 0.000 0.188 0.446 0.230 0.412 0.276 0.190 0.298 0.330 0.302 0.158 0.309 0.278
  7623. 0.312 0.037 0.324 0.126 0.367 0.077 0.400 0.261 0.459 0.880 0.482 0.710 0.493 0.798
  7624. 0.503 0.628 0.519 0.998 0.534 0.591 0.559 0.843 0.565 0.769 0.579 0.835 0.601 0.562
  7625. 0.622 0.663 0.641 0.581 0.642 0.689 0.660 0.465 0.682 0.601 0.707 0.678 0.724 0.603
  7626. 0.746 0.668 0.758 0.589 0.768 0.682 0.814 0.549 0.833 0.638 0.865 0.582 0.881 0.618
  7627. 0.915 0.527 0.965 0.143 1.000 0.000)
  7628. :duration dur :scaler amp))
  7629. (frqf (make-env '(0.000 0.262 0.127 0.273 0.263 0.273 0.294 0.320 0.318 0.383 0.346 0.410 0.373 0.386
  7630. 0.396 0.353 0.421 0.339 0.458 0.336 0.490 0.306 0.516 0.303 0.534 0.287 0.598 0.267
  7631. 0.689 0.245 0.806 0.223 1.000 0.212)
  7632. :duration dur :scaler (hz->radians 22000.0)))
  7633. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  7634. (do ((i start (+ i 1)))
  7635. ((= i stop))
  7636. (outa i (* (env ampf)
  7637. (polywave gen1 (env frqf))))))))
  7638. (defanimal (chestnut-sided-warbler-2 beg amp)
  7639. ;; notes 7 and 8
  7640. (let ((dur 0.17))
  7641. (let ((start (seconds->samples beg))
  7642. (stop (seconds->samples (+ beg dur)))
  7643. (ampf (make-env '(0.000 0.000 0.213 0.394 0.239 0.394 0.319 0.669 0.337 0.584 0.354 0.683 0.369 0.620
  7644. 0.381 0.705 0.387 0.556 0.398 0.642 0.419 0.683 0.468 0.576 0.490 0.424 0.513 0.576
  7645. 0.589 0.212 0.644 0.380 0.693 0.609 0.708 0.537 0.721 0.402 0.729 0.515 0.754 0.620
  7646. 0.767 0.526 0.785 0.749 0.812 0.942 0.827 0.675 0.835 0.733 0.853 0.573 0.863 0.369
  7647. 0.876 1.000 0.881 0.565 0.887 0.893 0.910 0.857 0.919 0.672 0.939 0.774 0.950 0.551
  7648. 0.968 0.477 0.982 0.050 0.989 0.102 1.000 0.000)
  7649. :duration dur :scaler (* .9 amp)))
  7650. (frqf (make-env '(0.000 0.129 0.067 0.160 0.129 0.174 0.184 0.176 0.273 0.196 0.351 0.212 0.390 0.229
  7651. 0.426 0.251 0.470 0.270 0.503 0.253 0.538 0.204 0.563 0.182 0.594 0.168 0.633 0.176
  7652. 0.688 0.218 0.715 0.223 0.733 0.240 0.750 0.281 0.794 0.303 0.844 0.314 0.894 0.320
  7653. 0.945 0.336 1.000 0.325)
  7654. :duration dur :scaler (hz->radians 22000.0)))
  7655. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .005 4 .003))))
  7656. (do ((i start (+ i 1)))
  7657. ((= i stop))
  7658. (outa i (* (env ampf)
  7659. (polywave gen1 (env frqf))))))))
  7660. (defanimal (chestnut-sided-warbler-3 beg amp)
  7661. ;; last note
  7662. (let ((dur 0.19))
  7663. (let ((start (seconds->samples beg))
  7664. (stop (seconds->samples (+ beg dur)))
  7665. (ampf (make-env '(0.000 0.000 0.015 0.036 0.074 0.344 0.105 0.331 0.111 0.427 0.137 0.455 0.152 0.567
  7666. 0.166 0.466 0.178 0.840 0.194 0.749 0.207 0.884 0.232 0.992 0.239 0.953 0.245 0.763
  7667. 0.255 0.895 0.260 0.749 0.272 0.862 0.286 0.650 0.295 0.744 0.302 0.636 0.334 0.501
  7668. 0.352 0.711 0.375 0.730 0.384 0.559 0.395 0.620 0.404 0.576 0.419 0.656 0.443 0.540
  7669. 0.462 0.559 0.473 0.490 0.487 0.534 0.566 0.267 0.582 0.320 0.645 0.154 0.714 0.113
  7670. 1.000 0.000)
  7671. :duration dur :scaler (* .7 amp)))
  7672. (frqf (make-env '(0.000 0.416 0.039 0.419 0.063 0.410 0.092 0.386 0.127 0.342 0.167 0.314 0.229 0.278
  7673. 0.334 0.245 0.497 0.198 0.579 0.179 0.628 0.176 0.675 0.171 0.731 0.160 0.841 0.152
  7674. 1.000 0.118)
  7675. :duration dur :scaler (hz->radians 22000.0)))
  7676. (gen1 (make-polywave 0.0 '(1 .98 2 .01)))) ; there are 3 to 5, but they alias at 44KHz
  7677. (do ((i start (+ i 1)))
  7678. ((= i stop))
  7679. (outa i (* (env ampf)
  7680. (polywave gen1 (env frqf))))))))
  7681. (let ((amps (vector .1 .3 .6 .8 .9 1.0))
  7682. (begs (vector 0.0 0.156 .311 .454 .594 .731)))
  7683. (do ((call 0 (+ call 1)))
  7684. ((= call 6))
  7685. (chestnut-sided-warbler-1 (+ beg1 (begs call))
  7686. (* amp1 (amps call)))))
  7687. (chestnut-sided-warbler-2 (+ beg1 .88) amp1)
  7688. (chestnut-sided-warbler-2 (+ beg1 1.09) amp1)
  7689. (chestnut-sided-warbler-3 (+ beg1 1.3) amp1))
  7690. ;; (with-sound (:play #t) (chestnut-sided-warbler 0 .5))
  7691. ;;; --------------------------------------------------------------------------------
  7692. ;;;
  7693. ;;; Yellow-bellied flycatcher
  7694. (defanimal (yellow-bellied-flycatcher beg amp)
  7695. ;; east 40 3.1
  7696. (let ((dur 0.167))
  7697. (let ((start (seconds->samples beg))
  7698. (stop (seconds->samples (+ beg dur)))
  7699. (ampf (make-env '(0.000 0.000 0.031 0.122 0.054 0.665 0.082 0.777 0.092 0.724 0.105 0.774 0.109 0.639
  7700. 0.116 0.697 0.121 0.577 0.135 0.781 0.149 0.368 0.153 0.419 0.171 0.092 0.176 0.234
  7701. 0.224 0.028 0.264 0.191 0.284 0.619 0.299 0.709 0.304 0.914 0.311 0.861 0.316 0.945
  7702. 0.320 0.809 0.327 0.957 0.332 0.786 0.337 0.972 0.348 0.973 0.362 0.742 0.377 0.358
  7703. 0.390 0.388 0.413 0.035 0.420 0.070 0.428 0.031 0.450 0.068 0.458 0.022 0.471 0.088
  7704. 0.480 0.051 0.490 0.189 0.499 0.041 0.509 0.164 0.518 0.101 0.526 0.230 0.536 0.046
  7705. 0.544 0.188 0.554 0.241 0.557 0.139 0.563 0.214 0.567 0.316 0.578 0.038 0.584 0.192
  7706. 0.595 0.303 0.598 0.186 0.607 0.381 0.615 0.082 0.621 0.132 0.628 0.286 0.634 0.266
  7707. 0.638 0.300 0.646 0.385 0.655 0.109 0.662 0.084 0.664 0.170 0.668 0.247 0.675 0.212
  7708. 0.687 0.382 0.697 0.122 0.704 0.086 0.708 0.236 0.715 0.262 0.718 0.334 0.724 0.251
  7709. 0.727 0.364 0.730 0.319 0.740 0.088 0.744 0.045 0.749 0.120 0.752 0.286 0.759 0.373
  7710. 0.764 0.259 0.770 0.341 0.778 0.234 0.782 0.057 0.789 0.122 0.794 0.245 0.801 0.336
  7711. 0.808 0.231 0.813 0.327 0.821 0.224 0.826 0.045 0.838 0.197 0.846 0.346 0.861 0.266
  7712. 0.867 0.074 0.874 0.189 0.880 0.168 0.887 0.388 0.904 0.489 0.917 0.520 0.922 0.497
  7713. 0.929 0.258 0.936 0.253 0.943 0.124 0.950 0.180 0.959 0.051 0.971 0.099 0.974 0.061
  7714. 0.980 0.089 0.988 0.032 1.000 0.000)
  7715. :duration dur :scaler amp))
  7716. (frqf (make-env '(0.000 0.341 0.025 0.368 0.045 0.434 0.059 0.482 0.073 0.482 0.086 0.465 0.101 0.434
  7717. 0.127 0.416 0.150 0.392 0.181 0.341 0.205 0.319 0.232 0.339 0.268 0.407 0.289 0.458
  7718. 0.311 0.500 0.324 0.509 0.390 0.518 0.408 0.590 0.444 0.487 0.455 0.247 0.470 0.253
  7719. 0.479 0.289 0.485 0.394 0.495 0.421 0.502 0.370 0.507 0.304 0.515 0.286 0.522 0.304
  7720. 0.523 0.438 0.529 0.454 0.538 0.441 0.546 0.319 0.552 0.295 0.559 0.326 0.562 0.425
  7721. 0.567 0.452 0.574 0.427 0.582 0.357 0.592 0.324 0.600 0.344 0.602 0.416 0.608 0.445
  7722. 0.616 0.447 0.625 0.339 0.634 0.322 0.642 0.337 0.643 0.394 0.645 0.454 0.654 0.452
  7723. 0.664 0.357 0.674 0.335 0.683 0.339 0.685 0.427 0.692 0.458 0.698 0.430 0.704 0.352
  7724. 0.714 0.337 0.721 0.346 0.727 0.436 0.731 0.456 0.737 0.434 0.742 0.374 0.756 0.346
  7725. 0.767 0.355 0.773 0.443 0.780 0.460 0.786 0.438 0.791 0.385 0.799 0.348 0.810 0.366
  7726. 0.815 0.421 0.821 0.434 0.824 0.419 0.831 0.372 0.841 0.359 0.851 0.357 0.854 0.388
  7727. 0.856 0.515 0.864 0.568 0.871 0.555 0.883 0.436 0.914 0.421 0.930 0.385 1.000 0.368)
  7728. :duration dur :scaler (hz->radians 10000.0)))
  7729. (gen1 (make-polywave 0.0 '(1 .98 2 .02 3 .005))))
  7730. (do ((i start (+ i 1)))
  7731. ((= i stop))
  7732. (outa i (* (env ampf)
  7733. (polywave gen1 (env frqf))))))))
  7734. ;; (with-sound (:play #t) (yellow-bellied-flycatcher 0 .5))
  7735. ;;; --------------------------------------------------------------------------------
  7736. ;;;
  7737. ;;; Black-throated blue warbler
  7738. (define (black-throated-blue-warbler beg1 amp1)
  7739. ;; east 15 9.8
  7740. (defanimal (black-throated-blue-warbler-1 beg dur amp ampf frq frqf ind)
  7741. (let ((speed 200))
  7742. (let ((start (seconds->samples beg))
  7743. (stop (seconds->samples (+ beg dur)))
  7744. (ampf (make-env ampf :duration dur :scaler amp))
  7745. (frqf1 (make-env frqf :duration dur :scaler (hz->radians frq)))
  7746. (gen1 (make-polywave 0.0 '(1 .99 2 .008 3 .003)))
  7747. (vib (make-oscil speed))
  7748. (vibf (make-env '(0 1 .8 1 .9 0 1 0) :duration dur :scaler (hz->radians ind)))
  7749. (rnd (make-rand-interp 800))
  7750. (trem (make-oscil (* 2 speed))))
  7751. (do ((i start (+ i 1)))
  7752. ((= i stop))
  7753. (outa i (* (env ampf)
  7754. (+ .25 (* .45 (abs (+ (rand-interp rnd) (* .7 (oscil trem))))))
  7755. (polywave gen1 (+ (env frqf1)
  7756. (* (env vibf) (oscil vib))))))))))
  7757. (black-throated-blue-warbler-1 beg1 .053 (* .2 amp1)
  7758. '(0.000 0.000 0.017 0.079 0.082 0.142 0.142 0.122 0.199 0.213 0.237 0.150 0.291 0.201
  7759. 0.317 0.102 0.352 0.197 0.395 0.248 0.415 0.201 0.435 0.335 0.468 0.323 0.488 0.429
  7760. 0.514 0.350 0.581 0.870 0.616 0.583 0.678 0.697 0.709 0.618 0.752 1.000 0.801 0.350
  7761. 0.815 0.295 0.838 0.500 0.895 0.197 0.911 0.366 0.929 0.220 0.955 0.248 0.972 0.134
  7762. 0.987 0.197 1.000 0.000)
  7763. 22000
  7764. '(0.000 0.222 0.038 0.204 0.099 0.208 0.134 0.197 0.205 0.208 0.244 0.186 0.288 0.211
  7765. 0.336 0.194 0.382 0.201 0.421 0.190 0.475 0.215 0.511 0.190 0.563 0.208 0.613 0.190
  7766. 0.656 0.208 0.695 0.194 0.755 0.194 1.000 0.133)
  7767. 10)
  7768. (let ((main-frqf '(0.000 0.228 0.795 0.210 0.816 0.235 0.827 0.199 0.846 0.217 0.882 0.181 1.000 0.206)))
  7769. (let ((main-ampf '(0.000 0.000 0.321 0.215 0.679 0.569 0.826 0.992 0.874 1.000 1.000 0.000)))
  7770. (black-throated-blue-warbler-1 (+ beg1 .156) .11 (* .4 amp1) main-ampf 20000 main-frqf 100)
  7771. (black-throated-blue-warbler-1 (+ beg1 .33) .135 (* .6 amp1) main-ampf 21000 main-frqf 200)
  7772. (black-throated-blue-warbler-1 (+ beg1 .33) .135 (* .6 amp1) main-ampf 22000 main-frqf 200))
  7773. (let ((other-ampf '(0.000 0.000 0.139 0.356 0.541 0.652 0.766 0.838 0.834 1.000 0.932 0.257 1.000 0.000)))
  7774. (black-throated-blue-warbler-1 (+ beg1 .51) .175 amp1 other-ampf 22400.0 main-frqf 200)
  7775. (black-throated-blue-warbler-1 (+ beg1 .72) .152 amp1 other-ampf 23000.0 main-frqf 200)))
  7776. (black-throated-blue-warbler-1 (+ beg1 .94) .23 (* .5 amp1)
  7777. '(0.000 0.000 0.022 0.300 0.067 0.788 0.191 0.919 0.331 0.958 0.581 1.000 0.805 0.946 0.929 0.773 1.000 0.000)
  7778. 5400.0 '(0 1 1 1) 400))
  7779. ;; (with-sound (:play #t) (black-throated-blue-warbler 0 .5))
  7780. ;;; --------------------------------------------------------------------------------
  7781. ;;;
  7782. ;;; Great crested flycatcher
  7783. (defanimal (great-crested-flycatcher beg amp)
  7784. ;; east 46 6
  7785. (let ((dur 0.318))
  7786. (let ((start (seconds->samples beg))
  7787. (stop (seconds->samples (+ beg dur)))
  7788. (ampf (make-env '(0.000 0.000 0.122 0.198 0.136 0.168 0.165 0.235 0.184 0.411 0.191 0.373 0.212 0.542
  7789. 0.224 0.499 0.242 0.715 0.288 0.617 0.294 0.559 0.307 0.644 0.338 0.491 0.348 0.586
  7790. 0.357 0.576 0.368 0.491 0.373 0.539 0.392 0.536 0.427 0.656 0.446 0.642 0.528 0.795
  7791. 0.556 0.636 0.566 0.997 0.582 0.100 0.590 0.384 0.597 0.097 0.601 0.213 0.607 0.120
  7792. 0.614 0.586 0.653 0.334 0.658 0.225 0.676 0.639 0.703 0.195 0.711 0.363 0.733 0.358
  7793. 0.746 0.280 0.771 0.551 0.793 0.226 0.840 0.258 0.922 0.183 0.973 0.150 1.000 0.000)
  7794. :duration dur :scaler amp))
  7795. (frqf1 (make-env '(0.000 0.226 0.033 0.284 0.076 0.324 0.128 0.376 0.200 0.423 0.254 0.439 0.314 0.441
  7796. 0.391 0.438 0.488 0.432 0.533 0.436 0.559 0.445 0.566 0.486 0.586 0.660 0.606 0.656
  7797. 0.612 0.544 0.627 0.535 0.643 0.546 0.689 0.535 0.708 0.523 0.718 0.546 0.735 0.528
  7798. 0.740 0.501 1.000 0.416)
  7799. :duration dur :scaler (hz->radians 7090.0)))
  7800. (ampf1 (make-env '(0 1 .6 1 .65 .1 .7 .5 .75 0 1 0) :duration dur))
  7801. (gen1 (make-polywave 0.0 '(1 .92 2 .05 3 .01 4 .005 6 .005)))
  7802. (frqf2 (make-env '(0.000 0.407 0.256 0.439 0.492 0.434 0.566 0.447 0.595 0.430 0.609 0.309 0.626 0.266
  7803. 0.646 0.297 0.661 0.396 0.673 0.430 0.681 0.474 0.695 0.412 0.702 0.325 0.719 0.320
  7804. 0.736 0.335 0.762 0.409 0.774 0.445 0.786 0.414 0.791 0.335 0.806 0.311 0.824 0.329
  7805. 0.839 0.376 0.856 0.349 0.876 0.324 0.916 0.324 0.951 0.293 1.000 0.25)
  7806. :duration dur :scaler (hz->radians 7090.0)))
  7807. (ampf2 (make-env '(0 0 .5 0 .55 .2 .7 1 1 .5) :duration dur))
  7808. (gen2 (make-polywave 0.0 '(1 .95 2 .01 3 .01 4 .01 5 .005 6 .01)))
  7809. (rnd (make-rand-interp 100 .7)))
  7810. (do ((i start (+ i 1)))
  7811. ((= i stop))
  7812. (outa i (* (env ampf)
  7813. (+ (* (env ampf1)
  7814. (polywave gen1 (env frqf1)))
  7815. (* (env ampf2)
  7816. (+ .3 (abs (rand-interp rnd)))
  7817. (polywave gen2 (env frqf2))))))))))
  7818. ;; (with-sound (:play #t) (great-crested-flycatcher 0 .5))
  7819. ;;; --------------------------------------------------------------------------------
  7820. ;;;
  7821. ;;; House sparrow
  7822. (defanimal (house-sparrow-1 beg amp)
  7823. ;; east 99 2.9
  7824. (let ((dur 0.144))
  7825. (let ((start (seconds->samples beg))
  7826. (stop (seconds->samples (+ beg dur)))
  7827. (ampf (make-env '(0.000 0.000 0.073 0.108 0.086 0.220 0.182 0.225 0.190 0.281 0.200 0.151 0.240 0.529
  7828. 0.254 0.436 0.259 0.558 0.266 0.536 0.284 0.856 0.299 0.461 0.311 0.888 0.330 0.281
  7829. 0.339 0.612 0.344 0.559 0.355 0.178 0.376 0.575 0.380 0.407 0.389 0.919 0.394 0.686
  7830. 0.399 0.836 0.407 0.547 0.412 0.976 0.422 0.176 0.426 0.476 0.442 0.942 0.461 0.347
  7831. 0.475 0.281 0.485 0.069 0.488 0.222 0.499 0.200 0.505 0.259 0.527 0.422 0.559 0.583
  7832. 0.576 0.324 0.599 0.578 0.611 0.556 0.626 0.268 0.640 0.525 0.652 0.471 0.657 0.237
  7833. 0.685 0.556 0.703 0.449 0.714 0.175 0.756 0.308 0.803 0.229 0.926 0.112 0.963 0.056
  7834. 0.972 0.093 1.000 0.000)
  7835. :duration dur :scaler amp))
  7836. (frqf (make-env '(0.000 0.217 0.130 0.236 0.169 0.261 0.196 0.321 0.238 0.414 0.260 0.445 0.286 0.462
  7837. 0.302 0.451 0.316 0.472 0.329 0.458 0.346 0.507 0.361 0.530 0.383 0.501 0.408 0.400
  7838. 0.427 0.420 0.451 0.395 0.465 0.333 0.485 0.275 0.503 0.290 0.518 0.321 0.563 0.373
  7839. 0.622 0.441 0.643 0.387 0.664 0.325 0.684 0.360 0.700 0.358 0.713 0.282 0.734 0.267
  7840. 0.746 0.288 0.769 0.325 0.799 0.290 0.833 0.321 0.859 0.292 0.888 0.304 0.913 0.265
  7841. 0.944 0.265 0.964 0.226 0.984 0.209 1.000 0.224)
  7842. :duration dur :scaler (hz->radians 10550.0)))
  7843. (rnd (make-rand-interp 4000 (hz->radians 300)))
  7844. (rnd1 (make-rand-interp 4000))
  7845. (rndf1 (make-env '(0 1 .15 1 .2 0 .75 0 .8 1 1 1) :duration dur :scaler .75))
  7846. (gen1 (make-oscil))
  7847. (ampf1 (make-env '(0 0 .15 0 .2 1 .9 1 1 .2) :duration dur))
  7848. (gen2 (make-oscil))
  7849. (ampf2 (make-env '(0 .5 .15 .5 .2 .05 1 .01) :duration dur))
  7850. (gen3 (make-oscil))
  7851. (ampf3 (make-env '(0 .5 .15 .5 .2 .005 1 .005) :duration dur)))
  7852. (do ((i start (+ i 1)))
  7853. ((= i stop))
  7854. (let ((rf (env rndf1))
  7855. (frq (+ (env frqf)
  7856. (rand-interp rnd))))
  7857. (outa i (* (env ampf)
  7858. (- (+ 1.0 (* rf (abs (rand-interp rnd1)))) rf)
  7859. (+ (* (env ampf1) (oscil gen1 frq))
  7860. (* (env ampf2) (oscil gen2 (* 2.0 frq)))
  7861. (* (env ampf3) (oscil gen3 (* 3.0 frq)))))))))))
  7862. ;; (with-sound (:play #t) (house-sparrow-1 0 .5))
  7863. ;;; --------------------------------------------------------------------------------
  7864. ;;;
  7865. ;;; Gambel's quail
  7866. (defanimal (gambels-quail beg amp)
  7867. ;; south 8 3
  7868. (let ((dur 0.56))
  7869. (let ((start (seconds->samples beg))
  7870. (stop (seconds->samples (+ beg dur)))
  7871. (ampf (make-env '(0.000 0.000 0.105 0.364 0.146 0.379 0.231 0.694 0.471 0.838 0.567 0.785 0.637 0.649
  7872. 0.681 0.626 0.750 0.513 0.771 0.417 0.828 0.351 0.864 0.212 0.952 0.048 1.000 0.000)
  7873. :duration dur :scaler amp))
  7874. (frqf (make-env '(0.000 0.080 0.029 0.091 0.079 0.131 0.103 0.136 0.165 0.148 0.219 0.164 0.341 0.176
  7875. 0.469 0.173 0.714 0.162 0.819 0.157 0.902 0.150 0.949 0.138 1.000 0.141)
  7876. :duration dur :scaler (hz->radians (* 0.5 10950))))
  7877. (gen1 (make-polywave 0.0 (normalize-partials '(1 .21 2 .83 3 .05))))
  7878. (gen2 (make-polywave 0.0 (normalize-partials '(4 .03 5 .02 6 .12))))
  7879. (gen3 (make-polywave 0.0 (normalize-partials '(7 .01 8 .02 9 .007 10 .003))))
  7880. (ampf2 (make-env '(0 0 .05 0 .1 .2 .15 0 .275 1 .6 1 .9 0 1 0) :duration dur :scaler .15))
  7881. (ampf3 (make-env '(0 0 .18 0 .5 1 .7 1 .85 0 1 0) :duration dur :scaler .08)))
  7882. (do ((i start (+ i 1)))
  7883. ((= i stop))
  7884. (let ((frq (env frqf)))
  7885. (outa i (* (env ampf)
  7886. (+ (polywave gen1 frq)
  7887. (* (env ampf2) (polywave gen2 frq))
  7888. (* (env ampf3) (polywave gen3 frq))))))))))
  7889. ;; (with-sound (:play #t) (gambels-quail 0 .5))
  7890. ;;; --------------------------------------------------------------------------------
  7891. ;;;
  7892. ;;; Scaled quail
  7893. (define (scaled-quail beg1 amp1)
  7894. ;; south 7 7
  7895. (defanimal (scaled-quail-1 beg dur amp frqscl frm1frq frm2frq frmamp vibamp vibf amp4 amp5)
  7896. (let ((start (seconds->samples beg))
  7897. (stop (seconds->samples (+ beg dur)))
  7898. (ampf (make-env '(0.000 0.000 0.026 0.166 0.052 0.609 0.058 0.250 0.066 0.892 0.070 0.465 0.073 0.909
  7899. 0.079 0.255 0.088 0.766 0.091 0.350 0.096 0.607 0.105 0.504 0.106 0.932 0.119 0.296
  7900. 0.126 0.978 0.129 0.540 0.134 0.609 0.136 0.347 0.140 0.425 0.142 0.274 0.148 0.998
  7901. 0.154 0.393 0.156 0.816 0.161 0.266 0.166 0.614 0.170 0.810 0.174 0.482 0.177 0.773
  7902. 0.184 0.305 0.192 0.937 0.198 0.296 0.199 0.596 0.203 0.350 0.207 0.738 0.212 0.399
  7903. 0.213 0.602 0.222 0.650 0.228 0.464 0.238 0.526 0.246 0.266 0.259 0.403 0.283 0.320
  7904. 0.323 0.365 0.388 0.249 0.405 0.196 0.432 0.191 0.496 0.135 0.582 0.120 0.621 0.071 1.000 0.000)
  7905. :duration dur :scaler (* 0.3 amp)))
  7906. (frqf (make-env '(0.000 0.157 0.051 0.204 0.075 0.267 0.142 0.281 0.196 0.267 0.268 0.191 0.353 0.171 1.000 0.175)
  7907. :duration dur :scaler (hz->radians frqscl)))
  7908. (gen1 (make-polywave 0.0 :partials '(1 2)))
  7909. (gen2 (make-polywave 0.0 (list 2 (* 2 .3) 3 (* 2 .7))))
  7910. (gen6 (make-polywave 0.0 (normalize-partials '(4 .1 5 .05 6 .02))))
  7911. (gen3 (make-polywave 0.0 (normalize-partials '(9 .12 10 .02 11 .003 12 .006 15 .005 16 .004))))
  7912. (gen4 (make-oscil))
  7913. (gen5 (make-oscil))
  7914. (ampf1 (make-env '(0 1 .6 1 .9 0 1 0) :duration dur :scaler .1))
  7915. (ampf3 (make-env '(0 0 .1 .2 .4 1 .5 1 .8 0 1 0) :duration dur :scaler .3))
  7916. (ampf4 (make-env amp4 :duration dur :scaler .25))
  7917. (ampf5 (make-env amp5 :duration dur :scaler .125))
  7918. (ampf6 (make-env '(0 0 .3 0 .4 1 1 0) :duration dur :scaler .5))
  7919. (vib (make-oscil 1000))
  7920. (vibf1 (make-env vibf :duration dur :scaler (hz->radians 200)))
  7921. (rnd (make-rand-interp 10000 vibamp))
  7922. (frm1 (make-formant frm1frq .97))
  7923. (frm2 (make-formant frm2frq .95))
  7924. (fr1 (* 10 (sin (hz->radians frm1frq))))
  7925. (fr2 (* 8 (sin (hz->radians frm2frq))))
  7926. (frmf (make-env frmamp :duration dur)))
  7927. (do ((i start (+ i 1)))
  7928. ((= i stop))
  7929. (let* ((frq (+ (env frqf)
  7930. (* (env vibf1)
  7931. (+ (oscil vib)
  7932. (rand-interp rnd)))))
  7933. (frm (env frmf))
  7934. (val (* (env ampf)
  7935. (+ (* (env ampf1) (polywave gen1 frq))
  7936. (* (env ampf4) (oscil gen4 (* frq 5)))
  7937. (* (env ampf5) (oscil gen5 (* frq 6)))
  7938. (+ (polywave gen2 frq)
  7939. (* (env ampf3) (polywave gen3 frq))
  7940. (* (env ampf6) (polywave gen6 frq)))))))
  7941. (outa i (+ (* frm (+ (* fr1 (formant frm1 val))
  7942. (* fr2 (formant frm2 val))))
  7943. (* (- 1.0 frm) val)))))))
  7944. (scaled-quail-1 beg1 .18 amp1 4200
  7945. 2300 6400 '(0 0 .1 1 .45 1 .5 0 .7 0 .8 1 1 1)
  7946. 1.5 '(0 1 .1 1 .45 1 .5 0 .6 0 .65 1 1 1)
  7947. '(0 0 .1 1 .4 1 .5 0 1 0)
  7948. '(0 0 .1 0 .4 1 .5 0 1 0))
  7949. (scaled-quail-1 (+ beg1 .35) .27 amp1 4000
  7950. 2700 6000 '(0 0 .1 1 .25 1 .3 0 1 0)
  7951. 2.0 '(0 1 .1 1 .25 1 .3 0 .9 0 1 .5)
  7952. '(0 0 .1 1 .2 1 .3 0 1 0)
  7953. '(0 0 .1 0 .2 1 .3 0 1 0)))
  7954. ;; (with-sound (:play #t) (scaled-quail 0 .5))
  7955. ;;; --------------------------------------------------------------------------------
  7956. ;;;
  7957. ;;; Montezuma quail
  7958. (defanimal (montezuma-quail beg amp)
  7959. ;; south 9 15
  7960. (let ((dur 1.3))
  7961. (let ((start (seconds->samples beg))
  7962. (stop (seconds->samples (+ beg dur)))
  7963. (ampf (make-env '(0.000 0.000 0.022 0.069 0.036 0.196 0.088 0.615 0.138 0.837 0.168 0.873 0.202 0.837
  7964. 0.217 0.743 0.225 0.850 0.242 0.962 0.255 0.839 0.270 0.914 0.309 0.916 0.322 0.796
  7965. 0.365 0.831 0.407 0.941 0.432 0.975 0.442 0.885 0.461 0.919 0.480 0.850 0.494 0.651
  7966. 0.504 0.903 0.527 0.773 0.546 0.870 0.585 0.813 0.604 0.880 0.630 0.836 0.642 0.789
  7967. 0.662 0.898 0.689 0.817 0.779 0.656 0.834 0.668 0.895 0.449 0.927 0.372 0.950 0.350
  7968. 0.965 0.229 0.981 0.253 1.000 0.000)
  7969. :duration dur :scaler amp))
  7970. (frqf (make-env '(0.000 0.284 0.052 0.254 0.128 0.239 0.256 0.229 0.404 0.219 0.580 0.211 0.707 0.206 1.000 0.216)
  7971. :duration dur :scaler (hz->radians 8700.0)))
  7972. (gen1 (make-polywave 0.0 '(1 .91 2 .008 3 .07 4 .003)))
  7973. (vib (make-oscil 50))
  7974. (vibf (make-env '(0 .1 .4 .6 .9 1 1 .4) :duration dur :scaler (hz->radians 100)))
  7975. (vibr (make-rand-interp 200 .5))
  7976. (rnd (make-rand-interp 240 .5)))
  7977. (do ((i start (+ i 1)))
  7978. ((= i stop))
  7979. (outa i (* (env ampf)
  7980. (+ .5 (abs (rand-interp rnd)))
  7981. (polywave gen1 (+ (env frqf)
  7982. (* (env vibf) (+ (oscil vib)
  7983. (rand-interp vibr)))))))))))
  7984. ;; (with-sound (:play #t) (montezuma-quail 0 .5))
  7985. ;;; --------------------------------------------------------------------------------
  7986. ;;;
  7987. ;;; Mountain quail
  7988. (defanimal (mountain-quail beg amp)
  7989. (let ((dur .2))
  7990. (let ((start (seconds->samples beg))
  7991. (stop (seconds->samples (+ beg dur)))
  7992. (ampf (make-env '(0.000 0.000 0.152 0.128 0.179 0.040 0.219 0.173 0.271 0.864 0.289 0.754 0.300 0.666
  7993. 0.316 0.804 0.339 0.666 0.362 0.628 0.402 0.477 0.493 0.653 0.513 0.721 0.573 0.736
  7994. 0.599 0.626 0.666 0.804 0.741 0.887 0.786 0.977 0.818 0.814 0.837 0.807 0.872 0.889
  7995. 0.899 0.761 0.920 0.588 0.932 0.656 0.956 0.427 0.970 0.176 1.000 0.000)
  7996. :duration dur :scaler amp))
  7997. (frqf (make-env '(0.000 0.103 0.036 0.108 0.151 0.103 0.175 0.156 0.219 0.160 0.261 0.162 0.322 0.144
  7998. 0.397 0.149 0.894 0.146 0.945 0.130 1.000 0.121)
  7999. :duration dur :scaler (hz->radians 10000.0)))
  8000. (gen1 (make-oscil))
  8001. (ampf2 (make-env '(0 0 .1 0 .2 1 1 1) :duration dur))
  8002. (gen2 (make-polywave 0.0 '(2 .01 3 .005 4 .04 5 .003)))
  8003. (rnd (make-rand-interp 4000 (hz->radians 500)))
  8004. (rndf (make-env '(0 1 .2 .1 .9 .1 1 1) :duration dur)))
  8005. (do ((i start (+ i 1)))
  8006. ((= i stop))
  8007. (let ((frq (+ (env frqf)
  8008. (* (env rndf) (rand-interp rnd)))))
  8009. (outa i (* (env ampf)
  8010. (+ (oscil gen1 frq)
  8011. (* (env ampf2) (polywave gen2 frq))))))))))
  8012. ;; (with-sound (:play #t) (mountain-quail 0 .5))
  8013. ;;; --------------------------------------------------------------------------------
  8014. ;;;
  8015. ;;; Verdin
  8016. (defanimal (verdin beg amp)
  8017. ;; south 57 18
  8018. (let ((begs (vector 0.0 0.28 0.57))
  8019. (durs (vector 0.12 0.15 0.15))
  8020. (amps (vector 0.25 0.75 1.0))
  8021. (frqs (vector '(0.000 0.162 0.246 0.168 0.505 0.168 0.867 0.183 0.956 0.198 1.000 0.192)
  8022. '(0.000 0.162 0.246 0.168 0.867 0.183 0.897 0.186 0.926 0.204 1.000 0.192)
  8023. '(0.000 0.189 0.039 0.168 0.246 0.168 1.000 0.192)))
  8024. (gen1 (make-polywave 0.0 '(1 .98 2 .015 3 .005))))
  8025. (do ((call 0 (+ call 1)))
  8026. ((= call 3))
  8027. (let ((start (seconds->samples (+ beg (begs call))))
  8028. (dur (durs call)))
  8029. (let ((stop (+ start (seconds->samples dur)))
  8030. (ampf (make-env '(0.000 0.000 0.016 0.207 0.079 0.402 0.131 0.348 0.224 0.562 0.255 0.592 0.316 0.757
  8031. 0.367 0.637 0.407 0.664 0.428 0.613 0.474 0.751 0.495 0.757 0.522 0.898 0.609 1.000
  8032. 0.701 0.778 0.738 0.967 0.770 0.892 0.797 0.898 0.819 0.790 0.835 0.931 0.852 0.892
  8033. 0.874 0.997 0.903 0.775 0.928 0.718 0.957 0.736 1.000 0.000)
  8034. :duration dur :scaler (* amp (amps call))))
  8035. (frqf (make-env (frqs call) :duration dur :scaler (hz->radians 22000.0))))
  8036. (do ((i start (+ i 1)))
  8037. ((= i stop))
  8038. (outa i (* (env ampf)
  8039. (polywave gen1 (env frqf))))))))))
  8040. ;; (with-sound (:play #t) (verdin 0 .5))
  8041. ;;; --------------------------------------------------------------------------------
  8042. ;;;
  8043. ;;; White-tipped dove
  8044. (defanimal (white-tipped-dove beg amp)
  8045. (let ((dur 1.7))
  8046. (let ((start (seconds->samples beg))
  8047. (stop (seconds->samples (+ beg dur)))
  8048. (ampf (make-env '(0.000 0.000 0.097 0.071 0.140 0.147 0.190 0.000 0.328 0.000 0.405 0.652 0.426 0.596
  8049. 0.447 0.136 0.465 0.109 0.473 0.000 0.511 0.000 0.555 0.354 0.625 0.578 0.672 0.820
  8050. 0.745 1.000 0.782 0.897 0.874 0.755 0.930 0.614 0.975 0.139 1.000 0.000)
  8051. :duration dur :scaler amp))
  8052. (frqf (make-env '(0.000 0.172 0.137 0.170 0.175 0.165 0.340 0.172 0.451 0.160 0.544 0.165 .6 .160 1.000 0.170)
  8053. :duration dur :scaler (hz->radians 2550.0)))
  8054. (gen1 (make-polywave 0.0 '(1 .94 2 .02 3 .05 4 .005))))
  8055. (do ((i start (+ i 1)))
  8056. ((= i stop))
  8057. (outa i (* (env ampf)
  8058. (polywave gen1 (env frqf))))))))
  8059. ;; (with-sound (:play #t) (white-tipped-dove 0 .5))
  8060. ;;; --------------------------------------------------------------------------------
  8061. ;;;
  8062. ;;; Zone-tailed hawk
  8063. (defanimal (zone-tailed-hawk beg amp)
  8064. (let ((dur 1.82))
  8065. (let ((start (seconds->samples beg))
  8066. (stop (seconds->samples (+ beg dur)))
  8067. (ampf (make-env '(0.000 0.000 0.014 0.170 0.019 0.000 0.046 0.074 0.054 0.327 0.090 0.448 0.106 0.781
  8068. 0.130 0.852 0.139 1.000 0.174 1.000 0.359 0.691 0.383 0.435 0.427 0.494 0.545 0.448
  8069. 0.654 0.463 0.704 0.485 0.741 0.330 0.752 0.407 0.785 0.435 0.792 0.238 0.793 0.528
  8070. 0.825 0.528 0.838 0.475 0.846 0.225 0.850 0.509 0.872 0.485 0.892 0.367 0.913 0.497
  8071. 0.949 0.500 0.978 0.537 0.988 0.099 1.000 0.000)
  8072. :duration dur :scaler (* 0.8 amp)))
  8073. (frqf (make-env '(0.000 0.283 0.026 0.321 0.048 0.368 0.051 0.404 0.055 0.330 0.064 0.357 0.076 0.357
  8074. 0.097 0.387 0.108 0.427 0.184 0.438 0.356 0.452 0.371 0.431 0.380 0.408 0.460 0.401
  8075. 0.510 0.390 0.555 0.397 0.589 0.386 0.615 0.388 0.667 0.376 0.718 0.382 0.783 0.365
  8076. 0.807 0.348 0.841 0.333 0.875 0.314 0.905 0.314 0.925 0.340 0.957 0.344 0.972 0.325
  8077. 0.983 0.302 1.000 0.237)
  8078. :duration dur :scaler (hz->radians (* 0.5 8150.0))))
  8079. (gen1 (make-polywave 0.0 (list 1 (* .5 0.328) 2 (* .5 0.328) 3 (* .5 0.066) 4 (* .5 0.262) 5 (* .5 0.013) 7 (* .5 0.004))))
  8080. (gen2 (make-oscil))
  8081. (gen3 (make-polywave 0.0 (normalize-partials '(3 .2 5 .1 7 .1 9 .05 11 .05 13 .01))))
  8082. (ampf2 (make-env '(0 0 .05 0 .12 1 .18 1 .2 .6 .5 .8 .75 0 .8 .7 1 .7) :duration dur :scaler .5))
  8083. (ampf3 (make-env '(0 0 .05 0 .12 1 .6 1 .75 0 1 0) :duration dur :scaler .3 :base 10))
  8084. (rnd (make-rand-interp 3000))
  8085. (rndf (make-env '(0 0 .12 .2 .25 1 .35 1 .4 .2 .75 .3 .9 .1 .93 .4 1 0) :duration dur :scaler (hz->radians 100)))
  8086. (vib (make-triangle-wave 40 (hz->radians 20)))
  8087. (vibf (make-env '(0 0 .15 0 .2 1 .4 0 1 0) :duration dur)))
  8088. (do ((i start (+ i 1)))
  8089. ((= i stop))
  8090. (let ((noise (* (env rndf)
  8091. (rand-interp rnd)))
  8092. (frq (+ (env frqf)
  8093. (* (env vibf)
  8094. (triangle-wave vib)))))
  8095. (outa i (* (env ampf)
  8096. (+ (polywave gen1 (+ frq (* 1.5 noise)))
  8097. (* (env ampf2) (oscil gen2 (+ (* 2.0 frq) (* 0.5 noise))))
  8098. (* (env ampf3) (polywave gen3 (+ (* 0.5 frq) (* 2.0 noise))))))))))))
  8099. ;; (with-sound (:play #t) (zone-tailed-hawk 0 .5))
  8100. ;;; --------------------------------------------------------------------------------
  8101. ;;;
  8102. ;;; Red-eyed vireo
  8103. (defanimal (red-eyed-vireo beg amp)
  8104. ;; south 47 46
  8105. (let ((dur 0.29))
  8106. (let ((start (seconds->samples beg))
  8107. (stop (seconds->samples (+ beg dur)))
  8108. (ampf (make-env '(0.000 0.000 0.033 0.082 0.069 0.415 0.081 0.426 0.102 0.204 0.119 0.156 0.137 0.307
  8109. 0.146 0.159 0.156 0.378 0.182 0.685 0.188 0.556 0.205 0.735 0.212 0.479 0.223 0.484
  8110. 0.236 0.939 0.243 0.344 0.246 0.825 0.254 0.415 0.258 0.611 0.273 0.587 0.279 0.251
  8111. 0.290 0.992 0.297 0.865 0.304 0.937 0.314 0.735 0.324 0.770 0.340 0.365 0.352 0.590
  8112. 0.367 0.230 0.387 0.000 0.495 0.000 0.510 0.331 0.535 0.339 0.560 0.249 0.572 0.116
  8113. 0.592 0.146 0.604 0.275 0.628 0.410 0.634 0.339 0.668 0.619 0.684 0.220 0.709 0.656
  8114. 0.731 0.593 0.761 0.598 0.770 0.534 0.783 0.720 0.797 0.632 0.809 0.479 0.819 0.288
  8115. 0.833 0.444 0.849 0.423 0.857 0.325 1.000 0.000)
  8116. :duration dur :scaler amp))
  8117. (frqf (make-env '(0.000 0.375 0.022 0.420 0.044 0.492 0.067 0.531 0.079 0.506 0.095 0.352 0.105 0.336
  8118. 0.121 0.359 0.147 0.417 0.163 0.462 0.178 0.520 0.188 0.590 0.197 0.662 0.209 0.685
  8119. 0.225 0.669 0.245 0.625 0.266 0.606 0.283 0.576 0.329 0.406 0.342 0.387 0.371 0.338
  8120. 0.484 0.289 0.505 0.340 0.529 0.347 0.541 0.368 0.558 0.268 0.572 0.245 0.589 0.259
  8121. 0.607 0.305 0.642 0.368 0.672 0.396 0.704 0.420 0.752 0.431 0.775 0.452 0.795 0.527
  8122. 0.815 0.534 0.824 0.492 0.835 0.387 0.861 0.336 0.891 0.305 0.946 0.298 1.000 0.240)
  8123. :duration dur :scaler (hz->radians 8100.0)))
  8124. (gen1 (make-polywave 0.0 '(1 .985 2 .005 3 .01))))
  8125. (do ((i start (+ i 1)))
  8126. ((= i stop))
  8127. (outa i (* (env ampf)
  8128. (polywave gen1 (env frqf))))))))
  8129. ;; (with-sound (:play #t) (red-eyed-vireo 0 .5))
  8130. ;;; --------------------------------------------------------------------------------
  8131. ;;;
  8132. ;;; Crested caracara
  8133. ;;;
  8134. ;;; not perfect... original seems to have a harder attack, slightly different timbre, etc
  8135. (defanimal (crested-caracara beg amp)
  8136. ;; south 5 6.5
  8137. (do ((i 0 (+ i 1)))
  8138. ((= i 17))
  8139. (let ((start (seconds->samples (+ beg (* i .04) (random .005))))
  8140. (dur (+ 0.04 (random .005))))
  8141. (let ((stop (+ start (seconds->samples dur)))
  8142. (ampf (make-env '(0.000 0.000 0.003 0.273 0.032 0.068 0.055 0.147 0.073 0.033 0.116 0.958 0.143 0.641
  8143. 0.180 0.869 0.193 0.340 0.207 0.618 0.235 0.881 0.258 0.587 0.293 0.387 0.320 0.676
  8144. 0.334 0.263 0.352 0.338 0.369 0.000 0.396 0.573 0.407 0.333 0.417 0.660 0.431 0.779
  8145. 0.445 0.268 0.498 0.1 1.000 0.000)
  8146. :duration dur :scaler amp))
  8147. (gen1 (make-polywave 1600 (normalize-partials '(1 .4 2 .7 3 .01 4 .01 5 .01))))
  8148. (gen2 (make-polywave 1200 '(1 .4 2 1)))
  8149. (index (hz->radians 800))
  8150. (rnd (make-rand-interp 4000 .425)))
  8151. (do ((k start (+ k 1)))
  8152. ((= k stop))
  8153. (outa k (* (env ampf)
  8154. (polywave gen1 (* index (+ (polywave gen2)
  8155. (rand-interp rnd)))))))))))
  8156. ;; (with-sound (:play #t) (crested-caracara 0 .5))
  8157. ;;; --------------------------------------------------------------------------------
  8158. ;;;
  8159. ;;; Trumpeter swan
  8160. ;;;
  8161. ;;; this is a good one
  8162. ;;; (someday also 55)
  8163. (define (trumpeter-swan-1 beg amp)
  8164. ;; east 19 44
  8165. (defanimal (trumpeter-swan-a beg amp)
  8166. (let ((dur 0.053))
  8167. (let ((start (seconds->samples beg))
  8168. (stop (seconds->samples (+ beg dur)))
  8169. (ampf (make-env '(0.000 0.000 0.086 0.411 0.253 0.887 0.466 0.989 0.627 0.992 0.782 0.842 1.000 0.000)
  8170. :duration dur :scaler amp))
  8171. (gen1 (make-polywave 356.0 (normalize-partials '(1 .1 2 1.0 3 .08 4 .2 5 .1 6 .03 7 .03 8 .03))))
  8172. (vib (make-oscil 130.0))
  8173. (index (hz->radians 30)))
  8174. (do ((i start (+ i 1)))
  8175. ((= i stop))
  8176. (outa i (* (env ampf)
  8177. (polywave gen1 (* index (oscil vib)))))))))
  8178. (defanimal (trumpeter-swan-b beg amp)
  8179. (let ((dur 0.12))
  8180. (let ((start (seconds->samples beg))
  8181. (stop (seconds->samples (+ beg dur)))
  8182. (ampf (make-env '(0.000 0.000 0.038 0.460 0.106 0.554 0.152 1.000 0.187 0.569 0.225 0.694 0.316 0.000
  8183. 0.381 0.000 0.462 0.827 0.512 0.000 0.539 0.613 0.571 0.859 0.609 0.528 0.632 0.815
  8184. 0.715 0.661 0.764 0.782 0.837 0.800 0.884 0.724 1.000 0.000)
  8185. :duration dur :scaler amp))
  8186. (frqf (make-env '(0.000 0.251 0.088 0.259 0.144 0.290 0.173 0.228 0.276 0.228 0.387 0.245 0.429 0.296
  8187. 0.457 0.310 0.484 0.296 0.514 0.265 0.548 0.307 0.599 0.377 0.641 0.352 0.706 0.346
  8188. 0.741 0.338 0.773 0.346 1.000 0.346)
  8189. :duration dur :scaler (hz->radians (* 0.5 3140))))
  8190. (gen2 (make-polywave 0.0 (float-vector 2 (* .6 .8) 3 (* .6 .2))))
  8191. (gen2a (make-polywave 0.0 (normalize-partials '( 4 .35 5 .19 6 .12 7 .03 8 .02))))
  8192. (ampf2a (make-env '(0 1 .6 1 1 0) :duration dur :scaler .4 :base 10))
  8193. (gen3 (make-nrxysin :n 12 :r .85 :ratio 1/9))
  8194. (ampf3 (make-env '(0 0 .1 0 .15 .5 .2 0 .4 0 .45 .7 .5 0 .55 1 .7 1 .8 0 .9 .1 1 0) :duration dur :scaler .02))
  8195. (gen1 (make-oscil))
  8196. (ampf1 (make-env '(0 0 .5 0 .6 1 .9 1 1 0) :duration dur :scaler .2)))
  8197. (set! (mus-phase gen2) (* 0.5 pi))
  8198. (set! (mus-phase gen2a) (* 0.5 pi))
  8199. (do ((i start (+ i 1)))
  8200. ((= i stop))
  8201. (let ((frq (env frqf)))
  8202. (outa i (* (env ampf)
  8203. (+ (polywave gen2 frq)
  8204. (* (env ampf2a) (polywave gen2a frq))
  8205. (* (env ampf1) (oscil gen1 frq))
  8206. (* (env ampf3) (nrxysin gen3 (* 9.0 frq)))))))))))
  8207. (defanimal (trumpeter-swan-c beg amp)
  8208. (let ((dur 0.11))
  8209. (let ((start (seconds->samples beg))
  8210. (stop (seconds->samples (+ beg dur)))
  8211. (ampf (make-env '(0.000 0.000 0.029 0.244 0.084 0.525 0.111 0.515 0.124 0.376 0.153 0.334 0.183 0.166
  8212. 0.205 0.000 0.240 0.769 0.261 0.775 0.280 0.271 0.297 0.000 0.338 0.773 0.423 1.000
  8213. 0.529 0.758 0.621 0.845 0.783 0.630 0.849 0.676 0.896 0.538 0.930 0.252 0.957 0.118 1.000 0.000)
  8214. :duration dur :scaler amp))
  8215. (frqf (make-env '(0.000 0.085 0.189 0.079 0.222 0.113 0.251 0.123 0.278 0.105 0.312 0.121 0.349 0.125
  8216. 0.377 0.133 0.412 0.127 0.510 0.123 0.691 0.129 0.778 0.125 0.830 0.127 1.000 0.129)
  8217. :duration dur :scaler (hz->radians (* 0.5 8650.0))))
  8218. (gen1 (make-polywave 0.0 (normalize-partials '(1 .01 2 .98 3 .05 4 .02 5 .005 6 .005))))
  8219. (gen2 (make-polywave 0.0 (normalize-partials '(1 .44 2 1.0 3 .34 4 .31 5 .19 6 .075 7 .04 8 .03))))
  8220. (gen3 (make-nrxysin :n 12 :r .85 :ratio 1/9))
  8221. (intrpf (make-env '(0 1 .19 1 .2 0 1 0) :duration dur))
  8222. (intrpf-1 (make-env '(0 1 .19 1 .2 0 1 0) :duration dur :offset 1.0 :scaler -1.0)))
  8223. (set! (mus-phase gen2) (* 0.5 pi))
  8224. (do ((i start (+ i 1)))
  8225. ((= i stop))
  8226. (let ((frq (env frqf)))
  8227. (outa i (* (env ampf)
  8228. (+ (* (env intrpf) (polywave gen1 frq))
  8229. (* (env intrpf-1) (+ (polywave gen2 frq)
  8230. (* .03 (nrxysin gen3 (* 9.0 frq)))))))))))))
  8231. (defanimal (trumpeter-swan-d beg amp)
  8232. (let ((dur 0.082))
  8233. (let ((start (seconds->samples beg))
  8234. (stop (seconds->samples (+ beg dur)))
  8235. (ampf (make-env '(0.000 0.000 0.068 0.279 0.121 0.989 0.178 0.755 0.208 0.451 0.234 0.834 0.291 0.921
  8236. 0.355 0.459 0.371 0.158 0.401 0.876 0.494 1.000 0.614 0.851 0.797 0.510 0.862 0.166
  8237. 0.928 0.146 1.000 0.000)
  8238. :duration dur :scaler amp))
  8239. (frqf (make-env '(0.000 0.328 0.092 0.328 0.147 0.370 0.212 0.314 0.256 0.356 0.345 0.359 0.389 0.373
  8240. 0.438 0.370 0.489 0.420 0.532 0.398 0.601 0.398 0.641 0.375 0.685 0.364 0.739 0.401
  8241. 0.799 0.417 0.856 0.398 1.000 0.401)
  8242. :duration dur :scaler (hz->radians 1350)))
  8243. (gen1 (make-oscil))
  8244. (ampf1 (make-env '(0 0 .4 .1 .5 1 .9 .5 1 0) :duration dur :scaler .3))
  8245. (gen2 (make-oscil))
  8246. (ampf2 (make-env '(0 1 .45 1 .5 .5 .6 .8 .7 .8 .75 .1 .8 .5 1 0) :duration dur :scaler .5))
  8247. (gen3 (make-nrxysin :n 12 :r .8 :ratio 1/8))
  8248. (ampf3 (make-env '(0 0 .1 1 .6 1 .8 0 1 0) :duration dur :scaler .15))
  8249. (gen4 (make-polywave 0.0 (normalize-partials '(3 .4 4 .4 5 .2 6 .1 7 .05))))
  8250. (ampf4 (make-env '(0 1 .8 1 1 0) :duration dur :scaler .5)))
  8251. (do ((i start (+ i 1)))
  8252. ((= i stop))
  8253. (let ((frq (env frqf)))
  8254. (outa i (* (env ampf)
  8255. (+ (* (env ampf1)
  8256. (oscil gen1 frq))
  8257. (* (env ampf2)
  8258. (oscil gen2 (* 2.0 frq)))
  8259. (* (env ampf3)
  8260. (nrxysin gen3 (* 8.0 frq)))
  8261. (* (env ampf4)
  8262. (polywave gen4 frq))))))))))
  8263. (defanimal (trumpeter-swan-e beg amp)
  8264. (let ((dur 0.04)
  8265. (frq 434))
  8266. (let ((start (seconds->samples beg))
  8267. (stop (seconds->samples (+ beg dur)))
  8268. (ampf (make-env '(0.000 0.000 0.087 0.300 0.206 0.927 0.265 1.000 0.324 0.894 0.382 0.482 0.445 0.515
  8269. 0.692 0.364 0.752 0.218 1.000 0.000)
  8270. :duration dur :scaler amp))
  8271. (gen1 (make-polywave frq '(1 .05 2 .85 3 .1 5 .01)))
  8272. (gen2 (make-nrxysin (* frq 7) 1/7 10 .8))
  8273. (ampf2 (make-env '(0 0 .1 1 .4 0 1 0) :duration dur :scaler .2))
  8274. (vib (make-rand-interp 200))
  8275. (index (hz->radians 40)))
  8276. (do ((i start (+ i 1)))
  8277. ((= i stop))
  8278. (let ((vb (* index (rand-interp vib))))
  8279. (outa i (* (env ampf)
  8280. (+ (polywave gen1 vb)
  8281. (* (env ampf2)
  8282. (nrxysin gen2 vb))))))))))
  8283. (trumpeter-swan-a beg (* amp .6))
  8284. (trumpeter-swan-b (+ beg .126) (* amp .9))
  8285. (trumpeter-swan-c (+ beg .259) amp)
  8286. (trumpeter-swan-d (+ beg .408) (* amp .6))
  8287. (trumpeter-swan-e (+ beg .54) (* amp .3)))
  8288. ;; (with-sound (:play #t) (trumpeter-swan-1 0 .5))
  8289. ;;; --------------------------------------------------------------------------------
  8290. ;;;
  8291. ;;; Wrentit
  8292. (define (wrentit beg1 amp1)
  8293. ;; calif 1 3
  8294. (defanimal (wrentit-1 beg dur amp frqscl)
  8295. (let ((start (seconds->samples beg))
  8296. (stop (seconds->samples (+ beg dur)))
  8297. (ampf (make-env '(0.000 0.000 0.095 0.221 0.193 0.692 0.293 0.814 0.380 0.727 0.486 1.000 0.543 0.972
  8298. 0.611 0.664 0.720 0.435 0.788 0.115 0.853 0.138 1.000 0.000)
  8299. :duration dur :scaler amp))
  8300. (frqf (make-env '(0.000 0.262 0.112 0.288 0.197 0.304 0.275 0.319 0.508 0.313 0.634 0.281 0.743 0.281
  8301. 0.811 0.249 0.869 0.256 1.000 0.240)
  8302. :duration dur :scaler (hz->radians (* frqscl 5000.0))))
  8303. (gen1 (make-polywave 0.0 '(1 .005 2 .9 3 .005 4 .01 6 .03 7 .005 8 .005))))
  8304. (do ((i start (+ i 1)))
  8305. ((= i stop))
  8306. (outa i (* (env ampf)
  8307. (polywave gen1 (env frqf)))))))
  8308. (defanimal (wrentit-2 beg dur amp frqscl)
  8309. (let ((start (seconds->samples beg))
  8310. (stop (seconds->samples (+ beg dur)))
  8311. (ampf (make-env '(0.000 0.000 0.091 0.616 0.150 0.724 0.195 0.667 0.259 0.686 0.387 1.000 0.447 0.770
  8312. 0.482 0.740 0.507 0.623 0.552 0.693 0.629 0.557 0.684 0.288 0.713 0.321 0.738 0.232
  8313. 0.754 0.162 0.771 0.225 0.786 0.150 0.792 0.197 0.801 0.126 0.808 0.225 0.816 0.122
  8314. 0.829 0.178 0.832 0.105 0.840 0.211 0.849 0.094 0.856 0.173 0.880 0.089 0.898 0.220
  8315. 0.914 0.124 .925 .01 1 0)
  8316. :duration dur :scaler amp))
  8317. (frqf (make-env '(0.000 0.269 0.105 0.297 0.182 0.319 0.311 0.319 0.428 0.304 0.534 0.281 0.688 0.269
  8318. 0.789 0.244 0.825 0.215 1 .21)
  8319. :duration dur :scaler (hz->radians (* frqscl 5040.0))))
  8320. (gen1 (make-polywave 0.0 '(1 .005 3 .005 4 .01 6 .03 7 .005 8 .005)))
  8321. (ampf1 (make-env '(0 1 .6 1 .7 0 1 0) :duration dur))
  8322. (gen2 (make-oscil))
  8323. (gen3 (make-oscil))
  8324. (ampf3 (make-env '(0 0 .7 0 1 1) :duration dur :scaler .5)))
  8325. (do ((i start (+ i 1)))
  8326. ((= i stop))
  8327. (let ((frq (env frqf)))
  8328. (outa i (* (env ampf)
  8329. (+ (* (env ampf1)
  8330. (polywave gen1 frq))
  8331. (* .9 (oscil gen2 (* 2.0 frq)))
  8332. (* (env ampf3)
  8333. (oscil gen3 (* 3.0 frq))))))))))
  8334. (wrentit-1 beg1 .041 (* amp1 0.6) 1.0)
  8335. (wrentit-1 (+ beg1 .35) .05 amp1 1.0)
  8336. (wrentit-2 (+ beg1 .45) .062 amp1 1.02)
  8337. (wrentit-1 (+ beg1 .8) .048 amp1 1.03)
  8338. (wrentit-2 (+ beg1 .87) .064 amp1 1.03)
  8339. (let ((ampf (make-env '(0 1 1 .8) :length 10))
  8340. (frqf (make-env (list 0 1 1 (/ 3050.0 3200.0)) :length 10))
  8341. (call-init 1.0))
  8342. (do ((call 0 (+ call 1)))
  8343. ((= call 10))
  8344. (let ((call-amp (env ampf))
  8345. (call-frq (env frqf)))
  8346. (let ((call-beg (+ beg1 call-init (* call .15) (random .01))))
  8347. (wrentit-1 call-beg (+ .03 (random .005)) (* amp1 call-amp) call-frq)
  8348. (wrentit-2 (+ call-beg .048) (+ .06 (random .005)) (* amp1 call-amp) call-frq))))
  8349. (wrentit-1 (+ beg1 2.6) .041 (* amp1 0.5) 1.0)))
  8350. ;; (with-sound (:play #t) (wrentit 0 .5))
  8351. ;;; --------------------------------------------------------------------------------
  8352. ;;;
  8353. ;;; Western wood-pewee
  8354. (defanimal (western-wood-pewee-1 beg amp)
  8355. ;; calif 2 8
  8356. (let ((dur 0.89))
  8357. (let ((start (seconds->samples beg))
  8358. (stop (seconds->samples (+ beg dur)))
  8359. (ampf (make-env '(0.000 0.000 0.009 0.038 0.014 0.140 0.019 0.184 0.030 0.178 0.038 0.055 0.046 0.000
  8360. 0.210 0.000 0.217 0.165 0.229 0.263 0.239 0.253 0.246 0.204 0.254 0.000 0.336 0.000
  8361. 0.338 0.122 0.355 0.373 0.363 0.356 0.367 0.151 0.371 0.260 0.383 0.000 0.408 0.000
  8362. 0.415 0.302 0.421 0.349 0.425 0.496 0.429 0.420 0.439 0.382 0.452 0.460 0.459 0.401
  8363. 0.466 0.438 0.469 0.498 0.484 0.567 0.505 0.603 0.518 0.541 0.531 0.580 0.543 0.582
  8364. 0.554 0.473 0.564 0.535 0.587 0.534 0.594 0.495 0.616 0.567 0.633 0.530 0.651 0.570
  8365. 0.665 0.544 0.683 0.566 0.698 0.521 0.704 0.402 0.709 0.000 0.727 0.001 0.738 0.865
  8366. 0.742 0.951 0.747 0.997 0.750 0.971 0.763 0.000 0.783 0.000 0.786 0.342 0.794 0.832
  8367. 0.800 0.611 0.805 0.764 0.811 0.705 0.815 0.863 0.819 0.822 0.829 0.0 0.834 0.0
  8368. 0.840 0.630 0.850 0.185 0.861 0.000 0.865 0.000 0.872 0.113 0.881 0.211 0.899 0.260
  8369. 0.907 0.441 0.913 0.340 0.917 0.424 0.919 0.317 0.921 0.444 0.930 0.198 0.935 0.174
  8370. 0.949 0.136 0.953 0.109 0.964 0.122 0.973 0.110 0.982 0.140 1.000 0.000)
  8371. :duration dur :scaler amp))
  8372. (frqf (make-env '(0.000 0.379 0.016 0.432 0.034 0.438 0.214 0.395 0.219 0.428 0.230 0.446 0.247 0.444
  8373. 0.339 0.407 0.346 0.444 0.356 0.452 0.365 0.436 0.369 0.415 0.375 0.434 0.380 0.411
  8374. 0.411 0.420 0.419 0.450 0.429 0.464 0.447 0.460 0.464 0.466 0.496 0.473 0.571 0.483
  8375. 0.691 0.485 0.701 0.468 0.710 0.409 0.728 0.314 0.734 0.464 0.740 0.511 0.746 0.521
  8376. 0.756 0.485 0.764 0.420 0.786 0.428 0.789 0.481 0.798 0.550 0.808 0.552 0.818 0.489
  8377. 0.823 0.46 0.825 0.481 0.829 0.809 0.835 0.792 0.839 0.546 0.842 0.487 0.848 0.442
  8378. 0.855 0.397 0.870 0.409 0.877 0.442 0.898 0.442 0.913 0.468 0.921 0.519 0.927 0.580
  8379. 0.938 0.650 0.948 0.697 0.954 0.684 0.958 0.705 0.967 0.680 0.983 0.666 0.991 0.593 1.000 0.452)
  8380. :duration dur :scaler (hz->radians 7100.0)))
  8381. (gen1 (make-polywave 0.0 '(1 .99 2 .005 3 .005))))
  8382. (do ((i start (+ i 1)))
  8383. ((= i stop))
  8384. (outa i (* (env ampf)
  8385. (polywave gen1 (env frqf))))))))
  8386. ;; (with-sound (:play #t) (western-wood-pewee-1 0 .5))
  8387. (defanimal (western-wood-pewee-2 beg amp)
  8388. (let ((dur 0.69))
  8389. (let ((start (seconds->samples beg))
  8390. (stop (seconds->samples (+ beg dur)))
  8391. (ampf (make-env '(0.000 0.000 0.016 0.098 0.038 0.208 0.060 0.000 0.254 0.000 0.293 0.846 0.306 0.975
  8392. 0.345 1.000 0.391 0.833 0.457 0.809 0.545 0.843 0.596 0.836 0.713 0.669 0.724 0.583
  8393. 0.729 0.326 0.740 0.324 0.751 0.240 0.774 0.179 0.794 0.600 0.812 0.632 0.878 0.539
  8394. 0.912 0.392 0.971 0.316 0.984 0.091 1.000 0.000)
  8395. :duration dur :scaler amp))
  8396. (frqf (make-env '(0.000 0.409 0.030 0.400 0.039 0.436 0.067 0.444 0.279 0.434 0.291 0.505 0.327 0.561
  8397. 0.420 0.578 0.482 0.569 0.648 0.532 0.728 0.527 0.753 0.593 0.779 0.650 0.802 0.605
  8398. 0.827 0.532 0.854 0.507 0.977 0.485 1.000 0.43)
  8399. :duration dur :scaler (hz->radians 7300.0)))
  8400. (gen1 (make-polywave 0.0 '(1 .99 2 .005 3 .005)))
  8401. (vib (make-oscil 152))
  8402. (index (hz->radians 500))
  8403. (vibf (make-env '(0 0 .29 0 .38 1 .7 .5 .75 0 1 0) :duration dur))
  8404. (trem (make-triangle-wave 76 .8)))
  8405. (do ((i start (+ i 1)))
  8406. ((= i stop))
  8407. (let ((vbf (env vibf)))
  8408. (outa i (* (env ampf)
  8409. (- 1.0 (* vbf (abs (triangle-wave trem))))
  8410. (polywave gen1 (+ (env frqf)
  8411. (* vbf index (oscil vib)))))))))))
  8412. ;; (with-sound (:play #t) (western-wood-pewee-2 0 .5))
  8413. ;;; --------------------------------------------------------------------------------
  8414. ;;;
  8415. ;;; Cedar waxwing
  8416. (defanimal (cedar-waxwing beg amp)
  8417. ;; probably the simplest bird call
  8418. ;; calif 10 10 (hard to find one call by itself)
  8419. ;; a cleaner original is east 3 3 with a slightly sharper frq env
  8420. (let ((dur 0.5))
  8421. (let ((start (seconds->samples beg))
  8422. (stop (seconds->samples (+ beg dur)))
  8423. (ampf (make-env '(0.000 0.000 0.133 0.217 0.337 0.854 0.470 0.826 0.533 0.751 0.617 0.980
  8424. 0.704 1.000 0.883 0.881 0.943 0.747 1.000 0.000)
  8425. :duration dur :scaler amp))
  8426. (frqf (make-env '(0.000 0.267 0.097 0.287 0.242 0.301 0.472 0.304 0.684 0.301 0.788 0.301
  8427. 0.973 0.293 1.000 0.264)
  8428. :duration dur :scaler (hz->radians 22000.0)))
  8429. (gen1 (make-polywave 0.0 '(1 .99 2 .006 3 .004))))
  8430. (do ((i start (+ i 1)))
  8431. ((= i stop))
  8432. (outa i (* (env ampf) (polywave gen1 (env frqf))))))))
  8433. ;; (with-sound (:play #t) (cedar-waxwing 0 .5))
  8434. ;;; --------------------------------------------------------------------------------
  8435. ;;;
  8436. ;;; Townsend's solitaire
  8437. (define (townsends-solitaire beg1 amp1)
  8438. ;; calif 67 33
  8439. (defanimal (townsends-solitaire-1 beg amp)
  8440. (let ((dur 0.15))
  8441. (let ((start (seconds->samples beg))
  8442. (stop (seconds->samples (+ beg dur)))
  8443. (ampf (make-env '(0.000 0.000 0.056 0.074 0.084 0.182 0.122 0.118 0.163 0.168 0.224 0.104 0.257 0.343
  8444. 0.289 0.337 0.299 0.155 0.308 0.242 0.320 0.185 0.329 0.125 0.389 0.145 0.436 0.242
  8445. 0.466 0.195 0.484 0.313 0.495 0.455 0.571 0.535 0.634 0.566 0.684 0.727 0.717 0.926
  8446. 0.751 0.983 0.786 0.960 0.891 0.717 0.957 0.242 1.000 0.000)
  8447. :duration dur :scaler amp))
  8448. (frqf (make-env '(0.000 0.321 0.055 0.337 0.081 0.365 0.103 0.370 0.113 0.303 0.153 0.308 0.192 0.329
  8449. 0.233 0.342 0.261 0.376 0.282 0.358 0.306 0.285 0.358 0.272 0.427 0.308 0.490 0.360
  8450. 0.584 0.376 0.813 0.360 1.000 0.342)
  8451. :duration dur :scaler (hz->radians 8100.0)))
  8452. (gen1 (make-polywave 0.0 '(1 .995 2 .005))))
  8453. (do ((i start (+ i 1)))
  8454. ((= i stop))
  8455. (outa i (* (env ampf)
  8456. (polywave gen1 (env frqf))))))))
  8457. (defanimal (townsends-solitaire-2 beg amp)
  8458. (let ((dur 0.037))
  8459. (let ((start (seconds->samples beg))
  8460. (stop (seconds->samples (+ beg dur)))
  8461. (ampf (make-env '(0.000 0.000 0.077 0.215 0.112 0.907 0.198 0.189 0.212 0.096 0.235 0.0 0.333 0.085
  8462. 0.433 0.515 0.471 0.481 0.517 0.622 0.571 0.526 0.671 1.000 0.699 0.752 0.718 0.904
  8463. 0.781 0.915 0.862 0.374 0.968 0.289 1.000 0.000)
  8464. :duration dur :scaler amp))
  8465. (frqf (make-env '(0.000 0.395 0.077 0.351 0.121 0.293 0.169 0.225 0.218 0.196 0.286 0.163 0.345 0.185
  8466. 0.407 0.221 1.000 0.36)
  8467. :duration dur :scaler (hz->radians 13800.0)))
  8468. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .005 4 .005))))
  8469. (do ((i start (+ i 1)))
  8470. ((= i stop))
  8471. (outa i (* (env ampf)
  8472. (polywave gen1 (env frqf))))))))
  8473. (defanimal (townsends-solitaire-3 beg amp)
  8474. (let ((dur 0.323))
  8475. (let ((start (seconds->samples beg))
  8476. (stop (seconds->samples (+ beg dur)))
  8477. (ampf (make-env '(0.000 0.000 0.106 0.301 0.117 0.254 0.156 0.475 0.198 0.359 0.221 0.043 0.228 0.214
  8478. 0.307 0.848 0.337 0.391 0.355 0.355 0.366 0.467 0.381 0.409 0.397 0.649 0.407 0.576
  8479. 0.424 0.105 0.453 0.449 0.474 0.627 0.485 0.558 0.488 0.703 0.506 0.482 0.514 0.261
  8480. 0.523 0.203 0.572 0.529 0.581 0.449 0.586 0.641 0.606 0.000 0.634 0.359 0.661 0.598
  8481. 0.675 0.522 0.684 0.750 0.701 0.616 0.709 0.380 0.718 0.250 0.733 0.188 0.768 0.478
  8482. 0.778 0.362 0.796 0.000 0.822 0.373 0.849 0.587 0.861 0.478 0.881 0.891 0.888 0.804
  8483. 0.904 0.996 0.935 0.703 0.946 0.768 1.000 0.000)
  8484. :duration dur :scaler amp))
  8485. (frqf (make-env '(0.000 0.549 0.083 0.595 0.114 0.606 0.144 0.641 0.179 0.656 0.213 0.643 0.229 0.590
  8486. 0.247 0.573 0.283 0.564 0.313 0.538 0.344 0.484 0.347 0.641 0.361 0.610 0.387 0.586
  8487. 0.404 0.547 0.419 0.486 0.435 0.477 0.440 0.645 0.450 0.667 0.456 0.634 0.472 0.610
  8488. 0.507 0.529 0.527 0.492 0.535 0.688 0.559 0.625 0.605 0.519 0.618 0.505 0.629 0.678
  8489. 0.654 0.619 0.672 0.590 0.711 0.519 0.732 0.510 0.734 0.702 0.758 0.632 0.797 0.508
  8490. 0.813 0.671 0.828 0.662 0.840 0.608 0.882 0.560 0.922 0.525 1.000 0.475)
  8491. :duration dur :scaler (hz->radians 6000.0)))
  8492. (gen1 (make-polywave 0.0 '(1 .99 2 .004 3 .006))))
  8493. (do ((i start (+ i 1)))
  8494. ((= i stop))
  8495. (outa i (* (env ampf)
  8496. (polywave gen1 (env frqf))))))))
  8497. (defanimal (townsends-solitaire-4 beg amp)
  8498. (let ((dur 0.217))
  8499. (let ((start (seconds->samples beg))
  8500. (stop (seconds->samples (+ beg dur)))
  8501. (ampf (make-env '(0.000 0.000 0.065 0.296 0.096 0.261 0.145 0.368 0.179 0.580 0.196 0.375 0.227 0.560
  8502. 0.272 0.000 0.314 0.000 0.380 0.451 0.416 0.325 0.433 0.183 0.456 0.351 0.483 0.303
  8503. 0.509 0.410 0.528 0.255 0.627 0.089 0.640 0.000 0.660 0.196 0.699 0.307 0.711 0.706
  8504. 0.722 0.719 0.740 0.481 0.755 0.455 0.763 0.362 0.775 0.453 0.793 0.059 0.796 0.214
  8505. 0.807 0.000 0.810 0.124 0.828 0.187 0.856 0.240 0.867 0.205 0.883 0.253 0.902 0.882
  8506. 0.909 1.000 0.955 0.438 0.963 0.603 0.969 0.497 0.982 0.153 1.000 0.000)
  8507. :duration dur :scaler amp))
  8508. (frqf (make-env '(0.000 0.486 0.036 0.486 0.128 0.538 0.134 0.473 0.166 0.481 0.183 0.512 0.200 0.534
  8509. 0.219 0.484 0.227 0.425 0.244 0.386 0.287 0.366 0.307 0.499 0.328 0.527 0.341 0.508
  8510. 0.424 0.429 0.507 0.410 0.599 0.364 0.617 0.381 0.628 0.414 0.659 0.427 0.685 0.460
  8511. 0.707 0.475 0.729 0.514 0.759 0.551 0.774 0.521 0.779 0.449 0.797 0.386 0.833 0.414
  8512. 0.873 0.451 0.905 0.492 0.941 0.547 0.959 0.545 0.970 0.423 1.000 0.322)
  8513. :duration dur :scaler (hz->radians 6050.0)))
  8514. (gen1 (make-polywave 0.0 '(1 .99 2 .006 3 .004))))
  8515. (do ((i start (+ i 1)))
  8516. ((= i stop))
  8517. (outa i (* (env ampf)
  8518. (polywave gen1 (env frqf))))))))
  8519. (defanimal (townsends-solitaire-5 beg amp)
  8520. (let ((dur 0.007))
  8521. (let ((start (seconds->samples beg))
  8522. (stop (seconds->samples (+ beg dur)))
  8523. (ampf (make-env '(0 0 1 1 3 0) :duration dur :scaler amp))
  8524. (frqf (make-env '(0 4600 1 3000) :duration dur :scaler (hz->radians 1.0)))
  8525. (gen1 (make-polywave 0.0 '(1 .99 2 .01))))
  8526. (do ((i start (+ i 1)))
  8527. ((= i stop))
  8528. (outa i (* (env ampf)
  8529. (polywave gen1 (env frqf))))))))
  8530. (townsends-solitaire-3 beg1 (* amp1 .7))
  8531. (townsends-solitaire-1 (+ beg1 .37) amp1)
  8532. (townsends-solitaire-1 (+ beg1 .59) amp1)
  8533. (do ((call 0 (+ call 1)))
  8534. ((= call 5))
  8535. (townsends-solitaire-2 (+ beg1 .85 (* call .059)) (* .3 amp1)))
  8536. (townsends-solitaire-5 (+ beg1 1.139) (* amp1 .2))
  8537. (townsends-solitaire-4 (+ beg1 1.178) (* amp1 .6)))
  8538. ;; (with-sound (:play #t) (townsends-solitaire 0 .5))
  8539. ;;; --------------------------------------------------------------------------------
  8540. ;;;
  8541. ;;; Canada goose
  8542. (defanimal (canada-goose-1 beg amp)
  8543. ;; east 21 28
  8544. (let ((dur 0.375))
  8545. (let ((start (seconds->samples beg))
  8546. (stop (seconds->samples (+ beg dur)))
  8547. (ampf (make-env '(0.000 0.000 0.446 0.182 0.489 0.778 0.521 0.465 0.610 0.356 0.682 0.553 0.741 1.000
  8548. 0.785 0.513 0.811 0.350 0.878 0.270 1.000 0.000)
  8549. :duration dur :scaler amp))
  8550. (frqf (make-env '(0.000 0.362 0.321 0.378 0.422 0.398 0.445 0.418 0.461 0.388 0.485 0.428 0.606 0.434
  8551. 0.624 0.421 0.643 0.444 0.662 0.405 0.670 0.451 0.685 0.378 0.691 0.428 0.700 0.378
  8552. 0.708 0.434 0.748 0.457 0.819 0.467 0.870 0.464 0.910 0.414 1.000 0.382)
  8553. :duration dur :scaler (hz->radians (* 0.5 3500))))
  8554. (gen1 (make-oscil))
  8555. (ampf1 (make-env '(0 1 .44 1 .455 .5 .46 1 .465 .5 .5 1 .67 1 .68 .1 .69 1 .71 1 .72 .1 .73 1 1 1) :duration dur :scaler .4))
  8556. (gen2 (make-oscil))
  8557. (gen3 (make-oscil))
  8558. (ampf3 (make-env '(0 .2 .4 .2 .5 1 .68 1 .7 .5 .9 .5 1 0) :duration dur :scaler .3))
  8559. (gen4 (make-polywave 0.0 '(4 .8 5 .2)))
  8560. (ampf4 (make-env '(0 0 .4 .1 .5 1 .75 1 .9 0 1 0) :duration dur :scaler .05))
  8561. (gen5 (make-nrxysin :n 12 :r .8 :ratio 1/6))
  8562. (ampf5 (make-env '(0 0 .4 0 .5 1 .65 .1 .7 1 .9 0 1 0) :duration dur :scaler .2))
  8563. (trem (make-triangle-wave (* 0.5 170)))
  8564. (tremf (make-env '(0 1 .45 1 .5 .3 .65 .2 .7 1 .75 .2 1 .2) :duration dur))
  8565. (tremf-1 (make-env '(0 1 .45 1 .5 .3 .65 .2 .7 1 .75 .2 1 .2) :duration dur :offset 1.0 :scaler -1.0))
  8566. (hum (make-oscil))
  8567. (humf (make-env '(0 .1 .1 1 .2 .1 .3 1 .4 1 .45 .1 .8 0 1 0) :duration dur :scaler .4))
  8568. (rnd (make-rand-interp 2000))
  8569. (rndf (make-env '(0 .1 .3 .2 .4 1 .45 1 .5 .1 .6 .01 .65 1 .7 .1 1 .25) :duration dur :scaler (hz->radians 200)))
  8570. (gen6 (make-nrxysin :n 12 :r .8 :ratio 1/6))
  8571. (ampf6 (make-env '(0 0 .4 0 .45 1 .5 0 .65 0 .7 1 .75 0 1 0) :duration dur :scaler .2)))
  8572. (do ((i start (+ i 1)))
  8573. ((= i stop))
  8574. (let ((frq (+ (env frqf)
  8575. (* (env rndf) (rand-interp rnd)))))
  8576. (outa i (* (env ampf)
  8577. (+ (env tremf-1)
  8578. (* (env tremf) (abs (triangle-wave trem))))
  8579. (+ (* (env ampf1) (oscil gen1 frq))
  8580. (* .5 (oscil gen2 (* 2.0 frq)))
  8581. (* (env ampf3) (oscil gen3 (* 3.0 frq)))
  8582. (+ (* (env ampf4) (polywave gen4 frq)) ; extra + to make the optimizer happy
  8583. (* (env ampf5) (nrxysin gen5 (* 6.0 frq)))
  8584. (* (env ampf6) (nrxysin gen6 (* 3.0 frq)))
  8585. (* (env humf) (oscil hum (* .25 frq))))))))))))
  8586. (defanimal (canada-goose-2 beg amp)
  8587. (let ((dur 0.245))
  8588. (let ((start (seconds->samples beg))
  8589. (stop (seconds->samples (+ beg dur)))
  8590. (ampf (make-env '(0.000 0.000 0.027 0.057 0.054 0.000 0.072 0.076 0.080 0.000 0.098 0.078 0.106 0.005
  8591. 0.121 0.087 0.133 0.000 0.147 0.101 0.157 0.005 0.174 0.119 0.183 0.005 0.200 0.119
  8592. 0.208 0.002 0.225 0.128 0.236 0.000 0.249 0.112 0.259 0.000 0.270 0.098 0.283 0.000
  8593. 0.299 0.105 0.308 0.000 0.322 0.133 0.329 0.066 0.345 0.151 0.352 0.085 0.361 0.201
  8594. 0.375 0.114 0.383 0.217 0.397 0.124 0.406 0.195 0.414 0.085 0.442 0.373 0.620 1.000
  8595. 0.640 0.686 0.705 0.469 0.757 0.352 0.818 0.300 0.846 0.405 0.942 0.133 1.000 0.000)
  8596. :duration dur :scaler amp))
  8597. (frqf (make-env '(0.000 0.276 0.164 0.300 0.307 0.308 0.599 0.297 0.651 0.302 0.661 0.354 0.755 0.357
  8598. 0.827 0.342 0.855 0.310 1.000 0.283)
  8599. :duration dur :scaler (hz->radians (* 0.5 4300))))
  8600. (gen1 (make-oscil))
  8601. (ampf1 (make-env '(0 1 .4 1 .55 1 .6 .7 1 1) :duration dur :scaler .5))
  8602. (gen2 (make-oscil))
  8603. (ampf2 (make-env '(0 .5 .55 .2 .6 1 .7 .2 1 1) :duration dur :scaler .5))
  8604. (gen3 (make-oscil))
  8605. (ampf3 (make-env '(0 .2 .6 .1 .65 1 .75 1 .9 0 1 0) :duration dur :scaler .3))
  8606. (gen4 (make-polywave 0.0 '(4 .8 5 .2)))
  8607. (ampf4 (make-env '(0 0 .4 .1 .65 1 .75 1 .8 0 .85 1 .9 .5 1 .5) :duration dur :scaler .1))
  8608. (gen5 (make-nrxysin :n 12 :r .8 :ratio 1/6))
  8609. (ampf5 (make-env '(0 0 .5 0 .55 1 .6 0 .65 1 .7 1 .8 0 1 0) :duration dur :scaler .2))
  8610. (hum (make-oscil))
  8611. (humf (make-env '(0 1 .4 1 .42 .1 .6 0 1 0) :duration dur :scaler .4))
  8612. (rnd (make-rand-interp 2000))
  8613. (rndf (make-env '(0 .1 .3 .2 .65 1 .7 .1 1 .25) :duration dur :scaler (hz->radians 100)))
  8614. (gen6 (make-nrxysin :n 12 :r .8 :ratio 1/6))
  8615. (ampf6 (make-env '(0 0 .65 0 .7 1 .75 0 1 0) :duration dur :scaler .3)))
  8616. (do ((i start (+ i 1)))
  8617. ((= i stop))
  8618. (let ((frq (+ (env frqf)
  8619. (* (env rndf) (rand-interp rnd)))))
  8620. (outa i (* (env ampf)
  8621. (+ (* (env ampf1) (oscil gen1 frq))
  8622. (* (env ampf2) (oscil gen2 (* 2.0 frq)))
  8623. (* (env ampf3) (oscil gen3 (* 3.0 frq)))
  8624. (+ (* (env ampf4) (polywave gen4 frq))
  8625. (* (env ampf5) (nrxysin gen5 (* 6.0 frq)))
  8626. (* (env ampf6) (nrxysin gen6 (* 3.0 frq)))
  8627. (* (env humf) (oscil hum (* .25 frq))))))))))))
  8628. (defanimal (canada-goose-3 beg amp)
  8629. ;; east 21 29
  8630. (let ((dur 0.33))
  8631. (let ((start (seconds->samples beg))
  8632. (stop (seconds->samples (+ beg dur)))
  8633. (ampf (make-env '(0.000 0.000 0.082 0.112 0.207 0.158 0.218 0.089 0.246 0.214 0.278 0.181 .32 .3
  8634. 0.364 0.944 0.374 1.000 0.384 0.974 0.394 0.757 0.431 0.645 0.584 0.201 0.639 0.688
  8635. 0.657 0.717 0.714 0.477 0.800 0.319 0.882 0.253 0.902 0.164 1.000 0.000)
  8636. :duration dur :scaler amp))
  8637. (frqf (make-env '(0.000 0.291 0.311 0.299 0.338 0.299 0.358 0.414 0.395 0.443 0.454 0.455 0.547 0.418
  8638. 0.596 0.389 0.614 0.414 0.634 0.393 0.682 0.418 0.764 0.426 0.846 0.410 0.874 0.369
  8639. 0.907 0.352 1.000 0.307)
  8640. :duration dur :scaler (hz->radians (* 0.5 3600))))
  8641. (gen1 (make-oscil))
  8642. (ampf1 (make-env '(0 .1 .5 .2 .6 1 .65 .3 1 1) :duration dur :scaler .3))
  8643. (gen2 (make-oscil))
  8644. (gen3 (make-oscil))
  8645. (ampf3 (make-env '(0 .1 .3 .2 .4 1 1 1) :duration dur :scaler .1))
  8646. (gen4 (make-polywave 0.0 '(4 .8 5 .2)))
  8647. (ampf4 (make-env '(0 0 .3 0 .4 1 .9 1 1 0) :duration dur :scaler .05))
  8648. (gen5 (make-nrxysin :n 12 :r .7 :ratio 1/6))
  8649. (ampf5 (make-env '(0 0 .3 0 .4 1 .5 .1 .55 0 .6 .1 .63 1 .85 0 1 0) :duration dur :scaler .3))
  8650. (trem (make-triangle-wave (* 0.5 170)))
  8651. (tremf (make-env '(0 1 .3 1 .35 .1 .6 .2 .65 1 .7 .2 1 .2) :duration dur))
  8652. (tremf-1 (make-env '(0 1 .3 1 .35 .1 .6 .2 .65 1 .7 .2 1 .2) :duration dur :offset 1.0 :scaler -1.0))
  8653. (hum (make-oscil))
  8654. (humf (make-env '(0 .5 .45 .4 .5 1 .6 .5 .7 0 1 0) :duration dur :scaler .2))
  8655. (humfrq (make-env '(0 150 .6 190 1 200) :duration dur :scaler (hz->radians 1.0)))
  8656. (tri1 (make-triangle-wave 75 .75))
  8657. (rnd (make-rand-interp 2000))
  8658. (rndf (make-env '(0 .1 .3 1 .35 .1 .4 .01 .55 .01 .6 1 .65 .01 1 .01) :duration dur :scaler (hz->radians 200))))
  8659. (do ((i start (+ i 1)))
  8660. ((= i stop))
  8661. (let ((frq (+ (env frqf)
  8662. (* (env rndf) (rand-interp rnd)))))
  8663. (outa i (* (env ampf)
  8664. (+ (env tremf-1)
  8665. (* (env tremf) (abs (triangle-wave trem))))
  8666. (+ (* (env ampf1) (oscil gen1 frq))
  8667. (* .5 (oscil gen2 (* 2.0 frq)))
  8668. (* (env ampf3) (oscil gen3 (* 3.0 frq)))
  8669. (+ (* (env ampf4) (polywave gen4 frq))
  8670. (* (env ampf5) (nrxysin gen5 (* 6.0 frq)))
  8671. (* (env humf)
  8672. (+ .25 (abs (triangle-wave tri1)))
  8673. (oscil hum (env humfrq))))))))))))
  8674. (define (canada-goose beg1 amp1)
  8675. (canada-goose-1 beg1 amp1)
  8676. (canada-goose-2 (+ beg1 .54) amp1)
  8677. (canada-goose-3 (+ beg1 .97) amp1))
  8678. ;; (with-sound (:play #t) (canada-goose 0 .5))
  8679. ;;; --------------------------------------------------------------------------------
  8680. ;;;
  8681. ;;; Pine warbler
  8682. (defanimal (pine-warbler beg amp)
  8683. ;; east 21 3
  8684. (let ((call-ampf (make-env '(0 .05 1 .2 3 .8 5 1 10 1 16 .4) :length 16))
  8685. (call-frqf (make-env '(0 1.1 4 1.0 13 .98 15 1.0) :length 16)))
  8686. (do ((call 0 (+ call 1)))
  8687. ((= call 16))
  8688. (let ((start (seconds->samples (+ beg (* call .115) (random .01))))
  8689. (dur (+ .105 (random .01))))
  8690. (let ((stop (+ start (seconds->samples dur)))
  8691. (ampf (make-env '(0.000 0.000 0.147 0.356 0.216 0.403 0.257 0.135 0.310 0.000 0.347 0.000 0.447 0.468
  8692. 0.474 0.694 0.489 0.656 0.500 0.729 0.514 0.632 0.529 0.815 0.562 0.644 0.578 0.809
  8693. 0.590 0.626 0.602 0.982 0.621 0.765 0.629 0.950 0.639 0.829 0.648 0.982 0.662 0.818
  8694. 0.669 0.644 0.675 0.824 0.685 0.932 0.699 0.579 0.706 0.353 0.723 0.800 0.737 1.000
  8695. 0.753 0.959 0.765 0.529 0.773 0.638 0.781 0.971 0.790 0.941 0.798 0.547 0.803 0.591
  8696. 0.808 0.806 0.822 0.832 0.833 0.124 0.839 0.415 0.874 0.132 0.887 0.206 0.923 0.062
  8697. 0.933 0.174 0.939 0.091 0.948 0.159 0.960 0.079 0.967 0.176 0.981 0.062 1.000 0.000)
  8698. :duration dur :scaler (* amp (env call-ampf))))
  8699. (frqf (make-env '(0.000 0.118 0.056 0.132 0.133 0.146 0.190 0.148 0.233 0.134 0.261 0.132 0.288 0.137
  8700. 0.311 0.154 0.332 0.176 0.365 0.151 0.415 0.151 0.477 0.164 0.526 0.171 0.636 0.199
  8701. 0.730 0.204 0.855 0.221 0.962 0.218 1.000 0.199)
  8702. :duration dur :scaler (hz->radians (* 22000.0 (env call-frqf)))))
  8703. (gen1 (make-polywave 0.0 '(1 .97)))
  8704. (gen2 (make-polywave 0.0 '(2 .005 3 .03 4 .003)))
  8705. (ampf2 (make-env '(0 0 .3 0 .4 1 1 1) :duration dur)))
  8706. (do ((i start (+ i 1)))
  8707. ((= i stop))
  8708. (let ((frq (env frqf)))
  8709. (outa i (* (env ampf)
  8710. (+ (polywave gen1 frq)
  8711. (* (env ampf2)
  8712. (polywave gen2 frq))))))))))))
  8713. ;; (with-sound (:play #t) (pine-warbler 0 .5))
  8714. ;;; --------------------------------------------------------------------------------
  8715. ;;;
  8716. ;;; Black-throated sparrow
  8717. (define (black-throated-sparrow beg1 amp1)
  8718. ;; south 85 2
  8719. (defanimal (black-throated-sparrow-1 beg amp)
  8720. (let ((dur .034))
  8721. (let ((start (seconds->samples beg))
  8722. (stop (seconds->samples (+ beg dur)))
  8723. (ampf (make-env '(0.000 0.000 0.057 0.806 0.073 0.857 0.111 0.783 0.139 0.988 0.216 0.817 0.235 0.574
  8724. 0.324 0.333 0.473 0.216 0.725 0.679 0.805 0.649 0.887 0.484 1.000 0.000)
  8725. :duration dur :scaler amp))
  8726. (frqf (make-env '(0.000 0.301 0.059 0.288 0.090 0.281 0.123 0.286 0.149 0.299 0.189 0.303 0.250 0.299
  8727. 0.341 0.292 0.568 0.296 0.746 0.299 1.000 0.296)
  8728. :duration dur :scaler (hz->radians 22000.0)))
  8729. (gen1 (make-polywave 0.0 '(1 .99 2 .007 3 .003))))
  8730. (do ((i start (+ i 1)))
  8731. ((= i stop))
  8732. (outa i (* (env ampf)
  8733. (polywave gen1 (env frqf))))))))
  8734. (defanimal (black-throated-sparrow-2 beg amp)
  8735. (let ((dur .11))
  8736. (let ((start (seconds->samples beg))
  8737. (stop (seconds->samples (+ beg dur)))
  8738. (ampf (make-env '(0.000 0.000 0.026 0.514 0.080 0.667 0.120 0.618 0.183 0.000 0.223 0.000 0.260 0.913
  8739. 0.281 0.977 0.311 0.895 0.343 0.631 0.399 0.000 0.444 0.000 0.504 0.130 0.514 0.070
  8740. 0.533 0.173 0.567 0.128 0.576 0.217 0.587 0.202 0.596 0.117 0.613 0.171 0.640 0.104
  8741. 0.654 0.166 0.677 0.087 0.729 0.000 0.820 0.000 0.844 0.940 0.865 1.000 0.909 0.927
  8742. 0.968 0.499 1.000 0.000)
  8743. :duration dur :scaler amp))
  8744. (frqf (make-env '(0.000 0.176 0.167 0.176 0.196 0.158 0.246 0.160 0.272 0.174 0.407 0.169 0.487 0.093
  8745. 0.504 0.117 0.518 0.093 0.543 0.117 0.562 0.093 0.579 0.117 0.599 0.093 0.615 0.113
  8746. 0.635 0.090 0.656 0.115 0.671 0.088 0.689 0.111 0.705 0.088 0.809 0.172 0.835 0.176 1.000 0.176)
  8747. :duration dur :scaler (hz->radians 22000.0)))
  8748. (gen1 (make-polywave 0.0 '(1 .99 2 .007 3 .003))))
  8749. (do ((i start (+ i 1)))
  8750. ((= i stop))
  8751. (outa i (* (env ampf)
  8752. (polywave gen1 (env frqf))))))))
  8753. (defanimal (black-throated-sparrow-3 beg amp)
  8754. (let ((dur .153))
  8755. (let ((start (seconds->samples beg))
  8756. (stop (seconds->samples (+ beg dur)))
  8757. (ampf (make-env '(0.000 0.000 0.099 0.442 0.124 0.456 0.146 0.372 0.164 0.203 0.243 0.061 0.257 0.352
  8758. 0.294 0.433 0.371 0.221 0.380 0.000 0.525 0.000 0.552 0.138 0.559 0.068 0.579 0.314
  8759. 0.595 0.074 0.621 0.643 0.636 0.738 0.649 0.542 0.660 0.147 0.670 0.853 0.681 0.986
  8760. 0.690 0.941 0.717 0.149 0.728 0.862 0.743 0.995 0.751 0.950 0.777 0.149 0.790 0.853
  8761. 0.799 0.901 0.805 0.840 0.825 0.056 0.835 0.609 0.851 0.822 0.858 0.795 0.873 0.061
  8762. 0.885 0.738 0.894 0.813 0.903 0.745 0.919 0.097 0.925 0.438 0.945 0.591 0.957 0.149
  8763. 0.971 0.289 0.985 0.065 1.000 0.000)
  8764. :duration dur :scaler amp))
  8765. (frqf (make-env '(0.000 0.192 0.090 0.195 0.119 0.197 0.156 0.211 0.163 0.142 0.242 0.128 0.254 0.211
  8766. 0.276 0.178 0.326 0.169 0.355 0.169 0.379 0.181 0.542 0.238 0.563 0.247 0.586 0.240
  8767. 0.618 0.245 0.640 0.238 0.664 0.247 0.690 0.240 0.721 0.240 0.748 0.233 0.782 0.243
  8768. 0.809 0.238 0.832 0.243 0.858 0.233 0.880 0.245 0.903 0.233 0.923 0.245 0.944 0.238 1.000 0.240)
  8769. :duration dur :scaler (hz->radians 22000.0)))
  8770. (gen1 (make-polywave 0.0 '(1 .99 2 .007 3 .003))))
  8771. (do ((i start (+ i 1)))
  8772. ((= i stop))
  8773. (outa i (* (env ampf)
  8774. (polywave gen1 (env frqf))))))))
  8775. (black-throated-sparrow-3 beg1 (* .4 amp1))
  8776. (let ((ampf (make-env '(0 .4 5 1.0 7 .9) :length 7)))
  8777. (do ((call 0 (+ call 1)))
  8778. ((= call 7))
  8779. (black-throated-sparrow-1 (+ beg1 .2 (* call .042) (random .003)) (* amp1 (env ampf)))))
  8780. (do ((call 0 (+ call 1)))
  8781. ((= call 3))
  8782. (black-throated-sparrow-2 (+ beg1 .53 (* call .134)) (* 0.6 amp1))))
  8783. ;; (with-sound (:play #t) (black-throated-sparrow 0 .5))
  8784. ;;; --------------------------------------------------------------------------------
  8785. ;;;
  8786. ;;; Cape May warbler
  8787. (defanimal (cape-may-warbler beg amp)
  8788. ;; east 14 2
  8789. ;; note #1
  8790. (let ((dur 0.234))
  8791. (let ((start (seconds->samples beg))
  8792. (stop (seconds->samples (+ beg dur)))
  8793. (ampf (make-env '(0.000 0.000 0.115 0.517 0.170 0.326 0.214 0.400 0.272 0.397 0.298 0.289 0.486 0.674
  8794. 0.529 0.564 0.537 0.744 0.554 0.605 0.570 0.871 0.617 0.637 0.646 0.986 0.664 0.857
  8795. 0.675 1.000 0.697 0.279 0.713 0.626 0.756 0.522 0.772 0.342 0.792 0.600 0.813 0.319
  8796. 0.825 0.667 0.856 0.330 0.864 0.642 0.890 0.568 0.899 0.242 0.920 0.573 0.983 0.323 1.000 0.000)
  8797. :duration dur :scaler (* .2 amp)))
  8798. (frqf (make-env '(0.000 0.357 0.070 0.364 0.119 0.362 0.246 0.378 0.318 0.380 0.397 0.387 0.538 0.398
  8799. 0.628 0.416 0.733 0.430 0.811 0.437 0.852 0.443 0.912 0.441 1.000 0.441)
  8800. :duration dur :scaler (hz->radians 22000.0)))
  8801. (gen1 (make-oscil)))
  8802. (do ((i start (+ i 1)))
  8803. ((= i stop))
  8804. (outa i (* (env ampf)
  8805. (oscil gen1 (env frqf)))))))
  8806. ;; next 4 notes
  8807. (let ((begs (vector 0.31 0.61 0.86 1.11))
  8808. (durs (vector 0.23 0.19 0.18 0.18))
  8809. (amps (vector 0.6 0.95 1.0 0.8))
  8810. (ampenv '(0.000 0.000 0.081 0.593 0.118 0.676 0.139 0.952 0.174 1.000 0.198 0.762 0.255 0.701 0.276 0.824
  8811. 0.316 0.572 0.372 0.794 0.411 0.572 0.506 0.663 0.550 0.514 0.582 0.622 0.633 0.337 0.653 0.520
  8812. 0.685 0.536 0.700 0.389 0.780 0.462 0.796 0.267 0.804 0.380 0.814 0.231 0.832 0.330 0.895 0.310
  8813. 0.942 0.238 1.000 0.000))
  8814. (frqenv '(0.000 0.326 0.102 0.344 0.182 0.351 0.269 0.360 0.352 0.373 0.503 0.382 0.614 0.394 0.730 0.410
  8815. 0.833 0.423 1.000 0.434))
  8816. (gen1 (make-oscil)))
  8817. (do ((call 0 (+ call 1)))
  8818. ((= call 4))
  8819. (let ((start (seconds->samples (+ beg (begs call))))
  8820. (dur (durs call)))
  8821. (let ((stop (+ start (seconds->samples dur)))
  8822. (ampf (make-env ampenv :duration dur :scaler (* amp (amps call))))
  8823. (frqf (make-env frqenv :duration dur :scaler (hz->radians 22000))))
  8824. (do ((i start (+ i 1)))
  8825. ((= i stop))
  8826. (outa i (* (env ampf)
  8827. (oscil gen1 (env frqf))))))))))
  8828. ;; (with-sound (:play #t) (cape-may-warbler 0 .5))
  8829. ;;; --------------------------------------------------------------------------------
  8830. ;;;
  8831. ;;; Kirtland's warbler
  8832. (define (kirtlands-warbler beg1 amp1)
  8833. ;; east 22 3
  8834. (defanimal (kirtlands-warbler-1 beg dur frqscl frqenv ampscl ampenv)
  8835. (let ((start (seconds->samples beg))
  8836. (stop (seconds->samples (+ beg dur)))
  8837. (ampf (make-env ampenv :duration dur :scaler ampscl))
  8838. (frqf (make-env frqenv :duration dur :scaler (hz->radians frqscl)))
  8839. (gen1 (make-polywave 0.0 (normalize-partials '(1 1.0 2 .08 3 .1 4 .03 5 .05)))))
  8840. (do ((i start (+ i 1)))
  8841. ((= i stop))
  8842. (outa i (* (env ampf)
  8843. (polywave gen1 (env frqf)))))))
  8844. (let ((begs (vector 0.0 0.25 0.47 0.65 0.79 0.99 1.17 1.33))
  8845. (durs (vector 0.05 0.05 0.06 0.07 0.14 0.14 0.12 0.11))
  8846. (amps (vector 0.04 0.6 0.8 0.80 1.0 0.94 0.92 0.75))
  8847. (frqs (vector 6020 6020 13370 13360 13360 13360 13360 13360))
  8848. (ampenvs (vector '(0.000 0.000 0.063 0.289 0.098 0.838 0.139 0.960 0.217 0.213 0.389 0.115 0.484 0.775
  8849. 0.524 0.530 0.546 0.842 0.587 0.375 0.630 0.909 0.739 0.613 0.764 0.320 0.829 0.443
  8850. 0.910 0.356 0.929 0.162 1.000 0.000)
  8851. '(0.000 0.000 0.049 0.166 0.083 0.204 0.111 0.348 0.149 0.271 0.190 0.665 0.238 0.671
  8852. 0.303 0.477 0.390 0.032 0.570 0.026 0.614 0.277 0.643 0.591 0.664 0.527 0.695 0.785
  8853. 0.732 0.492 0.767 0.856 0.809 0.933 0.853 0.576 0.907 0.346 0.960 0.140 1.000 0.000)
  8854. '(0.000 0.000 0.097 0.340 0.127 0.181 0.157 0.578 0.185 0.426 0.234 0.718 0.267 0.624
  8855. 0.300 0.613 0.416 0.041 0.506 0.034 0.554 0.232 0.575 0.561 0.609 0.318 0.651 0.865
  8856. 0.696 0.884 0.763 0.763 0.821 0.533 0.862 0.340 0.919 0.148 1.000 0.000)
  8857. '(0.000 0.000 0.077 0.052 0.138 0.196 0.159 0.368 0.178 0.067 0.210 0.589 0.224 0.256
  8858. 0.251 0.658 0.286 0.529 0.324 0.751 0.345 0.578 0.374 0.477 0.453 0.043 0.524 0.043
  8859. 0.595 0.413 0.609 0.258 0.635 0.333 0.654 0.667 0.685 0.852 0.703 0.871 0.725 0.789
  8860. 0.748 0.837 0.813 0.602 0.845 0.329 0.904 0.110 1.000 0.000)
  8861. '(0.000 0.000 0.063 0.075 0.109 0.275 0.125 0.262 0.135 0.146 0.166 0.523 0.184 0.503
  8862. 0.194 0.157 0.203 0.477 0.231 0.725 0.263 0.804 0.282 0.613 0.350 0.561 0.387 0.295
  8863. 0.442 0.060 0.489 0.054 0.545 0.303 0.562 0.140 0.632 0.583 0.669 0.594 0.705 0.923
  8864. 0.813 0.540 0.857 0.118 0.921 0.039 1.000 0.000)
  8865. '(0.000 0.000 0.085 0.308 0.096 0.153 0.143 0.477 0.154 0.239 0.161 0.443 0.196 0.755
  8866. 0.264 0.903 0.282 0.804 0.315 0.796 0.357 0.325 0.407 0.047 0.469 0.049 0.519 0.310
  8867. 0.543 0.159 0.552 0.480 0.657 0.908 0.769 0.570 0.828 0.142 0.882 0.071 1.000 0.000)
  8868. '(0.000 0.000 0.315 0.112 0.450 0.310 0.710 0.963 0.805 0.862 0.913 0.460 0.952 0.099
  8869. 1.000 0.000)
  8870. '(0.000 0.000 0.264 0.138 0.326 0.135 0.510 0.688 0.621 0.766 0.656 0.768 0.697 0.923
  8871. 0.717 0.809 0.743 0.892 0.824 0.871 0.877 0.725 1.000 0.000)))
  8872. (frqenvs (vector '(0.000 0.314 0.074 0.394 0.101 0.462 0.127 0.486 0.157 0.458 0.178 0.372 0.243 0.310
  8873. 0.348 0.299 0.425 0.323 0.463 0.413 0.496 0.505 0.522 0.533 0.552 0.492 0.567 0.415
  8874. 0.597 0.389 0.633 0.426 0.654 0.486 0.686 0.495 0.732 0.389 0.820 0.344 1.000 0.314)
  8875. '(0.000 0.394 0.044 0.458 0.059 0.578 0.085 0.606 0.113 0.542 0.125 0.475 0.150 0.462
  8876. 0.182 0.518 0.210 0.551 0.238 0.516 0.266 0.465 0.305 0.411 0.356 0.381 0.428 0.323
  8877. 0.508 0.312 0.588 0.348 0.628 0.426 0.646 0.499 0.669 0.525 0.695 0.510 0.713 0.469
  8878. 0.736 0.454 0.761 0.480 0.793 0.512 0.824 0.480 0.863 0.415 0.934 0.387 1.000 0.340)
  8879. '(0.000 0.204 0.027 0.258 0.053 0.267 0.077 0.224 0.096 0.196 0.119 0.222 0.136 0.252
  8880. 0.160 0.265 0.183 0.247 0.211 0.224 0.250 0.200 0.304 0.191 0.387 0.157 0.441 0.146
  8881. 0.494 0.168 0.528 0.178 0.548 0.206 0.564 0.243 0.584 0.265 0.609 0.245 0.646 0.217
  8882. 0.695 0.228 0.744 0.204 0.771 0.194 0.799 0.194 0.879 0.163 1.000 0.144)
  8883. '(0.000 0.202 0.138 0.204 0.162 0.273 0.186 0.314 0.201 0.273 0.211 0.237 0.229 0.224
  8884. 0.252 0.239 0.275 0.260 0.303 0.239 0.332 0.209 0.392 0.185 0.434 0.161 0.490 0.144
  8885. 0.547 0.170 0.588 0.198 0.600 0.239 0.624 0.265 0.650 0.241 0.677 0.228 0.716 0.245
  8886. 0.752 0.219 0.801 0.198 1.000 0.140)
  8887. '(0.000 0.161 0.050 0.163 0.075 0.237 0.095 0.363 0.119 0.398 0.160 0.396 0.190 0.391
  8888. 0.207 0.363 0.240 0.323 0.263 0.303 0.292 0.258 0.320 0.241 0.376 0.228 0.430 0.224
  8889. 0.466 0.247 0.481 0.327 0.498 0.381 0.530 0.398 0.570 0.385 0.599 0.359 0.659 0.329
  8890. 0.701 0.286 0.765 0.219 0.822 0.191 0.857 0.168 0.899 0.151 1.000 0.135)
  8891. '(0.000 0.245 0.021 0.353 0.047 0.402 0.087 0.406 0.122 0.381 0.147 0.353 0.180 0.329
  8892. 0.222 0.267 0.263 0.247 0.360 0.228 0.382 0.243 0.404 0.226 0.422 0.222 0.438 0.241
  8893. 0.463 0.314 0.488 0.376 0.521 0.387 0.553 0.381 0.570 0.361 0.599 0.353 0.622 0.329
  8894. 0.656 0.312 0.689 0.286 0.769 0.213 0.813 0.194 0.857 0.170 1.000 0.142)
  8895. '(0.000 0.110 0.160 0.138 0.284 0.159 0.389 0.172 0.504 0.196 0.555 0.215 0.628 0.239
  8896. 0.693 0.256 0.744 0.277 0.796 0.286 0.828 0.308 0.867 0.299 0.894 0.305 0.922 0.297
  8897. 1.000 0.267)
  8898. '(0.000 0.123 0.079 0.148 0.131 0.153 0.274 0.168 0.340 0.170 0.432 0.194 0.494 0.200
  8899. 0.520 0.215 0.595 0.219 0.628 0.241 0.675 0.245 0.752 0.273 0.864 0.310 0.898 0.297
  8900. 0.930 0.292 0.964 0.269 1.000 0.247))))
  8901. (do ((call 0 (+ call 1)))
  8902. ((= call 8))
  8903. (kirtlands-warbler-1 (+ beg1 (begs call))
  8904. (durs call)
  8905. (frqs call)
  8906. (frqenvs call)
  8907. (* amp1 (amps call))
  8908. (ampenvs call)))))
  8909. ;; (with-sound (:play #t) (kirtlands-warbler 0 .5))
  8910. ;;; --------------------------------------------------------------------------------
  8911. ;;;
  8912. ;;; Wood duck
  8913. ;;;
  8914. ;;; reverb in original makes this hard to match
  8915. (defanimal (wood-duck beg amp)
  8916. ;; east 22 19
  8917. (let ((dur 0.75))
  8918. (let ((start (seconds->samples beg))
  8919. (stop (seconds->samples (+ beg dur)))
  8920. (ampf (make-env '(0.000 0.000 0.022 0.070 0.027 0.433 0.041 0.441 0.047 0.256 .06 .1 0.088 0.888 0.1 0
  8921. 0.115 0.692 0.120 0.266 0.132 0.379 0.149 0.277 0.166 0.360 0.174 0.269 0.203 0.386
  8922. 0.219 0.295 0.269 0.413 0.316 0.287 0.338 0.428 0.354 0.292 0.369 0.397 0.424 0.290
  8923. 0.476 0.368 0.52 .01 0.53 0.029 0.58 0.916 0.634 0.875 0.657 0.781 0.682 1.000
  8924. 0.718 0.961 0.734 0.705 0.761 0.864 0.785 0.841 0.830 0.606 0.85 0.454 0.87 0.0
  8925. .88 0.0 0.919 0.292 0.966 0.240 1.000 0.000)
  8926. :duration dur :scaler amp))
  8927. (frqf (make-env '(0.000 0.110 0.029 0.174 0.048 0.232 0.075 0.256 0.096 0.238 0.120 0.191 0.199 0.168
  8928. 0.272 0.168 0.369 0.186 0.522 0.226 0.528 0.368 0.539 0.345 0.714 0.339 0.847 0.328
  8929. 0.879 0.325 0.885 0.200 0.956 0.157 1.000 0.122)
  8930. :duration dur :scaler (hz->radians 4890.0)))
  8931. (gen1 (make-oscil))
  8932. (ampf1 (make-env '(0 .2 .45 .15 .5 .25 .53 1 .85 1 .88 .4 1 .1) :duration dur :scaler .8))
  8933. (gen2 (make-oscil))
  8934. (ampf2 (make-env '(0 1 .1 1 .15 .75 .4 .75 .5 .1 .6 .75 .8 .75 .85 .1 .88 .5 .95 .5 1 .2) :duration dur :scaler .6))
  8935. (gen3 (make-oscil))
  8936. (ampf3 (make-env '(0 1 .2 .3 .4 .1 .5 1 .52 1 .7 1 .75 .3 1 .1) :duration dur :scaler .1))
  8937. (gen4 (make-oscil))
  8938. (gen5 (make-oscil))
  8939. (ampf4 (make-env '(0 .2 .4 .05 .5 .2 .55 0 1 0) :duration dur :scaler .1))
  8940. (rnd (make-rand-interp 400 (hz->radians 40)))
  8941. (rndf (make-env '(0 0 .05 4 .1 .5 .9 .1 1 1) :duration dur))
  8942. (rnd1 (make-rand-interp 500 .1))
  8943. (att (make-polywave 0.0 '(3 .3 5 .5 7 .1 9 .1)))
  8944. (attf (make-env '(0 0 .05 1 .1 0 1 0) :duration dur :scaler .125)))
  8945. (do ((i start (+ i 1)))
  8946. ((= i stop))
  8947. (let ((frq (+ (env frqf)
  8948. (* (env rndf) (rand-interp rnd)))))
  8949. (outa i (* (env ampf)
  8950. (+ .9 (abs (rand-interp rnd1)))
  8951. (+ (* (env attf) (polywave att (* 0.5 frq)))
  8952. (* (env ampf1) (oscil gen1 frq))
  8953. (+ (* (env ampf2) (oscil gen2 (* 2.0 frq)))
  8954. (* (env ampf3) (oscil gen3 (* 3.0 frq)))
  8955. (* (env ampf4) (+ (oscil gen4 (* 4.0 frq))
  8956. (oscil gen5 (* 5.0 frq)))))))))))))
  8957. ;; (with-sound (:play #t) (wood-duck 0 .5))
  8958. ;;; --------------------------------------------------------------------------------
  8959. ;;;
  8960. ;;; White-eyed vireo
  8961. (defanimal (white-eyed-vireo beg amp)
  8962. ;; south 41 2
  8963. ;; note #1
  8964. (let ((dur 0.1))
  8965. (let ((start (seconds->samples beg))
  8966. (stop (seconds->samples (+ beg dur)))
  8967. (ampf (make-env '(0.000 0.000 0.067 0.143 0.150 0.431 0.174 0.392 0.215 0.866 0.243 1.000 0.265 1.000
  8968. 0.309 0.589 0.322 0.742 0.347 1.000 0.371 0.487 0.415 0.617 0.496 0.457 0.546 0.604
  8969. 0.644 0.686 0.677 0.593 0.703 0.721 0.741 0.745 0.757 0.693 0.772 0.500 0.828 0.615
  8970. 0.838 0.766 0.875 0.965 0.897 0.905 0.912 0.461 0.932 0.868 0.952 0.855 1.000 0.000)
  8971. :duration dur :scaler (* .5 amp)))
  8972. (frqf (make-env '(0.000 0.109 0.076 0.131 0.112 0.144 0.155 0.156 0.235 0.193 0.259 0.198 0.287 0.215
  8973. 0.352 0.232 0.382 0.257 0.462 0.270 0.599 0.273 0.748 0.272 0.776 0.262 0.798
  8974. 0.260 0.897 0.227 0.927 0.211 0.960 0.195 1.000 0.191)
  8975. :duration dur :scaler (hz->radians 22000.0)))
  8976. (gen1 (make-polywave 0.0 '(1 .99 2 .01 3 .005))))
  8977. (do ((i start (+ i 1)))
  8978. ((= i stop))
  8979. (outa i (* (env ampf) (polywave gen1 (env frqf)))))))
  8980. ;; note #2
  8981. (let ((dur 0.046)
  8982. (start (seconds->samples (+ beg 0.23))))
  8983. (let ((stop (+ start (seconds->samples dur)))
  8984. (ampf (make-env '(0.000 0.000 0.052 0.258 0.111 0.138 0.273 0.508 0.356 0.992 0.419 0.569 0.493 0.547
  8985. 0.584 0.374 0.668 0.629 0.703 0.659 0.732 0.884 0.813 0.077 0.857 0.190 0.913 0.087 1.000 0.000)
  8986. :duration dur :scaler (* .6 amp)))
  8987. (frqf (make-env '(0.000 0.203 0.071 0.200 0.111 0.203 0.134 0.227 0.200 0.238 0.249 0.255 0.329 0.263
  8988. 0.469 0.265 0.627 0.245 0.728 0.233 0.891 0.146 0.948 0.131 1.000 0.144)
  8989. :duration dur :scaler (hz->radians (* 1/3 22000.0))))
  8990. (gen1 (make-polywave 0.0 (normalize-partials '( 2 1 3 .05 4 .02 5 .005 6 .01 7 .005))))
  8991. (gen2 (make-oscil))
  8992. (ampf2 (make-env '(0 .5 .4 1 .7 1 .8 0 1 0) :duration dur :scaler .05))
  8993. (gen3 (make-oscil))
  8994. (ampf3 (make-env '(0 1 .1 0 1 0) :duration dur :scaler .1)))
  8995. (do ((i start (+ i 1)))
  8996. ((= i stop))
  8997. (let ((frq (env frqf)))
  8998. (outa i (* (env ampf)
  8999. (+ (* (env ampf2) (oscil gen2 frq))
  9000. (* (env ampf3) (oscil gen3 (* 3.0 frq)))
  9001. (polywave gen1 frq))))))))
  9002. ;; note #3
  9003. (let ((dur 0.078)
  9004. (start (seconds->samples (+ beg 0.33))))
  9005. (let ((stop (+ start (seconds->samples dur)))
  9006. (ampf (make-env '(0.000 0.000 0.054 0.208 0.443 0.794 0.762 0.943 0.848 0.901 0.922 0.586 0.967 0.104 1.000 0.000)
  9007. :duration dur :scaler (* 0.3 amp)))
  9008. (frqf (make-env '(0.000 0.111 0.853 0.135 1.000 0.114)
  9009. :duration dur :scaler (hz->radians 22000.0)))
  9010. (gen1 (make-polywave 0.0 '(1 .95 2 .01 3 .03 4 .01 5 .005 )))
  9011. (vib (make-oscil 370))
  9012. (vib-index (hz->radians 300))
  9013. (rnd (make-rand-interp 4000 (hz->radians 200))))
  9014. (do ((i start (+ i 1)))
  9015. ((= i stop))
  9016. (outa i (* (env ampf)
  9017. (polywave gen1 (+ (env frqf)
  9018. (* vib-index (oscil vib))
  9019. (rand-interp rnd))))))))
  9020. ;; note #4
  9021. (let ((dur 0.2)
  9022. (start (seconds->samples (+ beg 0.426))))
  9023. (let ((stop (+ start (seconds->samples dur)))
  9024. (ampf (make-env '(0.000 0.000 0.023 0.147 0.041 0.537 0.063 0.716 0.077 0.179 0.092 0.812 0.121 0.710
  9025. 0.128 0.625 0.163 0.959 0.251 0.161 0.338 0.504 0.355 0.551 0.366 0.689 0.383 0.507
  9026. 0.393 0.845 0.406 0.806 0.410 0.601 0.421 0.815 0.444 0.856 0.456 0.575 0.500 0.742
  9027. 0.510 0.619 0.515 0.408 0.524 0.754 0.537 0.563 0.546 0.331 0.551 0.683 0.564 0.625
  9028. 0.572 0.493 0.580 0.704 0.593 0.639 0.597 0.396 0.604 0.721 0.621 0.551 0.624 0.413
  9029. 0.630 0.660 0.647 0.557 0.650 0.416 0.660 0.707 0.678 0.472 0.685 0.686 0.703 0.496
  9030. 0.716 0.733 0.732 0.575 0.740 0.739 0.750 0.648 0.765 0.762 0.771 0.727 0.777 0.636
  9031. 0.792 0.809 0.806 0.648 0.830 0.845 0.841 0.745 0.875 0.982 0.906 1.000 0.931 0.944
  9032. 0.970 0.645 1.000 0.000)
  9033. :duration dur :scaler amp))
  9034. (frqf (make-env '(0.000 0.197 0.042 0.463 0.047 0.513 0.060 0.492 0.067 0.553 0.076 0.624 0.086 0.592
  9035. 0.100 0.513 0.135 0.453 0.186 0.411 0.224 0.395 0.250 0.403 0.281 0.368 0.357 0.366
  9036. 0.370 0.397 0.384 0.376 0.396 0.426 0.412 0.400 0.426 0.445 0.440 0.421 0.449 0.476
  9037. 0.463 0.437 0.478 0.497 0.490 0.453 0.503 0.503 0.515 0.447 0.531 0.503 0.545 0.461
  9038. 0.557 0.511 0.569 0.463 0.580 0.516 0.595 0.455 0.608 0.505 0.625 0.455 0.638 0.505
  9039. 0.649 0.455 0.665 0.495 0.679 0.455 0.693 0.500 0.707 0.447 0.721 0.487 0.735 0.455
  9040. 0.750 0.479 0.766 0.453 0.778 0.479 0.793 0.439 0.808 0.461 0.821 0.437 0.837 0.458
  9041. 0.861 0.437 1.000 0.408)
  9042. :duration dur :scaler (hz->radians 7800.0)))
  9043. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .01 4 .005 5 .005))))
  9044. (do ((i start (+ i 1)))
  9045. ((= i stop))
  9046. (outa i (* (env ampf)
  9047. (polywave gen1 (env frqf)))))))
  9048. ;; note #5
  9049. (let ((dur 0.14)
  9050. (start (seconds->samples (+ beg 0.65))))
  9051. (let ((stop (+ start (seconds->samples dur)))
  9052. (ampf (make-env '(0.000 0.000 0.033 0.216 0.110 0.247 0.218 0.800 0.263 0.734 0.301 0.889 0.370 0.966
  9053. 0.470 0.905 0.494 0.658 0.531 0.666 0.727 0.508 1.000 0.000)
  9054. :duration dur :scaler (* .3 amp)))
  9055. (frqf (make-env '(0.124 0.214 0.222 0.265 0.311 0.310 0.400 0.317 0.501 0.307 0.651 0.283 0.752 0.262 1.000 0.198)
  9056. :duration dur :scaler (hz->radians 8100.0)))
  9057. (gen1 (make-polywave 0.0 (normalize-partials '(1 1.5 2 .01 3 .01 4 .07 5 .04 6 .05 8 .005))))
  9058. (rnd (make-rand-interp 3000))
  9059. (rndf (make-env '(0 1 .2 0 .7 0 .8 1 1 1) :duration dur :scaler (hz->radians 200))))
  9060. (do ((i start (+ i 1)))
  9061. ((= i stop))
  9062. (outa i (* (env ampf)
  9063. (polywave gen1 (+ (env frqf)
  9064. (* (env rndf)
  9065. (rand-interp rnd))))))))))
  9066. ;; (with-sound (:play #t) (white-eyed-vireo 0 .5))
  9067. ;;; --------------------------------------------------------------------------------
  9068. ;;;
  9069. ;;; Willet
  9070. (defanimal (willet beg amp)
  9071. ;; calif2 36 2
  9072. ;; note #1
  9073. (let ((dur 0.037))
  9074. (let ((start (seconds->samples beg))
  9075. (stop (seconds->samples (+ beg dur)))
  9076. (ampf (make-env '(0.000 0.000 0.017 0.603 0.397 0.986 0.531 0.915 0.750 0.255 0.836 0.383 0.913 0.420 1.000 0.000)
  9077. :duration dur :scaler (* .25 amp)))
  9078. (frqf (make-env '(0.000 0.172 0.152 0.172 0.401 0.188 0.667 0.201 0.808 0.205 0.951 0.227 1.000 0.234)
  9079. :duration dur :scaler (hz->radians (* 1/3 13000.0))))
  9080. (gen1 (make-polywave 0.0 (normalize-partials '(1 .03 2 .1 3 1 4 .6 5 .5 6 .4 7 .1 8 .04 9 .01 10 .01 11 .005)))))
  9081. (do ((i start (+ i 1)))
  9082. ((= i stop))
  9083. (outa i (* (env ampf)
  9084. (polywave gen1 (env frqf)))))))
  9085. ;; note #2
  9086. (let ((dur 0.029)
  9087. (start (seconds->samples (+ beg 0.054))))
  9088. (let ((stop (+ start (seconds->samples dur)))
  9089. (ampf (make-env '(0.000 0.000 0.063 0.263 0.086 0.656 0.113 0.877 0.429 0.753 0.681 0.578 0.830 0.224 1.000 0.000)
  9090. :duration dur :scaler amp))
  9091. (frqf (make-env '(0.000 0.178 0.849 0.156 1.000 0.156)
  9092. :duration dur :scaler (hz->radians (* 1/2 14900.0))))
  9093. (gen1 (make-polywave 0.0 (normalize-partials '(1 .07 2 1 3 .8 4 .47 5 .14 6 .04 7 .03 8 .01)))))
  9094. (do ((i start (+ i 1)))
  9095. ((= i stop))
  9096. (outa i (* (env ampf)
  9097. (polywave gen1 (env frqf))))))))
  9098. ;; (with-sound (:play #t) (willet 0 .5))
  9099. ;;; --------------------------------------------------------------------------------
  9100. ;;;
  9101. ;;; Philadelphia vireo
  9102. (defanimal (philadelphia-vireo beg amp)
  9103. ;; east 58 3
  9104. (let ((dur 0.364))
  9105. (let ((start (seconds->samples beg))
  9106. (stop (seconds->samples (+ beg dur)))
  9107. (ampf (make-env '(0.000 0.000 0.051 0.03 0.078 0.168 0.100 0.358 0.120 0.179 0.146 0.059 0.166 0.551
  9108. 0.175 0.363 0.188 0.486 0.197 0.441 0.212 0.559 0.226 1.000 0.311 0.105 0.317 0.227
  9109. 0.348 0.152 0.380 0.142 0.408 0.067 0.469 0.000 0.615 0.000 0.637 0.094 0.702 0.138
  9110. 0.731 0.055 0.784 0.028 0.835 0.168 0.899 0.429 0.928 0.323 0.942 0.220 0.953 0.309
  9111. 0.957 0.050 0.968 0.264 0.984 0.032 1.000 0.000)
  9112. :duration dur :scaler amp))
  9113. (frqf (make-env '(0.000 0.912 0.033 0.904 0.060 0.664 0.092 0.555 0.110 0.499 0.148 0.403 0.167 0.480
  9114. 0.178 0.567 0.198 0.593 0.221 0.563 0.236 0.510 0.254 0.465 0.283 0.430 0.331 0.373
  9115. 0.385 0.338 0.444 0.296 0.509 0.306 0.635 0.396 0.653 0.443 0.667 0.456 0.683 0.437
  9116. 0.719 0.351 0.745 0.296 0.765 0.281 0.802 0.298 0.835 0.358 0.868 0.452 0.904 0.507
  9117. 0.955 0.505 0.966 0.488 0.971 0.520 0.980 0.493 1.000 0.510)
  9118. :duration dur :scaler (hz->radians 7400.0)))
  9119. (gen1 (make-polywave 0.0 '(1 .98 2 .015 3 .005))))
  9120. (do ((i start (+ i 1)))
  9121. ((= i stop))
  9122. (outa i (* (env ampf)
  9123. (polywave gen1 (env frqf))))))))
  9124. ;; (with-sound (:play #t) (philadelphia-vireo 0 .5))
  9125. ;;; --------------------------------------------------------------------------------
  9126. ;;;
  9127. ;;; Black-crowned night heron
  9128. (defanimal (black-crowned-night-heron beg amp)
  9129. ;; east 15 6
  9130. (let ((dur 0.145))
  9131. (let ((start (seconds->samples beg))
  9132. (stop (seconds->samples (+ beg dur)))
  9133. (ampf (make-env '(0.000 0.000 0.045 0.233 0.289 0.674 0.508 0.865 0.762 1.000 0.847 0.900 0.929 0.368
  9134. 0.958 0.100 1.000 0.000)
  9135. :duration dur :scaler amp))
  9136. (frqf (make-env '(0.000 0.119 0.219 0.149 0.385 0.168 0.501 0.182 0.555 0.201 0.708 0.190 1.000 0.168)
  9137. :duration dur :scaler (hz->radians (* 1/2 7150.0))))
  9138. (gen1 (make-oscil))
  9139. (gens (make-nrxycos 0.0 1/6 15 .9))
  9140. (gens0 (make-polywave 0.0 (nrcos->polywave 6 .5 .2)))
  9141. (rf (make-env '(0 .5 .4 .9 .7 .8 1 .5) :duration dur))
  9142. (rnd (make-rand-interp 1000 (hz->radians 50)))
  9143. (vib (make-triangle-wave 500 (hz->radians 30)))
  9144. (rnd1 (make-rand-interp 1000 .5)))
  9145. (do ((i start (+ i 1)))
  9146. ((= i stop))
  9147. (let ((frq (+ (env frqf)
  9148. (triangle-wave vib)
  9149. (rand-interp rnd))))
  9150. (set! (mus-scaler gens) (env rf)) ;scaler=r
  9151. (outa i (* (env ampf)
  9152. (+ .5 (abs (rand-interp rnd1)))
  9153. (+ (oscil gen1 (* 2.0 frq))
  9154. (polywave gens0 frq)
  9155. (nrxycos gens (* 6.0 frq))))))))))
  9156. ;; (with-sound (:play #t) (black-crowned-night-heron 0 .5))
  9157. ;;; --------------------------------------------------------------------------------
  9158. ;;;
  9159. ;;; Scrub Euphonia
  9160. (defanimal (scrub-euphonia beg amp)
  9161. ;; arizona 90 3.0
  9162. (let ((dur 0.49))
  9163. (let ((start (seconds->samples beg))
  9164. (stop (seconds->samples (+ beg dur)))
  9165. (ampf (make-env '(0.000 0.000 0.067 0.188 0.111 0.676 0.151 0.838 0.239 0.988 0.275 0.000 0.346 0.000
  9166. 0.386 0.243 0.399 0.615 0.427 0.719 0.445 0.587 0.464 0.664 0.521 0.630 0.533 0.571
  9167. 0.567 0.868 0.580 0.877 0.611 0.176 0.628 0.138 0.637 0.000 0.671 0.000 0.676 0.168
  9168. 0.690 0.204 0.725 0.694 0.742 0.725 0.821 0.464 0.904 0.696 0.939 0.109 1.000 0.000)
  9169. :duration dur :scaler amp))
  9170. (gen1 (make-polywave 0.0 '(1 .99 2 .01)))
  9171. (frqf (make-env '(0.000 0.819 0.024 0.761 0.063 0.686 0.101 0.642 0.171 0.586 0.229 0.556 0.271 0.558
  9172. 0.342 0.556 0.347 0.883 0.361 0.900 0.367 0.719 0.390 0.656 0.436 0.589 0.480 0.564
  9173. 0.529 0.547 0.555 0.525 0.605 0.519 0.640 0.528 0.660 0.869 0.673 0.869 0.683 0.681
  9174. 0.717 0.625 0.763 0.561 0.791 0.564 0.817 0.544 0.857 0.533 0.894 0.522 0.924 0.531 1.000 0.531)
  9175. :duration dur :scaler (hz->radians 7160))))
  9176. (do ((i start (+ i 1)))
  9177. ((= i stop))
  9178. (outa i (* (env ampf)
  9179. (polywave gen1 (env frqf))))))))
  9180. ;; (with-sound (:play #t) (scrub-euphonia 0 .25))
  9181. ;;; --------------------------------------------------------------------------------
  9182. ;;;
  9183. ;;; Greater pewee
  9184. (defanimal (greater-pewee beg1 amp)
  9185. ;; arizona 52 2
  9186. (define (greater-pewee-first-and-last beg)
  9187. (let ((dur 0.4))
  9188. (let ((start (seconds->samples beg))
  9189. (stop (seconds->samples (+ beg dur)))
  9190. (ampf (make-env '(0.000 0.000 0.011 0.083 0.220 0.268 0.374 0.325 0.463 0.337 0.542 0.289 0.599 0.000
  9191. 0.668 0.000 0.683 0.554 0.701 0.501 0.735 1.000 0.775 0.039 0.829 0.806 0.852 0.862
  9192. 0.877 0.979 0.888 0.912 0.900 0.968 0.912 0.822 0.928 0.866 0.939 0.762 0.950 0.783
  9193. 0.970 0.637 1.000 0.000)
  9194. :duration dur :scaler amp))
  9195. (frqf (make-env '(0.000 0.102 0.018 0.114 0.138 0.124 0.251 0.124 0.438 0.124 0.511 0.124 0.589 0.119
  9196. 0.649 0.124 0.663 0.169 0.672 0.150 0.704 0.124 0.750 0.135 0.777 0.124 0.795 0.121
  9197. 0.969 0.147 1.000 0.162)
  9198. :duration dur :scaler (hz->radians 22500))) ; not a typo...
  9199. (gen1 (make-polywave 0.0 '(1 .96 2 .02 3 .02))))
  9200. (do ((i start (+ i 1)))
  9201. ((= i stop))
  9202. (outa i (* (env ampf)
  9203. (polywave gen1 (env frqf))))))))
  9204. (define (greater-pewee-midsection beg)
  9205. (let ((dur 1.65))
  9206. (let ((start (seconds->samples beg))
  9207. (stop (seconds->samples (+ beg dur)))
  9208. (ampf (make-env '(0.000 0.000 0.023 0.155 0.085 0.349 0.196 0.507 0.219 0.513 0.227 0.000 0.295 0.000
  9209. 0.306 0.510 0.333 0.741 0.356 0.825 0.370 0.752 0.386 0.775 0.394 0.713 0.409 0.761
  9210. 0.431 0.668 0.439 0.713 0.456 0.701 0.469 0.000 0.570 0.000 0.578 0.093 0.619 0.152
  9211. 0.653 0.223 0.684 0.217 0.721 0.299 0.745 0.507 0.780 0.620 0.795 0.586 0.808 0.679
  9212. 0.836 0.428 0.852 0.563 0.862 0.997 0.875 0.625 0.887 0.476 0.982 0.251 1.000 0.000)
  9213. :duration dur :scaler amp))
  9214. (frqf (make-env '(0.000 0.274 0.038 0.283 0.219 0.291 0.302 0.293 0.410 0.324 0.451 0.327 0.464 0.315
  9215. 0.518 0.324 0.542 0.213 0.580 0.223 0.715 0.242 0.759 0.293 0.813 0.308 0.828 0.320
  9216. 0.843 0.341 0.857 0.337 0.877 0.276 0.896 0.252 1.000 0.230)
  9217. :duration dur :scaler (hz->radians 10000)))
  9218. (gen1 (make-polywave 0.0 '(1 .98 2 .01 3 .01))))
  9219. (do ((i start (+ i 1)))
  9220. ((= i stop))
  9221. (outa i (* (env ampf)
  9222. (polywave gen1 (env frqf))))))))
  9223. (greater-pewee-first-and-last beg1)
  9224. (greater-pewee-midsection (+ beg1 1.13))
  9225. (greater-pewee-first-and-last (+ beg1 3.2)))
  9226. ;; (with-sound (:play #t) (greater-pewee 0 .5))
  9227. ;;; --------------------------------------------------------------------------------
  9228. ;;;
  9229. ;;; Brown-crested flycatcher
  9230. (defanimal (brown-crested-flycatcher-1 beg amp)
  9231. ;; calif 13 7
  9232. (let ((dur 0.66))
  9233. (let ((start (seconds->samples beg))
  9234. (stop (seconds->samples (+ beg dur)))
  9235. (ampf (make-env '(0.000 0.000 0.017 0.616 0.035 0.803 0.044 0.410 0.050 0.674 0.056 0.157 0.065 0.452
  9236. 0.081 0.350 0.105 0.426 0.106 0.279 0.111 0.439 0.122 0.483 0.133 0.743 0.192 0.466
  9237. 0.197 0.608 0.212 0.424 0.221 0.998 0.236 0.335 0.244 0.690 0.260 0.652 0.274 0.703
  9238. 0.283 0.537 0.288 0.847 0.298 0.743 0.305 0.829 0.323 0.324 0.336 0.619 0.349 0.075
  9239. 0.357 0.457 0.362 0.322 0.366 0.426 0.390 0.193 0.396 0.452 0.413 0.000 0.415 0.302
  9240. 0.422 0.220 0.426 0.259 0.433 0.120 0.437 0.191 0.452 0.000 0.530 0.000 0.556 0.144
  9241. 0.564 0.399 0.589 0.000 0.617 0.000 0.623 0.149 0.634 0.392 0.655 0.000 0.678 0.000
  9242. 0.682 .100 0.695 0.153 0.707 0.000 0.715 0.073 0.727 0.111 0.737 0.000 0.778 0.000
  9243. 0.786 0.089 0.798 0.060 0.806 0.175 0.815 0.000 0.829 0.000 0.830 0.217 0.842 0.146
  9244. 0.846 0.222 0.859 0.000 0.872 0.000 0.874 0.191 0.885 0.146 0.894 0.222 0.908 0.000
  9245. 0.918 0.000 0.919 0.166 0.924 0.115 0.929 0.169 0.938 0.091 0.942 0.038 0.949 0.069
  9246. 0.953 0.038 0.960 0.102 1.000 0.000)
  9247. :duration dur :scaler amp))
  9248. (frqf (make-env '(0.000 0.492 0.013 0.588 0.027 0.615 0.047 0.551 0.072 0.531 0.097 0.551 0.137 0.579
  9249. 0.197 0.588 0.211 0.608 0.219 0.654 0.225 0.592 0.237 0.583 0.270 0.581 0.288 0.695
  9250. 0.299 0.572 0.304 0.599 0.310 0.563 0.326 0.558 0.340 0.692 0.356 0.579 0.364 0.538
  9251. 0.375 0.510 0.390 0.501 0.397 0.610 0.414 0.576 0.417 0.478 0.436 0.462 0.442 0.513
  9252. 0.454 0.339 0.524 0.339 0.566 0.503 0.587 0.310 0.610 0.308 0.628 0.485 0.638 0.460
  9253. 0.655 0.292 0.674 0.294 0.685 0.431 0.699 0.417 0.715 0.351 0.728 0.524 0.745 0.519
  9254. 0.760 0.369 0.780 0.369 0.788 0.442 0.805 0.460 0.809 0.574 0.830 0.576 0.832 0.469
  9255. 0.846 0.474 0.854 0.574 0.873 0.604 0.877 0.476 0.892 0.476 0.901 0.592 0.917 0.563
  9256. 0.923 0.458 0.939 0.462 0.955 0.431 0.976 0.431 1.000 0.351)
  9257. :duration dur :scaler (hz->radians 4500)))
  9258. (gen1 (make-polywave 0.0 '(1 .9 2 .03 3 .05 4 .01 5 .01))))
  9259. (do ((i start (+ i 1)))
  9260. ((= i stop))
  9261. (outa i (* (env ampf)
  9262. (polywave gen1 (env frqf))))))))
  9263. ;; (with-sound (:play #t) (brown-crested-flycatcher-1 0 .5))
  9264. (defanimal (brown-crested-flycatcher-2 beg amp)
  9265. ;; calif 13 63.5
  9266. (let ((dur 0.47))
  9267. (let ((start (seconds->samples beg))
  9268. (stop (seconds->samples (+ beg dur)))
  9269. (ampf (make-env '(0.000 0.000 0.021 0.219 0.040 0.847 0.057 0.948 0.071 0.929 0.084 0.000 0.119 0.000
  9270. 0.132 0.633 0.145 0.711 0.153 0.836 0.175 0.000 0.202 0.000 0.215 0.237 0.233 0.232
  9271. 0.255 0.000 0.403 0.000 0.426 0.091 0.449 0.032 0.469 0.164 0.494 0.064 0.536 0.219
  9272. 0.568 0.125 0.586 0.210 0.622 0.185 0.627 0.128 0.652 0.155 0.675 0.271 0.692 0.205
  9273. 0.699 0.077 0.719 0.144 0.757 0.296 0.779 0.084 0.801 0.175 0.821 0.371 0.851 0.180
  9274. 0.867 0.112 0.898 0.273 0.942 0.080 0.976 0.294 0.991 0.262 1.000 0.000)
  9275. :duration dur :scaler amp))
  9276. (frqf (make-env '(0.000 0.392 0.036 0.595 0.049 0.626 0.064 0.601 0.082 0.405 0.117 0.387 0.126 0.497
  9277. 0.138 0.540 0.150 0.538 0.158 0.499 0.173 0.392 0.201 0.346 0.210 0.444 0.219 0.474
  9278. 0.231 0.465 0.239 0.433 0.254 0.346 0.404 0.349 0.423 0.417 0.439 0.401 0.461 0.410
  9279. 0.469 0.440 0.502 0.415 0.520 0.451 0.536 0.456 0.554 0.435 0.575 0.428 0.597 0.492
  9280. 0.636 0.440 0.678 0.506 0.694 0.465 0.723 0.476 0.751 0.517 0.762 0.478 0.789 0.478
  9281. 0.818 0.522 0.839 0.508 0.854 0.474 0.882 0.492 0.901 0.515 0.925 0.490 0.947 0.481
  9282. 0.958 0.501 0.986 0.494 1.000 0.633)
  9283. :duration dur :scaler (hz->radians 4100)))
  9284. (gen1 (make-polywave 0.0 '(1 .9 2 .02 3 .005 4 .02 5 .007 6 .01))))
  9285. (do ((i start (+ i 1)))
  9286. ((= i stop))
  9287. (outa i (* (env ampf)
  9288. (polywave gen1 (env frqf))))))))
  9289. ;; (with-sound (:play #t) (brown-crested-flycatcher-2 0 .5))
  9290. ;;; ================ calling-all-animals ================
  9291. (define* (calling-all-frogs (beg 0.0) (spacing 0.0))
  9292. (plains-spadefoot beg 0.25) (set! beg (+ beg spacing))
  9293. (barking-tree-frog (+ beg 1) 0.25) (set! beg (+ beg spacing))
  9294. (western-toad (+ beg 1.5) 2 0.25) (set! beg (+ beg spacing))
  9295. (southwestern-toad (+ beg 4) 2 0.25) (set! beg (+ beg spacing))
  9296. (american-toad (+ beg 6.5) 3 0.25) (set! beg (+ beg spacing))
  9297. (texas-toad (+ beg 10) 2.0 0.125) (set! beg (+ beg spacing))
  9298. (bullfrog (+ beg 12.5) 0.125) (set! beg (+ beg spacing))
  9299. (ornate-chorus-frog (+ beg 14) 2 0.1) (set! beg (+ beg spacing))
  9300. (squirrel-tree-frog (+ beg 16.5) 1 0.1) (set! beg (+ beg spacing))
  9301. (pinewoods-tree-frog (+ beg 18) 1.5 0.15) (set! beg (+ beg spacing))
  9302. (great-plains-narrow-mouthed-toad (+ beg 20) 2 .25) (set! beg (+ beg spacing))
  9303. (northern-leopard-frog-2 (+ beg 22.5) 0.5) (set! beg (+ beg spacing))
  9304. (pacific-chorus-frog (+ beg 24.5) .5) (set! beg (+ beg spacing))
  9305. (oak-toad (+ beg 25) 0.3) (set! beg (+ beg spacing))
  9306. (southern-cricket-frog (+ beg 25.5) 0.5) (set! beg (+ beg spacing))
  9307. (northern-leopard-frog-1 (+ beg 26) 0.5) (set! beg (+ beg spacing))
  9308. (green-tree-frog (+ beg 30.5) 0.5) (set! beg (+ beg spacing))
  9309. (knudsens-frog (+ beg 31) 0.5) (set! beg (+ beg spacing))
  9310. (spring-peeper (+ beg 31.5) 0.5) (set! beg (+ beg spacing))
  9311. (crawfish-frog (+ beg 32) 0.5) (set! beg (+ beg spacing))
  9312. (river-frog (+ beg 33) 0.5) (set! beg (+ beg spacing))
  9313. (red-spotted-toad (+ beg 35) 4 .25) (set! beg (+ beg spacing))
  9314. (green-toad (+ beg 39.5) 2 .25) (set! beg (+ beg spacing))
  9315. (little-grass-frog (+ beg 42.0) .25) (set! beg (+ beg spacing))
  9316. (sonoran-desert-toad (+ beg 43.0) .8 .25) (set! beg (+ beg spacing))
  9317. (amargosa-toad (+ beg 44.0) 0.5) (set! beg (+ beg spacing))
  9318. (+ beg 45))
  9319. (define* (calling-all-mammals (beg 0.0) (spacing 0.0))
  9320. (indri beg 0.25) (set! beg (+ beg spacing))
  9321. (+ beg 2))
  9322. (define* (calling-all-insects (beg 0.0) (spacing 0.0))
  9323. (mosquito beg 5 560 0.2) (set! beg (+ beg spacing))
  9324. (mosquito (+ beg 1) 3 880 0.05) (set! beg (+ beg spacing))
  9325. (broad-winged-tree-cricket (+ beg 5.5) 2.0 0.2) (set! beg (+ beg spacing))
  9326. (long-spurred-meadow-katydid (+ beg 8) 0.5) (set! beg (+ beg spacing))
  9327. (southern-mole-cricket (+ beg 18.5) 3 0.15) (set! beg (+ beg spacing))
  9328. (handsome-trig (+ beg 22) 2 0.5) (set! beg (+ beg spacing))
  9329. (fast-calling-tree-cricket (+ beg 24.5) 2 0.25) (set! beg (+ beg spacing))
  9330. (dog-day-cicada (+ beg 27) 2 0.1) (set! beg (+ beg spacing))
  9331. (linnaeus-cicada (+ beg 29.5) 2 0.125) (set! beg (+ beg spacing))
  9332. (lyric-cicada (+ beg 32) 2 0.125) (set! beg (+ beg spacing))
  9333. (confused-ground-cricket (+ beg 34.5) 2 0.3) (set! beg (+ beg spacing))
  9334. (tinkling-ground-cricket (+ beg 37) 2 0.3) (set! beg (+ beg spacing))
  9335. (marsh-meadow-grasshopper (+ beg 39.5) 0.3) (set! beg (+ beg spacing))
  9336. (striped-ground-cricket (+ beg 45) 2 0.25) (set! beg (+ beg spacing))
  9337. (sphagnum-ground-cricket (+ beg 47.5) 2 0.3) (set! beg (+ beg spacing))
  9338. (southeastern-field-cricket (+ beg 50) 2 0.13) (set! beg (+ beg spacing))
  9339. (snowy-tree-cricket (+ beg 52.5) 2.1 0.3) (set! beg (+ beg spacing))
  9340. (slightly-musical-conehead (+ beg 55) 2 0.4) (set! beg (+ beg spacing))
  9341. (pine-tree-cricket (+ beg 57.5) 2 0.125) (set! beg (+ beg spacing))
  9342. (davis-tree-cricket (+ beg 60) 2 0.125) (set! beg (+ beg spacing))
  9343. (carolina-grasshopper (+ beg 62.5) 1.5 1.0) (set! beg (+ beg spacing))
  9344. (black-horned-tree-cricket (+ beg 64.5) 2 0.125) (set! beg (+ beg spacing))
  9345. (narrow-winged-tree-cricket (+ beg 67.0) 2.0 .25) (set! beg (+ beg spacing))
  9346. (four-spotted-tree-cricket (+ beg 69.5) 1.0 .25) (set! beg (+ beg spacing))
  9347. (+ beg 71))
  9348. (define* (calling-all-birds (beg 0.0) (spacing .25))
  9349. (ruffed-grouse beg 0.5) (set! beg (+ beg spacing))
  9350. (eastern-wood-pewee-1 (+ beg 11.0) 0.25) (set! beg (+ beg spacing))
  9351. (eastern-wood-pewee-2 (+ beg 12.5) 0.25) (set! beg (+ beg spacing))
  9352. (field-sparrow (+ beg 14.0) 0.25) (set! beg (+ beg spacing))
  9353. (fox-sparrow (+ beg 17.5) 3 0.25) (set! beg (+ beg spacing))
  9354. (white-throated-sparrow (+ beg 21.0) 0.25) (set! beg (+ beg spacing))
  9355. (tufted-titmouse (+ beg 25.0) 0.3) (set! beg (+ beg spacing))
  9356. (savannah-sparrow (+ beg 26.5) 0.5) (set! beg (+ beg spacing))
  9357. (chipping-sparrow (+ beg 30.0) 0.3) (set! beg (+ beg spacing))
  9358. (henslows-sparrow (+ beg 33.0) 0.5) (set! beg (+ beg spacing))
  9359. (least-flycatcher (+ beg 33.5) 0.5) (set! beg (+ beg spacing))
  9360. (acadian-flycatcher (+ beg 34.0) 0.25) (set! beg (+ beg spacing))
  9361. (swainsons-thrush (+ beg 35.0) 0.25) (set! beg (+ beg spacing))
  9362. (carolina-wren (+ beg 37.5) 0.25) (set! beg (+ beg spacing))
  9363. (bachmans-sparrow (+ beg 40.0) 0.25) (set! beg (+ beg spacing))
  9364. (grasshopper-sparrow (+ beg 43.0) 0.25) (set! beg (+ beg spacing))
  9365. (american-robin (+ beg 45.0) 0.25) (set! beg (+ beg spacing))
  9366. (common-loon-1 (+ beg 47.5) 0.125) (set! beg (+ beg spacing))
  9367. (common-loon-2 (+ beg 50.5) 0.125) (set! beg (+ beg spacing))
  9368. (hermit-thrush (+ beg 51.5) 0.25) (set! beg (+ beg spacing))
  9369. (chuck-wills-widow (+ beg 53.5) 0.25) (set! beg (+ beg spacing))
  9370. (california-towhee (+ beg 55.0) 0.25) (set! beg (+ beg spacing))
  9371. (black-chinned-sparrow (+ beg 56.5) 0.25 #t) (set! beg (+ beg spacing))
  9372. (mourning-dove (+ beg 60.0) 0.125) (set! beg (+ beg spacing))
  9373. (bobwhite (+ beg 64.5) 0.25) (set! beg (+ beg spacing))
  9374. (warbling-vireo (+ beg 66.5) 0.25) (set! beg (+ beg spacing))
  9375. (great-horned-owl (+ beg 69.0) 0.25) (set! beg (+ beg spacing))
  9376. (western-tanager (+ beg 72.0) 0.25) (set! beg (+ beg spacing))
  9377. (pileated-woodpecker (+ beg 74.5) 0.125) (set! beg (+ beg spacing))
  9378. (whip-poor-will (+ beg 77.5) 0.25) (set! beg (+ beg spacing))
  9379. (varied-thrush (+ beg 79.0) 0.125) (set! beg (+ beg spacing))
  9380. (nashville-warbler (+ beg 80.5) 0.25) (set! beg (+ beg spacing))
  9381. (plumbeous-vireo-1 (+ beg 83.0) 0.25) (set! beg (+ beg spacing))
  9382. (american-crow (+ beg 84.0) 0.5) (set! beg (+ beg spacing))
  9383. (least-bittern (+ beg 85.0) 0.5) (set! beg (+ beg spacing))
  9384. (orange-crowned-warbler (+ beg 87.0) 0.25) (set! beg (+ beg spacing))
  9385. (loggerhead-shrike-1 (+ beg 89.0) 0.125) (set! beg (+ beg spacing))
  9386. (loggerhead-shrike-2 (+ beg 90.0) 0.125) (set! beg (+ beg spacing))
  9387. (california-quail (+ beg 91.0) 0.25) (set! beg (+ beg spacing))
  9388. (vermillion-flycatcher (+ beg 92.0) 0.25) (set! beg (+ beg spacing))
  9389. (cardinal (+ beg 93.0) 0.25) (set! beg (+ beg spacing))
  9390. (black-phoebe (+ beg 97.0) 0.25) (set! beg (+ beg spacing))
  9391. (yellow-warbler (+ beg 98.0) 0.25) (set! beg (+ beg spacing))
  9392. (barred-owl-1 (+ beg 100.0) 0.25) (set! beg (+ beg spacing))
  9393. (says-phoebe (+ beg 102.0) 0.25) (set! beg (+ beg spacing))
  9394. (yellow-rumped-warbler (+ beg 103.0) 0.25) (set! beg (+ beg spacing))
  9395. (purple-finch (+ beg 105.0) 0.25) (set! beg (+ beg spacing))
  9396. (northern-goshawk (+ beg 108.0) 0.125) (set! beg (+ beg spacing))
  9397. (common-gull (+ beg 109.0) 0.25) (set! beg (+ beg spacing))
  9398. (ash-throated-flycatcher (+ beg 110.0) 0.25) (set! beg (+ beg spacing))
  9399. (white-headed-woodpecker (+ beg 111.0) 0.25) (set! beg (+ beg spacing))
  9400. (phainopepla (+ beg 111.5) 0.5) (set! beg (+ beg spacing))
  9401. (golden-crowned-sparrow (+ beg 112.5) 0.25) (set! beg (+ beg spacing))
  9402. (house-finch (+ beg 115.0) 0.25) (set! beg (+ beg spacing))
  9403. (ruby-crowned-kinglet (+ beg 118.5) 0.25) (set! beg (+ beg spacing))
  9404. (green-tailed-towhee (+ beg 121.0) 0.25) (set! beg (+ beg spacing))
  9405. (lucys-warbler (+ beg 124.0) 0.25) (set! beg (+ beg spacing))
  9406. (cassins-vireo (+ beg 126.0) 0.25) (set! beg (+ beg spacing))
  9407. (plain-chacalaca (+ beg 127.0) 0.5) (set! beg (+ beg spacing))
  9408. (black-billed-cuckoo (+ beg 128.0) 0.25) (set! beg (+ beg spacing))
  9409. (eared-grebe (+ beg 129.0) 0.25) (set! beg (+ beg spacing))
  9410. (brown-jay (+ beg 130.0) 0.5) (set! beg (+ beg spacing))
  9411. (blue-grosbeak (+ beg 131.0) 0.25) (set! beg (+ beg spacing))
  9412. (acorn-woodpecker (+ beg 134.0) 0.5) (set! beg (+ beg spacing))
  9413. (red-shouldered-hawk (+ beg 136.0) 0.5) (set! beg (+ beg spacing))
  9414. (lesser-nighthawk (+ beg 137.0) 2 0.25) (set! beg (+ beg spacing))
  9415. (olive-sided-flycatcher (+ beg 139.5) 0.125) (set! beg (+ beg spacing))
  9416. (common-yellowthroat (+ beg 141.0) 0.25) (set! beg (+ beg spacing))
  9417. (cassins-sparrow (+ beg 143.5) 0.25) (set! beg (+ beg spacing))
  9418. (stellers-jay (+ beg 146.0) 0.25) (set! beg (+ beg spacing))
  9419. (black-rail (+ beg 147.5) 0.25) (set! beg (+ beg spacing))
  9420. (pinyon-jay (+ beg 148.5) 0.25) (set! beg (+ beg spacing))
  9421. (sora (+ beg 149.5) 0.25) (set! beg (+ beg spacing))
  9422. (killdeer (+ beg 150.5) 0.25) (set! beg (+ beg spacing))
  9423. (oak-titmouse (+ beg 152.0) 0.25) (set! beg (+ beg spacing))
  9424. (macgillivrays-warbler (+ beg 154.0) 0.25) (set! beg (+ beg spacing))
  9425. (huttons-vireo (+ beg 156.0) 0.25) (set! beg (+ beg spacing))
  9426. (western-meadowlark (+ beg 157.0) 0.25) (set! beg (+ beg spacing))
  9427. (northern-beardless-tyrannulet (+ beg 159.0) 0.25) (set! beg (+ beg spacing))
  9428. (scotts-oriole (+ beg 161.5) 0.25) (set! beg (+ beg spacing))
  9429. (wilsons-warbler (+ beg 164.0) 0.25) (set! beg (+ beg spacing))
  9430. (willow-flycatcher (+ beg 166.5) 0.25) (set! beg (+ beg spacing))
  9431. (black-necked-stilt (+ beg 167.5) 0.25) (set! beg (+ beg spacing))
  9432. (bushtit (+ beg 168.0) 0.25) (set! beg (+ beg spacing))
  9433. (red-breasted-nuthatch (+ beg 169.0) 0.25) (set! beg (+ beg spacing))
  9434. (white-breasted-nuthatch (+ beg 170.0) 0.25) (set! beg (+ beg spacing))
  9435. (pygmy-nuthatch (+ beg 171.0) 0.25) (set! beg (+ beg spacing))
  9436. (flammulated-owl (+ beg 171.5) 0.25) (set! beg (+ beg spacing))
  9437. (song-sparrow (+ beg 172.0) 0.25) (set! beg (+ beg spacing))
  9438. (burrowing-owl (+ beg 175.0) 0.25) (set! beg (+ beg spacing))
  9439. (gray-vireo-1 (+ beg 176.0) 0.25) (set! beg (+ beg spacing))
  9440. (gray-vireo-2 (+ beg 176.5) 0.25) (set! beg (+ beg spacing))
  9441. (bald-eagle (+ beg 177.0) 0.25) (set! beg (+ beg spacing))
  9442. (eastern-meadowlark (+ beg 178.5) 0.25) (set! beg (+ beg spacing))
  9443. (plumbeous-vireo-2 (+ beg 180.5) 0.25) (set! beg (+ beg spacing))
  9444. (yellow-green-vireo (+ beg 181.5) 0.25) (set! beg (+ beg spacing))
  9445. (magnolia-warbler (+ beg 182.0) 0.25) (set! beg (+ beg spacing))
  9446. (eastern-bluebird (+ beg 183.5) 0.25) (set! beg (+ beg spacing))
  9447. (evening-grosbeak (+ beg 184.5) 0.25) (set! beg (+ beg spacing))
  9448. (greater-roadrunner (+ beg 185.0) 0.5) (set! beg (+ beg spacing))
  9449. (dark-eyed-junco (+ beg 190.0) 0.25) (set! beg (+ beg spacing))
  9450. (groove-billed-ani (+ beg 192.0) 0.25) (set! beg (+ beg spacing))
  9451. (common-pauraque (+ beg 193.0) 0.25) (set! beg (+ beg spacing))
  9452. (hammonds-flycatcher (+ beg 194.0) 0.25) (set! beg (+ beg spacing))
  9453. (barn-owl (+ beg 194.5) 0.25) (set! beg (+ beg spacing))
  9454. (long-eared-owl (+ beg 196.0) 0.25) (set! beg (+ beg spacing))
  9455. (summer-tanager (+ beg 197.0) 0.25) (set! beg (+ beg spacing))
  9456. (whooping-crane (+ beg 201.0) .5) (set! beg (+ beg spacing))
  9457. (sandhill-crane (+ beg 202.0) .5) (set! beg (+ beg spacing))
  9458. (gray-crowned-rosy-finch (+ beg 203.0) .25) (set! beg (+ beg spacing))
  9459. (virginia-rail (+ beg 203.5) .25) (set! beg (+ beg spacing))
  9460. (sage-sparrow (+ beg 206.0) .25) (set! beg (+ beg spacing))
  9461. (hairy-woodpecker (+ beg 208.0) .25) (set! beg (+ beg spacing))
  9462. (pacific-slope-flycatcher (+ beg 208.5) .25) (set! beg (+ beg spacing))
  9463. (dusky-flycatcher (+ beg 209.0) .25) (set! beg (+ beg spacing))
  9464. (inca-dove-1 (+ beg 209.5) .25) (set! beg (+ beg spacing))
  9465. (inca-dove-2 (+ beg 210.5) .25) (set! beg (+ beg spacing))
  9466. (great-kiskadee (+ beg 211.0) .25) (set! beg (+ beg spacing))
  9467. (chestnut-sided-warbler (+ beg 212.0) .25) (set! beg (+ beg spacing))
  9468. (yellow-bellied-flycatcher (+ beg 213.5) .25) (set! beg (+ beg spacing))
  9469. (black-throated-blue-warbler (+ beg 214.0) .25) (set! beg (+ beg spacing))
  9470. (great-crested-flycatcher (+ beg 215.5) .25) (set! beg (+ beg spacing))
  9471. (gray-vireo (+ beg 216.0) .25) (set! beg (+ beg spacing))
  9472. (house-sparrow-1 (+ beg 218.0) .25) (set! beg (+ beg spacing))
  9473. (gambels-quail (+ beg 218.5) .25) (set! beg (+ beg spacing))
  9474. (scaled-quail (+ beg 219.5) .25) (set! beg (+ beg spacing))
  9475. (montezuma-quail (+ beg 221.0) .25) (set! beg (+ beg spacing))
  9476. (mountain-quail (+ beg 222.5) .25) (set! beg (+ beg spacing))
  9477. (verdin (+ beg 223.0) .25) (set! beg (+ beg spacing))
  9478. (white-tipped-dove (+ beg 224.0) .25) (set! beg (+ beg spacing))
  9479. (zone-tailed-hawk (+ beg 226.0) .25) (set! beg (+ beg spacing))
  9480. (red-eyed-vireo (+ beg 228.0) .25) (set! beg (+ beg spacing))
  9481. (crested-caracara (+ beg 228.5) .25) (set! beg (+ beg spacing))
  9482. (trumpeter-swan-1 (+ beg 229.5) .25) (set! beg (+ beg spacing))
  9483. (wrentit (+ beg 230.5) .25) (set! beg (+ beg spacing))
  9484. (western-wood-pewee-1 (+ beg 233.5) .25) (set! beg (+ beg spacing))
  9485. (western-wood-pewee-2 (+ beg 234.5) .25) (set! beg (+ beg spacing))
  9486. (cedar-waxwing (+ beg 235.5) .25) (set! beg (+ beg spacing))
  9487. (townsends-solitaire (+ beg 236.0) .25) (set! beg (+ beg spacing))
  9488. (canada-goose (+ beg 237.5) .25) (set! beg (+ beg spacing))
  9489. (pine-warbler (+ beg 239.0) .25) (set! beg (+ beg spacing))
  9490. (black-throated-sparrow (+ beg 241.5) .25) (set! beg (+ beg spacing))
  9491. (cape-may-warbler (+ beg 242.5) .25) (set! beg (+ beg spacing))
  9492. (kirtlands-warbler (+ beg 244.0) .25) (set! beg (+ beg spacing))
  9493. (wood-duck (+ beg 245.5) .25) (set! beg (+ beg spacing))
  9494. (white-eyed-vireo (+ beg 246.5) .25) (set! beg (+ beg spacing))
  9495. (philadelphia-vireo (+ beg 247.5) .25) (set! beg (+ beg spacing))
  9496. (willet (+ beg 248.3) .25) (set! beg (+ beg spacing))
  9497. (black-crowned-night-heron (+ beg 249.0) .25) (set! beg (+ beg spacing))
  9498. (scrub-euphonia (+ beg 249.5) .25) (set! beg (+ beg spacing))
  9499. (greater-pewee (+ beg 250.0) .25) (set! beg (+ beg spacing))
  9500. (brown-crested-flycatcher-1 (+ beg 254.0) .25) (set! beg (+ beg spacing))
  9501. (brown-crested-flycatcher-2 (+ beg 254.9) .25) (set! beg (+ beg spacing))
  9502. (+ beg 255.5))
  9503. (define (calling-all-animals)
  9504. (with-sound (:srate 44100) ;(srate needed by snd-test)
  9505. (calling-all-birds
  9506. (calling-all-insects
  9507. (calling-all-mammals
  9508. (calling-all-frogs 0.0))))))