Light up some LEDs with RNBO on the Raspberry Pi

Light up some LEDs with RNBO on the Raspberry Pi

You've just made your own desktop synthesizer with RNBO and the Raspberry Pi, you're ready to switch the lights off and jam out - but there's no visual feedback... If there's a bleep in a dark studio but there's no pulses of twinkling light - did it even happen?

⚙️
Before attempting this tutorial, make sure you're already familiar with the basics of exporting your RNBO patchers to the RPi and that your audio interface is working correctly with it.

Things you'll need:

  • 8x through-hole LEDs
  • 8x 220 ohm resistors*
  • 1x 12mm push button momentary switch (optional)
  • Breadboard
  • Hook up wires

*this is a general approximate resistor value for these current limiting resistors (without them, you can burn out your pins on your RPi or blow the LEDs) if you really want to be precise, this tool from digikey is really handy.


We'll start by exporting the following patcher to the Raspberry Pi target:​

RNBO Sequencer Patcher

<pre><code>

----------begin_max5_patcher----------

9902.3oc6ck0bbibj9YweEXauan4fhFUU3zQLQLiGIGq1vyQLZF+x3I5.cCP

RXCBzF.sD03v729VG.nwQgqtA5Cp7AQRgipxJyJyJqL+xB+6qdwhUQO5krP4

Oo7qJu3E+6qdwK3WhcgWj8+ewhGbdbcfSB+wVD58gnU+iEWKtUp2io7KGGsM

0SII0aS9s7c42f9vuBYmewvsO3GF3kxaK7tKRe65WciS5568CuaYr25TAEZZ

bi50JXcD6WFX9+g9SkeK6UDsR5G23Id9EKtl9Okeic2+yUWw9w0G1vbiRfma

9Uu2200KjccTywLwT5XFIcLq19XFg3iVroE6WD6FCZ963EmMVxFLuXws9Adu

2KNwOpLE9hENa1T5xunzqv3.+iHdCYccwk7CEWRu3Rwdu2O+8UKtpSLkxSoj

81XN2ewiFZK10LQtdwga84jh3hTYQFIw45gNO3krwYs3kYBm7aWR9qZxG9Zh

I.ZpreoYotiaPEq2EDs9e54Vl5VDswKzObSrWhWXpSZMhegq2sNaCRWdaTXZ

h+uyIADa5kj6eaFIJ8lrAAm9+lXemfhQvcw9tQgLhnhnfc47tiJn0YiF1O2M

X3OQnyFIuLcNFkuzxMSnCxsIqbhYRpUAdkzqnSlihBpdqh2K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fNgzWmPlfNA2Wmf2yNoppDy.Thy6KizwEIgNaRxPoVYM

KpYKuB04u0T6c4OWNcmA.qx5zL3OEEW5FEFK2AZirlo7wLyhnX+6DfihqsWf

XF4mJMKR1tp3F+B0txsTWaJPC2BuGVUEfqMFh6XxKWlTtDxK4xzxrLLU1iIY

Nac0KjYinTKUbjwodil7WyrmWSWW96o2y6ga48z1y9izy6YI+0v8QlsQmndd

Qj7WynmWyTV+sbo.RaYvShr1akIVi7JpiaFTmx8V8pUr+qipss8Jp+HqLLap

HWdpcioZq2FGSW2eY4Ii6Tfo2I1uJVkJ6hdeJisnO1kJYEsxsgo9TuHJCozx

JkChcTF9a4jJSat7MJq4V95MzYkp1VC2Y0TdqAYVYpvUzh6DCz0TmeQamCj6

Tpk1DlCpIz06pMzGTaf6rMzl.5fLn1vpql.OrgR2iEzfZDTWMgwfZBy1oi82

bQcnQxzri8ts0CszNzPEubimXIVkteR51Mu4AmGY5PMdkMNo2yekm9iuNZ8V

1tgS9iemyiJV+wbCKIMeonDARqqvLydb1CjwKnCXSrqpMhtsVSmaQqLuEYrF

Qzn6Z1VUEUlOb0Kp4zeCOVXdq3xTj8VmJAJp4NqTfi8kT9QsR4Xw1siVLUq+

K53NHA9DmnaaZ3eGs4G9d+D+5UZRoGHHJ7tB4YEOgJ+TTFdbZ+OVtgVRMN6U

4+LKJMUQIKmraDwn+8UC.Ur8Gtrrt85Q2OVGo9w7H0OFGo9Q+H0OZGo9gbj5

mp4NZ.Y0bu6IzPTgpBXmE26655EVdSbUQZ27RL03MUQR2920CREWcJ33CQI2

dJ5ngnkaMEczPTyMmhNZH54ShVwPTz0mhNBOfNRaJ5HzPzymhNR8HYibHCHr

9D0QngzQnIniv8w4ZZYP3EkylMk1kMuOV7fy+Pj1DdkLI1JNuDD3+2XOl6fk

1U9Bm3026mRc0carv4tGMDAicwCQTqrga8yLzx8OcWsSlrwYcdME+3hq9OW8

+CnEVP5D

-----------end_max5_patcher-----------

</code></pre>


We're going to use the LEDs to light up the current step of the sequence. If you've also got a momentary push button handy we'll add that as a little transport control start/stop button.

We'll write a quick python script on the Raspberry Pi to use alongside the rnbo runner that's running the sequencer patcher.

ssh in, or connect up a keyboard and monitor. We'll use a library that should already be on your RPi image called gpiozero and another for communicating with the runner via OSC. You can use any OSC library you like, this example will use pyliblo3. We've used this library before - so if you've done this in a previous tutorial - you can skip this step.

To install pyliblo3 run the following two commands from the terminal on your RPi.

$ sudo apt install liblo-dev
$ pip install pyliblo3

Now create a file called RNBOPi_LEDSeq.py by using nano or any other text editor you prefer.

$ nano RNBOPi_LEDSeq.py

Paste in the following script, then save the file.

from gpiozero import LEDBoard, Button
import liblo as OSC
import sys

# set up OSC client - send all messages to port 1234 on the local machine (rnbo runner)
try:
    target = OSC.Address(1234)
except OSC.AddressError as err:
    print(err)
    sys.exit()# set up OSC server - listening on port 4321

try:
    server = OSC.Server(4321)
except OSC.ServerError as err:
    print(err)

def update_transport_state(path, args):
    i = args[0]
    global transport_running
    transport_running = bool(i)

def handle_step(path, args):
    i = args[0]
    global transport_running
    print("current step:", i)
    led_vals = [0] * len(leds)
    led_vals[i] = 1
    leds.value = tuple(led_vals)

def fallback(path, args, types, src):
    print("got unknown message '%s' from '%s'" % (path, src.url))
    print("don't panic - probably just the runner echoing back your changes :)")
    for a, t in zip(args, types):
        print("argument of type '%s': %s" % (t, a))

# register callback methods for server routes
server.add_method("/rnbo/jack/transport/rolling", None, update_transport_state)
server.add_method("/rnbo/inst/0/messages/out/step", 'i', handle_step)

# Finally add fallback method for unhandled OSC addrs
server.add_method(None, None, fallback)

# Set up RNBO OSC listener
OSC.send(target, "/rnbo/listeners/add", f"127.0.0.1:4321")

# create a button object
button = Button(21)

# create an LEDBoard object representing our array of LEDs
leds = LEDBoard(17, 27, 22, 5, 6, 13, 19, 26)

def toggle_transport():
    global transport_running
    transport_running = not transport_running
    OSC.send(target, "/rnbo/jack/transport/rolling", transport_running)⁠

button.when_pressed = toggle_transport

transport_running = True
OSC.send(target, "/rnbo/jack/transport/rolling", transport_running)

try:
    while True:
        server.recv(100)        
        
except KeyboardInterrupt:
    print("exiting cleanly..."
                
RNBOPi_2Pots.py

Now sudo poweroff the RPi, and disconnect the power. Let's create our circuit:

Running the script

Power up the Pi again and run the script

$ python RNBOPi_LEDSeq.py

The script will start the transport rolling, you should be able to turn the transport on and off using the button. Try using rnbo.remote to toggle the transport also - you should see the state reflected in the attrui whether you use the button or the toggle.

If you want to control the step values, you can open the Raspberry Pi Debug Interface to control the parameters.
lys.//

lys.//

I'm an audio programmer, data scientist, grad researcher and media artist from Melbourne, Australia. I specialise in DSP and interactive coding for sound design across a wide array of platforms.
Australia