31 MIDISceneChange::MIDISceneChange (
int c,
int b,
int p)
60 if (size < 3 ||
_bank < 0) {
66 buf[2] = (
_bank >> 7) & 0x7f;
74 if (size < 3 ||
_bank < 0) {
80 buf[2] =
_bank & 0x7f;
105 snprintf (buf,
sizeof (buf),
"%d", (
int)
_program);
107 snprintf (buf,
sizeof (buf),
"%d", (
int) _program);
109 snprintf (buf,
sizeof (buf),
"%d", (
int)
_bank);
111 snprintf (buf,
sizeof (buf),
"%d", (
int)
_channel);
113 snprintf (buf,
sizeof (buf),
"%u",
_color);
128 if ((prop = node.
property (
X_(
"program"))) == 0) {
133 if ((prop = node.
property (
X_(
"bank"))) == 0) {
138 if ((prop = node.
property (
X_(
"channel"))) == 0) {
143 if ((prop = node.
property (
X_(
"color"))) != 0) {
bool operator==(const MIDISceneChange &other) const
int atoi(const string &s)
const std::string & value() const
static std::string xml_node_name
size_t get_bank_lsb_message(uint8_t *buf, size_t size) const
XMLProperty * property(const char *)
size_t get_bank_msb_message(uint8_t *buf, size_t size) const
bool set_id(const XMLNode &)
XMLProperty * add_property(const char *name, const std::string &value)
int set_state(const XMLNode &, int version)
static const uint32_t out_of_bound_color
MIDISceneChange(int channel, int bank=-1, int program=-1)
size_t get_program_message(uint8_t *buf, size_t size) const