Jump to content


Photo

Renoise does not like my Launchpad MK2...

Novation Launchpad Duplex Stepp0r

  • Please log in to reply
26 replies to this topic

#1 MSXUser

MSXUser

    Member

  • Normal Members
  • PipPip
  • 37 posts
  • Gender:Male
  • Location:Netherlands

Posted 12 October 2015 - 20:19

Bought a Novation Launchpad MK2 recently for use with tools eg. Duplex. Installation of the hardware went flawlessly (Windows 7, x64) and Renoise (3.0.1) can see the midi i/o.
In Duplex I can see the overview of the Launchpad, but it looks like the buttons on the LP do not correspond to the ones in Duplex. The top row (with session, user, mixer) seems to be ok, but the rest is all over the place and the tool often crashes when pressing certain pads. Also the button colours are way off.
Next I tried Stepp0r, but got the same issues. Thinking I might have bought a faulty unit, I installed Ableton and from there it works. Maybe the differences between the Mk2 and S/ Pro versions are bigger than expected?
Is there anyone who can confirm this odd behaviour and knows how to make it work correctly?
 
 
Forgot to mention: When I select the Launchpad as a 'master keyboard' in preferences I can play scales (B0 to F7).


#2 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 12 October 2015 - 21:44

In Duplex I can see the overview of the Launchpad, but it looks like the buttons on the LP do not correspond to the ones in Duplex. The top row (with session, user, mixer) seems to be ok, but the rest is all over the place and the tool often crashes when pressing certain pads. Also the button colours are way off.

 

Hmm, since MKII support RGB (original only does red and green), it's definitely not supported by Duplex - the MKII will require a new 'driver'. 

The trick is that Duplex needs to know how to tell the Launchpad how to light up it's buttons. From that point on, everything should just work. 

 

But probably shouldn't be too hard if we collaborate a bit back and forth. And Novation is usually good at documenting their products. 

 

... Are you willing to spend a bit of time testing this? 


Tracking with Stuff. API wishlist | Soundcloud


#3 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 13 October 2015 - 01:03

Hmm, since MKII support RGB (original only does red and green), it's definitely not supported by Duplex - the MKII will require a new 'driver'. 

The trick is that Duplex needs to know how to tell the Launchpad how to light up it's buttons. From that point on, everything should just work. 

 

But probably shouldn't be too hard if we collaborate a bit back and forth. And Novation is usually good at documenting their products. 

 

... Are you willing to spend a bit of time testing this?

the mk2 and mk1 launchpads have different Midi layouts.  thats why the buttons on the duplex do not correspond to the buttons on the LP.



#4 MSXUser

MSXUser

    Member

  • Normal Members
  • PipPip
  • 37 posts
  • Gender:Male
  • Location:Netherlands

Posted 13 October 2015 - 16:57

@danoise: Absolutely no problem to do some testing. :)



#5 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 24 May 2016 - 03:47

@danoise: has there been any news on this? I would love to help with testing

#6 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 24 May 2016 - 10:25

No, so far nothing has been done to support the LP MKII.

 

But if you could manage to describe the device in terms of a control-map file, that would be really useful

(a control-map is a layout of the messages that the device can send)

 

For reference, you can check out the control-map for the classic Launchpad:

https://raw.githubus.../Launchpad.xml 

 

Having a description of the LPMKII should make Duplex applications able to run on the device, even if the colors are a bit wrong.

 

Take a copy of the whole /controllers/Launchpad folder to begin and use it as a starting point? 

Perhaps getting rid of all device configuration but one - you can use them as starting points but they all need a unique name (as defined inside the file)

More tips on editing Duplex files here: http://forum.renoise...g-duplex-files/

 

Later, I could create a basic driver for the controller - to support the RBG LEDs. Next week or so. 


Tracking with Stuff. API wishlist | Soundcloud


#7 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 24 May 2016 - 12:36

When you say "driver" is that just the function Launchpad:output_value inside Launchpad.lua? If so I may see if I can get the colors working properly based on what I know about their RGB values. I looked at the xml files and they seem pretty self explanatory too.

I had actually started writing an entire script for the launchpad last weekend but just realized yesterday that duplex already had all of the functionality I wanted, so I will try and get it working through that framework.

#8 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 24 May 2016 - 13:36

Cool, I'd be happy to assist  :)

 

And yes, it's basically a modified version of Launchpad.lua that is required, along with an updated control-map. 

So start by copying the entire Launchpad folder over and you'd have yourself a good starting point. 


Tracking with Stuff. API wishlist | Soundcloud


#9 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 26 May 2016 - 00:25

ok Danoise, maybe you can help me out with this one. Is there a way to change the rslt of function LaunchpadMK2:output_value() to a sysex message instead of a standard midi message? Novation allows individual setting of the RGB values through sysex and I think it would be an easy and more dynamic way of setting the color than trying to parse an 3 number RGB array to a 0-127 decimal.

#10 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 26 May 2016 - 09:09

I think it would be an easy and more dynamic way of setting the color than trying to parse an 3 number RGB array to a 0-127 decimal

 
I respectfully disagree. the color is already an array, so you'll end up parsing it somehow, anyway.  

 

But of course, since you are writing that driver you can do it in whichever way possible -

The Launchpad is based on MidiDevice, which in turn is based on the more generic Device class.
Here's what the documentation has to say about output_value():

--- Convert values into a something that the display & device can understand. 
--
-- Each type of value (number, boolean or text) is handled by a specific 
-- submethod: @{output_number}, @{output_boolean}, @{output_text}
-- 
-- Numbers are generally used for dials and faders, booleans are 
-- used for objects with an on/off state (buttons), and text is used for 
-- things like labels and segmented displays 
--
-- Depending on the device, you might want to override these submethods with 
-- your own implementation. For example, the Launchpad has its own method for 
-- converting a value into a color. You can also implement your own code for 
-- direct communication with the device by overriding these methods - 
-- in such a case, adding an additional boolean return value ("skip_hardware") 
-- will update the virtual display, but skip the hardware part

 
So yes, you can send raw sysex using send_sysex_message(), and then "skip hardware" as explained above

 

Edit. btw: you also want to change the colorspace property, for the Launchpad classic it looks like this

-- this device has a color-space with 4 degrees of red and green
self.colorspace = {4, 4, 0}

Which means, blue is ignored. You probably want to specify {4,4,4} as the new value. 

Only once you have set this value can you start modding the device configurations to specify blue colors for the various applications. 


Edited by danoise, 05 May 2017 - 00:50.

Tracking with Stuff. API wishlist | Soundcloud


#11 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 26 May 2016 - 11:59

Thanks for the detailed explanation. The "skip hardware" but was what I was missing.

I'm going to have to think about this. I wrote a method last night after I posted this that takes in the pt.color array and finds the closest value in a table of hex color values that correspond to the launchpad colors. Then it outputs the decimal corresponding to that color. It works just fine, I guess it just feels clunky. Is there a performance drawback to using sysex instead the 0-127 value?

I'll post my code tonight, maybe I'll think of a better way to do it during the day.

#12 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 27 May 2016 - 04:06

So for anyone interested, here is the github for the Launchpad MK2. The only map that is done is the MixerMatrix. I got all of the LEDs and buttons working properly. I will be doing the rest of the maps and fine tuning next week.

@danoise I ended up sticking with the 0-127 values for the colors. I have the sysex code in there, and it works, but the colors just didn't turn out like I thought they would, they were a little lighter than the colors on the screen. I think the launchpad LEDs driver may interoperate the colors a little different than my monitor. So i'm going to just use the 0-127 method and fine tune it next week. Thanks for the help.

https://github.com/d...x-Launchpad-MK2
  • danoise and stellartux like this

#13 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 27 May 2016 - 08:37

Hopefully not too much work to adopt all those controlmaps. This one thing where I thought of coding a visual editor.

In any case, regarding those colors: yes you will never see a complete consistency between onscreen and device colors. Just think of how the minimal brightness for the Launchpad is dark, almost black, on screen but of course, can't look that way on the actual device :-)

LEDs often have very different strengths too, for example my Launchpad has quite weak green shades and strong yellows. For this reason, I picked colors that looked good on the device, not the screen :-)

Tracking with Stuff. API wishlist | Soundcloud


#14 dplduffy

dplduffy

    Member

  • Normal Members
  • PipPip
  • 13 posts
  • Gender:Male

Posted 27 May 2016 - 13:34

It shouldn't be too hard now that I know what I'm doing.

Also, I found a function MidiDevice:extract_midi_note() in the duplex code, but it doesn't seem to be in the framework documentation. I just wanted to let you know about that.

#15 stellartux

stellartux

    New Member

  • Normal Members
  • Pip
  • 3 posts
  • Gender:Male

Posted 05 June 2016 - 22:22

I made a different implementation of LaunchpadMK2:output_value()

https://github.com/a...x-Launchpad-MK2

 

You'd mapped your colorspace to {1,1,1} but there are {64,64,64} available colors. Most of these can only be called through sysex messages, there are colors that can be called via MIDI messages, but Novation just picked 128 colors and put them in a mostly random order to maintain easy compatibility with Live, but mapping RGB to their weird made up colorspace is too much of a pain to be worthwhile. 

 

I was wondering if someone could help me with a less hackish way of implementing the thing I've kind of got working in LaunchpadMK2:output() with rainbow_mode using the Keyboard application. Right now, output_value() passes out the expected color, but when rainbow_mode is on and the user presses a button on the LargeGrid I replace it with a color of my own. I've mapped the circle of fifths to the colorwheel, so when chords are played in IsomorphicLayout on the Launchpad, consonant chords have similar colors and dissonant chords clash. The way I've coded this means the colors are laid out in IsomorphicLayout even when the grid isn't. I was hoping someone could help me create a more generalised version of the code. I think it'd be quite easy if I could figure out how to get the pitch that is being sent to the sound engine after it has been quantized to the scale, rather that the pitch of the midi message received from the Launchpad. If not, if it were possible to work out through code which layout has been selected, I could write a color picker for each layout, but this seems a bit inelegant and would mean more effort each time a new layout is added. In any case, I prefer the IsomorphicLayout, so I've got most of the functionality I wanted now, but if it could be improved that'd be even better. 



#16 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 06 June 2016 - 12:01

I made a different implementation of LaunchpadMK2:output_value()
https://github.com/a...x-Launchpad-MK2
 
You'd mapped your colorspace to {1,1,1} but there are {64,64,64} available colors. Most of these can only be called through sysex messages, there are colors that can be called via MIDI messages, but Novation just picked 128 colors and put them in a mostly random order to maintain easy compatibility with Live, but mapping RGB to their weird made up colorspace is too much of a pain to be worthwhile.

I like your --> magic number dance  :) 
A shame if the full range of colors is not in formatted in a sensible way... then I better understand dplduffy's approach. 
 

when rainbow_mode is on and the user presses a button on the LargeGrid I replace it with a color of my own. I've mapped the circle of fifths to the colorwheel, so when chords are played in IsomorphicLayout on the Launchpad, consonant chords have similar colors and dissonant chords clash

 

Wow, really? I'm happy to see such a great improvement in the keyboard. I think I can help, too: 

 

 I think it'd be quite easy if I could figure out how to get the pitch that is being sent to the sound engine after it has been quantized to the scale, rather that the pitch of the midi message received from the Launchpad.

 

 

My xLib project has a class called xScale

-- restrict a note to a specific scale and key
function xScale.restrict_to_scale(note_value,scale_idx_or_name,scale_key)
Simply require the class in your tool and you should be good to go (it does not have any dependencies)..

Tracking with Stuff. API wishlist | Soundcloud


#17 stellartux

stellartux

    New Member

  • Normal Members
  • Pip
  • 3 posts
  • Gender:Male

Posted 07 June 2016 - 08:27

I got it to work, now rainbow_mode works in every layout. I ended up casting the button text as a number and working out the color from there. I also added three different color palettes, a bright one and two more pastel shaded ones. I'll probably tweak it a bit more, but for now I'm quite happy with it. I've updated the code on github for anyone who wants to try it, I'll make a video at some point today to show the colors.



#18 MSXUser

MSXUser

    Member

  • Normal Members
  • PipPip
  • 37 posts
  • Gender:Male
  • Location:Netherlands

Posted 01 August 2016 - 20:51

Well, that was quite a surprise noticing you guys got this thing to work. Great job!

 

Although I am not familiar with LUA scripting, I just downloaded the files from Github and added them to the Duplex Controllers folder. The MK2 shows up in the browser, but I get an error that class LaunchpadMK2 is 'unknown' (although it is there in the 'root' folder of the device). Most likely I forgot something, but I have absolutely no idea what it can be. Both Renoise and Duplex are updated to the latest version (Renoise 3.1 and Duplex v1). 



#19 MSXUser

MSXUser

    Member

  • Normal Members
  • PipPip
  • 37 posts
  • Gender:Male
  • Location:Netherlands

Posted 03 August 2016 - 19:21

Got it working now. My mistake was a wrong name for the folder (named it Launchpad-MK2 instead of LaunchpadMK2).  :mellow:

 

Once again, thanks guys for getting this thing to work!


  • danoise likes this

#20 gmohre

gmohre

    New Member

  • Normal Members
  • Pip
  • 2 posts

Posted 15 September 2016 - 22:58

I just picked one of these up used and cheap. I'm noticing only the first Matrix+Nav+transport works. Did the other mappings get finished or should I dive in?



#21 Mister Sombrero

Mister Sombrero

    Advanced Member

  • Normal Members
  • PipPipPip
  • 99 posts

Posted 07 October 2016 - 22:08

Can you assign samples to each of the pads and use it as a giant drumpad controller instead of as a clip launcher?

 

64 velocity sensitive pads each with their own samples assigned could be interesting...that is if they are sensitive enough to be played that way.

 

I know its primarily intended as a clip launcher...



#22 Meef Chaloin

Meef Chaloin

    Big GrandDaddy Member

  • Normal Members
  • PipPipPipPipPipPipPipPip
  • 478 posts
  • Gender:Male

Posted 24 September 2017 - 15:02

I made a different implementation of LaunchpadMK2:output_value()

https://github.com/a...x-Launchpad-MK2

 

You'd mapped your colorspace to {1,1,1} but there are {64,64,64} available colors. Most of these can only be called through sysex messages, there are colors that can be called via MIDI messages, but Novation just picked 128 colors and put them in a mostly random order to maintain easy compatibility with Live, but mapping RGB to their weird made up colorspace is too much of a pain to be worthwhile. 

 

I was wondering if someone could help me with a less hackish way of implementing the thing I've kind of got working in LaunchpadMK2:output() with rainbow_mode using the Keyboard application. Right now, output_value() passes out the expected color, but when rainbow_mode is on and the user presses a button on the LargeGrid I replace it with a color of my own. I've mapped the circle of fifths to the colorwheel, so when chords are played in IsomorphicLayout on the Launchpad, consonant chords have similar colors and dissonant chords clash. The way I've coded this means the colors are laid out in IsomorphicLayout even when the grid isn't. I was hoping someone could help me create a more generalised version of the code. I think it'd be quite easy if I could figure out how to get the pitch that is being sent to the sound engine after it has been quantized to the scale, rather that the pitch of the midi message received from the Launchpad. If not, if it were possible to work out through code which layout has been selected, I could write a color picker for each layout, but this seems a bit inelegant and would mean more effort each time a new layout is added. In any case, I prefer the IsomorphicLayout, so I've got most of the functionality I wanted now, but if it could be improved that'd be even better. 

 

I'm just trying your script out, works really well so thank you very much. I am curious about the top half of pads when playing, what are the two coloured blocks representing? 



#23 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 24 September 2017 - 15:15

@Meef Chaloin: Right, I forgot that Duplex actually had support through this. Relevant to this topic, I guess: 

http://forum.renoise...-launchpad-mk2/

 

But question is, is it good enough? Because, then I'm going to include it in future versions. You tell me :D

 

I'm just trying your script out, works really well so thank you very much. I am curious about the top half of pads when playing, what are the two coloured blocks representing? 

 

Mmmm...are you running Duplex (Keyboard)? 

https://github.com/r...ons/Keyboard.md

 

There are many things you can do with a Launchpad. In this case, it's a split keyboard layout (lower part and two smaller upper parts). Each one can be configured via options. 

And you can always create your own layouts by modifying the configuration files... 


Tracking with Stuff. API wishlist | Soundcloud


#24 Meef Chaloin

Meef Chaloin

    Big GrandDaddy Member

  • Normal Members
  • PipPipPipPipPipPipPipPip
  • 478 posts
  • Gender:Male

Posted 24 September 2017 - 15:35

It seems good enough to me so far but I have only started playing with it and I don't know what other things it could potentially do. It's certainly better than nothing! I thought I encountered a couple of bugs in it but I will need to play with it a bit more to check those. 

 

I'll have a look at the options regarding the upper and lower keyboard layout, I couldn't make sense of the upper part with the default settings. 

 

A couple of things about general duplex: 

With this script every time I changed from one script/mode to another the midi I/O was set to none, is that normal? 

Also, Is it supposed to be used by using the mouse to change script/mode? It would be great if there was somehow a way to change it from the controller itself but perhaps this would use up too many buttons? 


Edited by Meef Chaloin, 24 September 2017 - 15:39.


#25 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6458 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 24 September 2017 - 17:14

With this script every time I changed from one script/mode to another the midi I/O was set to none, is that normal? 

 

The tool saves the I/O for each configuration. So you might have to adjust them - but just once, then you're good to go. 

 

Also, yes, there are some mouse-free way to switch between applications. 

 

1. The application called SwitchConfiguration allow you to select "next", "previous" configuration

https://github.com/r...onfiguration.md

SwitchConfig is suitable when you need to switch absolutely *everything*. But you will need to create unique configurations that make use of it. 

For example, here are the Ohm64 configurations. Each one comes as a "switchified" and regular version: 

https://github.com/r.../Configurations

 

2. A control-map feature called States, which can switch or toggle things on your controller. A bit like pressing SHIFT or CAPS LOCK on the keyboard. 

https://github.com/r...-are-not-enough

States is a newer, more flexible way to do things. You can check out the LP keyboard configuration - it uses the feature to toggle the two upper grid on/off:

https://github.com/r...ad_Keyboard.xml


  • Meef Chaloin likes this

Tracking with Stuff. API wishlist | Soundcloud






Also tagged with one or more of these keywords: Novation, Launchpad, Duplex, Stepp0r