Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Random Melody Notes
In a DaqMusiq or KaleidoSynth performance from a random note stream, either from the default DaqMusiq random source, the Generator running a white noise setup, or from random room sounds with feedback, the performance can sound "musical" without having a definite melody.
For example, the Symphonic.DQM setup is melodious, but the specific note pattern does not repeat... you come away with a feeling of melody, and you might even be able to hum a typical passage, but the structure is too loose to be called a proper "song".
To make a more structured melody, as might be used in a popular song, you can use a "theme" that is repeated with variations, perhaps very specific variations, in an overall cycle.
The theme consists of two main aspects: A specific note pattern, and (usually) the relative velocity and timing of those notes. The remainder of this topic will deal with the note pattern; see Random Melody Velocities as well, which includes a discussion of timing. See JukeBox.DQM for an example of both.
You can obtain a random note pattern by using the random Buffer Fill command Bf, like this:
This fills Voice 1, Buffer 1 starting from the 0th position, with 8 notes randomly selected from the MIDI note range of 40 (E2) to 70 (A#4).
Alternatively, you could copy 8 notes from the input stream:
This fills the same buffer with 8 notes, starting from 7 notes ago (7) up to and including the current note (0).
If you then use the Input Select command i1=11 to tell Voice 1 to use this buffer instead of the input note stream, you will hear this 8-note measure repeated indefinitely.
You can then use the Buffer Copy command to copy this buffer to one or more others, then modify the copies. There are many modification options to try here:
Copy in reverse order by reversing the source indices.
Exchange part of the copied measure with another part.
Pivot the last part of the copy.
Add a constant value to one or more notes of the measure.
Use random Buffer Fill on part of the copy.
Repeat some notes in the measure.
Your script can then play each measure for some predetermined number of times. For example, with buffers 1 and 2 you could play 1, 1, 2, 1 or 1, 1, 2, 2 or 1, 1, 1, 2 (etc) as desired.
Since each buffer in the above examples is 8 notes long, you would use Wait commands that are multiples of 8 to get an integer number of measures.
You can play a measure a random number of times by using a Wait expression that is the product of the buffer note count and the random number of measures. For example, to play 1 to 3 measures of an 8-note buffer, use W=8*?(1,3).
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