Debian Codegraph @

examples/FLjoy.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages
5 -odac -iadc -d ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o FLjoy.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; Demonstration of the flpanel opcode
12 ; Horizontal click-dragging controls the frequency of the oscillator
13 ; Vertical click-dragging controls the amplitude of the oscillator
14 sr = 44100
15 kr = 441
16 ksmps = 100
17 nchnls = 1
18
19 FLpanel "X Y Panel", 900, 400, 50, 50
20 ; Minimum value output by x movement (frequency)
21 iminx = 200
22 ; Maximum value output by x movement (frequency)
23 imaxx = 5000
24 ; Minimum value output by y movement (amplitude)
25 iminy = 0
26 ; Maximum value output by y movement (amplitude)
27 imaxy = 15000
28 ; Logarithmic change in x direction
29 iexpx = -1
30 ; Linear change in y direction
31 iexpy = 0
32 ; Display handle x direction (-1=not used)
33 idispx = -1
34 ; Display handle y direction (-1=not used)
35 idispy = -1
36 ; Width of the x y panel in pixels
37 iwidth = 800
38 ; Height of the x y panel in pixels
39 iheight = 300
40 ; Distance of the left edge of the x y panel from
41 ; the left edge of the panel
42 ix = 50
43 ; Distance of the top edge of the x y
44 ; panel from the top edge of the panel
45 iy = 50
46
47 gkfreqx, gkampy, ihandlex, ihandley FLjoy "X - Frequency Y - Amplitude", iminx, imaxx, iminy, imaxy, iexpx, iexpy, idispx, idispy, iwidth, iheight, ix, iy
48 ; End of panel contents
49 FLpanelEnd
50 ; Run the widget thread!
51 FLrun
52
53 instr 1
54 ifn = 1
55 asig oscili gkampy, gkfreqx, ifn
56 out asig
57 endin
58
59
60 </CsInstruments>
61 <CsScore>
62
63 ; Function table that defines a single cycle
64 ; of a sine wave.
65 f 1 0 1024 10 1
66
67 ; Instrument 1 will play a note for 1 hour.
68 i 1 0 3600
69 e
70
71
72 </CsScore>
73 </CsoundSynthesizer>