~ubuntu-branches/ubuntu/precise/csound/precise

« back to all changes in this revision

Viewing changes to iOS/Csound iOS Examples/Csound iOS Examples/ViewControllers/AudioInTest/pitchshifter.csd

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler
  • Date: 2012-04-19 09:26:46 UTC
  • mfrom: (3.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20120419092646-96xbj1n6atuqosk2
Tags: 1:5.17.6~dfsg-1
* New upstream release
 - Do not build the wiimote opcodes (we need wiiuse).
* Add new API function to symbols file
* Disable lua opcodes, they were broken. Requires OpenMP to be enabled.
* Backport fixes from upstream:
  - Link dssi4cs with dl. Backport
  - Fix building of CsoundAC

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<CsoundSynthesizer>
 
2
<CsOptions>
 
3
-o dac -+rtmidi=null -+rtaudio=null -d -+msg_color=0 -M0 -m0 -i adc
 
4
</CsOptions>
 
5
<CsInstruments>
 
6
sr        = 44100
 
7
ksmps     = 64
 
8
nchnls    = 2
 
9
0dbfs     = 1
 
10
 
 
11
giWet           ftgen   0,0,1024,-7,0,512,1,512,1
 
12
giDry           ftgen   0,0,1024,-7,1,512,1,512,0
 
13
 
 
14
turnon 1
 
15
 
 
16
    opcode PitchShifter, aa, aakkk
 
17
    
 
18
aL, aR, kpitch, kfine, kfeedback xin 
 
19
 
 
20
                setksmps 64
 
21
 
 
22
ifftsize    = 1024
 
23
ihopsize    = 256
 
24
kscal       = octave((int(kpitch)/12)+kfine)
 
25
 
 
26
aOutL       init 0              
 
27
aOutR       init 0
 
28
 
 
29
fsig1L      pvsanal aL+(aOutL*kfeedback), ifftsize, ihopsize, ifftsize, 0
 
30
fsig1R      pvsanal aR+(aOutR*kfeedback), ifftsize, ihopsize, ifftsize*2, 0
 
31
fsig2L      pvscale fsig1L, kscal
 
32
fsig2R      pvscale fsig1R, kscal
 
33
aOutL       pvsynth fsig2L
 
34
aOutR       pvsynth fsig2R
 
35
 
 
36
            xout aOutL, aOutR
 
37
    endop
 
38
 
 
39
    instr 1 ;PITCH SHIFTER
 
40
 
 
41
a1, a2  ins
 
42
 
 
43
kmix        chnget "mix"
 
44
kpitch      chnget "pitch"
 
45
kpitch      scale kpitch, 12, -12
 
46
kfine       = 0      ;chnget "pitchshifter_fine"
 
47
kfine       scale kfine, 0.083333, -0.083333
 
48
kfeedback   = 0      ;chnget "pitchshifter_feedback"
 
49
 
 
50
kWet            table   kmix, giWet, 100
 
51
kDry            table   kmix, giDry, 100        
 
52
 
 
53
aOutL, aOutR PitchShifter a1, a2, kpitch, kfine, kfeedback
 
54
 
 
55
aOutL           = (aOutL * kmix) + (a1 * (1.0 - kmix))
 
56
aOutR           = (aOutR * kmix) + (a2 * (1.0 - kmix))
 
57
 
 
58
                outs aOutL, aOutR
 
59
    
 
60
    endin
 
61
 
 
62
 
 
63
</CsInstruments>
 
64
<CsScore>
 
65
f0 36000
 
66
 
 
67
</CsScore>
 
68
</CsoundSynthesizer>