mags Array Operations: complex numbers mags mags Obtains the magnitudes of a complex-number array Description This opcode returns the magnitudes of a complex-number array (in rfft format), as a real-valued array with half the size of its input plus one. The magnitude for the Nyquist frequency are kept in the last position of the array. Syntax kout[] mags kin[] Performance kout[] -- output array containing the magnitudes (size = input_size/2 + 1). It will be created if it does not exist. kin[] -- input array containing the complex-valued real-imaginary input. Examples Here is an example of the mags opcode. It uses the file mags.csd. Example of the mags opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See Also Vectorial opcodes array opcodes Array-based spectral opcodes Credits Author: &namevictor; NUI Maynooth 2014 New in version 6.04