Open armadsen opened 9 years ago
I'm not sure if it is practical to make them the same class or not.
I agree that conversion between the two should be simple, as you suggested. It would certainly keep MIKMIDISequencer from getting too packed full of conversion code itself as it expands to include more than just note events.
Both issues should probably be addressed at the same time to avoid the extra work of refactoring all of the conversions out of the sequencer class later.
Right. I actually just added +[MIKMIDICommand commandsFromNoteEvent:clock:] for now. I don’t consider its implementation final, and of course that’s only for note events. Combining them into single classes is probably a tall order, though…
On Feb 20, 2015, at 12:34 PM, Chris Flesner notifications@github.com wrote:
I'm not sure if it is practical to make them the same class or not.
I agree that conversion between the two should be simple, as you suggested. It would certainly keep MIKMIDISequencer from getting too packed full of conversion code itself as it expands to include more than just note events.
Both issues should probably be addressed at the same time to avoid the extra work of refactoring all of the conversions out of the sequencer class later.
— Reply to this email directly or view it on GitHub https://github.com/mixedinkey-opensource/MIKMIDI/issues/42#issuecomment-75304446.
As I've worked a little more on this, it seems like some classes could be the same. MIKMIDIChannelEvent and its subclasses are almost identical to MIKMIDIChannelVoiceCommand and its subclasses with the exception of the note commands. Let's keep thinking about this.
I'm not sure if this is actually practical, but I'd love to remove the mostly annoying distinction between MIDI messages (
MIKMIDICommand
s) as used by devices, endpoints etc., and MIDI events (MIKMIDIEvent
s) as used by sequences, tracks, etc.At the very least, it would be nice to make conversion between them easier. e.g. +
[MIKMIDICommand commandsWithEvent:event]
and vice versa.