DixShtix

com.dixshtix.midi
Class Velocity

java.lang.Object
  |
  +--java.lang.Number
        |
        +--com.dixshtix.midi.MidiNumber
              |
              +--com.dixshtix.midi.Velocity
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Velocity
extends MidiNumber

Velocity is the rate of a keypress or keyrise.

This indicates with how much force the note should be played (where 127 is the most force). It's up to a MIDI device how it uses velocity information. Often velocity is be used to tailor the VCA attack time and/or attack level (and therefore the overall volume of the note). MIDI devices that can generate Note On messages, but don't implement velocity features, will transmit Note On messages with a preset velocity of 64.

A Note On message that has a velocity of 0 is considered to actually be a Note Off message, and the respective note is therefore released. See the Note Off entry for a description of such. This "trick" was created in order to take advantage of running status.
A Logarithmic Scale would be appropriate.
VelocityCMN
0Off
1ppp
3pp
10p
32mp
45mf
64f
90ff
127fff
Alternate Logarithmic Scale
VelocityCMN
0Off
1pppp
2ppp
3pp
5p
9mp
15mf
25f
43ff
74fff
127ffff

Version:
0.1
Author:
Richard C. Penner II
See Also:
EventType.kNoteOff, EventType.kNoteOn, EventType.kKeyAfterTouch, EventType.kChannelAfterTouch, EventStatus.ksnNoteOff, EventStatus.ksnNoteOn, EventStatus.ksnKeyAfterTouch, EventStatus.ksnChannelAfterTouch, Serialized Form

Field Summary
(package private) static java.lang.String[] italian_names
          List of Italian names for velocity.
 
Fields inherited from class com.dixshtix.midi.MidiNumber
number
 
Fields inherited from class java.lang.Number
serialVersionUID
 
Constructor Summary
Velocity(int num)
          Initializer.
 
Method Summary
static void main(java.lang.String[] args)
          Print HTML table of velocity->Italian translation.
 java.lang.String toString()
          Produce a short, human-readable string.
static java.lang.String toString(int n)
          Produces a string that is a italian approximation to the velocity.
 
Methods inherited from class com.dixshtix.midi.MidiNumber
byteValue, doubleValue, equals, floatValue, hashCode, intValue, longValue, shortValue
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

italian_names

static java.lang.String[] italian_names
List of Italian names for velocity. From pppp to ffff
Constructor Detail

Velocity

public Velocity(int num)
Initializer.
Parameters:
num - Is a velocity in the range 0 or 1-127.
Method Detail

toString

public static java.lang.String toString(int n)
Produces a string that is a italian approximation to the velocity.
Parameters:
n - An integer in the range 0 or 1-127.

toString

public java.lang.String toString()
Produce a short, human-readable string.
Overrides:
toString in class MidiNumber

main

public static void main(java.lang.String[] args)
Print HTML table of velocity->Italian translation.

Sample Velocities
0 Off 22 mp 44 mf 66 f 88 ff 110 fff
1 pppp 23 mp 45 mf 67 f 89 ff 111 fff
2 ppp 24 mp 46 mf 68 f 90 ff 112 fff
3 pp 25 mp 47 mf 69 f 91 ff 113 fff
4 pp 26 mp 48 mf 70 f 92 ff 114 fff
5 pp 27 mp 49 mf 71 f 93 ff 115 fff
6 pp 28 mp 50 mf 72 f 94 ff 116 fff
7 pp 29 mp 51 mf 73 f 95 ff 117 fff
8 p 30 mp 52 mf 74 f 96 ff 118 ffff
9 p 31 mp 53 mf 75 f 97 ff 119 ffff
10 p 32 mp 54 mf 76 f 98 ff 120 ffff
11 p 33 mp 55 mf 77 f 99 ff 121 ffff
12 p 34 mp 56 mf 78 f 100 fff 122 ffff
13 p 35 mp 57 mf 79 f 101 fff 123 ffff
14 p 36 mp 58 mf 80 f 102 fff 124 ffff
15 p 37 mp 59 mf 81 f 103 fff 125 ffff
16 p 38 mf 60 mf 82 f 104 fff 126 ffff
17 mp 39 mf 61 mf 83 f 105 fff 127 ffff
18 mp 40 mf 62 f 84 f 106 fff
19 mp 41 mf 63 f 85 ff 107 fff
20 mp 42 mf 64 f 86 ff 108 fff
21 mp 43 mf 65 f 87 ff 109 fff


DixShtix