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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out Audio in No messages
-odac -iadc -d ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o FLcount.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
; Demonstration of the flcount opcode
; clicking on the single arrow buttons
; increments the oscillator in semitone steps
; clicking on the double arrow buttons
; increments the oscillator in octave steps
sr = 44100
kr = 441
ksmps = 100
nchnls = 1
FLpanel "Counter", 900, 400, 50, 50
; Minimum value output by counter
imin = 6
; Maximum value output by counter
imax = 12
; Single arrow step size (semitones)
istep1 = 1/12
; Double arrow step size (octave)
istep2 = 1
; Counter type (1=double arrow counter)
itype = 1
; Width of the counter in pixels
iwidth = 200
; Height of the counter in pixels
iheight = 30
; Distance of the left edge of the counter
; from the left edge of the panel
ix = 50
; Distance of the top edge of the counter
; from the top edge of the panel
iy = 50
; Score event type (-1=ignored)
iopcode = -1
gkoct, ihandle FLcount "pitch in oct format", imin, imax, istep1, istep2, itype, iwidth, iheight, ix, iy, iopcode, 1, 0, 1
; End of panel contents
FLpanelEnd
; Run the widget thread!
FLrun
instr 1
iamp = 15000
ifn = 1
asig oscili iamp, cpsoct(gkoct), ifn
out asig
endin
</CsInstruments>
<CsScore>
; Function table that defines a single cycle
; of a sine wave.
f 1 0 1024 10 1
; Instrument 1 will play a note for 1 hour.
i 1 0 3600
e
</CsScore>
</CsoundSynthesizer>
|