| 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 FLtext.wav -W ;;; for file output any platform |
| 8 |
</CsOptions> |
| 9 |
<CsInstruments> |
| 10 |
|
| 11 |
; A sine with oscillator with fltext box controlled |
| 12 |
; frequency either click and drag or double click and |
| 13 |
; type to change frequency value |
| 14 |
sr = 44100 |
| 15 |
kr = 441 |
| 16 |
ksmps = 100 |
| 17 |
nchnls = 1 |
| 18 |
|
| 19 |
FLpanel "Frequency Text Box", 270, 600, 50, 50 |
| 20 |
; Minimum value output by the text box |
| 21 |
imin = 200 |
| 22 |
; Maximum value output by the text box |
| 23 |
imax = 5000 |
| 24 |
; Step size |
| 25 |
istep = 1 |
| 26 |
; Text box graphic type |
| 27 |
itype = 1 |
| 28 |
; Width of the text box in pixels |
| 29 |
iwidth = 70 |
| 30 |
; Height of the text box in pixels |
| 31 |
iheight = 30 |
| 32 |
; Distance of the left edge of the text box |
| 33 |
; from the left edge of the panel |
| 34 |
ix = 100 |
| 35 |
; Distance of the top edge of the text box |
| 36 |
; from the top edge of the panel |
| 37 |
iy = 300 |
| 38 |
|
| 39 |
gkfreq,ihandle FLtext "Enter the frequency", imin, imax, istep, itype, iwidth, iheight, ix, iy |
| 40 |
; End of panel contents |
| 41 |
FLpanelEnd |
| 42 |
; Run the widget thread! |
| 43 |
FLrun |
| 44 |
|
| 45 |
instr 1 |
| 46 |
iamp = 15000 |
| 47 |
ifn = 1 |
| 48 |
asig oscili iamp, gkfreq, ifn |
| 49 |
out asig |
| 50 |
endin |
| 51 |
|
| 52 |
|
| 53 |
</CsInstruments> |
| 54 |
<CsScore> |
| 55 |
|
| 56 |
; Function table that defines a single cycle |
| 57 |
; of a sine wave. |
| 58 |
f 1 0 1024 10 1 |
| 59 |
|
| 60 |
; Instrument 1 will play a note for 1 hour. |
| 61 |
i 1 0 3600 |
| 62 |
e |
| 63 |
|
| 64 |
|
| 65 |
</CsScore> |
| 66 |
</CsoundSynthesizer> |