ANOTHER Teensy Audio Board Synth

Status
Not open for further replies.

mattbott

Member
Hey all!

I've been working on this on and off for about a year now. Finally decided it was in some sort of shape to post it here.

I haven't actually coded anything since I got my degree in 2008, so this was a nice re-learning project for me.

I gutted a music keyboard and attached the diode matrix to a pair of MCP23017 I2C port expanders and eventually figured out how to make a 16 voice polyphonic synth.

You can hear it here (I'd recommend headphones, also, I'm a percussionist who's not really trained in tonal instruments), and see all the code and some pictures on github

Any constructive criticism of the code, or things that you think would help optimize it would be appreciated! =]
 
Last edited:
Here are some pictures from the github. Still just breadboarded. Some day I'll build it out into a contained unit. I'm also thinking about just making the teensy a midi module so any midi keyboard can connect to it instead of just this particular keyboard.

I'll see what I can do about a video in the next couple of days, but it would just be me pushing keyboard buttons with sound. There no other interface at this time. But there is the soundcloud linked above with an audio example.

Ignore the blue and black jumpers between the teensy and the MCPs, they are no longer in use.

Keyboard.jpg


Breadboard_Overview.jpg


Breadboard_MCPs.jpg
 
The audio has clicks in it while you are playing a chord. I think you may have to back off the amplitude of the mixer(s) involved in creating those sounds.

Pete
 
I've modified your code to use the input from a MIDI keyboard. It frequently does not play a Note On even though it prints out the info in the Serial monitor indicating that it saw the MIDI message. This occurs even if I play just one note at a time with plenty of time between one keypress/release and the next.
In this Serial output, the one labelled "Using Voice #: 3" does not sound.
Code:
Play Midi Note: 48
Returning Oldest voice: 0
Using Voice #: 0
Memory usage max: 32
--------------------
Play Midi Note: 48
Returning Oldest voice: 1
Using Voice #: 1
Memory usage max: 32
--------------------
Play Midi Note: 48
Returning Oldest voice: 2
Using Voice #: 2
Memory usage max: 32
--------------------
Play Midi Note: 48
Returning Oldest voice: 3
Using Voice #: 3
Memory usage max: 32
--------------------
Play Midi Note: 48
Returning Oldest voice: 4
Using Voice #: 4
Memory usage max: 32
--------------------

Do you have any problem with your synth missing keypresses?

Pete
 
Interesting...

No, I haven't run into that problem.

I was messing with the organization of the code before I uploaded it, so maybe I broke it. I'll take a look later tonight.
 
BTW. The clicks I heard must have been caused during the recording process. I've been playing around with the synth for a while and it doesn't click at all.

Pete
 
Glad to hear you found the problem and that you seem to be enjoying it!

I'm still not too sure about those clicks, I don't seem to hear them through my headphones. Unless they are covered by the distortion to my ears.
 
Status
Not open for further replies.
Back
Top