Mercurial > hg > jslab
comparison examples/sound/sampled/stacker2.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 ;;; Example of how to use Stacker2, which buffers several | |
2 ;;; vectors into one big vector. | |
3 | |
4 (load "audio.scm") | |
5 (load "functions.scm") | |
6 (load "models.scm") | |
7 | |
8 | |
9 ;;; Buffers the last n vectors from x. Adds the appropriate | |
10 ;;; task and returns the big composite vector. | |
11 (define (stack n x) | |
12 (define stacker (node (.getNode x) (Stacker2. x n))) | |
13 (addtasks stacker) | |
14 (.output stacker)) | |
15 | |
16 | |
17 (stack 16 | |
18 (diffscale | |
19 (ft-mag (ft-vec (norm (linein (linesrc (mono 11025)) 512 256)))) | |
20 cauchy-spec)) | |
21 | |
22 (expose) | |
23 | |
24 (put "image.width" 256) | |
25 (put "image.height" 16) | |
26 (put "image.map.log" true) |