66 for (
auto instrument : instruments) {
78 for (
auto instrument : instruments) {
90 Orchestra(std::vector<hardware::ParentDevice *>
const &instruments,
char const *filepath) :
Orchestra{}
92 for (
auto instrument : instruments) {
106 Orchestra(std::array<hardware::ParentDevice *, N>
const &instruments,
char const *filepath) :
Orchestra{}
108 for (
auto instrument : instruments) {
Orchestra is used to play music through devices.
Definition Orchestra.hpp:39
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:106
Orchestra(std::vector< hardware::ParentDevice * > const &instruments, char const *filepath)
Constructor for a new Orchestra using the given Chirp file.
Definition Orchestra.hpp:90
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:76
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:64
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:55
Parent class for all devices.
Definition ParentDevice.hpp:29
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition StatusCodes.h:18