I'm about to start the building phase of my EE senior capstone project, for which I am designing a desktop multi-effects processing box using Bela. My design has 12 input potentiometers, but Bela has only 8 analog ins. To get the extra 4 channels I thought I'd try using a 4 channel ADC breakout board, but I'm confused about how I can refer to my extra analog inputs in the Bela environment. I know I can use the example code (link below) to read values from the ADC, and I know that I'll probably have to run that as a auxiliary task to avoid clogging up the audio thread - where I am lost is how I actually use the values in my main script.
Can I wrap the process of reading values from the 4 channel board in my own version of analogRead? Is it safe to do that inside the audio thread? Do I have to ensure the sample rates match up?
I don't expect concrete answers on these questions, what I need is confirmation that this is/isn't possible and a general framework of how it would be accomplished. Any advice you can offer will be greatly appreciated. My journey with Bela is just beginning but I am so glad to have found it! It's perfect for my project