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!

MissFundamental.DQM MIDI Setup

This DaqMusiq setup plays a simple tune ("Frere Jacques") with a separate MIDI Voice for the fundamental and each harmonic through the 8th. You can toggle any combination of these off and on to hear what happens. This setup is intended for use in conjunction with the Missing Fundamental macro mini-app, which includes a full discussion of the effect.

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.

MissFundamental.DQM uses the "Frere Jacques" melody (Velocity and Notes Patterns) from Voice 1 of the FrJacques.DQM setup, but without the chords which that setup holds in Voice 2. Instead, the Voice 1 Changes script copies its patterns to the other 7 voices. Here's the complete script, with annotations:

;n9=-12            ;Remove leading semicolon to shift down 1 octave

BC2P.0=1P(0,87)    ;Copy all Voice 1 patterns to Voice 2
BC3P.0=1P(0,87)    ;Repeat for Voice 3 through 8

X2=1               ;Toggle all voices on at start

{!                ;Dummy infinite loop
W=16               ;Waits 16 beats, does nothing
}                 ;Repeat

Although the script doesn't show it, a "key" part of this setup is that each voice has its Pattern Key manually pre-set to transpose the melody to the harmonic indicated by its voice number. Voice 1 is the fundamental, with its key set to A2, which is 110 Hz. (See Standard Musical Note Frequencies for a list of names and frequencies of all 88 notes on a piano keyboard.)

Voice 2 has its key set to A3, an octave higher at 220 Hz. This is the second harmonic of the Voice 1 fundamental. (Note: here we are using the standard convention of science and engineering, which numbers the harmonics by their multiple of the fundamental. The "first harmonic" would thus be the fundamental itself. Musical texts may refer to the "first harmonic" as (logically enough) the first actual harmonic above the fundamental, which we are calling the second.)

The Pattern Key for Voice 3 is set to E4 or 329.628 Hz. Not exactly 3 times 110, but as close as we can get with standard musical notes.

Voice 4 is A4, exactly the 4th harmonic at 440 Hz.

Voice 5 is C#5, 554.365 Hz. Musically close enough to 550 Hz to be the 5th harmonic.

Voice 6 is E5, 659.255 Hz. It's exactly double the 3rd harmonic, and very close to the desired 660 Hz.

Voice 7 is G5, 783.991 Hz. This is 1.8 percent higher than 770 Hz, nearly a 3rd of a semitone, but it's the best we can do with standard notes... and doesn't sound bad at all. Try toggling this off and on and you'll notice that when it's on the 14 Hz error causes a flutter or roughness, which is essentially beats that are too fast to discriminate individually. Note that it's beating against the "exact" harmonic even if it isn't there!

Voice 8 is A5, exactly the 8th harmonic at 880 Hz.

You can uncomment the first line by removing the leading semicolon so the command becomes n9=-12. The n is the +/-Note command and the 9 indicates that it will apply to all tonal voices 1-8. The -12 shifts all voices down by 12 semitones, or one octave. You can replace the -12 with another value to shift by another amount; positive values will shift up instead of down.

Another important feature of this setup is that all 8 voices are set to Ocarina (Instrument number 79). This instrument is the best approximation to a pure sine wave among the General MIDI Instruments in the standard Microsoft GS Wavetable synthesizer. (Some other instruments in this set are good sine waves, but only over limited note ranges, or they have other problems like added vibrato.)

Pure sine waves are required in order for each voice to be a single harmonic; other instruments may sound more "musical", but they confound the experiment by adding their own harmonics. If you have installed another synthesizer, its Ocarina may not be the best choice here. You can use the MIDI Device Select to switch back to the GS Wavetable for this experiment.

MissFundamental.DQM uses Voice Pattern Sync to allow any combination of voices to be toggled off and back on at will; as long as any voice is playing, toggling another voice on will cause it to immediately synchronize with the playing pattern. (Without Pattern Sync, it would just restart where it left off.) However, if you toggle all 8 voices off you may have trouble getting them back in sync when you start toggling them back on.

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