4545
4646#include "shared-module/synthio/LFO.h"
4747
48+ //| class EnvelopeState:
49+ //| ATTACK: EnvelopeState
50+ //| """The note is in its attack phase"""
51+ //| DECAY: EnvelopeState
52+ //| """The note is in its decay phase"""
53+ //| SUSTAIN: EnvelopeState
54+ //| """The note is in its sustain phase"""
55+ //| RELEASE: EnvelopeState
56+ //| """The note is in its release phase"""
57+ //|
4858MAKE_ENUM_VALUE (synthio_note_state_type , note_state , ATTACK , SYNTHIO_ENVELOPE_STATE_ATTACK );
4959MAKE_ENUM_VALUE (synthio_note_state_type , note_state , DECAY , SYNTHIO_ENVELOPE_STATE_DECAY );
5060MAKE_ENUM_VALUE (synthio_note_state_type , note_state , SUSTAIN , SYNTHIO_ENVELOPE_STATE_SUSTAIN );
@@ -59,7 +69,7 @@ MAKE_ENUM_MAP(synthio_note_state) {
5969
6070STATIC MP_DEFINE_CONST_DICT (synthio_note_state_locals_dict , synthio_note_state_locals_table );
6171MAKE_PRINTER (synthio , synthio_note_state );
62- MAKE_ENUM_TYPE (synthio , NoteState , synthio_note_state );
72+ MAKE_ENUM_TYPE (synthio , EnvelopeState , synthio_note_state );
6373
6474#define default_attack_time (MICROPY_FLOAT_CONST(0.1))
6575#define default_decay_time (MICROPY_FLOAT_CONST(0.05))
@@ -332,7 +342,7 @@ STATIC const mp_rom_map_elem_t synthio_module_globals_table[] = {
332342 { MP_ROM_QSTR (MP_QSTR_MathOperation ), MP_ROM_PTR (& synthio_math_operation_type ) },
333343 { MP_ROM_QSTR (MP_QSTR_MidiTrack ), MP_ROM_PTR (& synthio_miditrack_type ) },
334344 { MP_ROM_QSTR (MP_QSTR_Note ), MP_ROM_PTR (& synthio_note_type ) },
335- { MP_ROM_QSTR (MP_QSTR_NoteState ), MP_ROM_PTR (& synthio_note_state_type ) },
345+ { MP_ROM_QSTR (MP_QSTR_EnvelopeState ), MP_ROM_PTR (& synthio_note_state_type ) },
336346 { MP_ROM_QSTR (MP_QSTR_LFO ), MP_ROM_PTR (& synthio_lfo_type ) },
337347 { MP_ROM_QSTR (MP_QSTR_Synthesizer ), MP_ROM_PTR (& synthio_synthesizer_type ) },
338348 { MP_ROM_QSTR (MP_QSTR_from_file ), MP_ROM_PTR (& synthio_from_file_obj ) },
0 commit comments