scalet
Prev | Orchestra Opcodes and Operators | Next

## scalet

scalet — Scales the values in a range of a vector.

## Description

The scalet opcode scales a subregion of a vector to a given minimum/maximum.

## Syntax

    scalet tab, kmin, kmax[, kleft, kright]

## Performance

tab -- table for operation.

kmin, kmax -- target minimum and maximum values.

kleft, kright -- range of table to use, defaulting to 0 and size of the vector.

## Examples

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

Example 707. Example of the scalet opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

    <CsoundSynthesizer>
    <CsInstruments>

    instr 1
      t1 init 10,1
      t1[3] = 42
         scalet t1, 0, 1
      k1 sumtab t1
      printk2 k1
    endin
    </CsInstruments>
    <CsScore>
    i1 0 0.1
    e
    </CsScore>
    </CsoundSynthesizer>

## See Also

plustab, multtab, maxatab, mintab, sumtab,

## Credits

Author: John ffitch
October 2011

New in Csound version 5.14

Prev | Up | Next
scale | Home | scanhammer