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:



Spectrum Analyzer

Signal Generator

(Absolutely FREE!)


Pitch Tracker


DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Spectral Event

    MHz Frequencies

Data Logger

Waveform Averager


Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls


Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording



Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery


Product test

Contact us about
your application!

MIDI Changes Script Field and Label Access

MIDI Changes scripts can read, write, and test main Daqarta Fields and their matching Labels. This allows a script to get user input via text, time, or number entry, and also provides additional output display options.

The basic command to write to a Field takes the form of Fn=x, where n is the Field number (1-6) and x is a number, variable, or quoted string. You can use the same formats allowed by Output Display, not including those which are specific for Messages, Meters, Log Files, or the Title Generator.

For example, using Field1:

    F1=n value or expression
    F1=s current random seed value
    F1="String" arbitrary string
    F1="String "+U0 string plus variable
    F1O="String "+U0 string plus ON or OFF
    F1f=n fixed-point decimal
    F1h=n hexadecimal
    F1i=n instrument name
    F1n=n note name
    F1p=n percussion instrument name
    F1s=n scale pattern
    F1S=n scale name
    F1t=n seconds as H:M:S time

You can read the Field string as an ordinary numeric variable. For example, if Field1 holds "12" then UA=F1 will set variable UA to 12. Similarly I3=F1 would set the Voice 1 Instrument to 12 (Marimba).

The automatic conversion from Field string to numeric uses the standard Daqarta number entry formats, including decimal, exponential, scientific unit prefixes, "European" notation, or H:M:S time.

If Daqarta can't interpret the string as a standard number or time, it is converted to ASCII character values and stored as an integer holding the first 4 characters, ignoring all spaces.

You can use Fields in MIDI IF statments where the Field is interpreted as a numeric value, such as [F1=12, or you can test for a single-letter string as in [F1="A", but you can't test for longer strings as such. However, you can test for a string up to 4 characters long if you represent the ASCII characters as a hex value, as in [F1=h41424344 to test if Field1 holds "ABCD". Note, however, that since the string-to-ASCII conversion only takes the first 4 characters, this test will also pass if Field1 holds "ABCDE", etc.

One very useful test is to see if a Field is empty or not, so the script can accept user entry to change a default setting. The GlossyTracks Percussion script uses [F1!=0 to test if Field1 is not empty, in which case it uses the entered value as the seed for the initial track. Otherwise it uses a random seed by default.

You can also use a single Field to enter two separate integer values. For example, GlossyTracks uses Field3 for entry of Tempo range, with separate minimum and maximum BPM values. To specify a range of (say) 150-250 BPM you could enter 150.250. The script truncates the decimal part by ANDing (masking) with hFFFF (16 bits set) via UB=F3&hFFFF.

To extract the decimal part as an integer 250, it ANDs Field3 with 0.99999 (16 fraction bits set) to get rid of the 150 integer part, then multiplies by 1000 via UC=F3&0.99999*1000.

The commands to write and read Labels are similar to those for Fields, with the replacement of 'F' with 'FL'. The format is thus FLn=x where n is the Label number (1-6) and x is a number, variable, or quoted string.

For example, FL1="Seed" sets Label1 to "Seed". This is used in the GlossyTracks Percussion script to indicate that Field1 (immediately below Label1) can accept a user-supplied seed value, as mentioned above.

Although not normally recommended, if you need more than the 6 Fields to get user input, you can also use Labels just like Fields. The problem, of course, is that then there are no labels for these "fields"... you'll have to keep track of the usage yourself.

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


Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved