music.mix

music.mix(first_sonic_vector, second_sonic_vector)[source]

Mixes two sonic vectors.

This function mixes two sonic vectors of different lengths. It creates a new sonic vector by summing the samples of the input sonic vectors. If one of the input sonic vectors is shorter than the other, it is padded with zeros to match the length of the longer sonic vector before mixing.

Parameters:
first_sonic_vectorndarray

The first sonic vector.

second_sonic_vectorndarray

The second sonic vector.

Returns:
ndarray

A mixed sonic vector containing the sum of the input sonic vectors.

Parameters:
Return type:

ndarray

See also

mix2

A better mixer function that provides more control over the mixing process.