where the argument within the parentheses may be an expression. Value converters perform arithmetic translation from units of one kind to units of another. The result can then be a term in a further expression.
Examples
Here is an example of the ceil opcode. It uses the file ceil-modern.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform; Audio out Audio in No messages-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=2instr1num:i=p4iceil=ceil(inum)print(iceil)endin</CsInstruments><CsScore>i100.011i.+.0.999999i...0.000001i...0i...-0.0000001i...-0.9999999i...-1e</CsScore></CsoundSynthesizer>
Here is an example of the ceil opcode. It uses the file ceil.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform; Audio out Audio in No messages-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=2instr1inum=p4iceil=ceil(inum)printiceilendin</CsInstruments><CsScore>i100.011i.+.0.999999i...0.000001i...0i...-0.0000001i...-0.9999999i...-1e</CsScore></CsoundSynthesizer>
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac -d ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o ceil-2.wav -W ;;; for file output any platform; By Stefano Cucchi - 2020</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1dur:i=p3cps:k=100car:k=1mod:k=p4ndx:k=poscil(30,0.25/dur,1)ndx=ceil(ndx)sig:a=foscili(0.5,cps,car,mod,ndx,1)outs(sig,sig)endin</CsInstruments><CsScore>f1016384101i10101.5e</CsScore></CsoundSynthesizer>
Here is another example of the ceil opcode. It uses the file ceil-2.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;realtime audio out;-iadc ;;;uncomment -iadc if realtime audio input is needed too; For Non-realtime ouput leave only the line below:; -o ceil-2.wav -W ;;; for file output any platform; By Stefano Cucchi - 2020</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1kcps=100kcar=1kmod=p4kndxoscil30,.25/p3,1kndxceilkndxasigfoscili.5,kcps,kcar,kmod,kndx,1outsasig,asigendin</CsInstruments><CsScore>f1016384101i10101.5e</CsScore></CsoundSynthesizer>
Here is an example for the rounding-group, comparing the different rounding opcodes. It uses the file rounding-group-modern.csd.