| 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 FLroller.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; A sine with oscillator with flroller controlled frequency |
| 12 |
sr = 44100 |
| 13 |
kr = 441 |
| 14 |
ksmps = 100 |
| 15 |
nchnls = 1 |
| 16 |
|
| 17 |
FLpanel "Frequency Roller", 900, 400, 50, 50 |
| 18 |
; Minimum value output by the roller |
| 19 |
imin = 200 |
| 20 |
; Maximum value output by the roller |
| 21 |
imax = 5000 |
| 22 |
; Increment with each pixel |
| 23 |
istep = 1 |
| 24 |
; Logarithmic type roller selected |
| 25 |
iexp = -1 |
| 26 |
; Roller graphic type (1=horizontal) |
| 27 |
itype = 1 |
| 28 |
; Display handle (-1=not used) |
| 29 |
idisp = -1 |
| 30 |
; Width of the roller in pixels |
| 31 |
iwidth = 300 |
| 32 |
; Height of the roller in pixels |
| 33 |
iheight = 50 |
| 34 |
; Distance of the left edge of the knob |
| 35 |
; from the left edge of the panel |
| 36 |
ix = 300 |
| 37 |
; Distance of the top edge of the knob |
| 38 |
; from the top edge of the panel |
| 39 |
iy = 50 |
| 40 |
|
| 41 |
gkfreq, ihandle FLroller "Frequency", imin, imax, istep, iexp, itype, idisp, iwidth, iheight, ix, iy |
| 42 |
; End of panel contents |
| 43 |
FLpanelEnd |
| 44 |
; Run the widget thread! |
| 45 |
FLrun |
| 46 |
|
| 47 |
instr 1 |
| 48 |
iamp = 15000 |
| 49 |
ifn = 1 |
| 50 |
asig oscili iamp, gkfreq, ifn |
| 51 |
out asig |
| 52 |
endin |
| 53 |
|
| 54 |
|
| 55 |
</CsInstruments> |
| 56 |
<CsScore> |
| 57 |
|
| 58 |
; Function table that defines a single cycle |
| 59 |
; of a sine wave. |
| 60 |
f 1 0 1024 10 1 |
| 61 |
|
| 62 |
; Instrument 1 will play a note for 1 hour. |
| 63 |
i 1 0 3600 |
| 64 |
e |
| 65 |
|
| 66 |
|
| 67 |
</CsScore> |
| 68 |
</CsoundSynthesizer> |