added audio and scrolling_tricks

This commit is contained in:
Wei-ju Wu
2016-06-13 08:49:14 -07:00
parent 612e9ffdd8
commit 713cf74d27
28 changed files with 1199 additions and 10 deletions
+23
View File
@@ -0,0 +1,23 @@
#lang racket
(require rsound)
(require rsound/draw)
(require ffi/vector)
(define (play-sound s n)
(cond [(> n 0)
(play s)
(sleep 0.1)
;;(play (resample 2 sound))
(play-sound s (- n 1))]))
(define (analyze-sound s)
(let ([v (rsound-data s)])
v))
(let ([sound (rs-read "/home/weiju/Desktop/Laser_Shoot7.wav")])
;;(rsound-fft-draw sound)
(play-sound sound 3)
(play-sound sound 3)
;;(s16vector->list (analyze-sound sound))
)