<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform ; Audio out Audio in -odac -iadc -t60 ;;;RT audio I/O ; For Non-realtime ouput leave only the line below: ; -o tempo.wav -W -t60 ;;; for file output any platform </CsOptions> <CsInstruments> ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1. instr 1 kval tempoval printk 0.1, kval ; If the fourth p-field is 1, increase the tempo. if (p4 == 1) kgoto speedup kgoto playit speedup: ; Increase the tempo to 150 beats per minute. tempo 150, 60 playit: a1 oscil 10000, 440, 1 out a1 endin </CsInstruments> <CsScore> ; Table #1, a sine wave. f 1 0 16384 10 1 ; p4 = plays at a faster tempo (when p4=1). ; Play Instrument #1 at the normal tempo, repeat 3 times. r3 i 1 00.00 00.25 0 i 1 00.25 00.25 0 i 1 00.50 00.25 0 i 1 00.75 00.25 0 s ; Play Instrument #1 at a faster tempo, repeat 3 times. r3 i 1 00.00 00.25 1 i 1 00.25 00.25 0 i 1 00.50 00.25 0 i 1 00.75 00.25 0 s e </CsScore> </CsoundSynthesizer>