; Adapted from Richard Boulanger's toots sr = 44100 ksmps = 128 nchnls = 2 0dbfs = 1 instr 4 iamp = ampdbfs(p4) ; convert dB FS to linear amp iscale = iamp * .333 ; scale the amp at initialization inote = cpspch(p5) ; convert octave.pitch to cps k1 linen iscale, p6, p3, p7 ; p4=amp a3 oscil k1, inote*.996, 1 ; p5=freq a2 oscil k1, inote*1.004, 1 ; p6=attack time a1 oscil k1, inote, 1 ; p7=release time a1 = a1+a2+a3 outs a1, a1 endin ; number time size GEN p1 f 1 0 4096 10 1 ; use GEN10 to compute a sine wave ;ins strt dur amp freq attack release i4 0 1 -20 8.04 0.1 0.7 i4 1 1 -15 8.02 0.07 0.6 i4 2 1 -20 8.00 0.05 0.5 i4 3 1 -30 8.02 0.05 0.4 i4 4 1 -15 8.04 0.1 0.5 i4 5 1 -10 8.04 0.05 0.5 i4 6 2 -10 8.04 0.03 1. e ; indicates the end of the score 514 322 413 431 true 7 95 162 14 12 100 29 {a6fa6d02-14cc-4f0c-b2c3-5e3da73375d3} true 0 -3 left DejaVu Sans 18 3 241 241 241 255 255 255 noborder 1 1 14 43 365 114 {80a23d3c-a09d-4c5a-a02f-838a51099125} true 0 -3 left DejaVu Sans 12 3 241 241 241 255 255 255 noborder 1 1 50 276 292 96 {2075a23a-bf65-471c-a1c4-f675ed4b806c} true 0 -3 -255.00000000 scope 2.00000000 1.00000000 1.00000000 1.00000000 0.00000000 14 162 365 102 {94118d9a-d6aa-485c-81ac-b5148a74545b} true 0 -3 left DejaVu Sans 12 3 241 241 241 255 255 255 noborder 1 1