[sdiy] MIDI velocity
Roman Sowa
modular at go2.pl
Tue Apr 5 14:11:24 CEST 2016
hi,
1. yes, you can. I do that on PIC16 with promising results, but it's not
yet finished, so no performance details yet.
2. velocity byte represents how hard you hit the keyboard. Gently - low
velocity, hard - high velocity. There is straight logic here. Nobody
cares about actual time measured but only if it feels/sounds right,
that's why many keyboards give several velocity curves to choose from.
3. like with the keyboard - give the user possibility to choose. Why do
you need standard for something that is a matter of taste? By default it
affects amplitude, and sometimes cutoff, but nobody can forbid for
example to route it as pitch control.
Roman
W dniu 2016-04-05 o 13:43, Richie Burnett pisze:
> 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 dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
More information about the Synth-diy
mailing list