limit1 — Limiting function
Limits the value of an argument to the range [0,1].
ires[] limit1 iarg
kres[] limit1 karg
iarg[] -- the argument.
karg[] -- the argument.
Here is an example of the limit1 opcode. Play limit1.csd
Example 503. Example of the limit1 opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> </CsOptions> <CsInstruments> instr 1 iArg1[] fillarray 1,2,3 iRes[] limit1 iArg1/2.5 ik init 0 while ik < lenarray(iRes) do print iRes[ik] ik += 1 od endin </CsInstruments> <CsScore> i1 0 0 </CsScore> </CsoundSynthesizer>