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

« back to all changes in this revision

Viewing changes to iOS/Csound iOS Examples/Csound iOS Examples/ViewControllers/MidiTest/midiTest.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
 
4
</CsOptions>
 
5
<CsInstruments>
 
6
nchnls=2
 
7
0dbfs=1
 
8
ksmps=64
 
9
sr = 44100
 
10
 
 
11
massign 0, 1
 
12
 
 
13
ga1 init 0
 
14
 
 
15
 
 
16
opcode  cpsmid, k, k
 
17
 
 
18
kmid    xin
 
19
 
 
20
#define MIDI2CPS(xmidi) # (440.0*exp(log(2.0)*(($xmidi)-69.0)/12.0)) #
 
21
kcps    =       $MIDI2CPS(kmid)
 
22
 
 
23
        xout    kcps
 
24
 
 
25
                endop
 
26
 
 
27
 
 
28
instr 1
 
29
 
 
30
midinoteonkey p4, p5
 
31
 
 
32
kpch cpsmid p4
 
33
 
 
34
iattack chnget "attack" 
 
35
idecay chnget "decay" 
 
36
isustain chnget "sustain" 
 
37
irelease chnget "release" 
 
38
 
 
39
;print iattack
 
40
;print idecay
 
41
;print isustain
 
42
;print irelease
 
43
 
 
44
k2 linsegr 0, iattack, 1, idecay, isustain, irelease, 0
 
45
a1 vco2 k2 * .2, kpch
 
46
 
 
47
ga1 = ga1 + a1
 
48
 
 
49
endin
 
50
 
 
51
instr 2
 
52
 
 
53
kcutoff chnget "cutoff"
 
54
kresonance chnget "resonance"
 
55
 
 
56
a1 moogladder ga1, kcutoff, kresonance
 
57
 
 
58
aL, aR reverbsc a1, a1, .72, 5000
 
59
 
 
60
outs aL, aR
 
61
 
 
62
ga1 = 0
 
63
 
 
64
endin
 
65
 
 
66
instr allNotesOff
 
67
turnoff2 1, 0, 1
 
68
turnoff
 
69
endin
 
70
 
 
71
</CsInstruments>
 
72
<CsScore>
 
73
f1 0 16384 10 1
 
74
 
 
75
i2 0 360000
 
76
 
 
77
</CsScore>
 
78
</CsoundSynthesizer>