ipytone.Note#
- class ipytone.Note(time, note, velocity=1, duration=0.1, trigger_type='attack_release')#
Bases:
objectA single note with time, note (frequency) and velocity values.
This is just a placeholder for some attributes that allows a little more flexibility in
ipytone.Part. Unlike in Tone.js, it is not possible to pass arbitrary objects as the 2nd argument of aPartcallback. Instead, everyPartevent is coerced to aNoteobject that can be passed directly toInstrument.trigger_note()or to other trigger methods (using its attributes) inside the callback body.- duration#
The note duration in seconds (generaly used with the “attack_release” trigger type).
- Type:
float, optional
- trigger_type#
The type of event. Used in
Instrument.trigger_note()to determine the action to perform.- Type:
{‘attack’, ‘release’, ‘attack_release’}, optional
- __init__(time, note, velocity=1, duration=0.1, trigger_type='attack_release')#
Methods
to_dict()