Skip to content

limit1

Limits the value of an argument to the range [0,1].

Syntax

ires[] limit1 iarg
kres[] limit1 karg

Initialization

iarg[] -- the argument.

Performance

karg[] -- the argument.

Examples

Here is an example of the limit1 opcode. It uses the file limit1.csd.

Example of the limit1 opcode.
<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>

See also

Array opcodes

Credits

Author: Victor Lazzarini
2017