Using Pure Data to read a Mux

Hi I am brand new to pure data and daisy but have tinkered with arduino for some time (but im not a pro)
is there a way of using pure data to read a mux as seperate inputs on a key board

let me see if i can explain better

I am looking at running 13 keyboard inputs to a mux
once I have the stuff wired up I am thinking an array of true and false gates would make me able to split the mux out as different keys inside pure date.

am i anywhere close to the right concept or completely off

Hi Synth_Dino!

I already know a bit more about this project from talking to you in a DM, but I’m still leaning towards your doing this project on the Arduino IDE (AKA DaisyDuino) since you already have experience using Arduino. GitHub - electro-smith/DaisyDuino: Arduino Support for the Daisy Audio Platform.

The multiplexer breakout board that you’ll end up purchasing will most likely have an external library developed for it. And I think you should be able to install it and use with DaisyDuino. There are also lot of multiplexer codes for Arduino online already.

And as of right now, DaisyDuino comes with more examples than pd2dsy, so you’ll be able to get a good sounding synth quickly as you put together a prototype of the instrument.

Either way, this is something that I would love to dive deeper into! As projects get bigger, it’ll be helpful for all of us to have as much pins as possible. For now, I think you’re gonna have a much better time implementing this project with DaisyDuino.

I think the problem would be how you can run the selector on your multiplexer and sync it to receive objects in PD.

Since the receive objects only run at control rate (once every block of samples) you won’t be able to read more often that than. Now if you want to also control the selector from PD this will add an additional block latency for every selection that you want to cycle through. This may give too much latency for you to end up with a decently responsive interface.

It’s probably easier (and faster) to go for something like an I²C GPIO expander (one that is already supported by libDaisy) and simply get your extended inputs this way. All I/O would then be available at the same moment inside the control cycle and you’d need a lot less weird logic and ducttape to use it in the patch.

Hi,
so as my very limited knowledge understands, you could get lot more inputs and outputs for pd2dsy and pure data using I2C expander? Analog or digital?

I recommend checking out this guide!

Edit: I don’t know why I just linked to this. But in terms of getting more inputs, please use mux.
You should go to this guide instead: Cd4051 Multiplexer Tutorial Is Here!