[sdiy] MIDI velocity

Tom Wiltshire tom at electricdruid.net
Tue Apr 5 16:07:24 CEST 2016


Hi Richie,

1. The Prophet T8 only scans the keyboard every 1msec, so 128usecs is pretty good. Everyone speaks extremely highly of the T8 as a controller keyboard, so it's velocity response can't be that bad. Even if you didn't manage 8KHz, it'd probably still be fine.

2. "Time taken for a given distance" is a pretty good measure of velocity. I'm sure that's (down counters) how everyone does it. Perhaps the fact that it's a reciprocal is one reason that you tend to need selectable velocity curves. I'd have to think about whether it bends the right way or the wrong way.

3. Selectable response curves from either the sending MIDI instrument or the receiving instrument are pretty much the norm. It's often hard to get the full dynamic range out of the keys by playing them (on my own Fatar keyboard, the difference between 0 and about 40 is very difficult to get) and the curves can help adjust for this and get the best out of MIDI's 7-bit dynamic range.

The Dream Semi "log" response is just some way of getting a wider range of dynamics into a 7-bit variable. It'll just be another response curve look-up. I doubt they do the timing any differently.

Tom

On 5 Apr 2016, at 12:43, Richie Burnett <rburnett at richieburnett.co.uk> wrote:

> Hi guys,
> 
> A few general questions about MIDI velocity sensitivity implementation,
> (just for a DIY synth project.)
> 
> 1. Is it reasonable to expect that I could use a low-end micro (e.g. PIC) to
> scan a 61-key Fatar velocity sensitive keyboard with sufficient velocity
> resolution to work well?  Or does it need dedicated hardware to measure the
> time between top and bottom switch closures for every key in parallel
> with sufficient resolution.  For instance the old E510 is quoted as having
> 128us resolution, and it sounds challenging to write a program to poll all
> 61 keys nearly 8000 times a second?  Obviously I can use a free-running
> timer, and subtract time stamps obtained from the top and bottom switch
> closures for each key, but it still sounds tight.  I couldn't find any
> online examples of PIC based DIY velocity sensitive keyboards, and most
> commercial keyboards seem to have an ASIC taking care of timing the switch
> closures and reporting results to a general purpose micro to form the MIDI packets.
> 
> 2. What does the MIDI velocity byte actually represent!? The old E510 chip
> seems to contain a down-counter that starts at 127 when the top contacts
> close, and counts down towards 1 (minimum allowed note-on velocity,)
> stopping at whatever value it reaches when the key bottoms out and triggers
> the bottom switch contact.  The value it stops at is the "velocity byte"
> that's shoved in the note-on MIDI message.  But this is really a reversed
> measurement of time, not velocity at all.  I would have thought that there
> should be a reciprocal calculation done somewhere to convert from time to
> velocity.  Is this method the commonly accepted way to implement velocity
> sensitivity, or just a compromise because the reciprocal was too difficult
> to do back then?  I couldn't find anything in the original MIDI
> specification that describes what the velocity byte should actually
> represent.  If it does actually represent time, then that's easier, but it
> sounds wrong.
> 
> 3. How should a receiving synth set it's voice's volume depending on
> the velocity byte received?  I tried to think through the physics of someone
> hitting a piano key with a specific velocity, what the energy is from
> 0.5mv^2 etc, and how that should influence the amplitude of the resulting
> sound wave.  It seems that most synths either have a linear response or an x^2
> response curve to velocity, but many offer a selection of different responses.
> 
> To add to my confusion one chip that I looked at from Dream semiconductor
> mentioned a "logarithmic" timing method for measuring note on and note off velocity. Help!!!  Is it really just a case of everybody does it differently, and just go with what sounds good, or is there a definitive standard somewhere for how MIDI velocity *should* be implemented?
> 
> Thanks in advance for any comments and suggestions,
> 
> -Richie, 
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy



More information about the Synth-diy mailing list