35 DecimalPosition target_position = 0;
36 DecimalPosition current_position = 0;
46class FourTrackRecorder :
public Plugin{
60 void start(
const char *recording_name, uint8_t recording_length_min = 30);
82 void enroll(
RPC *rpc,
const String& instance_name);
85 static const uint8_t NUM_CHANNELS = 4;
118 float32_t resolution_units_per_step = STANDARD_RATIO_MM;
119 volatile bool in_recording =
false;
120 char recording_filename[30];
121 char length_filename[30];
122 FsFile active_recording_file;
135class FourTrackPlayer :
public Plugin{
147 void start(
const char *recording_name =
"recording");
169 void enroll(
RPC *rpc,
const String& instance_name);
172 static const uint8_t NUM_CHANNELS = 4;
173 BlockPort output_BlockPorts[NUM_CHANNELS];
206 DecimalPosition output_positions[NUM_CHANNELS];
207 float32_t resolution_units_per_step = STANDARD_RATIO_MM;
208 volatile bool in_playback =
false;
209 char recording_filename[30];
210 char length_filename[30];
211 FsFile active_playback_file;
218void initialize_sd_card();
BlockPorts provide a unified interface for mapping inputs and outputs of different StepDance componen...
Definition core.hpp:148
void set_resolution(float output_units, float per_steps=1.0)
Sets the resolution for playback in world units per step.
BlockPort & output_2
Output BlockPort for the second playback channel. Map downstream components to this port.
Definition recording.hpp:182
void start(const char *recording_name="recording")
Starts playback of a recording with the specified name.
void stop()
Stops the current playback.
void pause()
Pauses the current playback.
void begin()
Initializes the FourTrackPlayer. Must be called before using the player.
volatile long current_sample_index
Current sample index in the playback.
Definition recording.hpp:194
void resume()
Resumes a paused playback.
long max_num_playback_samples
Maximum number of samples in the playback.
Definition recording.hpp:198
BlockPort & output_3
Output BlockPort for the third playback channel. Map downstream components to this port.
Definition recording.hpp:186
BlockPort & output_1
Output BlockPort for the first playback channel. Map downstream components to this port.
Definition recording.hpp:178
BlockPort & output_4
Output BlockPort for the fourth playback channel. Map downstream components to this port.
Definition recording.hpp:190
volatile bool playback_active
Indicates whether the player is currently active.
Definition recording.hpp:202
void stop()
Stops the current recording.
BlockPort & input_1
Input BlockPort for the first recording channel. Map upstream components to this port.
Definition recording.hpp:91
volatile long current_sample_index
Current sample index in the recording.
Definition recording.hpp:107
BlockPort & input_4
Input BlockPort for the fourth recording channel. Map upstream components to this port.
Definition recording.hpp:103
void resume()
Resumes a paused recording.
void start(const char *recording_name, uint8_t recording_length_min=30)
Starts a new recording with the specified name and optional length.
volatile bool recorder_active
Indicates whether the recorder is currently active.
Definition recording.hpp:115
void pause()
Pauses the current recording.
void begin()
Initializes the FourTrackRecorder. Must be called before using the recorder.
long max_num_samples
Maximum number of samples in the recording.
Definition recording.hpp:111
BlockPort & input_3
Input BlockPort for the third recording channel. Map upstream components to this port.
Definition recording.hpp:99
BlockPort & input_2
Input BlockPort for the second recording channel. Map upstream components to this port.
Definition recording.hpp:95
void set_resolution(float input_units, float per_steps=1.0)
Sets the resolution for recording in world units per step.
RPC class for handling remote procedure calls over serial streams.
Definition rpc.hpp:35
RecorderTrack handles recording of a single motion stream.
Definition recording.hpp:26