Using RNBO to write for a hardware synth/sequencer w/raspberry pi, not sure how to handle polyphony..

1lamb1month's icon

I'm trying to make a hardware synth/sequencer thingy using Raspberry pi and a bunch of sliders, potentiometers and buttons. It's basically two synth sequencers (one plays quarter notes, one plays 16th notes), a simple drum sequencer (which plays 16th notes) and 8 buttons you can play like piano keys. So you'd use sliders to choose each of the quarter and 16th notes and an LED button matrix to sequence the drums. And while that's playing, you can press the piano key-style buttons to play sustained notes. I haven't gotten into the Raspberry Pi / hardware inputs part of the project yet but it all basically works on the screen. I've attached a pic of the interface which might help clarify what I'm trying to describe.

But I'm not sure how to handle polyphony inside RNBO. I have three different cycle~ objects (one for each synth) sending audio to the out~, which goes to an ezdac~ in my Max patch. The only thing in my Max patch is the rnbo~ object and ezdac~. Everything else is inside the rnbo~ object, including all the UI, timing stuff, and three simple cycle~ synthesizers. I'd like each one of them to have the ability to do polyphony. But the only polyphony guides I've seen have been for rnbo~ objects that take midiin or notein from outside the rnbo~ object. Mine doesn't have any external MIDI inputs because the logic that generates the notes is all internal. Is there a way to do polyphony purely internally? I guess I'd like polyphony for all three of the synths inside the rnbo~ but mostly it's for the piano key-style buttons that I want to be able to play a chord with.

This is my first attempt at using RNBO so I'm not sure if I'm approaching this in the right way for an eventual Raspberry Pi-based hardware device with polyphony. Any advice would be greatly appreciated. Thanks!

Jean-Francois Charles's icon

If you're going to use RNBO for Raspberry Pi, I would suggest you keep all of your UI objects outside of your rnbo~ programming. In Raspberry Pi, you won't get access to the UI objects.

Then, for polyphony, you are not limited to top-level polyphony: look at the "subpatcher polyphony" in the docs:

Julien Bayle's icon

+1 Jean-François.

For UI, if you were interested by remote controlling it, it is very easy to communicate back and forth with JS, for instance, if you wanted to control it through a script interfacing visuals handled by JS, and communicating through OSC with your pi.

1lamb1month's icon

Thanks for the advice, both of you.

Adding the UI outside the rnbo code has made things a lot easier..