Array Expand - Compress

Changes the size of an array by compress or expand its elements. Provides a linear interpolation.

For example, with a 512 array length in input and Factor of 0.5 we obtain a 0.5*512=256 array length output.

Can be used to expand or compress the spectra of a sound.

input array

expand with factor=2

expand with factor=0.5

Settings

bypass

Bypasses the module.

array in

Array input.

array out

Array output.

factor

compress expand factor:

  • if factor < 1, provides a compression.
  • if factor > 1, provides an expansion.
  • if factor = 1, no changes.

mode

Interpolation mode to calculate the new array.

  • linear interpolation between values
  • accumulation
     newIndex = trunc(factor*oldIndex);
     output[newIndex] := output[newIndex]+input[oldIndex]

See also

Edit All Pages