Stepdance Software Library
Loading...
Searching...
No Matches
FourTrackPlayer Class Reference

FourTrackPlayer plays back four motion streams from an SD card file. More...

#include <recording.hpp>

Inheritance diagram for FourTrackPlayer:

Public Member Functions

void begin ()
 Initializes the FourTrackPlayer. Must be called before using the player.
void start (const char *recording_name="recording")
 Starts playback of a recording with the specified name.
void pause ()
 Pauses the current playback.
void resume ()
 Resumes a paused playback.
void stop ()
 Stops the current playback.
void set_resolution (float output_units, float per_steps=1.0)
 Sets the resolution for playback in world units per step.

Public Attributes

BlockPortoutput_1 = output_BlockPorts[0]
 Output BlockPort for the first playback channel. Map downstream components to this port.
BlockPortoutput_2 = output_BlockPorts[1]
 Output BlockPort for the second playback channel. Map downstream components to this port.
BlockPortoutput_3 = output_BlockPorts[2]
 Output BlockPort for the third playback channel. Map downstream components to this port.
BlockPortoutput_4 = output_BlockPorts[3]
 Output BlockPort for the fourth playback channel. Map downstream components to this port.
volatile long current_sample_index = 0
 Current sample index in the playback.
long max_num_playback_samples = 0
 Maximum number of samples in the playback.
volatile bool playback_active = false
 Indicates whether the player is currently active.

Protected Member Functions

void run ()

Detailed Description

FourTrackPlayer plays back four motion streams from an SD card file.

The FourTrackPlayer class allows simultaneous playback of four motion streams from a recorded SD card file. Each track can be mapped to a BlockPort for output. The player supports starting, pausing, resuming, and stopping playback, as well as setting the resolution for playback. It reads recorded data stored in a binary format on the SD card for efficient retrieval. It is typically used in conjunction with the FourTrackRecorder class for recording motion streams. Here's an example of how to instantiate and configure a FourTrackPlayer: AxiDraw Recorder Example.

Member Function Documentation

◆ set_resolution()

void FourTrackPlayer::set_resolution ( float output_units,
float per_steps = 1.0 )

Sets the resolution for playback in world units per step.

Parameters
output_unitsWorld units corresponding to one step.
per_stepsNumber of steps. Default is 1.0.

◆ start()

void FourTrackPlayer::start ( const char * recording_name = "recording")

Starts playback of a recording with the specified name.

Parameters
recording_nameName of the recording file to play back. This should match the name used during recording.

The documentation for this class was generated from the following file: