Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
MIDI Buffer Velocity and Chord Maps
Changes: Bv="string", Bc="string"
The Buffer Velocity Map (Bv) and Chord Map (Bc) commands allow a MIDI Changes script to use random, oscillator, or live or Buffer note values to set Velocity Patterns or Chord Patterns using Buffer Fill commands.
The map allows you to create a random or semi-random pattern, yet still have a certain amount of control over the values used. The map is a string of up to 32 characters from which the actual pattern characters will be chosen, based upon the input data values.
The Velocity Map command format is Bv="string", and the Chord Map is Bc="string". The quotes around the string are mandatory.
If you select characters randomly from the full map, the probability of any particular character is based on the number of times it appears in the map.
For example, JukeBox.DQM sets the velocity map with Bv="0_8_8_8_8_8_8888", which gives a 9/16 probability of '8', a 6/16 probability of '_', and a 1/16 probability of '0' when it uses Bf1V.1=(?(0,15),UA-1) to select UA-1 characters at random over the 0,15 range of the map.
You can select over a smaller range of the same map to get different probabilities. The 0th item is the first one in the string, starting from the left.
You can also use non-uniform random values to weight the selection toward the center or either end. For example, Bf1V.1=(?2H(0,15),UA-1) would use a triangular distribution that would favor the high-index end of the map, with the probability of low-index selections falling linearly toward index 0.
If you attempt to use a selector index that is beyond the limits of the specified map, the given index is divided by the map length and the remainder is used as the actual index. (This is known as a "modulus" or MOD operation.) In the 16-character JukeBox map example above, suppose you set the random limits to ?(0,25) instead of ?(0,15): Bf1V.1=(?(0,25),UA-1). If a random index of (say) 23 is chosen then the actual index will be 23 MOD 16, which is 7.
Note that a script must include an appropriate Map command before a Buffer Fill (BF or Bf) or Buffer Copy (BC) to a Velocity or Chord Pattern. Otherwise, the map will be empty and the pattern will receive only nulls.
Map commands are global; all scripts use the current Velocity and Chord Maps. The maps can be changed as often as desired. You can also have a large fixed map and change which part is used.
You can create a large Velocity Map and use different parts of it for tonal and percussion instruments, or maybe one part for continuous tonal instruments like wind or brass and another for percussive tonal instruments like piano or guitar.
Likewise, you can use a large Chord Map and use different sets of chords for different instrument types, or for different parts of a performance.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved