<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 FLjoy.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> ; Demonstration of the flpanel opcode ; Horizontal click-dragging controls the frequency of the oscillator ; Vertical click-dragging controls the amplitude of the oscillator sr = 44100 kr = 441 ksmps = 100 nchnls = 1 FLpanel "X Y Panel", 900, 400, 50, 50 ; Minimum value output by x movement (frequency) iminx = 200 ; Maximum value output by x movement (frequency) imaxx = 5000 ; Minimum value output by y movement (amplitude) iminy = 0 ; Maximum value output by y movement (amplitude) imaxy = 15000 ; Logarithmic change in x direction iexpx = -1 ; Linear change in y direction iexpy = 0 ; Display handle x direction (-1=not used) idispx = -1 ; Display handle y direction (-1=not used) idispy = -1 ; Width of the x y panel in pixels iwidth = 800 ; Height of the x y panel in pixels iheight = 300 ; Distance of the left edge of the x y panel from ; the left edge of the panel ix = 50 ; Distance of the top edge of the x y ; panel from the top edge of the panel iy = 50 gkfreqx, gkampy, ihandlex, ihandley FLjoy "X - Frequency Y - Amplitude", iminx, imaxx, iminy, imaxy, iexpx, iexpy, idispx, idispy, iwidth, iheight, ix, iy ; End of panel contents FLpanelEnd ; Run the widget thread! FLrun instr 1 ifn = 1 asig oscili gkampy, gkfreqx, 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>