music.mix2¶
- music.mix2(sonic_vectors, end=False, offset=0, sample_rate=44100)[source]¶
Mix sonic vectors of arbitrary lengths.
The operation consists in summing sample by sample [1]. This function helps when the sonic_vectors are not of the same size.
- Parameters:
- Returns:
- S
ndarray A numpy array where each value is a PCM sample of the resulting sound.
- S
Notes
Cite the following article whenever you use this function.
References
[1]Fabbri, Renato, et al. “Musical elements in the discrete-time representation of sound.” arXiv preprint arXiv:abs/1412.6853 (2017)
Examples
>>> W(mix2(sonic_vectors=[np.vstack(), N()])) # writes a WAV file # with nodes