Time-line docs
Automations

Using Key Points in Node-REDRequires Pro

Use Key Points, groups, families, progress, and timing windows in Node-RED automations.

Key Points

Time-line Live listens to the active track and segments it into musical sections, Key Points, in real-time as the DJ performs: Drive, Build, Rhythmic Build, Pre-Drop, Fake Drop, Drop, Drop Break, Breakdown, Outro.

  1. Drive
  2. Build
  3. Rhythmic Build
  4. Pre-Drop
  5. Drop
  6. Drop Break
  7. Breakdown
  8. Outro
Key Points in a track

See Understanding Key Points for what each section means musically.

Key Points, Groups, and Families

When building an automation, you don't always want to react to every individual Key Point. Time-line lets you work at three levels:

  • Key Point: a single musical section.
  • Group: back-to-back Key Points of the same type, treated as one span. Example, two Rhythmic Build sections in a row is one group. Live marks these with a count badge (such as 2), and an individual Key Point node fires once for each section, so trigger on the Group to react to the whole span.
  • Family: back-to-back Key Points of related types, treated as one span.
    • Build: Build + Rhythmic Build
    • Drive: Drive + Drive Break
    • Drop: Drop + Drop Break
  1. Drive
  2. Build
  3. Rhythmic Build
  4. Rhythmic Build
  5. Drop
one key point — a single section
one group — same type, back-to-back
one family — related types, back-to-back
Key Point, Group, and Family levels

In Node-RED, you can work with individual Key Points, as well as their Groups and Families. As a reminder, each Key Point can output both Events (top connector) and a Stream (bottom):

  • Event sends one message when the section starts and one when it ends.
  • Stream sends around ~30 messages per second while the section is active, carrying live progress.

When to Use the Key Point, Group or Family

In the visual example above, the track moves through a Build → Rhythmic Build → Rhythmic Build → Drop. The Build and two Rhythmic Build sections together form one Build Family.

Let’s say you want your lighting to evolve throughout this sequence. You could use:

  • Build Family → change the color when the entire Build sequence begins.
  • Rhythmic Build Group → pulse the lights throughout both Rhythmic Build sections.
  • Individual Rhythmic Build Key Point → increase the intensity when the final (2nd) Rhythmic Build begins.
  • Drop Key Point → trigger the release.

You see how this system helps you create dynamic scenes that will always feel connected to the music. The Rhythmic Build Fader Ramp in the Node-RED example flows creates exactly this kind of ramp.

Reacting to the Start or End of a Group or Family

Key Point nodes only know about their own type. There is no separate Group or Family node, and the Enter and Exit nodes only look at the events that reach them. So a single Build node wired to Enter fires when a Build section starts, not when the Build Family starts.

To react to a Family, add a Key Point node for every type in the Family and wire all their Event outputs into one Enter node. For the Build Family that is Build and Rhythmic Build. The Enter node now fires at the start of every section in the Family, and an Exit node wired the same way fires at the end of every section.

That is often what you want, for example to re-trigger a look on each section. If something should happen only once, when the Family begins, add a Switch node after Enter that checks msg.payload.previousKeypointFamily is not the same Family (for Build: != build). The first section arrives from another family and passes; the sections that follow are continuations and are dropped. For the end of a Family, put the Switch after Exit and check msg.payload.nextKeypointFamily instead.

Groups work the same way with previousKeypointGroup and nextKeypointGroup. Because a Group is made of one type, you need only that one Key Point node.

For anything that should follow the music during the Family, such as a fader ramp, you do not need this. Use the Stream output and the Progress node with its scope set to Family, which already tracks the whole span.

Progress

The Time-line Progress node in Node-RED lets you track how far you are through a Key Point, Group, or Family. It takes a Stream as input and outputs a value that changes as the music progresses.

For example, in our Build sequence:

  • Key Point Progress resets for each individual Build or Rhythmic Build.
  • Group Progress runs across both back-to-back Rhythmic Build sections.
  • Family Progress runs across the entire Build Family, from the start of the Build until the Drop.

This makes it easy to create effects that evolve with the music. For example, gradually increasing brightness throughout an entire Build Family.

By default, Progress moves evenly from its minimum to maximum value. You can use the Curve to change how that value develops over time. For example, instead of increasing a lighting fader at a constant rate throughout a Build, you could keep the increase subtle at first and make it rise much faster as the Drop approaches.

Acting Before or After a Key Point (Pre/Post Windows)

By default, Progress runs from the beginning to the end of the selected Key Point, Group, or Family. Sometimes you may want it to start before that section begins or continue after it ends.

The Window setting inside the Progress node lets you extend the Progress period before or after the selected section, in seconds or bars.

For example, ramp up during the 8 bars before the Drop arrives or continue an effect 3 seconds after a section ends.

Pre window before the Drop

A Key Point's Stream starts 10 seconds before the section and continues 10 seconds after it, so that is the most a Window can reach. A longer Window, or one that works out to more than 10 seconds in bars, is shortened to 10 seconds and the value ramps over that time. To act at a single moment, feed the Progress value into a Switch node and trigger when it crosses the value you want.

How is this guide?

Last updated on

On this page