music.adsr_vibrato

music.adsr_vibrato(note_dict={}, adsr_dict={})[source]

Creates a note with a vibrato and an ADSR envelope.

A shorthand for calling music.note_with_vibrato() and passing the result to adsr(), so that the two sets of arguments do not have to be interleaved at the call site.

Parameters:
note_dictdict

Keyword arguments for music.note_with_vibrato(), which renders the note the envelope is applied to.

adsr_dictdict

Keyword arguments for adsr(), which shapes it. sonic_vector is supplied by this function and should not be given here.

Returns:
ndarray

A mono sequence of PCM samples: the vibrato note under the envelope.

See also

adsr

the envelope, and the meaning of every key of adsr_dict.

music.note_with_vibrato

the note, and the keys of note_dict.

Examples

>>> sound = adsr_vibrato(note_dict={'freq': 220, 'duration': 1},
...                      adsr_dict={'sustain_level': -10})
>>> sound.ndim
1