Closed llgcode closed 2 years ago
thanks @llgcode!
This also needs to be rebased/merged on the Main branch, since your other PR was accepted, it's muddying this one. Sorry I mixed everything
The Drum mode is weird, because Novation outputs the notes on the DAW interface, not the MIDI interface like Note/Chord/Seq. Something I miss, is the way drum mode work, in the Programmer’s reference manual we see in page 18 that we need to send this SysEx message to activate the drumrack mode:
Hex Version: F0h 00h 20h 29h 02h 0Eh 0Fh
F7h Where the byte can be one of the followings: 0: Note mode. 1: Drumrack.
But in the code I see this:
if (v) {
ext.midiDawOut.sendSysex(`${SysexPrefix} 00 02 F7`);
} else {
ext.midiDawOut.sendSysex(`${SysexPrefix} 00 01 F7`);
}
First I was thinking that it activates a particular page/layout but it doesn't seem to be a documented message.
ext.cursorTrack.playingNotes().addValueObserver((n) => {
ext.drumPads.updateNotes(n);
});
Is this value observer activated every time we play a note in drumrack layout mode (not in note layout mode, why?), this observation seems to be done twice in the code! surely a good reason :). How pads are litted when switching to note mode?
Is the programmer's reference manual contains all the information ? is there other source of information ?
These are questions that I ask myself aloud, it's not necessary to answer. I will investigate to better understand.
Thanks for your review and the explicit comments in the code it really help to understand.
The Novation Programmers Reference is actually wrong. I used MIDI Monitor to spy on Ableton Live to see how the Drum Mode was enabled and disabled.
And you are right! There is a double handler, and that is incorrect. I've updated the main branch.
This PR adds 16 midi input channels to tracks see issue #7. I've created other channels in Bitwig like this by filtering the expected channel with expected mask:
It's working pretty well with the 16 channels, tested with the launchpad sequencer, note mode and chord mode. When sending notes from note mode, it will send on both in 'Notes' channel and for example 'Note 1' if channel 1 is selected in notes mode (lots of notes :-). It reveals somethings, when selected a drum track in session mode and come back to note mode, the drum rack send midi note only in the drum channel.
Is there other channels that comes from the drum rack? I investigate.
Here a screenshot of what it looks like, what do you think of the naming: