Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

8-Channel
Signal Generator

(Absolutely FREE!)

Spectrogram

Pitch Tracker

Pitch-to-MIDI

DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Period
    Event
    Spectral Event

    Temperature
    Pressure
    MHz Frequencies

Data Logger

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Automotive

Product test

Contact us about
your application!

MIDI Changes Script User Variables


Changes: UA=n, Ua=n, U0=n, QA=n, Qa=n, Q0=n
Macros: U0-U9, Q0-Q9, UA-UZ, QA-QZ, Ua-Uz, Qa-Qz

Introduction:

MIDI Changes script User Variables may be set to any valid expression, including current MIDI control values, random values, current computer keyboard states or mouse position, input or buffered notes, oscillators, and other User Variables. They behave like the variables in a conventional programming language: You can set them, test them, or use them as values in other Changes expressions.

Note that all User Variables are cleared automatically at the start of each Pitch-to-MIDI performance. Since these variables can also be used by main macros, any macro that invokes a MIDI performance must take care to preserve them. The entire set can be saved and restored by simple Macro Array commands.

Variables U0 through U9 and UA through UZ, as well as Q0-9 and QA-Z, are for signed integers, whose values may range from -2147483648 to +2147483647 (+/- 2^31).

Ua through Uz and Qa through Qz are for unsigned fixed-points. These consist of a 16-bit integer portion and a 16-bit fraction, allowing values from 0 to 65535.9999.

U0 through U9 and Q0 through Q9 are for on-off or true-false states. Any expression assigned to one of these will be converted to 1 or 0 based on whether the expression is above zero.

You can combine both User variable types in expressions, and they will be converted as needed.

You can set a User Variable to a random value, then use that same exact value in multiple places in a Changes script.

User Variables are "global", so you can set a value in the script for one voice, and use it in any other voice. (Note that all active Changes scripts run on each beat, but they are processed in order. So if you set a value in, say, Voice 4, it will also be available to Voices 5 through 8 and Percussion on that same beat, but not to Voices 1, 2, and 3 until the next beat.)


Special Macro-MIDI Integer Variables:

There are 10 integer variables that, unlike the above User Variables, are not cleared at the start of each performance. These "special" integers can be set by main Daqarta macros before or during a performance, and the Changes script can read or set them at any time. They are a bit more awkward to use because they have different read and write commands, which are also different between the macro version and the Changes script version.

Miscellaneous macros Posn#0 to Posn#9 write the integers, and Posn?0 to Posn?9 read them.

Changes script commands ?0 to ?9 write these same variables, and they can be read as Miscellaneous Position read-only values m0 to m9.


Macro Notes:

You can use Daqarta Macros to set and read normal Changes Script User Variables. For example, the macro UA=7 will set UA to 7 just as would the same command given in a Changes script. Macros have much richer options for expressions, including advanced math functions and access to all Daqarta control variables, plus high-precision Macro Variables.

This feature allows performances with fixed Changes scripts to behave differently when run from macros. For example, suppose the Changes script ends with an IF statment like [UA=1 X0=0]. If User Variable UA is equal to 1, Pitch-to-MIDI will be toggled off to end the performance. If UA is normally 0, then the performance will repeat at the end of the script, as usual. The macro can thus tell the script to stop at the end of the current iteration.

One use for this is as a macro-controlled "juke box", where a macro selects the "song" via LoadDQM. By means of the above method, the macro can insure that the performance ends at the proper time, without cutting it off mid-phrase.

Similarly, if the script was designed using User Variables to set Instrument Numbers, then a macro could change instruments during the performance.

Note that all normal MIDI user variables are cleared when Pitch-to-MIDI is toggled on, or when any script or control changes are made that require it to be restarted. Thus, a macro can't control a performance by setting normal variables ahead of time... it must toggle Pitch-to-MIDI on first, then set any needed variables.

However, the 10 "special" Macro-MIDI integers (see above) are available to get around this issue, should the need arise.


See also Changes Script Overview, Changes Script Editor, MIDI Voice Setup Dialogs, Pitch-to-MIDI dialog, Pitch Track Toolbox - Overview

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved