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!

GlossyTracks.DQM MIDI Setup

Play Sample: MossPiglet (206 KB)

Play Sample: TwoRagas (454 KB)

[Glossy Tracks (54K image)]

Introduction:

GlossyTracks is derived from GlossyFishSticks, but instead of a single never-ending performance on each start, it has over 4 billion unique "tracks".

Each track has a random tempo, within a default range of 200-300 BPM. The random tempos can be evenly distributed throughout the range, or can be biased to have more fast, slow, or mid-range tempos using different non-uniform random distributions. See the Biased Random Tempo subtopic, below.

Tracks have finite durations (approximately 1 minute default, but you can set whatever you want), after which the performance fades to silence. Then a completely new track begins. See Track Duration.

Instead of manual Scale selection via hot-key or Scales list as in GlossyFishTracks, here the scale for each track is selected at random from a list of preferred scales, which have been stored in a text file that you can edit.

Similarly, tonal and percussion instruments are selected at random from separate editable text files. See Random Scale and Instrument Selection.

At the start of each track, a random value is chosen as a "seed" that completely determines the performance of that track. The seed is displayed at the lower left as in the other Glossy setups, allowing you to repeat the performance exactly, or repeat it but with a longer duration, different instruments, or other changes. See Repeating a Performance.

In addition, the seed is used to generate a title for the track, shown in a large Custom Message Box above the display area together with the seed and a 2-digit code identifying the title format. (Most formats have adjustable probablity; you can modify the Percussion Changes Script to favor any formats you especially like.) Left-clicking in the message box allows saving the seed, title, and format code all together to the clipboard.

You can change the default Seed, Time (duration), BPM range, Note range, Pattern length range, and Pattern Repeat threshold by entering appropriate values in the main Daqarta Fields that have the corresponding Labels.

If you really like the current track, you can extend the performance indefinitely by entering -1 into the Time field.

GlossyTracks carries over most of the same options as GlossyFishSticks, including Theme Pattern Repeat, Random Hold Beats, Random Levels, and Random Note and Percussion Lags, which are discussed in those GlossyFishSticks subtopics. It also supports the options discussed there in Customizing Parameters, with the exception that random instruments are now selected from a loaded and customizable file.

(The Music_from_Anything macro mini-app uses much of the same technology as GlossyTracks, but instead of just random numbers it can get its initial input from user-supplied data, such as sound or image files or live input. It also has hundreds of adjustable parameters.)


Operation:

Hit the F8 key followed by the D key to run the DaqMusiq macro, which will prompt you for a file to be automatically loaded. Select the GlossyTracks.DQM MIDI Setup file, and the macro will toggle the Pitch-to-MIDI button to start playing. Set the desired volume using the Volume/dB Slider Dialog (F9 key), or the speaker icon in the Windows system tray.

The track will be selected at random, and will play with all default settings. At the bottom of the main Daqarta dialog, just below the Notes area, the six Labels will show Seed, Time (1:00), BPM (200.300), Note (40.80), Pattern (7.11), and Patt. Rept.(0).

The values in parentheses show the default settings for each item. BPM, Note, and Pattern have separate minimum and maximum values, separated by a decimal point.

The Fields below each Label should initially be empty, so that the defaults will be used. (If you have been using them for something else, you may want to clear them before you start GlossyTracks.)

To change from the default values, just enter new values in the relevant Fields. For example, to change the BPM range to 150-250 from the default of 200-300, you would enter 150.250 in the BPM field.


Seed Field:

When the Seed field is empty, GlossyTracks choses the initial seed value at random. After the first track ends, the next random value will be chosen from the same sequence. This means that (all else being unchanged) the entire sequence of subsequent tracks can be repeated by setting the same initial seed. You can do that by entering the value into the Seed field, then restarting by toggling the Pitch-to-MIDI button off and back on.

While a track is playing, the seed value will be shown in the Song Title window ahead of the track name, and it will also be shown in the Output Display window at the lower left of the Pitch-to-MIDI dialog. The value will be shown in hexadecimal format, indicated via a leading 'h'. When you hear a track you want to repeat, you can copy (CTRL+C) its seed (including the 'h') from the output display and paste it (CTRL+V) into the Seed field before restarting. To copy from the Title, left-click inside the title window; its entire contents (seed, title, and 2-digit format code) will be copied to the Windows Clipboard. Pasting (CTRL+V) into the Seed field will insert the seed plus a few characters from the start of the title; these extraneous characters will be ignored.

You may want to copy a number of titles to the Notes area for later playback. Titles (with seeds and formats) average about 50 characters, which means you can fit about 40 titles into the 2047-character Notes area. (It will auto-scroll as needed.) If you want to save more than that, you can use Windows Notepad or any plain text editor.

Note that GlossyTracks only uses the Seed field when Pitch-to-MIDI is toggled on to begin playing; changing it has no effect during play. When the next track starts automatically, it will use a continuation of the existing random sequence, not the newly-entered seed. Once you toggle Pitch-to-MIDI off and back on, the new seed takes effect. As before, all subsequent tracks will be continuations of the new random sequence... the Seed track will not auto-repeat.

Just for fun: Note that you can enter ordinary text into the Seed field and GlossyTracks will use the first 4 characters as the seed. The characters will be converted to ASCII values in the order they appear. For example, if you enter "Barbara", the "Barb" will become the equivalent of entering the hexadecimal "h42617262". Using the default Song Title settings, the track will be named "Gospel Of The Grumpy Basilisk". Changing the case of one or more letters will give a completely different seed and name, and of course a completely different performance.

Alternatively, you can use hexadecimal values themselves to make "text" with up to 8 characters, or 9 if you count the leading 'h'. Hex notation includes the digits 0-9 plus letters A-F (case insensitive). You can use the digits to represent other letters, such as 0 for O, 1 for I or lowercase L, 2 for Z, 5 for S, and 6 for G. With a bit of stretching, you can use 7 for T. Using the leading 'h', you can get things like hEADCA5E or h07B0D1E5, or you can ignore the 'h' and just consider the remaining characters in seeds like hFEEDBA6 or hBA5EBAll.


Time Field:

The running time (track duration) defaults to 1:00 (one minute). This is indicated by the Label showing Time (1:00). You can set a different time using this same format. Note that if you use a single colon as above, it will be interpreted as minutes and seconds. If you want it to be treated as hours and minutes, append an 'a' or use a dual colon format like 1:00:00.

Alternatively, you can enter the desired number of seconds, without a colon.

The Time value is only read at the start of each track. If you enter a new value while a track is playing, it does nothing until the next track starts.

Exception: If at any point before the track-end fade you enter a negative number (not a negative HH:MM time value, but a simple negative integer like -1), then the current performance will be extended indefinitely. (Actually, it will be extended to 2^31 - 1 beats, which at 250 BPM would be more than 16 years.)

This is so that if you hear a track you really like, you can keep it going just by entering a negative number.

Note that changing the running time will cause subsequent tracks to have different random seed values. This is due to greater or fewer passes through the voice and percussion scripts causing greater of fewer values to be used from the random sequence, leaving it in a different position for the next track.


BPM Range:

The tempo for each track is fixed at its start, randomly chosen from the specified BPM range. The default range is between 200 and 300 beats per minute, indicated in the Label as BPM (200.300).

New values should be entered in the Field below using the same decimal format. Normally, it doesn't matter which order you use; 200.300 is equivalent to 300.200. Note, however, that whichever term is last must always have exactly 3 decimal places, which limits the effective value to 999 max. If it is less than 100, use leading zeros like 200.099. There are no similar restrictions on the leading value (the integer part).

However, if either the integer or decimal parts are zero, the default value (200 or 300) is used for that part. If you enter, say, 150 (no decimal part), the range will be from 150-300. If you enter 0.250 (no integer part), the range will be from 200-250. The order is important in this case, since if you enter 300 the range will be from 300-300... in other words, you'll always get 300 BPM.

Regardless of what values you enter, the actual values used will be limited to the range of 30 to 6000 BPM. The actual Tempo will be chosen randomly from between these limits, using a biased distribution. (See Biased Random Tempo, below.)

As indicated above, you can force a specific BPM by setting both limits to the same value, like 250.250.

The BPM limits are only read at the start of each track. If you enter new values while a track is playing, nothing changes until the next track starts.

Unlike running Time (above), changes to BPM limits have no effect on the random seed values of subsequent tracks. This is because the same number of random values are used from the random sequence, just at a different rate. It is thus left in the same position for the next track.

Note that BPM refers to the fastest notes in the track. Unlike conventional music notation which allows dividing whole notes into ever-smaller fractions, DaqMusiq works the other way around. It starts with BPM set equivalent to the smallest time division of the track, and uses multiples of that to make longer notes. Since this is under random control, the overall track may sound considerably slower than the specified BPM.


Note Range:

Each of the eight voices in GlossyTracks uses its own note patterns, which are changed when a new instrument is chosen at the start of a new pattern cycle. A pattern consists of notes randomly chosen from a specified range, which is the same for all voices. The default range is 40 to 80, indicated in the Label as Note (40.80).

New note range limits should be entered in the Field below using the same decimal format. Normally, it doesn't matter which order you use; 40.80 is equivalent to 80.40. Please note, however, that whichever term is last must always have exactly 2 decimal places, which limits the effective value to 99 max. If it is less than 10, use leading zeros like 40.09.

However, if either the integer or decimal parts are zero the default value (40 or 80) is used for that part. If you enter, say, 32 (no decimal part), the range will be from 32-80. If you enter 0.64 (no integer part), the range will be from 40-64. The order is important in this case, since if you enter 80 the range will be from 80-80... in other words, you'll only get note 80, for every note.

Standard MIDI notes run from 0 to 127. Note 40 is E2, about 82.4 Hz, while note 80 is G#5, about 830.6 Hz.

You can shift an entire performance up or down by a fixed number of notes (semitones) by adding or subtracting the same value from each Note limit. For example, to lower the pitch by one octave, subtract 12 from each.

Making the Note range wider or narrower, however, may affect the melody.

For reference, a standard piano keyboard runs from note 21 (A0, at 27.5 Hz) to note 108 (C8, at 4186 Hz). Note 60 is C4 (Middle C) at 261.626 Hz, and note 69 is A4 (Concert A) at exactly 440 Hz by definition.

You can compute the frequency of any MIDI note N from:

Freq = 440 * 2^((N - 69) / 12).

The overall 0-127 MIDI note range is thus 8.18 to 12543.86 Hz. This is far larger than is likely to be "musically interesting", but may be fun to experiment with. However, since the decimal portion is limited to 99, if you really want to use the widest possible range you must give the upper limit first, as in 127.01. (Remember, if you set either limit to 0, the default is used instead.)

The integer limit is 127. Larger values will be masked with 127, meaning that only the low 7 bits of the binary equivalent will be used. For example, if you enter 234 (binary 11101010) the most-significant bit will be zeroed to 01101010 binary, effectively subtracting 128 to give 106.

The Note limits are only read at the start of each track. If you enter new values while a track is playing, nothing changes until the next track starts.

Changes to the Note range have no effect on the random seed values of subsequent tracks. This is because the same number of random values are used from the random sequence, so it is left in the same position for the next track.


Pattern Length Range:

Each of the eight voices in GlossyTracks uses its own note patterns, which are changed when a new instrument is chosen at the start of a new pattern cycle. The length of each pattern is randomly chosen as well, from a default range of 7 to 11 notes. This is indicated in the Label as Pattern (7.11).

New pattern range limits should be entered in the Field below using the same decimal format. The minimum and maximum limits may be reversed. However, whichever is last (the decimal part) must have exactly 2 decimal places, padded with a leading zero as needed. 11.07 would thus be equivalent to the default 7.11.

However, if either the integer or decimal parts are zero the default value (7 or 11) is used for that part. If you enter, say, 3 (no decimal part), the range will be from 3-11. If you enter 0.9 (no integer part), the range will be from 7-9. The order is important in this case, since if you enter 11 the range will be from 11-11... all patterns will always have 11 notes.

Both limits are masked with 63; if you enter a larger value, only the low 6 bits of the binary equivalent will be used. This is effectively the same as subtracting 64 repeatedly until the remainder is 63 or less. For example, if you enter 500 (binary 111110100), masking with 63 will clear the high 3 bits for a value of binary 000110100 or 52.

The pattern limits are only read at the start of each track. If you enter new values while a track is playing, nothing changes until the next track starts.

Changes to the pattern range will cause subsequent tracks to have different random seed values. This is because the pattern length determines how many values are used from the random sequence to fill each pattern, which affects the starting position for the next track.


Theme Pattern Repeat:

The Patt. Rept.(0) (Pattern Repeat) Field allows you to control the probability that the intial patterns or "themes" that you hear at the start of the track will be repeated throughout the performance. By default, the pattern length and specific notes for each voice are changed along with the instrument after each pattern cycle completes.

If you set a Repeat value higher than the upper limit of the Pattern Length Range (see above), then every time a pattern cycle completes it will be reloaded with the initial values (which are saved at the start of the track).

If you set the Repeat value between the lower and upper limit, then only voices whose initial random pattern length is less than this will be repeated.

Even if set to repeat every voice, that doesn't mean the overall performance will repeat. Besides the fact that this repeat mechanism doesn't affect Percussion, the voices typically have different random initial lengths. That means they start, finish, and restart independently; the overall performance can only repeat when all voices happen to restart in their original sequence. See the detailed discussion of this under Theme Pattern Repeat in the GlossyFishSticks and GlossyFishBones topic. That uses variable Ur as the repeat value, whereas GlossyTracks uses Field6 via the F6 variable.

Unlike the Field variables for Seed, Time, BPM, Note, and Pattern length that are only read when a new track starts, the Repeat value is read every time a voice cycle begins during a track.

Changes to the repeat value will cause subsequent tracks to have different random seed values. This is because a repeated pattern will have the same length for each voice cycle, instead of a random-length pattern. Since the pattern length determines how many values are used from the random sequence to fill each pattern, this affects the starting position for the next track.


Biased Random Tempo:

In the Voice 1 Changes Script (below), the variable UB sets the default minimum Tempo to 200 BPM, and UC sets the maximum to 300 BPM, as long as there is nothing in Field3. Otherwise, the Field3 values are used. The Min and Max values are only used at the start of each track; if you change them during a track, they won't take effect until the next one.

You can choose one of 6 script lines to randomly select a tempo within this Min-Max range, using different random distributions: Uniform, triangular (default), semi-Gaussian 4, semi-Gaussian 8, Gaussian, and square-law. Each line has the general form TB=?(UB,UC), with different characters after the '?'. Five of the lines are commented out via a leading semicolon; only the one without the semicolon is active. You select a different distribution by moving semicolons. Here is the relevant portion of the script:

[F3&hFFFF=0            ;If no Field3 integer,
    UB=200                 ;Use default 200 BPM min
| UB=F3&hFFFF]         ;Else use integer as min
[F3&0.99999*1000=0     ;If no Field3 decimal,
    UC=300                 ;Use default 300 BPM max
| UC=F3&0.99999*1000]  ;Else use decimal as max

;TB=?(UB,UC)           ;Uniform random Tempo
TB=?2(UB,UC)           ;Triangular Tempo
;TB=?4(UB,UC)          ;Semi-Gauss 4 Tempo
;TB=?8(UB,UC)          ;Semi-Gauss 8 Tempo
;TB=?G(UB,UC)          ;Gaussian Tempo
;TB=?q(UB,UC)          ;Square-law Tempo

The uniform tempo gives an even distribution of tempos across the range. The default triangular favors the mid-range (250 BPM), with slower or faster tempos linearly less probable. As you go farther down the list, the mid-range probability increases and the slower and faster probabilities decrease. See the Non-Uniform Random Distributions subtopic under Changes Script Random Values for a histogram that compares these distributions.

In addition, you can put an 'L' or 'H' after any of the non-uniform distribution characters to favor the low or high end of the range. For example, TB=?2L(UB,UC) would give most tempos near 200 BPM, with faster tempos linearly less likely. Conversely, TB=?2H(UB,UC) would peak at 300, with slower tempos less likely.


Track Duration:

Track duration is based upon counting beats, using the median Tempo (BPM). Since that value is already in beats per minute, the number of beats for the default track time of 1 minute is equal to the BPM. However, if Field2 has been set, the returned value is always in seconds, so the total beats count is BPM times Field2 seconds, divided by 60 seconds per minute:

UC=UB/2+UC/2           ;Median BPM
[F2<=0                 ;Field2 empty?
    UD=UC                  ;Track time in beats if so
| UD=F2*UC/60]         ;Else use Field2 as track time

The track time (in beats) computed here assumes that the random tempo happens to fall midway between the tempo limits, or 250 BPM with the default 200-300 BPM range. Tracks that use slower tempos will thus take longer to use the computed UD number of beats, and faster tempos will take less time. A 200 BPM track would take 250/200 = 1.25 minutes, while a 300 BPM track would take only 250/300 = 0.833 minutes (50 seconds).

Since the basic Glossy approach creates performances of essentially infinite duration, some consideration must be given to stopping at an arbitrary time... there is no natural "end" point. An abrupt stop is too jarring, so GlossyTracks uses the simple expedient of a fade-out, similarly done by counting UF beats. The default is 5 seconds (5/60 of a minute) for a 250 BPM track, found by this line:

UF=5/60*UC              ;Fade-out, beats

Finally, there is a "sleep" or dead-time between tracks, which defaults to 2 seconds for a 250 BPM track via:

UZ=2/60*UC              ;Sleep between tracks

If you want the same overall track duration regardless of tempo, you can replace the above script lines with these, which use the actual Tempo TB instead of the median UC:

[F2=0                  ;Field2 empty?
    UD=TB                  ;Track time in beats if so
| UD=F2*TB/60]         ;Else use Field2 as track time
UF=5/60*UC             ;Fade-out duration, beats
UZ=2/60*UC             ;Sleep between tracks, beats

The only problem with this is that if you change Tempo (such as by changing the random distribution, or the Tempo limits Min BPM UB and and Max BPM UC) then the track performance will last a different number of beats. That usually means a different number of random values, which are used to set performance factors such as note and percussion patterns, instruments, scales, and levels as well as tempo. The track will thus end with a different random seed for the start of the next track... you'll get a completely different series of tracks.

Likewise, if you change the Time UD duration to get longer or shorter tracks, or set a different UF fade or UZ sleep time, you'll get a different series of tracks.

The actual duration timing is done in the Percussion Changes script, which runs on every beat. The last major IF block in the script compares the total elapsed beats mB to the UD target via [mB>UD. When mB is greater than UD, the business of stopping the performance proceeds.

However, if the Time field (F2) holds a negative integer, UD is set to 2^31-1 via [F2<0 UD=3G] just before the [mB>UD test. ('3G' is 3 Giga, or 3 * 10^9. The maximum positive value that UD can hold is 2^31-1 or 2.14 * 10^9, so it is limited to that automatically.)

If UD is set to this limit value, the duration of the current performance will be extended indefinitely (several years). Since the Percussion script runs on every beat, you can enter a negative integer into Time at any point before the end-fade starts if you decide you want to hear more of the current track.

Initially, variable Qf is 0, since all MIDI user variables are reset to zero before each performance begins. On the first beat past the target duration the Qf value is still zero (since it is not used anywhere else), which acts as a flag. The flag is set via Qf=1, and the current Level for each voice is saved in position 196 of buffer 3 for that voice via Bb13.196=L1, etc. The current Percussion Level LP is saved in Qp. Finally, Qe=UF loads fade counter Qe with the number of fade-out beats UF, and that block of the IF is done:

[F2<0 UD=3G]   ;If Time Field2 neg, set max duration
[mB>UD         ;If current beats total past duration,
    [Qf=0              ; start fade
        Qf=1
        Bb13.196=L1
        Bb23.196=L2
        Bb33.196=L3
        Bb43.196=L4
        Bb53.196=L5
        Bb63.196=L6
        Bb73.196=L7
        Bb83.196=L8
        Qp=LP
        Qe=UF

On the next and following beats, elapsed beat count mB is still greater than target UD, so the outer IF block is entered. But flag Qf is no longer 0, so the ELSE (|) block of the inner IF is run:

    |
        L1=Bb13.<196>*Qe/UF
        L2=Bb23.<196>*Qe/UF
        L3=Bb33.<196>*Qe/UF
        L4=Bb43.<196>*Qe/UF
        L5=Bb53.<196>*Qe/UF
        L6=Bb63.<196>*Qe/UF
        L7=Bb73.<196>*Qe/UF
        L8=Bb83.<196>*Qe/UF
        LP=Qp*Qe/UF
        Qe=Qe-1
        [Qe=0 W=UZ X0=1]
    ]
]

Here the current Level for each voice is set to the saved value, times Qe/UF, and Qe is decremented. Since Qe starts off equal to UF and declines, the ratio declines as well and the Level is linearly reduced.

During the fade, each Voice script is still running, although at a slowly-reducing Level. During normal operation this could result in one or more voices coming to the end of its pattern cycle, which would cause it to restart with a new pattern and instrument... and a new Level instead of the fading one.

At the end of each voice cycle there is normally a rest (Wait) of Qr beats, via W=Qr. To block any possible restart during the fade, the Qf fade flag is tested and if the fade is in progress it uses a very large Wait of 1 million beats (1M) instead, as shown in the Voice 1 script below:

[Qf=1 W=1M | W=Qr]     ;Rest Qr beats unless fade

The fade proceeds. Finally, after Qe is decremented to 0, the last line of the inner IF runs, which is an IF itself: [Qe=0 W=UZ X0=1]. This sets the inter-track silence interval via a Wait of UZ beats with W=UZ.

The Percussion script is still running, though with the Level off, and after the Wait the entire Pitch-to-MIDI performance is restarted via X0=1. This is just like toggling it off and back on, resetting all variables, selecting a new random seed, Tempo, Scale, etc, to give a totally new performance.


Random Scale and Instrument Selection:

Each time GlossyTracks starts a new track, it selects a new Scale at random. But although Daqarta includes over 500 standard Scales, most of them don't sound very good in Glossy setups, where 8 different voices can be playing different notes of the scale at the same time. That's why GlossyFish (and GlossyFishSticks, etc) default to Pentatonic Major... it always sounds good in this use.

However, via listening tests with each standard scale, a list has been created of preferred scales that work well in Glossy setups. It is a standard text file called GlossyScales.TXT that you can edit with Windows Notepad or any other text editor. It is derived from the complete Scales list in AllScales.TXT

When GlossyTracks starts a performance, it loads this file into macro buffer Buf0 via BLm0="GlossyScales". It then obtains the number of entries via UA=BLm0. This is one more than the highest (0-based) buffer index, so a random scale can be selected from the list via S9=Bm0.?(0,UA-1). (The "9" voice in S9 means that the selected scale should be used for all 8 voices.)

GlossyScales.TXT could actually have fit into a voice buffer instead of a macro buffer. It contains 12-bit values that would have taken two 8-bit buffer positions each using 16-bit direct access, but since there happen to be only 42 scales in this list, they would have only taken 84 bytes out of the 256 in the buffer. However, by using a macro buffer here, the full 532-scale AllScales.TXT (or anything up to 1024 scales) can be substituted without any additional changes to the script.

However, voice buffers are used for random instrument selection. A list of tonal instruments is loaded from GlossyInst.TXT into Buffer 4 of Voice 1 by BLb14="GlossyInst", and the maximum instrument index is obtained by UI=BLb14-1. Random instruments are then selected via I1=B14.?(0,UI) in the Voice 1 script, and similarly for I2 in the Voice 2 script, etc.

GlossyInst is actually a copy of AllInst.TXT that has certain unwanted instruments commented out. But since instrument numbers only run from 0-127, the full list would fit easily into an 8-bit, 256-position voice buffer for direct access.

Likewise, the Percussion script loads the GlossyPerc.TXT list of percussion instruments into Buffer 4 of Voice 2 via BLb24="GlossyPerc", and gets the maximum instrument index via UJ=BLb24-1. Instruments are selected with IA=B24.?(0,UJ), IB=B24.?(0,UJ), etc, in the script. Similar to the above, the file is a copy of AllPerc.TXT with certain unwanted instruments commented out.


Repeating a Performance:

Like the other Glossy setups, GlossyTracks selects an initial random seed from one of over 4 billion values (2^32-1), and then switches the random generator into pseudo-random mode. It does this at the start of the Percussion script, like GlossyBones and GlossyFishBones (but unlike the other Glossy setups that set the seed in the Voice 1 script).

[X0=0                  ;Initial track?
    ?s=?(-3G,3G)           ;32-bit random seed
    [F1!=0                 ;Use Field1 seed if set:
        ?s=F1                  ; h1327BBDA = "MossPiglet"
    ]                          ; h20C234B0 = "TwoRagas"
]

The initial IF tests if Pitch-to-MIDI On/Off has been restarted for a new track via X0=1 (near the end of the Percussion script). If not, it selects a random initial seed via ?s=?(-3G,3G). However, if you have entered a seed value into Field1 (under the Seed label), that value will become the initial seed for the subsequent tracks.

When you manually set a Field1 initial seed instead of using a random value, the performance (the initial track and the subsequent series of tracks) will repeat exactly every time.

You'd typically highlight and copy (CTRL+C) the random seed value displayed at the bottom left of a performance you liked, including the 'h' prefix that indicates it is a hexadecimal value. Then paste (CTRL+V) that value into Field1 before starting or restarting Pitch-to-MIDI.


GlossyTracks Voice 1 Changes Script:

Voices 2-8 are similar to the infinite loop part of this Voice 1 script (the final part starting with {! ). They don't include a specific infinite loop command because they are all infinite loops by default, since they omit the once-only initialization done at the start of Voice 1. They begin with similar IF-ELSE tests ([mB<U2..., etc) and operate the same way, just with different voice numbers in the commands.

BLm0="GlossyScales"    ;Load Scales list
UA=BLm0                ;Num scales in list
S9=Bm0.?(0,UA-1)       ;Random Scale
oRS=S1                 ;Show Scale name
ors=S1                 ;Show Scale pattern
BLb14="GlossyInst"     ;Load Instrument list
UI=BLb14-1             ;Max Instrument number

[F3&hFFFF=0            ;If no Field3 integer,
    UB=200                 ;Use default 200 BPM min
| UB=F3&hFFFF]         ;Else use integer as min
[F3&0.99999*1000=0     ;If no Field3 decimal,
    UC=300                 ;Use default 300 BPM max
| UC=F3&0.99999*1000]  ;Else use decimal as max

;TB=?(UB,UC)           ;Uniform random Tempo
TB=?2(UB,UC)           ;Triangular Tempo
;TB=?4(UB,UC)          ;Semi-Gauss 4 Tempo
;TB=?8(UB,UC)          ;Semi-Gauss 8 Tempo
;TB=?G(UB,UC)          ;Gaussian Tempo
;TB=?q(UB,UC)          ;Square-law Tempo
UC=UB/2+UC/2           ;Median BPM
[F2<=0                 ;Field2 empty?
    UD=UC                  ;Track time in beats if so
| UD=F2*UC/60]         ;Else use Field2 as track time
UF=5/60*UC             ;Fade-out duration, beats
UZ=2/60*UC             ;Sleep between tracks, beats

[F5&63=0               ;If no Field5 integer,
    UL=7                   ;Use min 7 pattern length
| UL=F5&63]            ;Else use integer as min
[F5&0.99999*100=0      ;If no Field5 decimal
    UU=11                  ;Use max 11 pattern length
| UU=F5&0.99999*100&63] ;Else use decimal as max
UM=-4                  ;Hold Beats lower limit
Um=4                   ;Hold Beats upper limit
[F4&127=0              ;If no Field4 integer,
    Un=40                  ;Use default 40 min note
| Un=F4&127]           ;Else use integer as min
[F4&0.99999*100=0      ;If no Field4 decimal,
    UN=80                  ;Use default 80 max note
| UN=F4&0.99999*100]   ;Else use decimal as max
UV=80                  ;Max random Level
Uv=48                  ;Min random Level
Ug=2                   ;Max random Note Lag
Qv=2                   ;Number of verses per theme
Qs=4                   ;Sustain beats after all verses
Qr=4                   ;Rest beats after sustain
Qt=10                  ;Min intro delay for Percussion
QT=50                  ;Max intro delay (beats)
[QP=1 QT=?(Qt,QT) | QT=0]  ;No intro delay if no Perc
U1=QT                  ;Voice 1 starts after intro delay
UT=50                  ;Max voice-voice intro delay
U2=QT+?(0,UT)          ;Random delays for voices 2-8
U3=QT+?(0,UT)
U4=QT+?(0,UT)
U5=QT+?(0,UT)
U6=QT+?(0,UT)
U7=QT+?(0,UT)
U8=QT+?(0,UT)

{!                     ;Infinite loop
[mB<U1 W=1 | [Qf>0 W=1 | X1=1  ;Intro delay or fade Wait, else voice on
I1=B14.?(0,UI)         ;Random Instrument
L1=?(Uv,UV)            ;Random Level
g1=?r(0,Ug)            ;Random Note Lag
H1=?(UM,Um)            ;Biased random Hold Beats
U1=?(UL,UU)            ;Random pattern length
V1.0="8"               ;1st note velocity, always sounds
Bf1V.1=(?(0,15),U1-1)  ;Random Velocity Pattern
Bf11.0=(?(Un,UN),U1)   ;Random Note Buffer 1 Fill
Bf12.0=(?(Un,UN),U1)   ;Random Note Buffer 2 Fill
[Q1=0                  ;Initial pass?
    BC13.0=1V(0,U1-1)      ;If so, save Velocity Pattern
    BC13.64=11(0,U1-1)     ;Save Buffer 1 note pattern
    BC13.128=12(0,U1-1)    ;Save Buffer 2 note pattern
    Bb13.192=U1            ;Save pattern length
    Bb13.193=I1            ;Save Instrument number
    Bb13.194=H1            ;Save Hold Beats
    Bb13.195=L1            ;Save Level
    Q1=1                   ;Flag = initial pass done
|                      ;Else if not initial pass,
    [U1<F6                 ;Is pattern size below threshold?
        U1=Bb13.192            ;If so, restore original size
        BC1V.0=13(0,U1-1)      ;Original Velocity Pattern
        BC11.0=13(64,U1+63)    ;Original Buffer 1
        BC12.0=13(128,U1+127)  ;Original Buffer 2
        I1=Bb13.193            ;Original Instrument
        H1=Bb13.194            ;Original Hold Beats
        L1=Bb13.195            ;Original Level
    ]                      ;End pattern threshold IF
]                      ;End initial pass IF
U1=U1*H1               ;Pattern * Hold length
{Qv                    ;Play Qv complete verses
i1=11 W=2*U1           ;select Buf 1, play twice
i1=12 W=U1             ;Buffer 2, play once
i1=11 W=U1             ;Buffer 1, play once
i1=12 W=U1             ;Buffer 2, play once
i1=11 W=U1             ;Buffer 1, play once
}                      ;End of verse
s1=1                   ;Sustain after 2nd verse
X1=0                   ;Voice 1 Instrument off
W=Qs                   ;Hold (wait) Qs beats
s1=0                   ;Sustain off
[Qf=1 W=1M | W=Qr]     ;Rest Qr beats unless Qf fade
X1=1                   ;Instrument on
]                      ;End Qf fade IF
]                      ;End intro delay IF
}                      ;End of infinite loop

GlossyTracks Percussion Changes Script:

Bv="0_8_8_8_8_8_88880_4_4_6_6_6_8888"   ;Buffer Velocity Map
FL1="Seed"             ;Set Label1-Label6
FL2="Time (1:00)"
FL3="BPM (200.300)"
FL4="Note (40.80)"
FL5="Pattern (7.11)"
FL6="Patt. Rept. (0)"
[X0=0                  ;Initial track?
    ?s=?(-3G,3G)           ;32-bit random seed
    [F1!=0                 ;Use Field1 seed if set:
        ?s=F1                  ; h1327BBDA = "MossPiglet"
    ]                          ; h20C234B0 = "TwoRagas"
]

?x=0                   ;Set pseudo-random mode
oLh=s                  ;Show random seed
oTh=1                  ;Hex seed value before track Title
oTb=1                  ;Block number after track Title
oM="<<Track Title"     ;Custom Message title
oM="<F(34)"            ;Font height for Custom Message
oM="<D(0,-80)"         ;Message position above main window
oM="<v(10)"            ;Vertical white space for Custom Message
oM="<B(256,256,128)"   ;Background color for Custom Message
oMT=s                  ;Show track Title as Custom Message
XP=?(0,5)              ;Random Percussion on/off
QP=XP                  ;Save Percussion button state
LP=?(48,64)            ;Random Percussion level
XP=0                   ;Force Percussion off for 1st beat
Up=4                   ;Min pattern length
UP=9                   ;Max pattern length
BLb24="GlossyPerc"     ;Load Percussion instrument list
UJ=BLb24-1             ;Max Percussion instrument
UR=4                   ;Pattern repeat count

{!                     ;Infinite loop
W=1                    ;Wait 1 beat
[QX=0 XP=QP QX=1]      ;Percussion back on after 1st beat
QA=QA-1                ;Perc A countdown
[QA<=0                 ;If 0 or less...
    Ua=?(Up,UP)            ;New random pattern length
    IA=B24.?(0,UJ)         ;New A instrument
    BfAV.0=(?(16,31),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.?(0,UJ)
    BfBV.0=(?(16,31),Ub)
    gB=?r(0,Ug)
    QB=UR*Ub
]
QC=QC-1                ;Perc C countdown
[QC<=0
    Uc=?(Up,UP)
    IC=B24.?(0,UJ)
    BfCV.0=(?(16,31),Uc)
    gC=?r(0,Ug)
    QC=UR*Uc
]
QD=QD-1                ;Perc D countdown
[QD<=0
    Ud=?(Up,UP)
    ID=B24.?(0,UJ)
    BfDV.0=(?(16,31),Ud)
    gD=?r(0,Ug)
    QD=UR*Ud
]
QE=QE-1                ;Perc E countdown
[QE<=0
    Ue=?(Up,UP)
    IE=B24.?(0,UJ)
    BfEV.0=(?(16,31),Ue)
    gE=?r(0,Ug)
    QE=UR*Ue
]
QF=QF-1                ;Perc F countdown
[QF<=0
    Uf=?(Up,UP)
    IF=B24.?(0,UJ)
    BfFV.0=(?(16,31),Uf)
    gF=?r(0,Ug)
    QF=UR*Uf
]

[F2<0 UD=3G]           ;If Time Field2 neg, set max duration
[mB>UD
    [Qf=0
        Qf=1
        Bb13.196=L1
        Bb23.196=L2
        Bb33.196=L3
        Bb43.196=L4
        Bb53.196=L5
        Bb63.196=L6
        Bb73.196=L7
        Bb83.196=L8
        Qp=LP
        Qe=UF
    |
        L1=Bb13.<196>*Qe/UF
        L2=Bb23.<196>*Qe/UF
        L3=Bb33.<196>*Qe/UF
        L4=Bb43.<196>*Qe/UF
        L5=Bb53.<196>*Qe/UF
        L6=Bb63.<196>*Qe/UF
        L7=Bb73.<196>*Qe/UF
        L8=Bb83.<196>*Qe/UF
        LP=Qp*Qe/UF
        Qe=Qe-1
        [Qe=0 W=UZ X0=1]
    ]
]

}                       ;End of infinite loop

See also "Glossy" MIDI Setup Family, 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