Control LUMI with block API

Hi, does anyone know if I can control LUMI with BLOCKS API? What I want to do is to set key colors in realtime (eg, illuminating notes triggered by a sequencer) and configure other settings like polyphonic aftertouch/mpe mode, sensitivity, etc. Essentially, to do what you can do with the Dashboard app…
Thanks!

I’m also interested in doing this, afaik Roli has not exposed much/any of LUMI to the BLOCKS API. Maybe we can build some momentum to making it a feature request…

JUCE is no longer owned by ROLI, and LUMI support will not be made available in JUCE. Additionally, the juce_blocks_basics module will be removed in a future release. Equivalent functionality is available from a separate repository which is owned and managed by ROLI.

1 Like

Thanks Reuben, I guess the JUCE forums is not the best place to discuss making a collective feature request to Roli, but I am not sure where else we would do it (have been trying on The Audio Programmer discord as well…)

During the kickstarter one of the stretch goals was allowing control of the key lights, and what we got was a static global control from the desktop application. I think a lot of devs who supported the kickstarter were expecting the BLOCKS API to be expanded to include Lumi but this hasn’t happened yet. Hopefully we will find a way to learn if it will come in the future or not. I bet people would do a lot of cool things with it (besides just learning to play the piano…)

Thanks for the answers. Searching for “lumi” in the Blocks API code repository there are some references and some code related to it which makes me think it might be possible to control LUMI. Also, I wonder if LUMI exposes a midi in port to which you can simply send MIDI messages to illuminate keys. This would be easy to try if I had a unit but I don’t have one. If I manage to have access to one unit and test I’ll report here.

Hi, Ali from ROLI here :wave:

Yes this is possible, and we do exactly that when you hook up a LUMI to Roli Studio Player. As Rebuen mentions the api is still available as a seperate JUCE module here: https://github.com/WeAreROLI/roli_blocks_basics.

We need to update some of the documentation, which we hope to do soon, but essentially the LUMI keys are a single row of pixels which you can draw on like you would a grid of pixels on the Lightpad Block

Thanks Ali, I’ll give it a shot!

I’ve just updated https://github.com/WeAreROLI/roli_blocks_basics to include the latest LUMI 1.3.x support. We hope to release an update to BLOCKS Code that will support LUMI. In the meantime you should be able to load any custom .littlefoot app on to a LUMI by dragging and dropping in Dashboard. This will save the app as the default but you can always revert back to the factory script by selecting the “Reset Block to factory settings” in Dashboard.

Hi, thanks for that, looking forward to receive my LUMI and start experimenting. When you say “release an update to BLOCKS Code” you mean the BLOCKS API? (so instead of using a littlefoot app we use the API directly?)

My use case is that I have sequencer app running on a raspberrypi, and I want to use LUMIs to input notes and to show the output of the sequencer (illuminate keys, etc). I already do that with a Push2, and it is very easy as I only need to send MIDI messages to set pad colours. I guess the recommended way to do this for the LUMI is with the BLOCKS api once updated? My sequencer app is a Python script, but I’d have no problem in building an intermediary JUCE app which connects to the LUMI and is controlled by the Python script using OSC. I’d also like to be able to switch LUMI between MPE/PolyAt/ChannelAT modes from my sequencer app.

Thanks,

The update to BLOCKS Code will allow for custom littlefoot apps to be loaded onto a LUMI. This is already possible using drag/drop with Dashboard but BLOCKS Code is geared towards littlefoot app development - among other things it will reload apps as you code and highlight any errors. I wasn’t referring to an extension of the SDK/API beyond a few additional functions for LUMI support. It should be possible to write a littlefoot app that responds to MIDI messages and sets key colours appropriately, see the handleMIDI() littlefoot function. You will have to disable the default lighting with setUseDefaultKeyHandler (true, false); for this to work. With a JUCE app in between you can also send a message see roli::Block::sendProgramEvent() on the host end and handleMessage() on the littlefoot end. Alternatively you can also set data on the shared heap between a host program and the Block.

Thanks for the reply @miketoon. I think the confusion came because I did not know what Blocks Code is. What I understand now is that to control LUMI I can simply write a littlefoot program which handles MIDI the way I want, compile it with Blocks Code and load the program to the LUMI. Then from my Python app I should be able to send MIDI messages to the LUMI without the need of a JUCE intermediary app.

This is nice, however I guess this means that the littlefoot program will overwrite LUMIs default functionality so I’ll have to re-implement MIDI sending and handling of polyAT/MPE in littlefoot? If I want to use LUMI as a MIDI controller which works like one of the standard modes (e.g., sends polyAT messages, with keys illuminated in piano mode but also illuminating keys when receiving certain MIDI notes) what would be the recommended way to go about it?

Thanks again!

You can use the default key/midi handling whilst having custom key lighting in a littlefoot script.
I just updated the docs in the repo:

So setting setUseDefaultKeyHandler (true, false); would mean that the default key handler would be used to process the touches and send the correct MIDI out but no keys would be lit up. You would have to set any config items active if you wanted to be able to adjust the settings in Dashboard.

The default program would be overwritten but you can restore the factory script by pressing all 3 of the top buttons at the same time.

That looks great. Thanks for your time and I’ll let you know how it goes once I got the LUMIs (hopefully in a couple of weeks or so).