12 votes

Accordion Synthesizer Project

I've been posting about this in various topics but now that it's on Github, I thought maybe it's time to give it a topic of its own. From the README:

My goal is to eventually replicate the keyboard and sound of the bass side of an accordion in an electronic device that accordion players will find easy to adapt to. So far I've built three prototypes:

  • Prototype 1 was trying out a Teensy 4 with an audio shield on a breadboard, with 4 bass buttons.
  • For prototype 2, I put the buttons on two double-decker circuit boards (9 bass buttons). Here's the Video. You can see the remains of prototype 1 in the background.
  • For prototype 3, I built a real case out of wood and laser-cut acrylic panels, to make a desktop device that's more easily portable. This one uses a Teensy 3.6. Here's the Video. I designed it in Onshape and you can look at the CAD model online.

11 comments

  1. skybrian
    Link
    Update #2 I'm trying different ways of adding expression, to substitute for not having a bellows. I tried using a load cell (like the one used in small kitchen scales) to measure how much force I...

    Update #2

    I'm trying different ways of adding expression, to substitute for not having a bellows. I tried using a load cell (like the one used in small kitchen scales) to measure how much force I use pushing down on prototype #3. This works but is strangely unsatisfying.

    My guess is that it's because it's like pressing touch-screen button, or pushing against a wall. Audio feedback is nice, but isn't a substitute for physical feedback. I ordered an accelerometer and a pressure sensor and will try some different ideas in prototype #4.

    2 votes
  2. [2]
    skybrian
    (edited )
    Link
    Update #5 I got a new accelerometer/gyroscope breakout board and decided to go back to that. (I got a bit bogged down figuring out how to handle the tubing for the breath sensor.) It works well...

    Update #5

    I got a new accelerometer/gyroscope breakout board and decided to go back to that. (I got a bit bogged down figuring out how to handle the tubing for the breath sensor.)

    It works well for measuring rotational velocity, but I haven't figured out how to make it feel nice playing either softly or loudly like you can with an accordion bellows. I did come up with a pressure curve that's okay for accenting notes, though.

    2 votes
    1. cfabbro
      Link Parent
      Not related to your latest update... but having just revisited your YouTube in hopes of seeing it in action, I just wanted to say that this was great! It sounds like something out of Leisure Suit...

      Not related to your latest update... but having just revisited your YouTube in hopes of seeing it in action, I just wanted to say that this was great! It sounds like something out of Leisure Suit Larry. :P

      1 vote
  3. [2]
    wirelyre
    Link
    I haven't been following this project too closely, but congratulations! Very impressive work! Is there a reason you're focusing on the bass side? Just to limit the scope of the project? Acoustic...

    I haven't been following this project too closely, but congratulations! Very impressive work!

    Is there a reason you're focusing on the bass side? Just to limit the scope of the project?

    Acoustic accordions share reeds between keys, right? Do you emulate that?

    Do the keys actuate uniformly? How hard was it to get them to where they are now?

    If someone made a bellows, would you use it, or does that not fit your idea of this instrument? Ooh, could you power the electronics with a bellows and turbine?

    1 vote
    1. skybrian
      Link Parent
      I'm doing the bass side because I play piano accordion, and there are plenty of inexpensive MIDI controllers you can buy that have a piano keyboard. So, I just need to add a MIDI port for the...

      I'm doing the bass side because I play piano accordion, and there are plenty of inexpensive MIDI controllers you can buy that have a piano keyboard. So, I just need to add a MIDI port for the treble side. (I've already experimented with this, using both a keyboard and prototype #3 connected to a computer.) Another possibility would be to use a melodica for the treble side, and in fact that's how I came up with the idea for this project; I play melodica sometimes and was thinking "wouldn't it be cool if it had some bass buttons?"

      But there is another kind of accordion called a "chromatic button accordion" that has buttons on the treble side, and maybe I'll get into that someday.

      I have a "Reed" class in the source code that's currently a couple of detuned oscillators and an envelope. The buttons turn reeds on and off based on a layout array that says which reeds to activate. Currently I have to edit the code to change the layout or the reed sound, but I would like to add some controls for this.

      Like an accordion, the buttons themselves are not touch-sensitive. In prototype #3 they are made out of nylon bolts and it's mainly a matter of cutting them all to the same length. (Even that much isn't that easy to do, so I cut more than I need and keep the ones that are closest.) In prototype #2 I cut up a plastic dowel, but the buttons were pretty wobbly. For the switches themselves, I'm using mechanical computer keyboard switches, which I bought from a small vendor that caters to computer keyboard enthusiasts.

      I plan to add some way to control expression similar to how accordionists use a bellows, but probably not an actual bellows. Currently I'm looking at using a load cell (as found in small kitchen scales) to measure how hard you push on the top. Some kind of breath control is also a possibility if I hooked it up with a melodica.

      2 votes
  4. [3]
    MimicSquid
    Link
    That's really cool. Is it intended to be a teaching/practice tool? A more portable replacement? Either way, good stuff.

    That's really cool. Is it intended to be a teaching/practice tool? A more portable replacement? Either way, good stuff.

    1 vote
    1. [2]
      skybrian
      Link Parent
      Accordions are expensive; new ones are $1500 and up. A lot of people look for used ones on craigslist and the like, but it's hit-and-miss whether the instrument from someone's attic will work, and...

      Accordions are expensive; new ones are $1500 and up. A lot of people look for used ones on craigslist and the like, but it's hit-and-miss whether the instrument from someone's attic will work, and repairs are often more expensive than finding one that works. I have a perfectly good accordion so I'm just doing it for fun, but in the back of my mind, I'm thinking that eventually I can post a recipe online and someone who is discouraged by the cost of an accordion will be able to put together an alternative instrument out of inexpensive parts.

      Also, a musical instrument that fits in a suitcase is nice for travelling. (This is somewhat ironic because accordions originally became popular as a more portable and less expensive alternative to a piano or organ.)

      4 votes
      1. MimicSquid
        Link Parent
        That's awesome. I'm glad you're working towards making the accordion a more accessible instrument. I love the sound of them, and I've avoided picking one up to try to learn it in part for exactly...

        That's awesome. I'm glad you're working towards making the accordion a more accessible instrument. I love the sound of them, and I've avoided picking one up to try to learn it in part for exactly the reasons you mention.

        3 votes
  5. skybrian
    Link
    Update #1 Today I sent off my order to OSH Park to make the circuit boards for prototype #4. These are the first printed circuit boards I've ever designed, but it's a simple enough design that...

    Update #1

    Today I sent off my order to OSH Park to make the circuit boards for prototype #4. These are the first printed circuit boards I've ever designed, but it's a simple enough design that hopefully I haven't screwed it up too badly!

    If you're curious, you can look at the schematic and board on Github.

    1 vote
  6. skybrian
    Link
    Update #3 I now have Prototype #3 mounted on a hinged board that's clamped to my desk. I'm using a 3-axis accelerometer as a tilt sensor, using the speed of the tilt to control volume in imitation...

    Update #3

    I now have Prototype #3 mounted on a hinged board that's clamped to my desk. I'm using a 3-axis accelerometer as a tilt sensor, using the speed of the tilt to control volume in imitation of a bellows. It basically works but doesn't feel right.

    Maybe I could improve the software to make the volume control more responsive? The accelerometer has a lot of noise from picking up vibrations that I have to smooth away to get the tilt angle. Then I take the delta with the previous angle to get velocity. It seems like if I could subtract out the gravity vector, I could integrate acceleration to get velocity?

    I could also change the sensor. Adafruit sells an acceleration + gyroscope board for $5.95 and maybe a gyroscope reading would be better for this? Or should I be measuring tilt more directly using a potentiometer?

    The other thing that doesn't feel right about it is that the hinge doesn't resist movement like a bellows, so I'm wondering if I could get a different hinge. It seems like a syringe would provide the resistance to movement that I want, but I'm not sure how to mount it yet.

    Also, the boards for Prototype #4 arrived from OSH Park. I will be soldering the components on and trying them out, but still haven't finished the rest of the design. (I was hoping to figure out what I'm doing for a bellows by now.)

    1 vote
  7. skybrian
    Link
    Update #4 I tried using a syringe to add some resistance to the hinge. It helps but doesn't provide enough resistance, so I will try again later with a bigger one. It also got me thinking about...

    Update #4

    I tried using a syringe to add some resistance to the hinge. It helps but doesn't provide enough resistance, so I will try again later with a bigger one. It also got me thinking about air pressure as an input device. Considering that I'm trying to imitate an accordion bellows, maybe that's the way to go?

    So, I've been testing using a pressure sensor for breath input. It seems the pressure sensor I bought (an MPX10GP) is analog and uses a Wheatstone bridge and the output must be amplified. I used the ADC breakout board I already had for the load cell (based on an HX711), and it worked, but again was rather unsatisfying. It seems 10 Hz is not responsive enough, even for a simple one-note test, basically a kazoo?

    I ordered another amplifier breakout board (based on an ADS115) and at over 100Hz it's much more fun. I wonder if the load cell would have been more fun too, with a higher sample rate? Things are looking more promising.

    It would be nice to get rid of the extra breakout board. There are pressure sensors that have digital output, but they are pricey, so this will have to do for now. It seems the MPX10GP is just about the cheapest you can get?

    I also soldered the parts onto one of the printed circuit boards I got back from OSH Park. Still need to test, but so far, so good. (Next time around I will make the holes for the keyboard switches slightly bigger.)

    1 vote