Volume, Pan, Pi duration

Part of OrgMaker Notes


I prepared an ORG file to play sounds at five equally spaced volume levels. That is, at 0, 1/4, 1/2, 3/4, and full volume levels. (To specify exact ORG volume levels, I first made an ORG file with the approximate volume levels I wanted, then I used a hex editor to get the volume levels to the exact values I wanted.) I played the test file and recorded the resulting sound into Audacity.

The ORG test volume levels recorded in Audacity.

I then examined the recordings in Audacity. I zoomed in on the waveform, scrolled the parts I wanted to measure so they were next to the amplitude ruler, and estimated the levels of the waveform to four decimal places. I noticed the center of the waveforms weren't centered on zero, so I measured the top and bottom point of each waveform and calculated the amplitude as half of the distance between the top and bottom. I then normalized the values so the maximum amplitude is 1.

Zooming in to measure the top, middle, and bottom points. (Click to enlarge.)

When I tested the ORG volume levels, the most surprising result was an input level of zero was still quite audible. I found the following formula seems to fit.

[ORG volume to amplitude]

V is relative ORG volume (0 to 1)
A is relative amplitude (0 to 1)

A = 10(V − 1)


I examined the pan values the same way: I recorded ORG sounds at various pan values and examined the amplitudes in Audacity.

I noticed the ORG pan behaves like this:

Here are the formulas I found that fit.

[ORG pan to amplitudes]

P is relative ORG pan (0=left, 0.5=center, 1=right)
L is relative amplitude, left channel (0 to 1)
R is relative amplitude, right channel (0 to 1)

L = {1,0P0.5
20(1 − 2P),0.5< P1

R = {20(2P − 1),0P <0.5

Pi duration

When I examined what recordings of melodic OrgMaker notes looked like in Audacity, I found that when the Pi checkbox is enabled, OrgMaker outputs a specific number of wave periods in each OrgMaker octave.

OrgMaker octaveperiods

In other words, octave 0 starts with 4 periods, each additional octave adds 4 periods.

Terminology reminder: In a periodic wave, the period is the length before the wave repeats. For example, if you use a sine wave, one period is one cycle of the sine wave.

Next: Pitch
Return to OrgMaker Notes

Home > Articles > OrgMaker Notes > Volume, Pan, Pi duration

Robert Hart
Posted Dec. 23, 2011