Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Voice Instrument On/Off and Name
This long button appears next to the Instrument Number in both the Pitch-to-MIDI and the Voice Setup dialogs. It toggles the instrument (voice) on and off, as well as showing the name of the current instrument.
Note that toggling the instrument does not toggle the associated Changes script operation, which must be toggled separately. A script can thus continue to run (affecting other voices) while the instrument is off.
You can see the General MIDI Instruments list at any time by right-clicking the Instrument Number or Instrument On/Off controls for Voices 2 through 8 in the Pitch-to-MIDI dialog. (Not Voice 1, which provides this control Help, as do the Voice Setup controls.)
Use Xv=n to set the Instrument state for Voice v (1 to 8) to the value of n, which may be any unsigned integer or valid expression, including current MIDI control values, random values, current computer keyboard states or mouse position, input or buffered notes, or oscillators. If the value is zero, the instrument is off; any other value toggles it on.
Alternatively, you can use x instead of a value to toggle the current state. For example, X2=x toggles the state of the Voice 2 Instrument.
Tip: As noted, the n value can include random numbers. If you set the random limits to 0 and 1, as in X2=?(0,1), the instrument will be toggled on approximately half the time. See the Random Values topic for a simple method to control the average percentage of on or off states.
You can use an expression to compute the voice number for the command by enclosing it in carets, as in X<UB+1>=?(0,1).
You can use X9 to toggle all voices via a single command, or set them all to the same state.
Likewise, you can read X9 to get the number of active voices.
MIDItog2=1 sets the Voice 2 Instrument on, MIDItog2=0 sets it off, and MIDItog2=x toggles the current state.
However, Changes scripts are recommended for this purpose.
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