added generic voice allocator

This commit is contained in:
Christopher Herb
2023-07-07 14:42:10 +02:00
parent 01596ca8e8
commit d9bcd96276
2 changed files with 173 additions and 0 deletions

25
synth/note_event.h Normal file
View File

@@ -0,0 +1,25 @@
#pragma once
namespace trnr::lib::synth {
enum note_event_type {
note_on = 0,
note_off
};
class note_event {
public:
note_event_type type;
int midi_note;
float velocity;
int offset;
note_event(note_event_type type, int _midi_note, float _velocity, int _offset)
: type { type }
, midi_note { _midi_note }
, velocity { _velocity }
, offset { _offset }
{
}
};
}