MicroKontrol native mode, Pure Data, MFB 502 (video)
Moderators: Sharp, X-Trade, Pepperpotty, karmathanever
MicroKontrol native mode, Pure Data, MFB 502 (video)
Here's a little tryout with a homebrew stepsequencer i built a while ago in PD and a mfb 502 drumcomputer. A little vague yes, so i'll explain. Bottom 4 pads are changing the pattern on the fly(not waiting for 1st step ala x0x boxes) and the other pads are voice mutes which give visual feedback as to when the're being triggered. Next step is to add an edit mode where you can choose a voice and the 16 pads become the 16 steps for editing the pattern.
MicroKontrol-Native_PureData
MicroKontrol-Native_PureData
I struggled in C++ to get Native Mode working.
Mostly user error, however I was unable to get the pads to respond to LED (my first task) until I sent all four sysex messages for native mode.
While frustrated yesterday I searched here to see if anyone posted the correct sysex to get the MicroKontrol to enter native mode, and I didn't find it. So, here is is, for the next person who was in my position (this darn thing just won't enter native mode!)
this may not be 100% correct (for instance I'm sending 0x00 for the LCD chars, when it should be in the ascii range) but it does enter native mode.
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x00, 0x00, 0x01, 0xF7
(native mode ON request)
_________________________________________________
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x27, 0x00,
0x00, //transpose
0x00, //global ch
0x00, //pitchbend ch
0x00, //pads 0-6 transmit note
0x00, //pads 7-C transmit note
0x00, //last 2 pads, transmit note
0x00, //pad1 MIDI ch
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, //pad1 note#
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7
_________________________________________________
3rd packet (second 'native mode' packet):
0xf0, 0x42, 0x40, 0x6E, 0x00,
0x3F, //Packet communication command
0x12, //message for "Packet Com 2" (says data 1+17 bytes)
0x01, //tells MicroKontrol this is the second packet
0x00, //Pad LED 1-7
0x00, //Pad LED 8-14
0x00, //more LEDs main buttons
0x00, //more led's, tempo arrows etc
0x00, //lcd color 1-2
0x00, // lcd color 3-4
0x00, //lcd color 5-6
0x00, //lcd color 7-8
0x00, // main backlight color
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //main LCD ASCII
0xF7
__________________________________
3rd Native Message (4th total)
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x21, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //DispSubLCD1
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sublcd4
0xF7
__________________________________
4th Native packet (5th total)
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x21, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //Disp. Sub LCD 5
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //Disp. Sub LCD 8
0xF7
__________________________________
finally my test packet:
0xf0, 0x42, 0x40, 0x6E, 0x00,
0x01, //PAD LED message
0x00, //which pad (PAD #0)
0x01, //state (light it up!)
0xF7
__________________________________
hope this helps someone!
Mostly user error, however I was unable to get the pads to respond to LED (my first task) until I sent all four sysex messages for native mode.
While frustrated yesterday I searched here to see if anyone posted the correct sysex to get the MicroKontrol to enter native mode, and I didn't find it. So, here is is, for the next person who was in my position (this darn thing just won't enter native mode!)
this may not be 100% correct (for instance I'm sending 0x00 for the LCD chars, when it should be in the ascii range) but it does enter native mode.
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x00, 0x00, 0x01, 0xF7
(native mode ON request)
_________________________________________________
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x27, 0x00,
0x00, //transpose
0x00, //global ch
0x00, //pitchbend ch
0x00, //pads 0-6 transmit note
0x00, //pads 7-C transmit note
0x00, //last 2 pads, transmit note
0x00, //pad1 MIDI ch
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, //pad1 note#
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7
_________________________________________________
3rd packet (second 'native mode' packet):
0xf0, 0x42, 0x40, 0x6E, 0x00,
0x3F, //Packet communication command
0x12, //message for "Packet Com 2" (says data 1+17 bytes)
0x01, //tells MicroKontrol this is the second packet
0x00, //Pad LED 1-7
0x00, //Pad LED 8-14
0x00, //more LEDs main buttons
0x00, //more led's, tempo arrows etc
0x00, //lcd color 1-2
0x00, // lcd color 3-4
0x00, //lcd color 5-6
0x00, //lcd color 7-8
0x00, // main backlight color
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //main LCD ASCII
0xF7
__________________________________
3rd Native Message (4th total)
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x21, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //DispSubLCD1
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sublcd4
0xF7
__________________________________
4th Native packet (5th total)
0xf0, 0x42, 0x40, 0x6E, 0x00, 0x3f, 0x21, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //Disp. Sub LCD 5
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //Disp. Sub LCD 8
0xF7
__________________________________
finally my test packet:
0xf0, 0x42, 0x40, 0x6E, 0x00,
0x01, //PAD LED message
0x00, //which pad (PAD #0)
0x01, //state (light it up!)
0xF7
__________________________________
hope this helps someone!
-
- Posts: 9
- Joined: Sat Dec 01, 2007 9:04 pm
Re: MicroKontrol native mode, Pure Data, MFB 502 (video)
wicked idea.chaosmoon wrote:Here's a little tryout with a homebrew stepsequencer i built a while ago in PD and a mfb 502 drumcomputer. A little vague yes, so i'll explain. Bottom 4 pads are changing the pattern on the fly(not waiting for 1st step ala x0x boxes) and the other pads are voice mutes which give visual feedback as to when the're being triggered. Next step is to add an edit mode where you can choose a voice and the 16 pads become the 16 steps for editing the pattern.
MicroKontrol-Native_PureData
I'm actually trying to write some abstractions/externals with PD to make my padkontrol blink.
Something like what the CovertOps are doing for PadKontrol, but for PD.
care to share your code?
how do you send Sysex strings to Pk in PD? I'm using PD extended, and the only app I see is "sysexout", which only works for Linux.
I'm already kinda stumped. any help would be greatly appreciated.
p.
a more elegant c++ definition for the messages... Thanks for all your info it cleared up some stuff.
note you must first send the header, then the message you want to send, then the last sysx byte which is 0xF7
note you must first send the header, then the message you want to send, then the last sysx byte which is 0xF7
Code: Select all
//SysX header for microKONTROL
unsigned char MsgHdr[5] = {0xf0, 0x42, 0x40, 0x6E, 0x00};
//Native mode request
unsigned char MsgIORequest[3] = {0x00, 0x00, 0x01};
//Native mode packet communication 1
unsigned char MsgPacket1[41] = {0x3F, 0x27, 0x00,
0x00, //0 transpose
0x00, //1 global midi channel
0x00, //2 pitch bend
0x00, //3 BINARY pad 7-1 note send
0x00, //4 BINARY pad 14-8 note send
0x00, //5 BINARY pad 16-15 note send
//6-21 pad 1-16 midi ch(0-15)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//22-37 pad 1-16 not number(0-127)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
//Native mode packet communication 2
unsigned char MsgPacket2[20] = {0x3F, 0x12, 0x01,
0x00, //0 BINARY pad 7-1 LED
0x00, //1 BINARY pad 14-8 LED
0x00, //2 BINARY (enter, exit, scene, message, setting, pad16, pad 15) LED
0x00, //3 BINARY (<red> red, <green> green, tempo, hex lock)
0x00, //4 Sub LCD 2 (0,1,2,3=off/Red/Green/Orange)
// Sub LCD 1 (0,1,2,3=off/Red/Green/Orange)
0x00, //5 Sub LCD 4 (0,1,2,3=off/Red/Green/Orange)
// Sub LCD 3 (0,1,2,3=off/Red/Green/Orange)
0x00, //6 Sub LCD 6 (0,1,2,3=off/Red/Green/Orange)
// Sub LCD 5 (0,1,2,3=off/Red/Green/Orange)
0x00, //7 Sub LCD 8 (0,1,2,3=off/Red/Green/Orange)
// Sub LCD 7 (0,1,2,3=off/Red/Green/Orange)
0x00, //8 Main LCD (0,1,2,3=off/Red/Green/Orange)
0x00, //9 Main LCD 1st char (20-7F)
0x00, //10 Main LCD 2nd char (20-7F)
0x00, //11 Main LCD 3d char (20-7F)
0x00, //12 Main LCD 4th char (20-7F)
0x00, //13 Main LCD 5th char (20-7F)
0x00, //14 Main LCD 6th char (20-7F)
0x00, //15 Main LCD 7th char (20-7F)
0x00}; //16 Main LCD 8th char (20-7F)
//Native mode packet communication 3
unsigned char MsgPacket3[35] = {0x3F, 0x21, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 1 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 2 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 3 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; //sub lcd 4 characters
//Native mode packet communication 4
unsigned char MsgPacket4[35] = {0x3F, 0x21, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 5 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 6 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //sub lcd 7 characters
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; //sub lcd 8 characters