Skip to content

Core Concepts

Understanding these fundamental concepts will help you get the most out of RMT Compose.

Relative Music Theory

Relative Music Theory (RMT) is the idea that musical relationships can be expressed as mathematical ratios rather than fixed frequencies.

Traditional Approach

In traditional music notation:

  • A4 = 440 Hz
  • E5 = 659.25 Hz
  • The relationship between them is implicit

RMT Approach

In relative music theory:

  • BaseNote frequency = any value (e.g., 440 Hz)
  • E5 = BaseNote × 3/2 (a perfect fifth)
  • The relationship is explicit and exact

This means:

  • Change the BaseNote, and all notes shift proportionally
  • Intervals are pure - they match the natural harmonic series
  • Transposition is trivial - just change one number

The BaseNote

Every module has a special note called the BaseNote (displayed as an orange circle at time=0).

The BaseNote provides default values for:

PropertyDescription
frequencyReference frequency (e.g., 440 Hz for A4)
startTimeReference start time (usually 0)
tempoBeats per minute
beatsPerMeasureTime signature numerator

All other notes can reference BaseNote properties:

javascript
// Frequency relative to BaseNote
module.baseNote.getVariable('frequency').mul(new Fraction(3, 2))

// Start time relative to BaseNote
module.baseNote.getVariable('startTime').add(new Fraction(1))

Think of it like a guitar capo

The BaseNote is like placing a capo on a guitar. It sets the foundation, and all other notes are defined relative to it.

Ratios and Fractions

Musical intervals are expressed as exact fractions:

IntervalRatioDecimalSound
Unison1/11.000Same pitch
Octave2/12.000Same note, higher
Perfect fifth3/21.500Very consonant
Perfect fourth4/31.333Consonant
Major third5/41.250Bright, major feel
Minor third6/51.200Dark, minor feel
Major second9/81.125Whole step

Why Exact Fractions?

Compare a perfect fifth in different systems:

SystemRatioDecimal
Just intonation3/21.500000
12-TET2^(7/12)1.498307

The difference is small but audible - just intonation sounds "purer" and more resonant.

RMT Compose uses the Fraction.js library for arbitrary-precision arithmetic, so ratios like 3/2 are stored exactly, not as floating-point approximations.

Expressions

Every note property is defined by an expression - a mathematical formula that computes a value.

Simple Expressions

Constants are written as Fractions:

javascript
// The number 3/4
new Fraction(3, 4)

// The number 440
new Fraction(440)

Reference Expressions

Notes can reference other notes:

javascript
// BaseNote's frequency
module.baseNote.getVariable('frequency')

// Note 5's start time
module.getNoteById(5).getVariable('startTime')

Arithmetic Expressions

Combine values with operations:

javascript
// BaseNote frequency times 3/2 (perfect fifth)
module.baseNote.getVariable('frequency').mul(new Fraction(3, 2))

// Note 3's end time (start + duration)
module.getNoteById(3).getVariable('startTime')
  .add(module.getNoteById(3).getVariable('duration'))

Available Operations

OperationSyntaxExample
Add.add(x)a.add(new Fraction(1))
Subtract.sub(x)a.sub(new Fraction(1, 4))
Multiply.mul(x)a.mul(new Fraction(3, 2))
Divide.div(x)a.div(new Fraction(2))
Power.pow(x)a.pow(new Fraction(1, 12))
Negate.neg()a.neg()

Dependencies

When a note's expression references another note, it creates a dependency.

Example

javascript
// Note 2 depends on Note 1's frequency
note2.frequency = module.getNoteById(1).getVariable('frequency').mul(new Fraction(5, 4))

// Note 3 depends on Note 2's duration
note3.startTime = module.getNoteById(2).getVariable('startTime')
                   .add(module.getNoteById(2).getVariable('duration'))

Dependency Visualization

When you select a note in the workspace:

  • Blue/cyan lines point to notes this note depends on
  • Red/orange lines point to notes that depend on this note

Smart Updates

When you change a note:

  • All notes that depend on it automatically update
  • The dependency graph uses an inverted index for O(1) lookup
  • Drag previews only move notes whose position actually depends on the dragged note

Circular Dependencies

You cannot create circular dependencies (Note A depends on Note B, which depends on Note A). The app will show an error if you try.

Modules

A module is a collection of notes that form a composition or reusable pattern.

Module Structure

json
{
  "baseNote": {
    "frequency": "new Fraction(440)",
    "startTime": "new Fraction(0)",
    "tempo": "new Fraction(120)",
    "beatsPerMeasure": "new Fraction(4)"
  },
  "notes": [
    {
      "id": 1,
      "frequency": "module.baseNote.getVariable('frequency').mul(new Fraction(5, 4))",
      "startTime": "module.baseNote.getVariable('startTime')",
      "duration": "new Fraction(1)",
      "color": "rgba(255, 100, 100, 0.7)",
      "instrument": "sine-wave"
    }
  ]
}

Built-in Categories

The Module Bar organizes modules by category:

CategoryContents
IntervalsSingle intervals (octave, fifth, third, etc.)
ChordsCommon chord voicings
MelodiesExample melodies including TET scales
CustomYour own saved modules

Creating Modules

  1. Build your composition in the workspace
  2. Save via Menu > Save Module
  3. The JSON file can be shared or added to your module library

The ≈ Symbol (Approximation)

Some notes display an symbol before their frequency. This indicates an irrational number that cannot be expressed as an exact fraction.

When Does This Happen?

Equal temperament systems use irrational ratios:

javascript
// 12-TET semitone = 2^(1/12) ≈ 1.05946...
new Fraction(2).pow(new Fraction(1, 12))

This value is irrational - it has infinite non-repeating decimals.

SymbolicPower

RMT Compose preserves the algebraic structure of these expressions:

javascript
// Two semitones up: 2^(1/12) × 2^(1/12) = 2^(1/6)
// Not collapsed to a float, but kept as a symbolic power

The ≈ symbol reminds you that the displayed value is an approximation of this symbolic representation.

Just Intonation vs Equal Temperament

AspectJust IntonationEqual Temperament
RatiosExact fractions (3/2)Irrational powers (2^(7/12))
SoundPure, resonantCompromise across all keys
DisplayNo ≈ symbolShows ≈ symbol
TranspositionEach key sounds differentAll keys sound equal

Summary

ConceptDescription
BaseNoteReference point for all ratios
RatioExact fraction representing an interval (3/2 = fifth)
ExpressionMathematical formula computing a property
DependencyOne note referencing another
ModuleCollection of notes forming a composition
≈ SymbolIndicates an irrational (TET) value

Next Steps

Now that you understand the core concepts:

Released under the RMT Personal Non-Commercial License