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 toadsr(), so that the two sets of arguments do not have to be interleaved at the call site.- Parameters:
- note_dict
dict Keyword arguments for
music.note_with_vibrato(), which renders the note the envelope is applied to.- adsr_dict
dict Keyword arguments for
adsr(), which shapes it.sonic_vectoris supplied by this function and should not be given here.
- note_dict
- Returns:
ndarrayA mono sequence of PCM samples: the vibrato note under the envelope.
See also
adsrthe envelope, and the meaning of every key of
adsr_dict.music.note_with_vibratothe 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