<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>