View previous topic :: View next topic |
Author |
Message |
Fat Elvis
Joined: 12 Feb 2007 Posts: 2
|
Posted: Thu Feb 15, 2007 8:54 pm Post subject: PadKontrol - How to use Native Mode (SysEx) |
|
|
I can't find this info documented anywhere else, so here goes!
Quote: | Please understand that "Native Mode" is useless without programming an interface to it. Native Mode is like an API - it's for programming dedicated interfaces for the PadKontrol. It doesn't magically "fix" any of the complaints about the PadKontrol. You need to create software (in Max/MSP for example) to take advantage of Native Mode.
|
(I am referring to this PDF.)
USING PADKONTROL NATIVE MODE
Wha? When you put your PadKontrol into Native Mode, you get full control over every button and light. Not just some of the buttons - literally every button and LED on the top side of the machine. Every one of these buttons sends a message when you push it and when you release it. The "downside" here is that it's not sending NOTE or CC messages anymore - it's all System Exclusive messages (SysEX) - so while you have "full control" over them, they generally don't do a damn thing on their own as far as controlling something like Reason or Live.
Every knob/button/pad/touchpad sends out an id plus:
The large knob sends an increment/decrement message.
The two smaller knobs send out 0 thru 127.
The drum pads send velocity, and a seperate "on" and "off" message.
The touchpad sends 0 thru 127 for each axis.
The remaining buttons send out a seperate "on" and "off" message.
These are all 9 bytes long, and basically they only differ by 3 bytes - the first 5 bytes and last byte are always the same. This makes it slightly easier to deal with.
Every light can be controlled on the system - right down to the individual lights making up the 7-segment LEDs. The lights can have 4 states - On, Off, Blink and "One Shot". "One Shot" means the light is turned on for a predetermined number of milliseconds, and then it automatically turns itself off. The range of milliseconds is 9ms to 279ms in 9ms increments - from the briefest flash to about a quarter of a second. (The blink setting is not adjustable, but you could use the "one shot" mode and programming on the client side to do adjustable blinks.)
There's also comands to print numbers and letters to the 3 character 7-Segment LED display using ASCII. It allows from hex 20 to hex 7F - but experimentation will show that 7-Segment LEDs aren't the best thing to display a "W" for example. (Think "boobless" on an old calculator. ) Works awesome for numbers.
Native Mode requires you to send 3 commands to the PadKontrol before it will do any Native Mode tricks:
Native KORG mode In - see PDF 3-1(15)
Native KORG mode Packet Communication 1 - see PDF 3-1(17) + Table 3
Native KORG mode Packet Communication 2 - see PDF 3-1(19) + Table 4
The SysEx Commands
I used "MIDI-OX" to experiment initially. Under Actions - Send - Sysex File… (Just cancel the file dialog to send data from the scratch pad. Hightlight the bits you want to send, right-click on it and choose "send" to transmit it. Input from PadKontrol Port A - Output to Padkontrol CTRL)
Commands transmitted start with "f0 42 40 6e 08" and end with "f7". This is hexadecimal and it's not case sensitive. (If you're using Max/MSP, you can use decimal - but if you're following along, you need to write hex as 0xf0 0x42 0x40 etc. in Max/MSP)
f0 42 40 6e 08 00 00 01 F7 :: Enter Native Mode. PDF section 2-2(16)
f0 42 40 6e 08 3f 0a 01 7f 7f 7f 7f 7f 03 38 38 38 F7 :: Lights! W00t! PDF section 2-2(19) + Table 4
f0 42 40 6e 08 3f 2a 00 00 05 05 05 7f 7e 7f 7f 03 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 f7 :: Setup the controls to actually send data. PDF section 2-2(17) + Table 3
All controls now send SysEx. All the lights should be turned on - or close to it.
f0 42 40 6e 08 22 04 01 50 57 4e f7 :: Print "PWN" to the 3 character LED display. The bold bit is the ASCII for P, W and N. PDF section 3-2(3)
f0 42 40 6e 08 01 00 63 f7 :: Set the first pad light to blink. The bold is the light number - numbering starts at zero. The red part tells the light what to do. 00=Off, 20=On, 63=Blink, 5F=Longest OneShot, 41=Shortest OneShot. PDF section 3-2(1)
In a lot of the cases, creating the right SysEx messages means taking a 7bit binary map and converting it into hexadecimal. It only confuses things because they put notations like "B0"; in the PDF - but they mean "binary place 0"; and not B0 in hexadecimal. The PDF was written with a programmer in mind, to be sure.
For example:
f0 42 40 6e 08 3f 0a 01 7f 7f 7f 7f 7f 03 38 38 38 F7 (The "Initialize the lights" message)
The series of 7f's are binary maps of 7 lights each. 1111111 in binary = 127 in decimal = 7F in hexadecimal. In this case it means "all 7 lights are on" - I was setting every light "on" in the example command I provided. 1010101 (55 in hex) would mean "turn on lights 1,3,5 and 7 in the 7 light set. 0000000 = 0 decimal = 00 hex - all lights would be off in that 7 light set. (And so on…) See Table 3 in the PDF.
After the sequence of five 7F's, the 03 has to do with the "decimal points" in the 3-character display. Couldn't get that to work as predicted. YMMV.
The 38 38 38 sequence is simply the number eight in ASCII, represented as hex three times. That prints "888"; to the display. asciitable.com can be of some help there. You may have to reverse the order of the letters to make it read correctly on the display.
Processing SysEx
As far as processing the raw sysex data from the controls in Max/MSP, my "winning" functions have been a chain that's basically a "sysexin" to a "zl group 9"; to a "match" to a "unpack". That gives me access to the values - and then I do some math and the values that wind up feeding a "sxformat to a midiout" to do visual feedback and a "noteout" to make a sound.
sysexin = from PadKontrol Port A
noteout = anything that makes a sound.
midiout = PadKontrol CTRL
Understanding the PDF…
When they say "(NOTE 4)" they mean "See Table 4 at the end of the document."
When you see "0nnn nnnn (nn)" - you need to create a Hex byte from a binary pattern. In this case (and usually, in general) a 7bit pattern.
In the Tables, B7..B0 means binary digits converted to hex for that section.
What Else?
There's a ton of SysEx functions in the PDF, but most of them just enable the library software that's included with the PadKontrol - things like uploading and downloading the scenes, changing paramaters, etc. Not all that useful for Native Mode.
I hope this helps someone!
- Fat Elvis |
|
Back to top |
|
|
Daz Retired
Joined: 01 Jan 2002 Posts: 10829
|
Posted: Thu Feb 15, 2007 9:09 pm Post subject: |
|
|
Thanks ... very interesting indeed
I haven't checked out these abilities of the pK yet, so definitely useful here.
Daz. |
|
Back to top |
|
|
Fat Elvis
Joined: 12 Feb 2007 Posts: 2
|
Posted: Mon Feb 19, 2007 7:52 pm Post subject: |
|
|
One thing I didn't realize - and it's something I overlooked...
The PadKontrol DOES send many regular MIDI Note and CC messages in Native Mode - they're just on Port B instead of Port A. You get MIDI for the touchpad and the pads - but not for the two knobs, as far as I can see. None of the other buttons send data.
This is at least useful for a few tricks - as you get SysEx and CC/Note values on two different channels - Port B could go to Ableton Live, Port A could go to Max/MSP to do the button effects. |
|
Back to top |
|
|
cera
Joined: 25 Feb 2007 Posts: 1
|
Posted: Sun Feb 25, 2007 1:38 pm Post subject: |
|
|
FatElvis, i really owe you something. based on your explanations, i managed to click a simple patch in max. you could download it at http://kpkproject.twoday.net/. would be cool if you'd give me feedback on that - i am sure there are more elegant ways to do it.
i know a commercial hack for the KPK should be released soon. but i want to be able to customize the PKP for my setup and still have insight on what's going on. trying it by myself is a good max tutorial. |
|
Back to top |
|
|
Vadim Platinum Member
Joined: 20 Nov 2006 Posts: 625
|
Posted: Fri Mar 09, 2007 1:00 am Post subject: |
|
|
but how can i put it into nativemode? |
|
Back to top |
|
|
microxuser
Joined: 17 Nov 2006 Posts: 19
|
Posted: Mon Apr 16, 2007 7:40 pm Post subject: |
|
|
This is exactly what I was looking for, a way to do monome type stuff on the padkontrol. I am getting a PK soon if this stuff does work.
Are there any latency issues, etc. with doing this stuff or is it as good as it sounds? |
|
Back to top |
|
|
Soup Sounds
Joined: 05 Aug 2007 Posts: 3
|
Posted: Sun Aug 05, 2007 6:38 pm Post subject: Help no lights! - What am I doing wrong ? |
|
|
Hi – I would be very very grateful if anyone could help. I have been struggling to get my head around the Padkontrol active mode – Once I get just an indication that something is happening I think I’ll be OK to sus programming a meaningful dialogue with it. But so far – doodly squit – Not one light on and off to indicate something might be happening. I am hoping to use Bome translator to communicate it as I already use Bome to extensively control the functionality of Abelton Live.
I have followed the suggestion and used “MIDI-OX” to send the sysex to the Padkontol to test it out – I have also used Bome to do this.
I have Midi out set to “Padkontrol cntl” and Midi in set to “port A”.
I have sent all the sysex strings described in Fat Elvis’s post – But not a flicker of a light to indicate I was on to something.
1. I wondered if perhaps there should be some handshaking process going on to communicate – But I figure that wouldn’t be possible anyway with MIDI-OX ?
2. Is there something I need to do to the Korg to initialise it ?
If anyone can help with this I would be happy to share all my Bome programming (comprehensive looping interface for Abelton) – I realise that it would really enhance my live improvisation with Beat-repeat to be able to see at a glance what’s going on – Rather than try and remember what I have and haven’t pressed.
I have even shared the information about Native Mode with the UK Korg Technical support – who didn’t seem to be award of it.
All the best
Richard (www.soupsounds.com / www.myspace.com/soupsounds) |
|
Back to top |
|
|
Dave604
Joined: 28 Sep 2007 Posts: 21
|
Posted: Thu Jan 17, 2008 3:11 pm Post subject: Step Sequencer for the padKONTROL! |
|
|
Hi all!
Here is my patch for the padKONTROL. It`s made with Max/MSP. I`ve made a rewire sync before but because of some strange behavior of rewire i decided to remove it (when playing a loop inside a sequencer rewire sends also the first position after the end of loop together with the first position of the beginning of the loop) until i figure out how to make it flawless. Enjoy! feedback: djooker {at] gmail [dot} com |
|
Back to top |
|
|
MusicIsMath
Joined: 17 Jan 2008 Posts: 4
|
Posted: Thu Jan 17, 2008 10:07 pm Post subject: |
|
|
I have recently purchased a PK but am lost with how to make use of it....silly i know!!
I was looking at the option of using it's native mode as a step sequencer with each scene and buttons corresponding with each sample.
Will the above patch enable this kinda functionality? |
|
Back to top |
|
|
MusicIsMath
Joined: 17 Jan 2008 Posts: 4
|
Posted: Thu Jan 17, 2008 10:08 pm Post subject: |
|
|
Just had a look and realised its for mac >.< is there one available for pc? |
|
Back to top |
|
|
Dave604
Joined: 28 Sep 2007 Posts: 21
|
Posted: Fri Jan 18, 2008 3:30 pm Post subject: |
|
|
MusicIsMath wrote: | Just had a look and realised its for mac >.< is there one available for pc? |
I am sorry will do the pc version too in about a week...keep in touch
regards
dave |
|
Back to top |
|
|
Dave604
Joined: 28 Sep 2007 Posts: 21
|
Posted: Sun Jan 20, 2008 2:11 pm Post subject: pc and mac ppc version here |
|
|
if you go now to http://debreczeni.info/ and download the zip now will get the pc and mac ppc version too |
|
Back to top |
|
|
Dave604
Joined: 28 Sep 2007 Posts: 21
|
|
Back to top |
|
|
powers
Joined: 25 Feb 2008 Posts: 30 Location: Dallas,TX
|
Posted: Wed May 14, 2008 1:54 pm Post subject: |
|
|
Bumping because original pdf isn't valid. I can assume this is the thread for pK light show inquiries. |
|
Back to top |
|
|
Dave604
Joined: 28 Sep 2007 Posts: 21
|
|
Back to top |
|
|
|