[sdiy] Smoothing MIDI data
Andrew Simper
andy at cytomic.com
Thu Mar 1 03:18:28 CET 2018
For most end parameters the 7-bit midi quantisation won't matter, apart
from not being able to get the exact value you want at the target, for
example the attack time of an envelope being modulated by a 7-bit signal
will be fine. For things like the cutoff of a self oscillating filter, or
pitch of an oscillator, then smoothing would be needed. I developed an
adaptive algorithm that works pretty well for most applications when you
want a smooth CV from midi at the cost of a little lag. You can read about
it in the pdf at the top of this page:
https://cytomic.com/technical-papers
It uses a 2 pole SVF with self modulation. The algorithm is pretty
efficient and can be computed in fixed point, it takes 3 mult 6 add/sub and
a min to tick each sample, and you can easily adjust the base cutoff and
maximum cutoff to produce a variety of 1 and 2 pole glide transitions (you
can take the output of the first low pass filter for 1 pole glide). You
could also implement the algorithm in analog, but it would require a two
voltage controlled one pole low pass filter sections and some supporting
circuitry per parameter to be smoothed, so it would probably be cheapest
done in digital and then have some support circuitry to ramp / smooth the
results coming out the DAC.
Andy
On 28 February 2018 at 10:38, <rsdio at audiobanshee.com> wrote:
> There are lots of options, depending upon your specifics.
>
> At one extreme, the fastest that a classic MIDI interface can update a CC
> value would be 640 nanoseconds. Even with 14-bit data, 99.2% of the updates
> can occur on 640 ns intervals thanks to the specification allowing for the
> LSB to be updated alone, with the MSB only updated as necessary.
>
> Based on that, I’d say your smoothing should have a time constant of at
> least 640 ns.
>
> Of course, the challenge is that MIDI data updates can also occur at much
> slower update rates, depending upon the implementation of the source. You
> might need an adaptive smoothing algorithm to minimize latency while still
> avoiding zipper noise.
>
>
> Another option is analog smoothing. Eµ Systems released a paper via the
> AES that describes a Voltage-Controlled Lag Circuit. This allows each
> individual CV output to have independent, linear smoothing. I think this
> ended up in an Oberheim patent, US Patent # 3,969,682.
>
> Authors: Rossum, Dave; Wedge, Scott
> Affiliation: Eµ Systems, Santa Clara, CA
> AES Convention:57 (May 1977) Paper Number:1231
> Publication Date:May 1, 1977
>
>
> On Feb 27, 2018, at 8:56 AM, Bruno Afonso <bafonso at gmail.com> wrote:
> > I've been developing a few MPE modules for VCVRack and I'm wondering
> what do people that develop firmware for hardware synths do when it comes
> to smoothing midi data, typically 7bit. I guess my question is a bit along
> the lines of how fast or slow do you move to the new mapped CV voltage. Are
> there good time constants that empirically work better?
>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20180301/9cf18e3d/attachment.htm>
More information about the Synth-diy
mailing list