-
More Responsive Bellows
03/25/2022 at 18:11 • 0 commentsAfter using the concertina five or six hours a week for a couple of years, it finally sunk in that I needed to improve the way the bellows pressure controls the MIDI "expression pedal" (instrument volume). The motivation was twofold. First, I suspected that the controller was sending many more expression pedal MIDI messages than was actually necessary. When I really cranked on the bellows, it would sometimes induce a fleeting lag in the synth. Second, pushing (or pulling) the bellows produced less change in volume – particularly at the low pressure end – than I wanted.
So, I reworked the transfer function that converts the bellows pressure to the MIDI expression pedal value. This was really simple to do because it's described by a cubic Bézier curve. All I needed to do was twiddle a few compile-time constants. To see what effect the twiddling would have I used a spreadsheet that plots the curve:
And I reworked the code that issues the midi expression pedal messages to be more careful with how often it sends them. The result was a noticeable improvement on both fronts. It's considerably more responsive without being "jumpy" and I haven't seen the occasional lag I saw before.
Of course, once I got to changing how the bellows worked, it got me to thinking about more "improvements" I could make. For now, though, I'll play it a while with the update to see how I like it. But I suspect I'll be back. A good project is never done.
While opening this project up again, I discovered the only place the code existed was on my laptop. Oops. There's now a Github repo.
-
Just Using It!
01/02/2020 at 20:50 • 0 commentsSince making the new bellows and fiddling with the pressure-to-Expression transfer function, I switched my attention to making a dedicated BLE-driven synthesizer I can use with the concertina.
That turned out to be pretty straightforward. I based it on a Raspberry Pi B+, a touch-screen display from Adafruit and a MAX9744 Class D Audio Amplifier, also from Adafruit, Taking inspiration from the Adafruit Pibow stacked acrylic enclosure, I designed and laser-cut a custom enclosure for the hardware. This worked and looks nice, but, because of the need to interconnect boards, is a bit fiddly to assemble.
For software I used Raspbian together with a selection standard packages. For the synth, I chose the open source Fluidsynth project. On this set of giants' shoulders, I wrote a simple GUI client for Fluidsynth using C++ and QT5.
Et voilà! A fully functional synth in a nice compact form factor with just the features I need to have exposed.
Since getting the synth working, I've stopped fiddling with the innards of the concertina and the synth and just used them. I play the concertina almost every day and it's a joy to do so. Mostly, I make it sound like a flute, an oboe, a bandoneon, or the pan pipes. But a cello and a reed organ are nice, too. Maybe I should turn my attention to making an English concertina "sound font" so that it can sound like what it appears to be. Maybe someday. In the meantime, I think I'll just use it.
-
New Bellows, New Seals
08/28/2019 at 04:43 • 0 commentsI slightly redesigned the bellows to eliminate most of the pasteboard at the hinge points -- both mountains and valleys -- to decrease the overall springiness. I also reworked the way the bellows attaches to the two keyboard assemblies and added a beeswax-filled gasket to cut down on air leaks.
The result is a big improvement. The whole concertina now rests comfortably in a more-or-less closed position. It's still a bit springier than a traditional bellows, but not horribly so. Although there are clearly some I missed, going after leaks really helped with two things: 1) how responsive the MIDI "expression" is to bellows pressure and 2) how long I can sustain a note (or chord). More work in that area would be good, for sure.
I'm still fiddling with the parameters for the Bézier curve that maps pressure to MIDI expression. It's surprising how much it changes how the concertina feels when playing it.
A really good set of improvements overall.
-
Cubic Bézier Curves
08/19/2019 at 18:54 • 0 commentsBefore embarking on a redesign of the bellows to make it less springy, I decided to fiddle with the function that translates bellows pressure into MIDI expression. I'd been using a function of the form expression = a*ln(pressure) + b* pressure + c for no good reason other than that for suitable values of a and b it rises quickly and then flattens out which more or less is what I think a traditional concertina feels like it does. But after playing it for a while, I decided I didn't like how it jumped in volume at low bellows pressures. A traditional concertina requires a minimum pressure to do anything at all and then rises slowly for a bit and then quickly until finally flattening out again.
In casting about for a a curve that looks like that, I sketched it out in Adobe Illustrator. Which got me to thinking, why not use the same kind of curve used in vector graphics programs and standards: cubic Bézier curves. A cubic Bézier curve is a continuous vector-valued function of t where t is a real number in the range 0 to 1. The function's values sweep out a curve between two points called "anchor points" as t goes from 0 to 1. The shape of the curve between the anchor points is controlled by two other points called "control points." Because of this, not all Bézier curves are functions where y = f(x) -- which is what I need -- but many are, and it's easy and natural to control the the shape of the curve if you've ever used a vector graphics program like Illustrator or Inkscape.
So, I implemented a change that calculates a pressure-to-expression lookup table using a cubic Bézier curve. The table is calculated during initialization and used at runtime. The feel is much improved and it's easy to fine tune how it behaves. Plus designing and implementing this change gave me a really good reason to look into the nuts and bolts of Bézier curves, which I've used in Illustrator and SVGs for years but never really studied.