Skip to content

Working with Octaves

Learn techniques for octave manipulation using frequency ratios and the power operation.

The Octave Ratio

An octave is the simplest frequency ratio: 2:1

When you double a frequency, you go up one octave:

  • 440 Hz × 2 = 880 Hz (one octave up)
  • 440 Hz × 4 = 1760 Hz (two octaves up)
  • 440 Hz ÷ 2 = 220 Hz (one octave down)

Basic Octave Operations

One Octave Up

javascript
module.getNoteById(1).getVariable('frequency').mul(new Fraction(2))

One Octave Down

javascript
module.getNoteById(1).getVariable('frequency').div(new Fraction(2))

Multiple Octaves

javascript
// Two octaves up (multiply by 4)
module.getNoteById(1).getVariable('frequency').mul(new Fraction(4))

// Three octaves down (divide by 8)
module.getNoteById(1).getVariable('frequency').div(new Fraction(8))

Using the Power Operation

For variable octave shifts, use .pow():

javascript
// n octaves up: frequency × 2^n
module.getNoteById(1).getVariable('frequency').mul(new Fraction(2).pow(new Fraction(n)))

// n octaves down: frequency × 2^(-n)
module.getNoteById(1).getVariable('frequency').mul(new Fraction(2).pow(new Fraction(-n)))

Examples

javascript
// 2 octaves up using pow
frequency.mul(new Fraction(2).pow(new Fraction(2)))  // × 4

// 1 octave down using pow
frequency.mul(new Fraction(2).pow(new Fraction(-1))) // × 0.5

Octave Equivalence

Notes separated by octaves are considered "equivalent" in music. A perfect fifth above A4 (440 Hz) is E5 (660 Hz). You can also play:

  • E4 (330 Hz) - one octave below
  • E6 (1320 Hz) - one octave above

Bringing Notes into Range

If a note is too high or low, shift it by octaves:

javascript
// Original: way too high
module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 2))

// Bring down an octave
module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 2)).div(new Fraction(2))

// Same as:
module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 4))

Building Octave Patterns

Octave Doubling (Parallel Octaves)

Create a bass note that always plays an octave below the melody:

javascript
// Melody note
frequency: module.baseNote.getVariable('frequency').mul(new Fraction(3, 2))

// Bass note (same timing, one octave down)
frequency: module.getNoteById(MELODY_ID).getVariable('frequency').div(new Fraction(2))
startTime: module.getNoteById(MELODY_ID).getVariable('startTime')
duration: module.getNoteById(MELODY_ID).getVariable('duration')

Arpeggiated Octaves

Play the same note across multiple octaves in sequence:

javascript
// Note 1: Root
frequency: module.baseNote.getVariable('frequency')
startTime: new Fraction(0)
duration: new Fraction(1, 4)

// Note 2: One octave up
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(2))
startTime: module.getNoteById(1).getVariable('startTime').add(module.getNoteById(1).getVariable('duration'))
duration: new Fraction(1, 4)

// Note 3: Two octaves up
frequency: module.getNoteById(2).getVariable('frequency').mul(new Fraction(2))
startTime: module.getNoteById(2).getVariable('startTime').add(module.getNoteById(2).getVariable('duration'))
duration: new Fraction(1, 4)

// Note 4: Back to root
frequency: module.getNoteById(1).getVariable('frequency')
startTime: module.getNoteById(3).getVariable('startTime').add(module.getNoteById(3).getVariable('duration'))
duration: new Fraction(1, 4)

Octaves with Intervals

Compound Intervals

A compound interval spans more than an octave. For example, a "9th" is an octave plus a second:

javascript
// Major 9th = octave (2/1) × major 2nd (9/8) = 9/4
module.getNoteById(1).getVariable('frequency').mul(new Fraction(9, 4))

Reducing to Simple Intervals

Any interval can be reduced to within one octave:

Compound IntervalRatioSimple Equivalent
Major 9th9/4Major 2nd (9/8)
Minor 10th12/5Minor 3rd (6/5)
Perfect 11th8/3Perfect 4th (4/3)
Perfect 12th3/1Perfect 5th (3/2)
javascript
// Major 9th (compound)
frequency.mul(new Fraction(9, 4))

// Reduced to Major 2nd (same pitch class, lower octave)
frequency.mul(new Fraction(9, 8))

Practical Example: Octave-Spanning Chord

Build a wide voicing of a C major chord:

javascript
// C3 (root, low)
frequency: module.baseNote.getVariable('frequency').div(new Fraction(2))  // 220 Hz
startTime: new Fraction(0)
duration: new Fraction(2)

// G3 (fifth, mid-low)
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(3, 2))  // 330 Hz
startTime: module.getNoteById(1).getVariable('startTime')
duration: module.getNoteById(1).getVariable('duration')

// E4 (third, mid)
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(5, 2))  // 550 Hz
startTime: module.getNoteById(1).getVariable('startTime')
duration: module.getNoteById(1).getVariable('duration')

// C5 (octave, high)
frequency: module.getNoteById(1).getVariable('frequency').mul(new Fraction(4))  // 880 Hz
startTime: module.getNoteById(1).getVariable('startTime')
duration: module.getNoteById(1).getVariable('duration')

Tips for Working with Octaves

1. Keep Reference Notes in a Comfortable Range

Start with frequencies in the middle range (200-800 Hz) and adjust from there.

2. Use Consistent Octave References

When multiple notes need to be in the same octave, reference a common note:

javascript
// All notes in this phrase reference the same octave anchor
const anchorFreq = module.getNoteById(1).getVariable('frequency')

// Note A: Major third above anchor
frequency: anchorFreq.mul(new Fraction(5, 4))

// Note B: Perfect fifth above anchor
frequency: anchorFreq.mul(new Fraction(3, 2))

3. Hear the Full Range

Test your composition with notes spanning multiple octaves to ensure balance.

Common Octave Ratios Quick Reference

OperationRatioExpression
1 octave up2/1.mul(new Fraction(2))
1 octave down1/2.div(new Fraction(2))
2 octaves up4/1.mul(new Fraction(4))
2 octaves down1/4.div(new Fraction(4))
3 octaves up8/1.mul(new Fraction(8))
3 octaves down1/8.div(new Fraction(8))

Next Steps

Released under the RMT Personal Non-Commercial License