Help needed with setting up midi controller
I'm using a korg nanokontrol2 and want to have each of the 8 faders control a different slider object. This sounds simple but I can't find anything in the tutorials or forums which tells me how to do it. I've spent a lot of time fiddling around with ctrlin, ctrlout and so on but can only manage to get all faders to control one slider instead of having different faders on different channels. I know this will be simple to do but I'm stuck and any help would be much appreciated.
Set up one ctlin object with second outlet wired to a number box - to set the correct port, Double click on the ctlin while patch is locked and select from the drop down menu - in your case it will be something along the lines of 'nanoKONTROL2'. This ctlin will then display the controller number sent by any of the nanokontrol faders when they are moved. Each fader will output a different controller number and you will need to 'hardwire' a new ctlin object for each fader/control source you require (there are other ways but not now…). I've attached an example, which in this case is set up for a nanoPAD2: To avoid having to set the port when reopening the patch, the port argument to the ctlin object can be added as in the example, and should be set exactly as it appears in the drop down menu surrounded by quotes if there are any spaces in the name. You'll have to change that argument in the example to match the port for the Nanokontrol. Good luck…
Thanks. Unfortunately that's not working. I select the nanoKOntrol2 but thee's no movement at all in the boxes. The korg is recognised in midi set up.
I can get the buttons recognised (from 16 upwards) but not the faders. With the button the slider only moves from 0 to 65 to 124 with no values in-between. I would use the buttons if I had to but I can't find a way of getting a smooth slide between values.Also it's all back-to-front. - a clockwise turn of the buttons reduces the values instead of increasing.
Just stabbing in the dark here: Can you select different presets on the nanokontrol2 that change what messages it sends? (I'm thinking that maybe it's set to transmit NRPNs or sys-ex or something.)
To find out exactly what messages it's sending, open a new patch and create 2 objects":
midiin "nanoPAD2 PAD"
midiparse
Again, use the proper name of the nanokontrol2 instead of "nanoPAD2 PAD". Cable the one outlet of [midiin] to the one inlet of [midiparse] then check out what's coming out of [midiparse]. Some outlets will have 2-integer lists; one way to see them properly is by plugging a cable into the right inlet of a message box.
HI and thanks for this. I've set up the patch as you described. From output 1 (note on/note off) of midiparse I'm getting pairs of integers: 24 0, 25 0 etc. for each of the eight faders. From output 3 (control change ) I get pairs of integers - first integer in the range 16-23, second integer in the range 0 - 127 which respond to the knobs on the nanokontrol. From the last output I get midi channels 1 - 8 for each of the faders. Pressing other buttons on the controller plays notes from the laptop's internal synth.
Still not sure how best to make the faders control a slider. With a DAW like Reaper for example you just hook up the controller and it straightaway controls faders 1-8.
"From output 3 (control change ) I get pairs of integers – first integer in the range 16-23, second integer in the range 0 – 127"
Which suggests that if you have a [ctlin 16] set to the correct inport, then the left outlet of that object will be the 1st fader control value (0-127). Ctlin 17 for fader 2 and so forth...
Thanks again but still no result. All faders are controlling the slider instead of just one. I have [ctlin 16] going into a [midiin "nanoKONTROL2 1 CTRL"] - this is the output in midi setup - going into the slider.
James, you need to separate the different controllers from the nanoKONTROL2. One way is to use a separate [ctlin] object for each controller, but each of these [ctlin]s needs to output only one controller, not all of them. To do this, just use the appropriate arguments, like so…
For controller 16 (fader 1 on the nanoKONTROL2? Check it with the [midiin] and [midiparse] objects if necessary) use [ctlin nanoKONTROL2 16]
For controller 17 (fader 2?) use [ctlin nanoKONTROL2 17]
For controller 18 (fader 3?) use [ctlin nanoKONTROL2 18], etc.
(Spectro already said this, but it seems you didn't quite get it yet.)
That's assuming the Korg comes up as nanoKONTROL2 in the list that appears when you double-click a [midiin] or [ctlin] object. If it actually comes up as "nanoKONTROL2 1 CTRL", use that instead.
You can also separate controllers by MIDI channel by adding another argument, e.g. [ctlin nanoKONTROL2 16 1] = controller 16 on MIDI channel 1.
Once you get it working I'm sure it'll all make sense to you.
Cheers, Bill
Use midi parse into a route object to pass certain cc numbers. No need for all these separate ctlin objects
Thanks again. No matter what I do or which arguments I pass to the objects I can't get separate control of each fader. All faders still move all sliders. If anyone can post a simple patch that would be helpful.
I can do what you've suggested with the buttons - they check out as 16 - 23. I'm getting no readout for the faders.
I don't have a nanokontrol, so I don't know what CCs the sliders are putting out, so I can't make a patch for you.
What the hell does readout mean? Readout of what? Coming from what? Post a patch plz
Are you getting values out of the third outlet of midiparse?
Those are your CC numbers and its value.
Use a route object, it's arguments being the CC numbers that are coming out of midiparse.
You will then get values for each CC number that you can pass on to whatever you want.
As Evan pointed out, there are other ways to do this. But still, something's going wrong.
In another thread Jean-Francois Charles wisely suggested using the "MIDI Tester" from Max's Extras menu to find out exactly what MIDI messages your device is sending. Could you do that then tell us (1) the precise name that appears for the nanoKONTROL2 in the input devices list, and (2) the controller number and channel of each of the 8 faders that you're trying to use?
Here's my patch or at least bits of it because I haven't got a clue what's going on despite hours of trying to find out. At the moment I can get midiparse to read out numbers 24 - 31 for the faders from the left outlet and 16 - 23 for the knobs from outlet 3. And midi channels on the far right. I can also move the slider with every fader. What I want to be able to do is simply have one unique fader move the slider so I can set up further sliders for different faders.
On the miditester the precise name is: nanoKONTROL2 1 SLIDER/KNOB
controller number and channel for each fader: The faders aren't registering any control number data (but the knobs are - from 16 - 23). The faders are showing pitch data (C - G), velocity (24 - 31) and channel numbers 1 - 8
Doesn't seem to be right.
One other thing - according to the Korg Kontrol editor app the #CC for the faders is 0 - 7
Ot sounds like you need to configure your device to send cc data instead of note data
I agree with Evan. So back to my first suggestion: "Can you select different presets on the nanokontrol2 that change what messages it sends?"
Check that out first. If you can find a nanoKONTROL2 preset that makes it send nice orderly MIDI messages (rather than a mess that happens to suit a particular receiving device) you'll have an easier time in Max.
Or adjust all the messages yourself to something neat. Use Max's MIDI Tester to check it all. Gotta go. Good luck!
ok thanks everyone for your help
From the nanoKONTROL2 manual:
"The nanoKONTROL2 features two operation modes: DAW mode, in
which each controller is set up for a specific DAW controller; and CC
mode, in which Control Change messages are assigned to the unit's
controllers. To engage the desired mode, turn on the unit while
pressing and holding down the button that corresponds to that mode."
Sounds to me like you should be in CC mode. Are you?
From the korg editor it would seem so but I'll have to check the manual. Thanks again
If you haven’t ever used the Korg Kontrol Editor (so the MIDI values are still the factory defaults), this visualisation extra for the nanoKontrol2 might come in handy: https://github.com/delucis/nanoKontrolViz
Aha - very useful thanks
Hi! If this helps still anyone :) if you press those Track and Cycle buttons at the same time while plugging, it resets the values and the values 0-127 will flow smoothly from you knobs slider and buttons to your Maxmsp. Hope it works for you!
