Sine wave: Difference between revisions

31 bytes removed ,  2 years ago
Line 134:
0 0 0 1)) ; mono
(setq s (apply #'concat header (mapcar (lambda (x) (unibyte-string
(mod (+ 128 (round (+* 128127 (sin (* 1272 pi freq x (sin/ 44100.0))))) 256) 0))
(* 2 pi freq x (/ 44100.0))))))) 256) 0))
(number-sequence 0 (* dur 44100)))))
(play-sound `(sound :data ,s)))
Anonymous user