File: mfb.csd

package info (click to toggle)
csound-manual 1%3A6.08.0~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,580 kB
  • sloc: xml: 193,471; python: 1,332; makefile: 783
file content (35 lines) | stat: -rw-r--r-- 581 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<CsoundSynthesizer>
<CsOptions>
</CsOptions>
<CsInstruments>
ksmps = 64
instr 1

 ifftsize init 1024
 ibins init ifftsize/2
 kIn[] init ifftsize
 kcnt init 0
 p3 = filelen("fox.wav")
 asig diskin "fox.wav"
 kIn shiftin asig
 kcnt += ksmps
 if kcnt == ifftsize then
  kFFT[] = rfft(kIn)
  kPows[] = pows(kFFT)
  kMFB[] = log(mfb(kPows,300,8000,32))
  kmfcc[] = dct(kMFB)
  kcnt = 0
  kfb = 0
  while kfb < 32 do
   printf("mfcc[%d] = %.3f \n", kfb+1, kfb, kmfcc[kfb])
   kfb += 1
  od
 endif
               
endin
</CsInstruments>
<CsScore>
i1  0 1
</CsScore>
</CsoundSynthesizer>