music.resolve_stereo

music.resolve_stereo(afunction, argdict, stereo_vars=('sonic_vector',))[source]

Resolve stereo arguments for a function.

Parameters:
afunctionfunction

The function to apply the resolved arguments to.

argdictdict

The dictionary of arguments to resolve.

stereo_varslist, optional

List of variable names that represent stereo data, by default [‘sonic_vector’]

Returns:
numpy.ndarray

Stereo output of the function.

Examples

>>> stereo = convert_to_stereo(note(440, 0.1))
>>> # `loud` takes one channel; this runs it on each of the two.
>>> both = resolve_stereo(loud, {"sonic_vector": stereo, "trans_dev": 6})
>>> both.shape[0]
2