Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
MIDI Buffer Add Value Commands
The Buffer Add Value (BA) command allows a MIDI Changes script to modify a section of an input buffer by adding a specified amount to each note. (See Buffer Copy and Buffer Fill for getting notes into the buffer to be modified.)
The format for Buffer Add Value is BAvb.i0=(add,count), where v is Voice number 1-8, and b is buffer number 1-4. i0 is the index (position) where the addition should start, add is a the amount to add (which may be negative), and count is the number of notes to be affected.
i0, add, and count may use any unsigned integer or valid expression, including current MIDI control values, random values, current computer keyboard states or mouse position, input or buffered notes, oscillators, and User Variables. i0 will be limited to the 0-255 buffer range. add will be limited to +127/-128, and count will be limited such that the 256-note buffer size is not exceeded.
The actual notes resulting from the addition will be limited to the standard 0-127 MIDI note range.
Note: The Add Value operation detects if the note to be modified is a silent note from the Pitch Tracker, and if so that note is passed through without addition.
The normal Buffer Add BA command computes the add value once, and adds it to all buffer positions.
There is also a Ba variant that recomputes add for each position. If add is an expression that includes oscillators or random values, each position may have a different value added to it. This is useful for modifying bass, rhythm, or melody lines.
For example, Ba21.0=($a(-6,+6),8) would add 8 points from the oscillator $a output to Voice 2, buffer 1 starting from the 0th position.
The oscillator in this example is scaled such that a full cycle would swing between -6 and +6. The actual range covered by the 8 points used here would depend upon the frequency of the oscillator... a low frequency might not move very much in only 8 points.
A use-based (lower case) oscillator $a to $h is usually best for inclusion in add, because its output is computed on every use. A frequency-based oscillator $1 to $8 or a beat-based oscillator $A to $H will act as a constant whose value is the current output of the oscillator at the beat when the command is processed.
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2021 by Interstellar Research
All rights reserved