music.note_with_two_vibratos_glissando¶
- music.note_with_two_vibratos_glissando(start_freq=220, end_freq=440, duration=2, vibrato_freq=2, secondary_vibrato_freq=6, max_pitch_dev=2, secondary_max_pitch_dev=0.5, alpha=1, alphav1=1, alphav2=1, waveform_table=array([-1., -0.99975586, -0.99951172, ..., -0.99926758, -0.99951172, -0.99975586], shape=(16384,)), vibrato_waveform_table=array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), secondary_vibrato_waveform_table=array([0., 0.0003835, 0.00076699, ..., -0.00115049, -0.00076699, -0.0003835], shape=(16384,)), number_of_samples=None, sample_rate=None, **renamed)[source]¶
A note with a glissando and a vibrato that also has a secondary oscillatory pattern.
- Parameters:
- start_freqscalar
The starting frequency.
- end_freqscalar
The final frequency.
- durationscalar
The duration of the sound in seconds.
- vibrato_freqscalar
The frequency of the vibrato.
- secondary_vibrato_freqscalar
The frequency of the secondary pattern of the vibrato.
- max_pitch_devscalar
The maximum deviation of pitch in the vibrato in semitones.
- secondary_max_pitch_devscalar
The maximum deviation in semitones of pitch in the secondary pattern of the vibrato.
- alphascalar
An index to begin the transitions faster or slower. If alpha != 1, the transition is not of linear pitch.
- alphav1scalar
An index to distort the pitch deviation of the vibrato.
- alphav2scalar
An index to distort the pitch deviation of the secondary pattern of the vibrato.
- waveform_tablearray_like
The table with the waveform to synthesize the sound.
- vibrato_waveform_tablearray_like
The table with the waveform for the vibrato oscillatory pattern.
- secondary_vibrato_waveform_tablearray_like
The table with the waveform for the secondary pattern of the vibrato.
- number_of_samplesscalar or
None The number of samples of the sound. If given, duration is not used, and zero is no samples.
- sample_ratescalar or
None The sample rate. None, the default, is the rate
music.get_sample_rate()returns.- **renamed
tabv1andtabv2, whatvibrato_waveform_tableandsecondary_vibrato_waveform_tablewere called before they took the namesnote_with_two_vibratos()gives them. Still accepted, with aDeprecationWarning.
- Returns:
- s
ndarray A numpy array where each value is a PCM sample of the sound.
- s
- Raises:
ValueErrorIf alpha is negative: it bends a transition through zero, where a negative power has no finite value, and the render came back holding infinity behind a warning.
If alphav1 is negative: it bends a vibrato through zero, where a negative power has no finite value, and the render came back holding infinity behind a warning.
If alphav2 is negative: it bends a vibrato through zero, where a negative power has no finite value, and the render came back holding infinity behind a warning.
- Parameters:
start_freq (float)
end_freq (float)
duration (float)
vibrato_freq (float)
secondary_vibrato_freq (float)
max_pitch_dev (float)
secondary_max_pitch_dev (float)
alpha (float)
alphav1 (float)
alphav2 (float)
waveform_table (ArrayLike)
vibrato_waveform_table (ArrayLike)
secondary_vibrato_waveform_table (ArrayLike)
number_of_samples (int | None)
sample_rate (int | None)
renamed (Any)
- Return type:
NDArray[float64]
See also
note_with_glissando_vibratoA note with a glissando and a vibrato.
note_with_two_vibratosA note with a vibrato with two oscillatory patterns.
note_with_vibratos_glissandosA note with arbitrary pitch transitions and vibratos.
note_with_vibratoa musical note with an oscillation of pitch.
notea basic musical note without vibrato.
tremoloa tremolo, an oscillation of loudness.
fadefade in or out.
louda transition of loudness.
Examples
>>> write_wav_mono(note_with_two_vibratos_glissando()) >>> s = horizontal_stack( ... *[adsr(sonic_vector=note_with_two_vibratos_glissando( ... secondary_vibrato_freq=i, max_pitch_dev=j)) ... for i, j in zip([330, 440, 100], [8, 2, 15])]) >>> write_wav_mono(s)