Page 1 of 1

MicroKontrol native mode, Pure Data, MFB 502 (video)

Posted: Tue Sep 25, 2007 10:33 pm
by chaosmoon
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

Posted: Mon Oct 22, 2007 2:10 pm
by haj
Very cool! Please keep it coming :mrgreen:

Posted: Mon Nov 26, 2007 1:06 am
by rodolpheg
Wahoo! This is really cool!

Would you mind sharing your code Chaosmoon? I'm trying to get a PD patch to control my microkontrol with no luck... Did you use "ctout" to make it work?

Cheers! :)

Posted: Tue Nov 27, 2007 5:16 pm
by padnum
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!

Posted: Sun Dec 02, 2007 5:03 pm
by nobbystylus
what app are you using to enter Native mode? i'm on a Mac and i don't own MAX/MSP and can't find any little app that sends sysex..

Re: MicroKontrol native mode, Pure Data, MFB 502 (video)

Posted: Tue Dec 04, 2007 10:24 pm
by prichard
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
wicked idea.
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.

Posted: Tue Apr 08, 2008 4:55 am
by Ruso
I should note, the idea of these packets is to communicate back and fourth... so ideally you should send one, wait for reply, if the reply is a success message, then send next one... this would be the ideal way to do it and it is also a way of debugging.

Posted: Tue Apr 08, 2008 5:36 am
by Ruso
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

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

Posted: Wed Apr 09, 2008 7:13 am
by plosive
link is dead, did you upload to youtube or anywhere else :?:

Posted: Wed Apr 09, 2008 3:24 pm
by Ruso
I'm working on a c++ .net example using windows forms which will provide a set of functions(not in a class because it's not nearly a complex enough structure) to allow you to receive native mode messages as well as send all the information to microkontrol.

pd file

Posted: Wed Dec 16, 2009 7:58 pm
by dbwest
where's the pd file. I'm interested in using it with pure dyne and my microKontrol