music.trill

music.trill(freqs=(440, 493.8833012561241), notes_per_second=17, duration=5, sample_rate=44100)[source]

Makes a trill.

This is just a simple function for exemplifying the synthesis of trills. The user is encouraged to make its own functions for trills and set e.g. ADSR envelopes, tremolos and vibratos as intended.

Parameters:
freqsiterable of scalars

Frequencies to the iterated.

notes_per_secondscalar

The number of notes per second.

durationscalar

The maximum duration of the trill in seconds.

sample_rateinteger

The sample rate.

Returns:
sndarray

The PCM samples of the resulting sound.

See also

V

A note with vibrato.

PV_

a note with an arbitrary sequence of pitch transition and a meta-vibrato.

T

A tremolo envelope.

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(trill())