Mercurial > hg > jslab
comparison examples/sound/sampled/audio-player/test.scm @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bf79fb79ee13 |
---|---|
1 (load "audio.scm") | |
2 (load "filelist.scm") | |
3 (load "lineout.scm") | |
4 (load "functions.scm") | |
5 (load "models.scm") | |
6 | |
7 (define hop 512) | |
8 (define fs 22050) | |
9 | |
10 (put "regulator.target" (* 1.04 (/ fs hop))) | |
11 (put "regulator.regulated" "true") | |
12 (put "trace.map.symmetric" #f) | |
13 (put "trace.map.log" #t) | |
14 (put "trace.scroll" #t) | |
15 (put "ft.power.trace.map.maximum" 60) | |
16 (put "ft.power.trace.map.minimum" 0.005) | |
17 (put "diffScaler.offsetRate" 0) | |
18 (put "diffScaler.scaleRate" 0.01) | |
19 (put "scaler.scaleRate" 0.01) | |
20 | |
21 (define f (mono fs)) | |
22 (define s (filesource f)) | |
23 (define lin (linein s 1024 hop)) | |
24 (define lou (lineout (linesnk-buf f 1024) lin hop)) | |
25 (exec lin "plotter") | |
26 | |
27 (set-playlist (map File. '( | |
28 "Tesri-A.mp3" | |
29 "Tesri-B.mp3" | |
30 "The Amateur View-A.mp3" | |
31 "The Amateur View-B.mp3" | |
32 "HotelMorgen-A.ogg" | |
33 "HotelMorgen-B.ogg"))) | |
34 | |
35 (define x (norm lin)) | |
36 (define y (ft-power (ft-vec x))) | |
37 (define z (smoothscale y genexp-spec)) | |
38 (exec z "trace") | |
39 | |
40 (exec (viewable "ft.power.diffScaler.w") "load") | |
41 (exec (viewable "ft.power.diffScaler.genexp.alpha") "load") | |
42 (expose) | |
43 | |
44 ;(start) |