music.note_with_vibratos_glissandos¶
- music.note_with_vibratos_glissandos(freqs=(220, 440, 330), durations=((2, 3), (2, 5, 3), (2, 5, 6, 1, 0.4)), vibratos_freqs=((2, 6, 1), (0.5, 15, 2, 6, 3)), vibratos_max_pitch_devs=((2, 1, 5), (4, 3, 7, 10, 3)), alpha=((1, 1), (1, 1, 1), (1, 1, 1, 1, 1)), waveform_tables=((array([-1., -0.99975586, -0.99951172, ..., -0.99926758, -0.99951172, -0.99975586], shape=(16384,)), array([-1., -0.99975586, -0.99951172, ..., -0.99926758, -0.99951172, -0.99975586], shape=(16384,))), (array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), array([-1., -0.99975586, -0.99951172, ..., -0.99926758, -0.99951172, -0.99975586], shape=(16384,)), array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,))), (array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)))), number_of_samples=0, sample_rate=44100)[source]¶
A note with an arbitrary sequence of pitch transition and a meta-vibrato.
A meta-vibrato consists in multiple vibratos. The sequence of pitch transitions is a glissandi.
A one-sample pitch transition uses its starting frequency for a positive curve index; an index of zero jumps directly to the endpoint. After the pitch sequence ends, its last frequency is held. Completed vibratos contribute no further modulation.
- Parameters:
- freqssequence
ofscalars Positive frequencies at each end of the pitch transitions.
- durations
listoflistsofscalars Durations of the pitch transitions and then of the vibratos, in seconds. Every segment uses
int(sample_rate * duration)samples.- vibratos_freqs
listoflistsofscalars The frequencies of each vibrato.
- vibratos_max_pitch_devs
listoflistsofscalars The maximum deviation of pitch in the vibratos in semitones.
- alpha
listoflistsofscalars Indexes to distort the pitch deviations of the transitions and the vibratos. A zero vibrato index selects the undistorted oscillation.
- waveform_tables
listoflistsofarray_likes The tables with the waveforms to synthesize the sound and for the oscillatory patterns of the vibratos. All the tables for f should have the same size.
- number_of_samplesscalar
If nonzero, truncate or zero-pad the complete render to this length.
- sample_ratescalar
The sample rate.
- freqssequence
- Returns:
- s
ndarray A numpy array where each value is a PCM sample of the sound.
- s
- Raises:
ValueErrorIf a pitch endpoint is not positive.
See also
note_with_glissando_vibratoA note with a glissando and a vibrato.
note_with_two_vibratos_glissandoA note with a glissando and two vibratos.
note_with_two_vibratosA note with a vibrato with two oscillatory patterns.
notea basic musical note without vibrato.
note_with_vibratoa musical note with an oscillation of pitch.
tremoloa tremolo, an oscillation of loudness.
fadefade in and out.
louda transition of loudness.
Examples
>>> write_wav_mono(note_with_vibratos_glissandos())