63 for (
auto instrument : instruments) {
75 for (
auto instrument : instruments) {
85 Orchestra(std::vector<hardware::ParentDevice *>
const &instruments,
char const *filepath) :
Orchestra{}
87 for (
auto instrument : instruments) {
99 Orchestra(std::array<hardware::ParentDevice *, N>
const &instruments,
char const *filepath) :
Orchestra{}
101 for (
auto instrument : instruments) {
145 ctre::phoenix::StatusCode
LoadMusic(
char const *filepath);
153 ctre::phoenix::StatusCode
Play();
169 ctre::phoenix::StatusCode
Stop();
Orchestra is used to play music through devices.
Definition: Orchestra.hpp:38
double GetCurrentTime() const
Gets the current timestamp of the music file.
ctre::phoenix::StatusCode AddInstrument(hardware::ParentDevice const &instrument)
Adds an instrument to the orchestra.
Orchestra(std::array< hardware::ParentDevice *, N > const &instruments, char const *filepath)
Constructor for a new Orchestra using the given Chirp file.
Definition: Orchestra.hpp:99
Orchestra(std::vector< hardware::ParentDevice * > const &instruments, char const *filepath)
Constructor for a new Orchestra using the given Chirp file.
Definition: Orchestra.hpp:85
bool IsPlaying() const
Gets whether the current track is actively playing.
ctre::phoenix::StatusCode LoadMusic(char const *filepath)
Loads a Chirp file at the specified file path.
Orchestra(std::array< hardware::ParentDevice *, N > const &instruments)
Constructor for a new Orchestra using the given Chirp file.
Definition: Orchestra.hpp:73
ctre::phoenix::StatusCode Stop()
Stops the loaded music file.
ctre::phoenix::StatusCode Pause()
Pauses the loaded music file.
Orchestra(std::vector< hardware::ParentDevice * > const &instruments)
Constructor for a new Orchestra using the given Chirp file.
Definition: Orchestra.hpp:61
Orchestra()
Constructor for a new Orchestra.
ctre::phoenix::StatusCode AddInstrument(hardware::ParentDevice const &instrument, uint16_t trackNumber)
Adds an instrument to the orchestra on the given track.
ctre::phoenix::StatusCode Play()
Plays the loaded music file.
ctre::phoenix::StatusCode ClearInstruments()
Clears all instruments in the orchestra.
Orchestra(char const *filepath)
Constructor for a new Orchestra using the given Chirp file.
Definition: Orchestra.hpp:52
Parent class for all devices.
Definition: ParentDevice.hpp:29
Definition: string_util.hpp:15