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!

JukeBox.DQM MIDI Setup

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.

JukeBox.DQM performs a series of simple instrument solos, each using a random instrument and playing a short song composed using random velocity and note patterns to define the theme. The song uses the same random velocity pattern for each measure, but there are two different random note patterns that are used in a simple AABABA sequence.

The process is repeated after each song: A new instrument is randomly selected, new patterns are generated, and the new song is begun. Due to the random note and (especially) velocity patterns, not to mention instrument types, there is a wide variation between songs. If you listen long enough, you will surely find something interesting... you may have to kiss a lot of frogs to find true love, but the search itself may be enlightening.

More importantly, JukeBox is a building block for much more interesting performances using the "Glossy" setup family.

JukeBox.DQM sets a random instrument on Voice 1, Scale is set to Major, and Tempo is 400 BPM.

Track Min-Max range is 100-2500 Hz, but neither that nor the Track Threshold are important here since the Pitch Track input stream is not actually used for anything. You must have either the internal DaqMusiq random source, Generator, or Input active so that Pitch Track and Pitch-to-MIDI will operate, but performance pitch information is from random values used in the Changes script. (But see Ideas To Try below for a live-input version.)

The Changes script (with comments added) is:

Bv="0_8_8_8_8_8_8888"   ;Buffer Velocity Map
?s=?(-3G,3G)            ;32-bit random seed
?x=0                    ;Set pseudo-random mode
UL=7                    ;Base pattern lower size limit
UU=11                   ;Base pattern upper size limit

{!                      ;Infinite loop
oLh=s                   ;Display random seed
I1=?(0,118)             ;Random Instrument
U1=?(UL,UU)             ;Random pattern length
oR=U1                   ;Display pattern length
V1.0="8"                ;1st note always sounds
Bf1V.1=(?(0,15),U1-1)   ;Random Velocity Pattern
Bf11.0=(?(40,80),U1)    ;Random Note Buffer 1 Fill
Bf12.0=(?(40,80),U1)    ;Random Note Buffer 2 Fill
{2                      ;Play 2 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=4                     ;Hold (wait) 4 beats
s1=0                    ;Sustain off
W=4                     ;Rest 4 beats
X1=1                    ;Instrument on
}                       ;End of infinite loop

The first line sets a Velocity Map with 16 characters, meaning that the last 4 bits of the random values used in the subsequent Bf1V.0=(?(0,15),U1) Buffer Fill command will select which of the 16 characters will be used as the Velocity character for each beat.

Most of the map characters are either '8' for full loudness or '_' (underscore) to hold the prior note, with only the final character a '0' for silence. You can change the relative proportions of these as desired.

The next 2 script commands set the random seed with a 32-bit true random integer, then switch to pseudo-random mode such that the same random patterns will always result from any particular seed value.

Lower and upper pattern length limits are set to UL and UU for later use.

The remainder of the script is an infinite loop, so that the above steps are not repeated.

First the random seed value for the song to be played is displayed at the lower left of the Pitch-to-MIDI dialog, so you can repeat it later if desired. Think of this as the "song number" in an old-fashioned jukebox, or the "track number" on a modern recording.

The the Instrument Number is set with a random value between 0 and 118. Why not the full 0-127 range? If you look at the General MIDI Instrument Sounds list, you will see that the higher numbers are sound effects. (But feel free to experiment!)

The melody pattern length U1 is then set with a random value between UL and UU. The length is displayed at the lower right.

Then the Velocity Pattern is set. V1.0="8" sets the first beat of each U1-note "measure" to '8' for full loudness, then the remaining beats of the melody are randomly set via Bf1V.1=(?(0,15),U1-1) using the Velocity Map, as detailed earlier.

Bf11.0=(?(40,80),U1) fills a measure of Buffer 1 of Voice 1 with random notes, then the same process is applied to send different random notes to Buffer 2.

The actual performance is 2 verses of the song. Each verse consists of 6 measures of U1 beats each. i1=11 W=2*U1 selects Voice 1, Buffer 1 and then Waits for 2 measures while it plays. Then one measure of Buffer 2, one of Buffer 1 again, then Buffer 2, then Buffer 1, and the verse repeats.

After both verses, the final note (if any) is set to Sustain and the Voice 1 Instrument is toggled off to prevent the Velocity and buffer note patterns from advancing. The sustain is held for 4 beats, then toggled off for 4 beats of rest to mark the end of the song.

Then the Instrument is toggled back on for the next song. The script loops back to the start of the infinite loop section to show the current random seed and select a new instrument and new patterns for the next song.


Ideas To Try:

You can use this script as a basic starting point for your own experiments. You can prevent the random instrument changes by commenting out the I1=?(0,118) line near the start of the infinite loop, if you want to focus on a single instrument. In that case, the Voice 1 Instrument Number will be used exclusively.

Or, you may want to focus on a certain 8-instrument family by changing the I1=?(0,118) line to use a different range. Consult the General MIDI Instrument Sounds list.

Try different Tempos as well. Note that even with the 400 BPM used here, some performances will have a very slow effective tempo if a lot of the '_' note-hold characters from the Velocity Map happen to be chosen for the random Velocity Pattern.

Changing the proportions of '8', '_', and '0' in the Velocity Map can have a major effect on the song structures that are selected, but remember that these only affect probabilities... you can still get a less-probable pattern on any given instance.

You can also use other characters than '8' to get different velocities for a more "human" feel, as noted in Random Melody Velocities.

Try changing the UL and UU range of the pattern (and hence "measure") length for longer and more-complex songs, or shorter and simpler ones. (You don't need to change the length of the Velocity Map.)

Try commenting out the V1.0="8" and Bf1V.1=(?(0,15),U1) lines to eliminate the Velocity Map influence completely, giving the same result as a map full of '8's.

You can use Buffer Copy from the live input instead of random Buffer Fill. (Here "live" includes the default DaqMusiq random source, the Generator, or actual live Input sound.)

For example, use BC11.0=10(U1-1,0) to copy the most-recent U1 measure of input notes to Voice 1, Buffer 1, instead of the current Bf11.0=(?(40,80),U1) that uses random notes. (You may want to Wait for at least the number of beats you are going to copy, so there will be fresh input notes.)

With live inputs Track Min-Max range and the Track Threshold will become relevant, as well as whether you are using DaqMusiq or KaleidoSynth mode.

Also with live inputs, the note sequences are no longer derived from random numbers. They can thus no longer be re-created using the displayed random seed, though the seed still controls the Velocity Pattern, pattern length, and instrument choice.


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 30 Years of Innovative Instrumentation
© Copyright 2007 - 2017 by Interstellar Research
All rights reserved