Guided by AI, I had a proof-of-concept run of my project based on the said Roland Keybed, and an Arduino Nano. Due to the pin limitation of Nano, I'm now only able to wire up 80 out of the 88 keys and one switch only for each key. It now relies on a PC running a Hairless MIDI-Serial Bridge which drives the MS wave table synthesizer to drive the PC speaker and make sound.
It works, and if I can add two CD74HC4067 multiplexer chips to scan all of the 88 keys and 2 switches for each, it seems to meet my goal at this moment. AI also suggested using LoopMIDI, which is able to bridge between Hairless and any VST software, allowing you to get the effect of various instruments, just like what a commercial digital piano does. This looks full of potential, very interesting, and fantastic.
One big issue however, is that there is clear latency between the keystroke and the sound. This is intolerable.
Now AI suggests Teensy 4.1, as mentioned (and used) by the OP, which is completely new to me.
A few questions:
1. If building on the Arduino family boards (I've already ordered another Arduino big brother Mega2560 for its number of pins, before becoming aware of the latency issue), is it possible for me to remove the perceivable latency?
2. If using Teensy 4.1 (I'm now very inclined to getting one), which seems much more powerful, how can I directly get audio signal out of it to drive an audio amplifier, which in turn drivers the speakers (I have these salvaged from the Roland)? If this is not possible, what's the technology pathway to achieve this for my DIY piano project (that is reasonably cheap)? [Edit: AI suggests Teensy Audio Shield ...]
3. What are the best options for the controller part of this project (or this type of MIDI/audio/musical instrument projects)? Arduino, Teensy, Raspberry Pi, bare MCUs, or anything else? What are the pros and cons?
4. For the Teensy family pathway (most likely the one I'm going to choose in the end), I've now put these in my Digikey shopping basket: 1)
Teensy 4.1; and 2)
Teensy Audio Shield. Are these the right variants, and basically all that I would need (apart from pins, sockets, wires, etc.)? (The keybed requires 30 independent pins altogether.)
Thank you.