Functions | |
| s32 | NOTESTACK_Init (notestack_t *n, notestack_mode_t mode, notestack_item_t *note_items, u8 size) |
| s32 | NOTESTACK_Push (notestack_t *n, u8 new_note, u8 tag) |
| s32 | NOTESTACK_Pop (notestack_t *n, u8 old_note) |
| s32 | NOTESTACK_CountActiveNotes (notestack_t *n) |
| s32 | NOTESTACK_RemoveNonActiveNotes (notestack_t *n) |
| s32 | NOTESTACK_Clear (notestack_t *n) |
| s32 | NOTESTACK_SendDebugMessage (notestack_t *n) |
Usage Examples: $MIOS32_PATH/apps/tutorial/016_aout $MIOS32_PATH/apps/tutorial/017_sequencer $MIOS32_PATH/apps/tutorial/018_arpeggiator $MIOS32_PATH/apps/sequencers/midibox_seq_v4/core/seq_midi_in.c
| s32 NOTESTACK_Clear | ( | notestack_t * | n | ) |
Clears the note stack
| [in] | *n | pointer to notestack structure |
| s32 NOTESTACK_CountActiveNotes | ( | notestack_t * | n | ) |
Counts all active notes in notestack
| [in] | *n | pointer to notestack structure |
0 if no active note
> 0 if active notes have been found
| s32 NOTESTACK_Init | ( | notestack_t * | n, | |
| notestack_mode_t | mode, | |||
| notestack_item_t * | note_items, | |||
| u8 | size | |||
| ) |
Initializes a Notestack
Has to be called before NOTESTACK_Push/Pop/Clear functions are used!
| [in] | *n | pointer to notestack structure |
| [in] | mode | one of following modes:
|
| [in] | *note_items | pointer to notestack_item_t array which stores the notes and related informations |
| [in] | size | number of note items stored in the array |
| s32 NOTESTACK_Pop | ( | notestack_t * | n, | |
| u8 | old_note | |||
| ) |
Removes a note from the stack
| [in] | *n | pointer to notestack structure |
| [in] | old_note | the note number which should be removed (1..127) |
0 if note hasn't been found
1 if note has been found and removed from stack (in hold mode: marked as depressed)
2 only in hold mode: if all notes are depressed now
| s32 NOTESTACK_Push | ( | notestack_t * | n, | |
| u8 | new_note, | |||
| u8 | tag | |||
| ) |
Pushes a new note, bundled with a tag, to the note stack
| [in] | *n | pointer to notestack structure |
| [in] | new_note | the note number which should be added (1..127) |
| [in] | tag | an optional tag which is bundled with the note. It can contain a voice number, the velocity, or... |
| s32 NOTESTACK_RemoveNonActiveNotes | ( | notestack_t * | n | ) |
Removes all non-active notes from notestack
| [in] | *n | pointer to notestack structure |
| s32 NOTESTACK_SendDebugMessage | ( | notestack_t * | n | ) |
Sends the content of the Notestack to the MIOS Terminal
| [in] | *n | pointer to notestack structure |
1.4.7