Skip to main content

Overview

The [playhead] object receives playhead information from the DAW, including transport state, timing, tempo, and position data. This object only works in the plugin version of plugdata. With [playhead], you can synchronize your patches with the DAW’s timeline, respond to transport changes, and create tempo-synchronized effects.

Outlets

float
Playing stateOutputs 1 if the DAW is playing, 0 otherwise. Use this to trigger actions when playback starts or stops.
float
Recording stateOutputs 1 if the DAW is recording, 0 otherwise.
list
Loop informationOutputs a list of three floats: <loop_active, loop_start, loop_end>
  • First value: 1 if looping is enabled, 0 otherwise
  • Second value: Loop start position (in PPQ)
  • Third value: Loop end position (in PPQ)
When looping is disabled, all three values are 0.
float
Edit timeThe current edit time in the DAW (useful for offline processing).
float
Frame rateThe DAW’s frame rate (frames per second). Common values include 24, 25, 30, 60, etc.
float
BPM (Tempo)The current tempo in beats per minute. Use this to create tempo-synchronized effects.
float
Last bar positionThe position of the last bar in the timeline (in PPQ).
list
Time signatureA list containing the time signature information: <numerator, denominator>For example, 4/4 time outputs 4 4, and 6/8 time outputs 6 8.
list
Position informationA list of three floats providing the current playhead position in different formats:
  • PPQ position: Position in Pulses Per Quarter note (musical time)
  • Time in samples: Position in sample frames
  • Time in seconds: Position in seconds
Example output: 16.0 176400 4.0 (at 4 seconds, 16 quarter notes, 176400 samples at 44.1kHz)

Usage Example

Advanced Example: Beat Counter

Notes

  • This object only works in plugin mode, not in standalone
  • Position data is provided in multiple formats for convenience
  • PPQ (Pulses Per Quarter) is the standard MIDI timing format
  • All outlets update whenever the playhead information changes
  • Use [change] objects to detect when specific values change if needed