Skip to content

Add Rhythm

In this tutorial, you'll learn to work with timing and duration to create rhythmic patterns.

Objective

Create a simple rhythmic melody using different note lengths.

Prerequisites

Understanding Time in RMT

Time in RMT Compose is based on:

PropertyDescriptionUnit
tempoBeats per minuteBPM
startTimeWhen a note beginsSeconds
durationHow long a note playsSeconds

Beat Duration Formula

// Duration of one beat in seconds
beatDuration = 60 / tempo

// In RMT expression (preferred shorthand):
beat(base)

// Or equivalently:
60 / tempo(base)

At 120 BPM: 60/120 = 0.5 seconds per beat

Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote))

Note Duration Reference

NoteBeatsExpression
Whole4beat(base) * 4
Half2beat(base) * 2
Quarter1beat(base)
Eighth0.5beat(base) * (1/2)
Sixteenth0.25beat(base) * (1/4)
Dotted quarter1.5beat(base) * (3/2)
Triplet1/3beat(base) * (1/3)

Step 1: Set Up the BaseNote

  1. Open RMT Compose
  2. Click the BaseNote (orange circle)
  3. In the Variable Widget, scroll down to the bottom and click "Clean Slate" to remove all notes except the BaseNote
  4. Verify the BaseNote settings are what you want:
    • frequency: e.g. 440 (A4)
    • tempo: e.g. 120 (120 BPM)

Step 2: Create the Beat Duration Helper

First, understand the beat duration expression:

// This expression equals one beat duration
beat(base)

We'll use this as the base for all durations.

Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote))

Step 3: Create a Rhythmic Pattern

Let's create: Quarter - Eighth - Eighth - Half

Note 1: Quarter Note

  1. With the BaseNote selected, in "Add Note / Silence" section, select "Note", click "Create Note"
  2. Select the new note and set Frequency: base.f (root)
  3. StartTime: base.t
  4. Duration (1 beat):
beat(base)
Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote))

Note 2: First Eighth Note

  1. Add note after Note 1 (select Note 1, use "At End")
  2. Frequency: base.f * (9/8) (Re)
  3. StartTime: [1].t + [1].d
  4. Duration (0.5 beats):
beat(base) * (1/2)
Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote)).mul(new Fraction(1, 2))

Note 3: Second Eighth Note

  1. Add note after Note 2 (select Note 2, use "At End")
  2. Frequency: base.f * (5/4) (Mi)
  3. StartTime: [2].t + [2].d
  4. Duration (0.5 beats):
beat(base) * (1/2)
Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote)).mul(new Fraction(1, 2))

Note 4: Half Note

  1. Add note after Note 3 (select Note 3, use "At End")
  2. Frequency: base.f * (3/2) (Sol)
  3. StartTime: [3].t + [3].d
  4. Duration (2 beats):
beat(base) * 2
Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote)).mul(new Fraction(2))

Verification

  1. Click Play
  2. You should hear: short - quick quick - looong
  3. Total duration: 1 + 0.5 + 0.5 + 2 = 4 beats (one measure at 4/4)

Visual Check

In the workspace:

  • Note 1 is medium width
  • Notes 2 and 3 are half as wide
  • Note 4 is twice as wide as Note 1

Using Duration Quick Controls

Instead of typing expressions, use the Variable Widget duration presets:

  1. Select a note

  2. Find the duration row

  3. Click the note-length icon buttons:

    • Whole note (4 beats)
    • Half note (2 beats)
    • Quarter note (1 beat)
    • Eighth note (1/2 beat)
    • Sixteenth note (1/4 beat)
  4. Use the dot buttons (. or ..) for dotted notes:

    • Single dot = 1.5× duration
    • Double dot = 1.75× duration

Exercises

Exercise 1: Different Tempo

  1. Change BaseNote tempo to 60 (60 BPM)
  2. Play - the rhythm is the same but slower!
  3. The relationships are preserved

Exercise 2: Syncopation

Create an off-beat accent:

  1. Make Note 2 start half a beat late
  2. Make Note 1 duration 1.5 beats
  3. Overlap creates syncopation

Exercise 3: Triplets

Create triplet rhythm (3 notes in the space of 2):

// Triplet duration (1/3 of a beat)
beat(base) * (1/3)
Legacy JavaScript syntax
javascript
new Fraction(60).div(module.findTempo(module.baseNote)).mul(new Fraction(1, 3))

Exercise 4: Rest Simulation

Create the effect of a rest:

  1. Make a note's duration shorter than the gap before the next note
  2. Or: create a silent note (set a very low frequency that won't be heard)

Chaining Rhythms

For complex rhythms, use note references:

// Note 5 starts when Note 4 ends
[4].t + [4].d

This creates a chain where timing flows automatically.

Legacy JavaScript syntax
javascript
module.getNoteById(4).getVariable('startTime')
  .add(module.getNoteById(4).getVariable('duration'))

Save Your Module

  1. Menu > Save Module
  2. Name it rhythmic-pattern.json

What You Learned

  • How tempo, startTime, and duration relate
  • Creating different note lengths
  • Chaining notes for sequential rhythm
  • Using quick controls for duration

Next Steps

Released under the RMT Personal Non-Commercial License