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!

AirBand.DQM MIDI Setup

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

Introduction:

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.

AirBand 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, 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, whistle, hum, talk, or make musical "Doo Ba DOO Ba" babbling sounds. The detected pitch will serve as the basis for the output music, but this is more like conducting a band than actually playing the instruments: As your pitch goes up and down, the output notes follow the general trend... but always in tune. If you pause, the output notes pause (although the percussion continues).

AirBand is based on the PhrygidBlueJam approach that uses multiple voices with notes that are randomly scattered about each incoming Pitch Track note, but constrained to a common scale. There is no specific random melody generation as in JukeBox or the Glossy series.

If a random note does not fit in the selected scale, it is "rounded" to the next higher or lower note that fits. The secret to why this "works" musically is really all in the scale selection: Certain scales, like the default Blues Phrygian, or Pentatonic Major, Blues Minor, or many others, always sound good... you can't hit a bad note. (This is most definitely not true for every scale.)

Each voice is independent of the rest. It plays for 20-30 beats and then changes to all new random parameters:

Besides your voice input, AirBand is designed to be "played" by using hot-keys to change the random note range of each voice, the pitch separation among voices, the overall octave shift of the whole ensemble, and several other effects.

And of course, you can use hot-keys to change the scale, which has a major effect on the basic "feel" of the performance.

You can use these hot-key effects even without sound input, using the built-in DaqMusiq random source.

As in a live jam session, playing with AirBand can be an interactive process: The random riffs and percussion rhythms that you hear can inspire you to take new directions as the performance progresses.

Important note: The built-in Microsoft GS Wavetable Software Synthesizer that comes standard with Windows has excessive latency... over 100 milliseconds, which is typically a significant fraction of a beat. When used with normal Pitch-to-MIDI this lag makes it extremely difficult to play a tune.

But with AirBand this is usually not much of an issue, since for the most part AirBand is only getting general pitch range and direction from your voice, not specific notes. At worst you may have to anticipate the sound output (like a real band conductor) by a beat, such as when starting and stopping any pauses in the performance. But if you are only babbling anyway you won't get confused about where you are in the song. You'll easily fall into a groove with the background percussion beat.


Microphone Setup:

First start AirBand by hitting the F8 key followed by 'd' to start DaqMusiq, then selecting AirBand.DQM from the Open dialog.

You should hear music playing. At this point there is no microphone input, only random DaqMusiq input. Adjust your speaker volume as desired.

Toggle Input on in the toolbar, then click on the thin unmarked button below it to open the Input Control dialog. Select Mic if it isn't selected already. The level control below the line select buttons will then be labeled 'Mic'; start with it set it to 0, which is the highest value and most sensitive. (Negative values are less sensitive.)

Make sure the microphone is positioned for use. You may or may not be hearing music now.

Now hit the thin unmarked button below Sgram/PT on the toolbar to get to the Spectrogram / Pitch Track Controls. In the Pitch Track Toolbox section, click on the Track Limits button in the center of the dialog, next to the colored rectangle.

The Threshold Level control is set to -55 dB by default. If you are already hearing music, increase the Threshold Level (to less-negative values) until it just stops. Or, if you were not hearing music, decrease the Threshold Level to more-negative values until the music starts, then back off until it just stops.

The idea here is to have the system be sensitive to your voice, but not so sensitive that the speaker output causes self-sustaining feedback even when you are silent. That's not a completely bad thing (like normal sound-system feedback squeals); here feedback will still produce music (KaleidoSynth), just not music you can easily control. It's worth experimenting with later, however.

Now sing, hum, or babble as desired; you should hear music when you are making sound, and it should stop when you stop.

Click 'OK' or '[x]' to return to the Pitch Track controls, and hit Pitch to MIDI to get back to its control dialog, then, with Pitch-to-MIDI still active, hit Save Setup and save your customized AirBand.DQM. (You can use another name, as desired.) As soon as you toggle Pitch-to-MIDI off, the threshold will revert to its original default value, so you should now reload the setup you've just saved, which contains the new value as default.

This new setup will be ready to go for future sessions that use the same microphone/speaker configuration and volume control settings. You'll only need to repeat the above threshold adjustment if you change things too much.

Since the microphone is only used to extract pitch information, there is no need for high fidelity... almost any microphone will work, even built-in laptop units. But if you are using a professional unit with a separate preamp, you'll need to plug it into Line In instead of Mic In, and likewise select 'Line In' in the Input dialog.

Tip: Breath noises can cause rumble that can confuse the Pitch Tracker. A windscreen may help for vocals, but (especially for whistling) you might want to try arranging things so the air goes across the microphone instead of directly into it.

If you are using AirBand for a stage performance, you will need to take precautions against feedback, as you do for normal vocals: Place speakers at the front of the stage, facing the audience. Keep the microphone sensitivity low (Threshold Level high, meaning small negative numbers), and use the microphone close to your mouth.

However, you may want to try a bit of audience participation. Ideally, you'd switch in a directional microphone aimed at the audience. But you might be able to just aim your vocal microphone at them, and possibly boost the sensitivity a bit closer to the feedback point.


Hot-Key Effects:

AirBand consists of 8 random tonal instrument voices, all driven by the single instantaneous pitch extracted from your own voice. (A random percussion background is independent of voice input.) Although your voice controls the general pitch range (as well as the presence or absence of sound), you can modify several other parameters via hot-keys (including Scale, discussed separately):

Note Range (N,n):

The 8 instruments typically don't all play the same note, even though they all see the same extracted pitch. Each plays a random note that is within a certain range of the input pitch. The default is +/-2 notes, but you can change that with the 'N' and 'n' keys, which control variable UN in the Changes scripts: 'N' increases the range, and 'n' decreases it. After hitting either of these the left output display will show "Note Range 3", or whatever the new range is. The actual range in this case would be +/-3, since the range limits are symmetrical about 0. (If you set -3, you still get +/-3.)


Spread Factor (S,s):

The Spread Factor (variable UX in the Changes scripts) controls how far apart the voices are in pitch; the default value is 2, but can be raised with the 'S' key and lowered with the 's' key. The left output display will then show "Spread Factor 3" or whatever the new factor is.

To understand how Spread Factor works, consider the case where it is 0, and Note Range is also 0. In that case, all 8 voices would play the same note. If Spread Factor is then raised to 1, then the voices would play:

    Voice 1 = 3 * Factor notes higher
    Voice 2 = 2 * Factor notes higher
    Voice 3 = 1 * Factor notes higher
    Voice 4 = No change
    Voice 5 = No change
    Voice 6 = -1 * Factor notes lower
    Voice 7 = -2 * Factor notes lower
    Voice 8 = -3 * Factor notes lower

Setting negative Spread Factor values causes the above order to flip. For example, if Spread Factor = -1, Voice 1 would have 3 * (-1) = -3 notes added to the incoming pitch track note, (meaning 3 notes lower), while Voice 8 would have -3 * (-1) = +3 notes added.

You might notice when certain instruments swap between high and low at the time of the order flip, but since all instruments are chosen at random every 20-30 beats the effect would not be noticeable for long.

However, if you have manually toggled some voices off (say 1-4), then the flip could cause a dramatic overall range shift as voices 5-8 went from low to high, without the balance of 1-4 going from high to low.


Spread Toggle (0):

The '0' (zero) key forces both Note Range and Spread Factor to 0, but saves the original values. The left output display shows this as "No Spread". Hitting '0' again restores the saved values and shows this as "Normal Spread".

In the "No Spread" condition all voices play the same notes with perfect tracking. If all voices happen to have their random Hold Beats values at 0, the main display will show only a single horizontal note line for each beat... all voices overlap, except for intended minor Note Lag variations in start times. (However, if a voice holds a note for more than one beat, due to its random Hold Beats value, that note continues as expected. So you may see a horizontal note line change color at the start of the next beat, as it continues to hold while the other unheld voices start a new note line.)

This "No Spread" sound is quite distinctive... clean and pure. You may find it useful in adding variety to your performances.


Octave Shift (O,o):

The 'O' key shifts the overall performance up by octaves, and the 'o' key shifts it down. (The default is 0 shift.) These control variable UO in the Changes scripts. The left output display will show the current octave after any change.

You can use Octave to adjust the performance range relative to your voice input range, or to add a "soaring" section to the performance.

Another important use is to compensate for a sudden shift in input range, such as between a low male voice and whistling. (But see Auto-Octave and Note Range Reflect, below, for other approaches.)


Auto-Octave (a):

The 'a' key toggles Auto-Octave on and off. The left output display will show "Auto-Octave ON" or "Auto-Octave OFF".

When Auto-Octave is on, any input notes that are above MIDI note 72 (C5) will cause the Octave to drop to -1 for that note, otherwise it will be set to 0.

This option is intended for mixed voice and whistled performances, where the whistled notes are so high they don't go well with the rest of the performance. When Auto-Octave is active, the whistled parts will typically still be higher than the rest, to use as a "soaring" section, but not outright shrill.

Once toggled on, no further keyboard action is required when you switch between voice and whistle... the Auto-Octave change is automatic on every note. It can do this because it acts in the Percussion script, which runs on each beat before any of tonal voice scripts.

You can change the Percussion script to use a different switching threshold than note 72, and/or different octaves. The real-time action is this line, just after the percussion voice handling and before the hot-key handler:

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

This says that IF Auto-Octave is currently on ([UA=1) then IF the incoming Pitch Track note is above 72 ([mN>72) set the current octave to -1 (UO=-1), ELSE set it to zero (| UO=0].

You can use the Standard Musical Note Frequencies table to get the MIDI note that correponds to the letter note you want to switch at, but it may be easier to just display the MIDI note numbers while you are whistling (with Auto-Octave off) to see what your unshifted range is.

To do that, temporarily close the Pitch-to-MIDI dialog to get back to the Pitch Track controls dialog. Down near the bottom, just above the Pitch-to-MIDI button, there are 3 buttons in a row. Click the middle one to go from 'Notes' through 'Freq' to 'MIDI'.

Alternatively, while staying in the Pitch-to-MIDI dialog (using the default 'Notes' mode), you can decide which letter octave to use, and convert to MIDI number by noting that there are 12 notes per octave and that C5 is 72. So if you want to switch at (say) C4, subtract 12 from 72 to get 60. Or if you want to switch at C6, then add 12 to 72 to get 84.

The switch point doesn't need to fall on an even octave, so you can just "eyeball" the target value: Add 6 if you want it to fall midway between C5 and C6, for example.

You may want to have Auto-Octave shift even lower than -1, especially if you want to switch between voice and whistle without a noticeable range shift. Just change the UO=-1 part as needed.

Notice that Auto-Octave doesn't cooperate with manual Octave Shift (above)... it just selects between two hard-coded octave values. If you set a different octave with Octave Shift, it will be ignored when Auto-Octave is active. Also, when you toggle Auto-Octave off, the new current octave will be -1 (or whatever you have hard-coded) if you toggled mid-whistle, or 0 if not. You can then change it manually with Octave Shift.



Solo (1):

The '1' key toggles Solo on and off. The left output display will show "Solo 1" or "All Voices".

When Solo is active, only Voice 1 plays, and all others are toggled off. (Percussion continues as usual.) Since voice instruments are assigned randomly every 20-30 beats, you will probably want to activate Solo only when you see an an appropriate instrument, and toggle it off if and when a new instrument appears that doesn't meet your needs.

Although Solo toggles off all the other voices, you can manually toggle individual voices back on as desired, to make a duet, trio, or whatever. When you later hit '1' to toggle Solo off, all voices will be toggled on.

Since Voice 1 is typically the voice with the highest range (if you are using a positive Spread Factor), the solo may be higher than you want. You can hit the '0' Spread Toggle key to force both Spread Factor and Note Range to zero for the solo, but you may want a non-zero Note Range, or you may want a mid-range voice.

To solo with a voice other than Voice 1, you can hit the '1' key to toggle all voices but Voice 1 off, and then quickly toggle Voice 1 off manually and toggle the desired voice on. This will be faster than toggling individual 7 voices off manually.

Alternatively, you can modify the Solo function in the Percussion script (which handles all hot-keys) to use another voice:

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

This says that IF the '1' key is hit, toggle the state of U1. Then IF U1=1, force all voices off with X9=0 and force Voice 1 back on with X1=1, showing the status with oL="Solo 1". If you want to use Voice 2 instead, just change X1=1 to X2=1, and change oL="Solo 1" to oL="Solo 2".

Or, you can easily modify this to make the solo voice be a specific instrument. If you want the solo to be (say) Distortion Guitar (General MIDI Instrument 30), you could just add I1=30 to the first line, like this:

    [UK="1" U1=!U1 [U1=1 X9=0 X1=1 I1=30 oL="Solo 1"

However, this doesn't stop the random changes that happen every 20-30 beats. To prevent that, you must also change the Voice 1 script from this:

    I1=?(Ui,UI)             ;Random Instrument

To this:

    [U1=1 I1=30 | I1=?(Ui,UI)]

That says that if Solo is on (UI=1 then force the Instrument for Voice 1 to 30, else set it randomly as before.

Another issue with Solo is loudness, since with only one instrument the overall performance will, of course, be softer than with all 8 playing. You can force Level to a higher setting for the solo voice, by adding L1=UV to set it to the default UV=80. Or use a specifc value instead of UV, such as L1=90, up to the limit of 127.

This has the same random change issue as Instrument number above, and can be handled the same way by replacing:

    L1=?(Uv,UV)             ;Random Level

With:

    [U1=1 L1=UV | L1=?(Uv,UV)]

Or with an immediate like 90:

    [U1=1 L1=90 | L1=?(Uv,UV)]

If you are forcing a specific instrument as well, you can combine these into a single IF:

    [U1=1 I1=30 L1=90 | I1=?(Ui,UI) L1=?(Uv,UV)]

Fundamental Track (f):

Fundamental Track is on by default, and can be toggled off (and back on later) via the 'f' key. The state is shown in the left output display after the toggle.

The Daqarta Pitch Track system has serious problems with low male voices. That's because it relies on spectral peak interpolation, and the fundamental peak of male voices is typically too low for good peak resolution using a 48000 Hz sample rate and 1024-sample analysis width.

In addition, even if that peak were to be well-resolved, the fundamental is often not be the strongest peak. Consider that for male voices the fundamental is usually below 100 Hz, but (for example) standard telephone frequency response is typically only 300-3000 Hz. We don't actually hear the fundamental over the phone... our brains reconstruct it from the higher harmonics.

Daqarta's Fundamental Track option attempts to do the same thing, deducing the fundamental from the spacing of harmonics. This almost always results in a lower detected pitch for voices, especially male voices.

The detected pitch may be much lower than "normal" instruments, and in fact lower than your sound card and audio system can produce. You'll thus hear only the overtones of these super-deep notes... a really distinctive effect.

Please note that it may not be of great importance whether AirBand gets the "true" pitch... after all, it's going to use random notes above and below it anyway. You generally just want it to track the general motion; it should go up and down when your voice goes up and down, regardless of the exact pitch.

So, use Fundamental Track as just another artistic tool to shape your performance.


Note Range Reflect (r):

Note Range Reflect is off by default; the 'r' key toggles it on and off, and shows the state in the left output display.

When Reflect is off, all input notes that are accepted by the Pitch Tracker (as set by the Track Max and Min frequencies in the Track Limits dialog) are also accepted by each MIDI voice. This is because the Note Range Min and Max controls in the individual Voice dialogs are set to allow all MIDI notes (0-127).

When you toggle Reflect on, the Max value for each voice is set to 84, and Reflect at Max is set on. This causes notes that would have been above 84 (C6, at 1046.502 Hz) to "reflect" off of that limit down to lower notes. For example, note 91 (G6, 1567.982 Hz) is 7 notes above the new Max, so it would be reflected down to note 84 - 7 = 77 (F5, 698.456 Hz), which is 7 notes below it.

This option is useful when you shift between voice input (which will be mostly below 1000 Hz) and whistling (which can easily run an octave higher). With Reflect on, your whistling stays in the voice range, though with its direction inverted.

Since Reflect doesn't change the lower vocal notes, you can leave it on all the time, whether using voice or whistle. This is an alternative to using Octave Shift, which typically requires changing up and down when you switch between whistle and voice.

There is nothing magical about note 84; you can modify the Percussion Changes script (where all hot-keys are handled) to use another note number. You can also change it from Reflect at Max to Reflect at Min, such as to bring super-low notes (typically obtained by Fundamental Track with a low male voice) up to the normal audio range.

These are the lines in the Percussion Changes script:

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

Change the '84' as desired. If you want to change to Reflect at Min to reflect up from a low note like 28 (E1, 41.203 Hz), you also need to change all rM9 and rR9 entries to rm9 and rr9 respectively:

    [UK="r" QR=!QR [QR=1 rm9=28 rr9=1
    | rm9=0 rr9=0] oLO="Reflect "+QR]

rm9=28 sets Min for the reflection point, and rr9=1 sets Reflect at Min on. When Reflect goes off (second line), rm9=0 sets Min back to 0 (instead of setting Max to 127 as in the original) and rr9=0 sets Reflect at Min off.


Note Bend (~):

The '~' (tilde) key toggles Note Bend on and off, which is shown via the left output display.

This is an option you will probably want to use sparingly, just for special effects. While it is on, each MIDI note starts out "on pitch", then tracks your actual voice pitch change relative to the MIDI note. In other words, if your voice note goes slightly sharp or flat, then all MIDI notes will go slightly sharp or flat by the same amount.


Hot-Key Scale Select:

You can use hot-keys to change the Scale used by AirBand at any time during a performance. The current scale is always shown in the right output display. Note that case is important:

    "?"  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

The default is Blues Phrygian ('y' key), which gives a "cool jazz" sound. Blues Minor ('b' key) is similar, but not quite as potent. Pentatonic Major ('P' key) gives a universally nice, pleasant sound, useful for "Oriental" music at slow Tempo settings, or for folk or general background music at higher tempos.

Major ('M' key) or Natural Minor ('m' key) are good for conventional ("Western") music. Chromatic ('C' key) is for "New Music", or for emergency evacuations, psychological warfare, or as a substitute for rennet to curdle milk.

The others are there for you to experiment with, but a few are worth noting here:

Random Scale ('?' key) picks a random number between 2048 and 4095 and uses the bit positions as keys in the scale, with the most-significant bit representing 'C' and the least representing 'B' above it. Think of "CdDeEFgGaAbB", where upper case letters indicate whole notes or white keys and lower case letters indicate flats or black keys.

For example, if the number is 2048, the binary equivalent is 100000000000, so only the 'C' key is used (see below). 4095 is 111111111111, so all keys are used (Chromatic). 2194 is 100010010010, which is listed as Raga Mahathi but also happens to be the notes of a 7th chord:

    100010010010
    C...E..G..b.

The above Raga Mahathi is a nice-sounding scale, but most random scales either don't sound very good or are just plain weird. Still, random scales can be a fun way to liven up a performance... and you never know when you will make a great discovery.

Random scales, like all others, are shown in the right output display by name. If there is no standard name, then the 'C...E..G..b.' format is used. (Actually, it uses '^' instead of periods as spacers, which stand out better in the font used for output display.)

C-notes only ('c' key) does just what you'd expect... it only plays the closest 'C' note in each voice. With typical Note Range and Scale Factor settings, this usually means you get 'C's from at least two or three octaves. This doesn't sound like any particular genre of music, but it can be very useful in performances because it causes anticipation of change to come.

5th (Power Chord) ('5' key) is likewise not a "normal" scale... it's just 'C' and 'G', often called a "power chord" when played as a chord in guitar music. This doesn't mean that each voice plays chords, just that it only has those two notes to choose from. But with all voices going at once, you will typically get an assortment of 'C's and 'G's in different octaves... and a really nice effect. It has a bit of the tension of the above C-notes only, and a bit of the "pure" sound of the '0'-key "No Spread" effect.

Major 6th Chord ('6' key) is likewise derived from a chord and is not a "normal" named scale, but it produces fully musical "smooth and mellow" performances.

Feel free to try other chords as scales... you may be pleasantly surprised. Possible chords (those that fit into a single octave) appear at the very end of the Scales list. (See Scales List and Custom Scales, below.) The 7th chord mentioned above under Random Scale is listed there as "Chord 7th", and is shown with 'C...E..G..b.' format, as well as scale number 2194. Use that number to create a new hot-key... we'll use '&' here, which is a shifted '7'. Add a line in the scale hot-key section of the Percussion dialog:

    [UK="&" US=2194]   ;7th Chord

You might want to place this line right before or after the "Dominant 7th" scale line.

Now when AirBand is running, hitting the '&' key will instantly switch to this scale. The right output display will show it as Raga Mahathi in this case, since that is the same scale and it appears earlier in Daqarta's Scale list.


Scales List and Custom Scales:

Besides hot-keys, there is another way to select scales. It's more cumbersome to use during a performance, but it is a great way to explore the possibilities.

Click on Voice 1 in the Setup column of the Pitch-to-MIDI dialog to open the Voice 1 Setup dialog. Then click on the Scale button to open the Scale dialog, which includes the Scales list. Scroll around the list; any scale you select (by clicking on it) will become the current AirBand scale. Also, unlike hot-keys, the selected scale will become the new default for future AirBand performances.

At the bottom of the Scale dialog is the Custom Scale section, which allows you to define up to 4 different scales. You can enter the definition either by note letters or scale number, and give it a label of your choice.

The AirBand setup includes examples of some chord-based Custom Scales, but you can replace any or all of these with whatever scales you like.

To select a Custom Scale, click on the small button (1-4) between the scale number and Name fields. AirBand will display the corresponding name; it may not be the selected Custom Scale name, however, if there is a matching scale in the Scale list.

Once you find a scale you want to add as a hot-key, either from the list or from Custom Scales, you will have the scale number you need to create the hot-key line in the Percussion dialog, as discussed above for the 7th chord example.


Voice 1 Changes Script:

UX=2                    ;Note spread factor
UO=0                    ;Octave shift
Ui=0                    ;Min Instrument number
UI=118                  ;Max Instrument number
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
{?(Qp,QP)               ;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 part
}                       ;End of infinite loop

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.

However, there is one significant difference: The +/-Note line uses 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

See the Spread Factor topic under Hot Key Effects for more details on UX. The Note Range topic relates to the UN variable, and the Octave Shift topic is for the UO variable.


Percussion Changes Script:

The Percussion script is identical to that used for PhrygidBlueJam, except for the addition of effects hot-key handling just ahead of the scale change keys.

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
[QB<=0
    Ub=?(Up,UP)
    IB=B24.?(Uj,UJ)
    BfBV.0=(?(0,15),Ub)
    gB=?r(0,Ug)
    QB=UR*Ub
]
QC=QC-1                ;Perc C countdown
[QC<=0
    Uc=?(Up,UP)
    IC=B24.?(Uj,UJ)
    BfCV.0=(?(0,15),Uc)
    gC=?r(0,Ug)
    QC=UR*Uc
]
QD=QD-1                ;Perc D countdown
[QD<=0
    Ud=?(Up,UP)
    ID=B24.?(Uj,UJ)
    BfDV.0=(?(0,15),Ud)
    gD=?r(0,Ug)
    QD=UR*Ud
]
QE=QE-1                ;Perc E countdown
[QE<=0
    Ue=?(Up,UP)
    IE=B24.?(Uj,UJ)
    BfEV.0=(?(0,15),Ue)
    gE=?r(0,Ug)
    QE=UR*Ue
]
QF=QF-1                ;Perc F countdown
[QF<=0
    Uf=?(Up,UP)
    IF=B24.?(Uj,UJ)
    BfFV.0=(?(0,15),Uf)
    gF=?r(0,Ug)
    QF=UR*Uf
]

[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" U1=!U1 [U1=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="?" 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)

GO:

Questions? Comments? Contact us!

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