saveMatrixAsGen23#
- csoundengine.csoundlib.saveMatrixAsGen23(outfile, mtx, extradata=None, header=True)[source]#
Save a numpy 2D array as gen23
- Parameters:
outfile (str) – the path to save the data to. Suggestion: use ‘.gen23’ as ext
mtx (np.ndarray) – a 2D array of floats
extradata (
list
[float
] |None
) – if given, this data will be prependedto the data in mtx. Implies include_header=Trueheader – if True, a header of the form [headersize, numrows, numcolumns] is prepended to the data.
- Return type:
None
Note
The format used by gen23 is a text format with numbers separated by any space. When read inside csound the table is of course 1D but can be interpreted as 2D with the provided header metadata.