Patch Launch Control Led with logic counter


#1

Hello,

I did this patch, to use each pad of the launch controle of novation with an logic counter and different led color for each tree positions.
I was working empirical, so i guess there is miskate, or we can improve it.

The led color, is set with the value.

The speed of the blinking led is set with lfo, i did that because i will use it to know the speed of osc or lfo in my patch. But the true is : i didn't find the right way to keep it alway one. :sunny:

Anyway, with this patch you have the number and the value of each note, to use the pad launch controle, with the original set up.

Edit this patch " ring buffer overflow the midi send", you should change "usb host port 1" to "usb host port 2 "

axoloti-lauchcontrole-led.axp (22.7 KB)

You can find more information about midi and led for lauch pad control there :
https://global.novationmusic.com/sites/default/files/novation/downloads/6958/launch-control-programmers-reference-guide.pdf

Cheers,


#2

Awesome man. Just bought a launch controller a while ago and I was wondering how to set those LEDs up.

Look forward to test it when I am home in the afternoon.

Allthough I think it is a lot of objects used for such a small task. Like the Modular thing controller patch I have made, it also uses alot of object for a fairly simple task; controlling something. I guess some custom objects would scale it down a bit. Will see it it is possible to do something about it.

Great work :wink:


#3

thank, ! but i test it with my all patch (lfo, vcf) with midi CC for control, et axoloti core is disconnecting, because the midi buffer send to much information.

So, the blinking led with the lfo isn't a good idea. There is to much midi information. work in progress !

Looking forward,


#4

ah ok. I think I read another thread a while ago that another user had also attempted this with succes. Try do a search for it, if you havent all ready.


#5

See this thread for info i talked about:


#6

Thank!

Still in progress,... The midi is over flow after more than 5 led blinking


#7

you are sending messages faster than can be processed...

this can happen in two scenarios:
a) your hardware device is not processing the messages (or too slowly)
b) you are trying to send too many messages in one go (k-rate cycle)

I found with the push, that when I made coding errors (a) was the most likely ... e.g. sending on the wrong usb port, or for some reason the push not being connected properly
... I suspect this is the case, as the ring buffer is pretty 'large' certainly more than 5 midi messages... so id guess, there is a build up of messages caused by something else.

on the push, I also was careful to not send too many messages in one k-rate cycle instead spreading the updates over a few.

I suspect what you are doing with the launch control is very similar to what I did with the Push, (see my community library objets) , so it might be worth you reviewing my code to see the things Ive done.... you may even be able to use some of it (e.g. to get scales support)

tech note:
patches send the messages in the normal 'audio thread', obviously we cannot block this with IO, so message are place in a ring buffer, than is then process by a separate midi IO thread.
this error occurs, when you are producing messages faster than the IO thread can consume them.
as I mentioned above, if you produce a huge number of messages quickly its possible to overflow, in practice, I found this uncommon, unless my code had gone a bit 'awry' , or a more general issue with usb output.


#8

many thank for you anwser ! i checked your midi objet for the push but i didn't figure out, how use it.

If i'm right, i should do some think to limite the number midi message. it is correct ?
It is how, (k-rate cycle) should be use ? I did'nt understand what it is. sorry.


#9

ok, the control lines (blue) are updating objects at 'control rate' which is 3000/sec

I think probably the cause of your issue is you are continually sending midi notes out, to update the pad , at a rate derived by your LFOs. this is completely unnecessary... and a waste of CPU too.
remove the LFO's and instead place a change from the mux output to the trig
e.g.
mux -> change ->note/trig

this will mean a midi message will only be sent when the colour actually changes, rather than continually updating.

generally, its important for any computing platform, but especially when using micro-controllers, that you minimise I/O as this is very 'expensive'. so if your doing midi output or gpio output , carefully triggering objects when needed is important.
(change speedlim can sometimes be used to throttle changes too, though in this case i dont think it necessary)

as a coding tip, Id also point out, you could also do what your doing with many fewer objects, all those repeated dials, lfo (unnecessary now) , midi/out/note,counters all take up valuable space, and could be replaced generally with a single one.
this is not an issue in this case, as the patch doesn't do much, but if you start incorporating with other functionality (e.g. doing FX/Synth) then it will limit that functionality.