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!

AirGuitar.DQM MIDI Setup

Samples: See AirGuitar: User-Controlled Random-Note Jam Session


When this setup is loaded, right-clicking on the Pitch-to-MIDI title bar or any non-control portion of the dialog will open Help at this topic.

AirGuitar can be used like a "normal" DaqMusiq setup that generates music from an internal random source, but it is particularly intended to be used with a microphone and "played" using your voice or another instrument. However, like AirBand, absolutely no skill is required... any sounds you make will be turned into music, with a full percussion backup to set the beat.

You can sing, hum, whistle, talk, babble, or play any instrument; the pitch will be tracked and used to direct the performance, much like a band conductor does, without actually playing the instruments.

AirGuitar is derived from AirBand, so you should read that Help topic for basic principles, plus information on microphone setup, hot-key effects, and scale changes.

The main differences from AirBand are that AirGuitar only uses guitar instruments, and voice usage is divided into two sections: Voices 1-4 randomly select from Guitars 24-31 of the General MIDI Instruments, while voices 5-8 use Bass instruments 32-39.

Because it uses the same Spread Factor scheme as AirBand, lower-numbered voices (higher on the Pitch-to-MIDI dialog) have a higher default note range than higher-numbered voices, so the above split naturally puts bass instruments in their proper relative pitch range. (But you can change that with hot-keys, by setting a negative Spread Factor using repeated hits of the 's' key.)

Another difference from AirBand is that voices 1-4 can optionally play chords (see below), not just single notes.

As with AirBand, each voice is independent and plays for 20-30 beats, then changes to all new random parameters:

Notes to be played are obtained by randomly selecting from those that match a selected scale (Blues Phrygian default) and are within a certain Note Range of the pitch-tracked input note. Hot-keys can change the selected scale and Note Range, as well as the relative pitch spacing between voices (Spread Factor) and the overall octave (Octave Shift), plus other effects.

Chord Hot-Keys:

In addition to all the hot-keys used with AirBand, AirGuitar includes keys to control chords:

Chords Toggle:

The '3' key toggles Chords for Voices 1-4. (Chords for voices 5-8 are disabled by default, but can easily be enabled. See below.) The left output display shows "Chords ON" or "Chords OFF".

When active, the chord patterns for each voice are randomly chosen from a 16-value chord map at the start of the Voice 1 script, but used by all voices:

    Bc="M.M.M."   ;Chord map

This contains three Major chords, two 7th chords, two 5ths (power chords), and one minor. (See the Chord Pattern Character Table.) The 8 remaining entries (50%) are '.' (periods), meaning "no chord"... only the ordinary single-note root is played.

The pattern for each voice is the same length as its 20-30 beat voice cycle, and is replaced at the start of each new cycle by this line (from the Voice 1 script):

    [UC=1 Bf1C.0=(?(0,15),U1)]   ;Random Chord Pattern

This fills the Chord Pattern for Voice 1 with U1 characters randomly chosen from the 16-value chord map, but only if UC=1.

UC is toggled between 0 and 1 via the '3' key in the Percussion Changes script. However, you may hit this key at any time, not necessarily at the start of the 20-30 beat Voice 1 pattern cycle. (And in fact since each voice has a random cycle length, you'd almost never find a point when all voice cycles were just about to start.)

So the toggle script also performs Chord Pattern fills like the above for all four voices, at whatever point they may be in their respective cycles. Conversely, since you may toggle Chords off at any time, the toggle script also fill all four patterns with the '.' "no chord" character.

Here is the full Chords toggle portion of the Percussion script:

[UK="3" UC=!UC oL="Chords "+UC     ;Chord toggle
    [UC=1                          ;If now on,
        Bf1C.0=(?(0,15),U1)        ; fill random chords
        Bf2C.0=(?(0,15),U2)        ; from Chord Map
        ;Bf5C.0=(?(0,15),U5)       ;Chords disabled by default
        ;Bf6C.0=(?(0,15),U6)       ;Remove leading ; to enable,
        ;Bf7C.0=(?(0,15),U7)       ; also in relevant voice
        A9=UU                      ;Set Strum / Arpeggio
    |                              ;Else if Chords off,
        BF1C.0=(15,U1)             ; fill all chords
        BF2C.0=(15,U2)             ; with Map char 15
        BF3C.0=(15,U3)             ; ('.' = no chord)
        ;BF5C.0=(15,U5)            ;Chords disabled by default
        ;BF6C.0=(15,U6)            ;Remove leading ; to enable,
        ;BF7C.0=(15,U7)            ; also in relevant voice
        A9=0                       ;No Strum / Arpeggio

Notice that the lines pertaining to Voices 5-8 are disabled via leading semicolons. To enable Chords for any of these voices, just remove the semicolons on the relevant 2 lines here, as well as the similar line in the relevant Voice script.

Conversely, to disable any of voices 1-4, add leading semicolons here and in the Voice script.

Also notice that in the "off" state the buffer fill value is 15. Since this is filling a chord pattern this interpreted not a literal fill value, but instead indicates index 15 in the Chord Map as the source of the fill value. That is the last entry in the 16-character map, which is '.'.

You can change the map as desired to use other chords (see the Chord Pattern Character Table), or to use different percentages. You can use up to 32 total characters in the map, but you must make sure that character 15 is '.', or you must change the above lines to the corresponding index of a '.' in order for the toggle-off to work properly.

Note that with all 8 voices active, adding Chords to the first 4 will probably be overwhelming.

Arpeggio / Strum Delay:

On a real guitar there is a time lag between the succesive notes of a chord, depending on how fast you strum. In AirGuitar this delay is controlled by variable UU, set to 2 at the start of the Voice 1 script.

The delay is in units of the Trace Update interval, typically 10 msec. The default setting of 2 thus represents about 20 msec between each note of the chord.

You can increase this with the 'U' key or decrease it with the 'u' key. The left output display will then show "Strum 3" or whatever the new value is.

The range of possible values is 0 to 15, but note that this interacts with the beat duration. For example, at the default 250 BPM for AirGuitar, a beat lasts 240 msec. At a delay setting of 15 the second note of the chord starts at 150 msec but the third note won't be heard.

However, AirGuitar can hold each note of a 20-30 beat sequence for up to 4 beats, as determined by the Um=4 maximum Hold Beats setting at the start of the Voice 1 script. In this case, each effective beat would be 4 * 240 = 960 msec, plenty of time to hear all the notes of the chord.

But even without held notes, high delays can produce interesting effects. For example, with the delay set to 12, the second note starts half-way through the beat (120 msec), essentially halving the note duration of the second note (and eliminating any higher notes). The effect sounds like fancy fingerwork.

Arpeggio / Strum Direction:

By default, each strummed chord is played as a downstroke. For a standard-strung guitar and a right-handed player this means the notes go up in pitch as the strum progresses. You can change the direction via hot-keys.

The '/' key (re)sets the default. The left output display will show "Strum Dir /". The symbol indicates the rising pitch direction, not the stroke direction.

Conversely, the '\' key sets a falling pitch for upstrokes, and the display shows "Strum Dir \".

Finally, the '^' (shifted '6') key alternates between rising and falling pitch (downstrokes and upstrokes), and the display shows "Strum Dir /\".

Playing AirGuitar:

Follow the Microphone Setup instructions under AirBand.

The following options can be used to control AirGuitar, shown here with their relevant hot-keys:

    Chords Toggle (3)
    Arpeggio / Strum Delay (U,u)
    Arpeggio / Strum Direction (/, \, ^)
    Note Range (N,n)
    Spread Factor (S,s)
    Spread Toggle (0)
    Octave Shift (O,o)
    Auto-Octave (a)
    Solo (1)
    Fundamental Track (f)
    Note Range Reflect (r)
    Note Bend (~)

The Chords options were discussed above. The rest are the same as those offered in AirBand, and discussed there in detail.

In addition, you can use hot-keys to control the scale. These options are also shared with AirBand, which includes discussions on use, selecting other scales from the Scale List, and creation of custom scales.

    ?  Random Scale
    5  5th (Power Chord)
    6  Major 6th Chord
    7  Dominant 7th
    B  Blues Major
    b  Blues Minor
    C  Chromatic
    c  C-notes only
    H  Harmonic Major
    h  Harmonic Minor
    L  Lydian
    l  Locrian
    M  Major
    m  Natural Minor
    P  Pentatonic Major
    p  Pentatonic Minor
    w  Whole Tone
    X  Mixolydian Pentatonic
    y  Blues Phrygian (default)

Besides hot-keys, another important performance tool is simply toggling voices off and on via their Instrument On/Off buttons in the Pitch-to-MIDI dialog. Due to the Spread Factor, the higher buttons in the dialog (lower Voice numbers) have higher average pitches. Thus, even though the specific instruments are chosen at random, you can still "conduct" the band with respect to high and low instrument voices.

Cutting back on voices is especially likely to be needed when using the Chords option, since with all four high voices each playing multiple notes, the sound can easily become too dense.

You can modify the scripts to remove Chords from some of the first four voices, allowing some with and some without. Conversely, you can add Chords support to some of the bass voices 4-8. (See the Chords Toggle section above for details.) You can then control the mix by toggling voices during the performance.

You may also want to keep the Percussion dialog open to toggle some of the 6 percussion voices off and on during the performance. Unlike tonal voices, all 6 have the same random selection of percussion instruments (and no pitch range), so toggling some off and on is usually just for controlling the overall amount of percussion.

Voice 1 Changes Script:

Bc="M.M.M."   ;Chord map
UX=3                    ;Note spread factor
UO=0                    ;Octave shift
UU=2                    ;Arpeggio / Strum delay
Ui=24                   ;Min Instrument
UI=31                   ;Max Instrument
Qi=32                   ;Min bass Instrument
QI=39                   ;Max bass Instrument
Qp=20                   ;Min play beats
QP=30                   ;Max play beats
UM=-4                   ;Hold Beats lower limit
Um=4                    ;Hold Beats upper limit
UN=2                    ;+/-Note range
Uv=48                   ;Min random Level
UV=80                   ;Max random Level
Ug=2                    ;Max random Note Lag
US=S1                   ;Default Voice 1 Scale
oRS=US                  ;Show Scale name
RF=1 oL="Fundamental Track ON"

{!                      ;Infinite loop
I1=?(Ui,UI)             ;Random Instrument
L1=?(Uv,UV)             ;Random Level
g1=?(0,Ug)              ;Random Note Lag
H1=?(UM,Um)             ;Biased random Hold Beats
U1=?(Qp,QP)             ;Random 20-30 pattern length
[UC=1 Bf1C.0=(?(0,15),U1)]   ;Random Chord Pattern
{U1                     ;Play 20-30 beats
W=1                     ;Wait one beat
n1=?(-UN,UN)+3*UX+12*UO ;Random +/-Note w. spread, octave
}                       ;End of 20-30 note pattern
}                       ;End of infinite loop

Scripts for the other voices are similar to the infinite loop portion of the above, but with different voice numbers like I2 instead of I1, L2 instead of L1, etc.

The +/-Note lines also use different UX note "Spread Factor" multipliers for each voice:

    Voice 1: n1=?(-UN,UN)+3*UX+12*UO
    Voice 2: n2=?(-UN,UN)+2*UX+12*UO
    Voice 3: n3=?(-UN,UN)+UX+12*UO
    Voice 4: n4=?(-UN,UN)+12*UO
    Voice 5: n5=?(-UN,UN)+12*UO
    Voice 6: n6=?(-UN,UN)-UX+12*UO
    Voice 7: n7=?(-UN,UN)-2*UX+12*UO
    Voice 8: n8=?(-UN,UN)-3*UX+12*UO

In addition, voices 5-8 have chords disabled by default, via a leading semicolon on the pattern fill line. Here's the full script for Voice 8:

I8=?(Qi,QI)             ;Random Instrument
L8=?(Uv,UV)             ;Random Level
g8=?(0,Ug)              ;Random Note Lag
H8=?(UM,Um)             ;Biased random Hold Beats
U8=?(Qp,QP)             ;Random 20-30 pattern length
;[UC=1 Bf8C.0=(?(0,15),U8)]   ;Random Chord Pattern
{U8                     ;Play 20-30 beats
W=1                     ;Wait one beat
n8=?(-UN,UN)-3*UX+12*UO ;Random +/-Note w. spread, octave
}                       ;End of 20-30 note pattern

Percussion Changes Script:

This is identical to that used for AirBand, except for the addition of the Chords option using hot-key '3':

Bv="0_4_4_6_6_6_8888"  ;Buffer Velocity Map
Up=4                   ;Min pattern length
UP=9                   ;Max pattern length
Uj=27                  ;Min Percussion instrument
UJ=87                  ;Max Percussion instrument
Bi24.0=(0,88)          ;Fill buffer with 0-87
Bb24.32=47             ;Replace Click 1 with Low-Mid Tom
Bb24.72=71             ;Replace Long Whistle with Short
UR=4                   ;Pattern repeat count

{!                     ;Infinite loop
W=1                    ;Wait 1 beat
QA=QA-1                ;Perc A countdown
[QA<=0                 ;If 0 or less...
    Ua=?(Up,UP)            ;New random pattern length
    IA=B24.?(Uj,UJ)        ;New A instrument
    BfAV.0=(?(0,15),Ua)    ;New velocity pattern
    gA=?r(0,Ug)            ;New Percussion Lag
    QA=UR*Ua               ;Reset count for new total beats
]                      ;End IF
QB=QB-1                ;Perc B countdown
QC=QC-1                ;Perc C countdown
QD=QD-1                ;Perc D countdown
QE=QE-1                ;Perc E countdown
QF=QF-1                ;Perc F countdown

[UA=1 [mN>72 UO=-1 | UO=0]]    ;Auto-Octave real-time change

US=S1                      ;Set US to Voice 1 Scale
UK=K#                      ;Most-recent key hit
[UK>0                      ;Any key?  If so, test which:

[UK="0" UZ=!UZ
    [UZ=1 QN=UN QX=UX UN=0 UX=0 oL="No Spread"
    | UN=QN UX=QX oL="Normal Spread"]]

[UK="1" Q1=!Q1 [Q1=1 X9=0 X1=1 oL="Solo 1"
| X9=1 oL="All Voices"]]

[UK="~" U6=!U6 b9=U6 oLO="Note Bend "+U6]

[UK="N" UN=UN+1 oL="Note Range "+UN]
[UK="n" UN=UN-1 oL="Note Range "+UN]

[UK="O" UO=UO+1 oL="Octave "+UO]
[UK="o" UO=UO-1 oL="Octave "+UO]

[UK="a" UA=!UA UO=0 oLO="Auto-Octave "+UA]  ;Auto-Octave toggle

[UK="S" UX=UX+1 oL="Spread Factor "+UX]
[UK="s" UX=UX-1 oL="Spread Factor "+UX]

[UK="f" RF=!RF oLO="Fundamental Track "+RF]

[UK="r" QR=!QR [QR=1 rM9=84 rR9=1
| rM9=127 rR9=0] oLO="Reflect "+QR]

[UK="3" UC=!UC oLO="Chords "+UC    ;Chord toggle
    [UC=1                          ;If now on,
        Bf1C.0=(?(0,15),U1)        ; fill random chords
        Bf2C.0=(?(0,15),U2)        ; from Chord Map
        ;Bf5C.0=(?(0,15),U5)       ;Chords disabled by default
        ;Bf6C.0=(?(0,15),U6)       ;Remove leading ; to enable,
        ;Bf7C.0=(?(0,15),U7)       ; also in relevant voice
        A9=UU                      ;Set Strum / Arpeggio
    |                              ;Else if Chords off,
        BF1C.0=(15,U1)             ; fill all chords
        BF2C.0=(15,U2)             ; with Map char 15
        BF3C.0=(15,U3)             ; ('.' = no chord)
        ;BF5C.0=(15,U5)            ;Chords disabled by default
        ;BF6C.0=(15,U6)            ;Remove leading ; to enable,
        ;BF7C.0=(15,U7)            ; also in relevant voice
        A9=0                       ;No Strum / Arpeggio

[UK="U" UU=UU+1 A9=UU UU=A1 oL="Strum "+UU]    ;Strum Delay increase
[UK="u" UU=UU-1 A9=UU UU=A1 oL="Strum "+UU]    ;Strum Delay decrease

[UK="/" AD9=0 AA9=0 oL="Strum Dir /"]          ;Rising Strum pitch
[UK="\" AD9=1 AA9=0 oL="Strum Dir \"]          ;Falling Strum pitch
[UK="^" AA9=1 oL="Strum Dir /\"]               ;Alternating Strum

[UK="?" US=?r(2048,4095)]  ;Random Scale
[UK="5" US=2064]           ;5th (Power Chord)
[UK="6" US=2196]           ;Major 6th Chord
[UK="7" US=2774]           ;Dominant 7th
[UK="B" US=2964]           :Blues Major
[UK="b" US=2418]           ;Blues Minor
[UK="C" US=4095]           ;Chromatic
[UK="c" US=2048]           ;C-notes only
[UK="H" US=2777]           ;Harmonic Major
[UK="h" US=2905]           ;Harmonic Minor
[UK="L" US=2741]           ;Lydian
[UK="l" US=3434]           ;Locrian
[UK="M" US=2773]           ;Major
[UK="m" US=2906]           ;Natural Minor
[UK="P" US=2708]           ;Pentatonic Major
[UK="p" US=2386]           ;Pentatonic Minor
[UK="w" US=2730]           ;Whole Tone
[UK="X" US=2258]           ;Mixolydian Pentatonic
[UK="y" US=3442]           ;Blues Phrygian
]                          ;End main hot-key test

[S2!=US             ;If Voice 2 Scale not as above,
S9=US               ; then update all to new scale
oRS=US              ;Show scale name or pattern
}                   ;End of infinite loop

See also Example MIDI Setup Files, MIDI Setup Files, Musical Frontiers, DaqMusiq, KaleidoSynth, Pitch-to-MIDI dialog, Pitch Track Toolbox - Overview, Spectrogram / Pitch Track Controls, Spectrogram / Pitch Track (Sgram/PT)


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