Mercurial > hg > constant-q-cpp
comparison yeti/test.yeti @ 41:ae7d2e558ed1
More debug testing
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 19 Nov 2013 19:27:45 +0000 |
parents | 031386846e3c |
children | f5bd00c97de3 |
comparison
equal
deleted
inserted
replaced
40:031386846e3c | 41:ae7d2e558ed1 |
---|---|
14 //testStream = manipulate.withDuration 96000 (syn.sinusoid 48000 500); | 14 //testStream = manipulate.withDuration 96000 (syn.sinusoid 48000 500); |
15 //testStream = manipulate.withDuration 96000 (syn.pulseTrain 48000 4); | 15 //testStream = manipulate.withDuration 96000 (syn.pulseTrain 48000 4); |
16 //testStream = af.open "sweep-48000.wav"; | 16 //testStream = af.open "sweep-48000.wav"; |
17 //testStream = af.open "sweep.wav"; | 17 //testStream = af.open "sweep.wav"; |
18 | 18 |
19 testStream = manipulate.withDuration 64 (syn.sinusoid 8 2); | 19 //testStream = manipulate.withDuration 64 (syn.sinusoid 8 2); |
20 // So the stream is [ 0, 1, 0, -1, 0, 1, 0, -1, ... ] | |
20 | 21 |
21 // So the stream is [ 0, 1, 0, -1, 0, 1, 0, -1, ... ] | 22 testStream = manipulate.withDuration 32 (syn.pulseTrain 8 0.001); |
22 | 23 |
23 eprintln "have test stream"; | 24 eprintln "have test stream"; |
24 | 25 |
25 cq = cqt { maxFreq = testStream.sampleRate/2, minFreq = 1, binsPerOctave = 4 } testStream; | 26 cq = cqt { maxFreq = testStream.sampleRate/2, minFreq = 1, binsPerOctave = 4 } testStream; |
26 | 27 |
27 eprintln "bin frequencies: \(cq.kernel.binFrequencies)"; | 28 eprintln "bin frequencies: \(cq.kernel.binFrequencies)"; |
28 | 29 |
30 /* | |
29 for cq.output do c: | 31 for cq.output do c: |
30 mm = cm.magnitudes c; | 32 mm = cm.magnitudes c; |
31 for (mat.asColumns mm) (println . strJoin "," . vec.list); | 33 for (mat.asColumns mm) (println . strJoin "," . vec.list); |
32 done; | 34 done; |
35 */ | |
33 | 36 |
34 bigM = mat.concatHorizontal (map cm.magnitudes cq.output); | 37 bigM = mat.concatHorizontal (map cm.magnitudes cq.output); |
35 | 38 |
36 eprintln "overall output size = \(mat.size bigM)"; | 39 eprintln "overall output size = \(mat.size bigM)"; |
37 | 40 |