45 static struct midi_std_init {
49 { 0,
"Bank Select MSB"},
50 { 1,
"Modulation MSB"},
51 { 2,
"Breath Controller"},
53 { 4,
"Foot Controller MSB"},
54 { 5,
"Portamento Time MSB"},
55 { 6,
"Data Entry MSB"},
61 {12,
"Effect Control 1"},
62 {13,
"Effect Control 2"},
64 {22,
"Midi Beat Clock"},
65 {23,
"Clock start/stop"},
66 {24,
"Jack Transport"},
68 {32,
"Bank Select LSB"},
74 {68,
"Legato Footswitch"},
76 {70,
"Sound Contr. 1"},
77 {71,
"Sound Contr. 2"},
78 {72,
"Sound Contr. 3"},
79 {73,
"Sound Contr. 4"},
80 {74,
"Sound Contr. 5"},
81 {75,
"Sound Contr. 6"},
82 {76,
"Sound Contr. 7"},
83 {77,
"Sound Contr. 8"},
84 {78,
"Sound Contr. 9"},
85 {79,
"Sound Contr. 10"},
87 {84,
"Portamento Control"},
101 {120,
"All Sounds Off"},
102 {121,
"Controller Reset"},
103 {122,
"Local Control"},
104 {123,
"All Notes Off"},
107 {126,
"Mono On (Poly Off)"},
108 {127,
"Poly On (Mono Off)"},
112 for (
unsigned int i = 0; i <
sizeof(midi_std_itab)/
sizeof(midi_std_itab[0]); i++) {
113 m.insert(pair<int, modstring>(midi_std_itab[i].ctrl, modstring(midi_std_itab[i].name)));
118 map<int, modstring>::iterator i = m.find(ctr);
121 if (i->second.modified) {
123 i->second.name = m[ctr].std;
124 m[ctr].modified =
false;
132 m[ctr] = modstring(name,
true, 0);
134 i->second.modified =
true;
135 i->second.name = name;
142 for (map<int, modstring>::const_iterator i = m.begin(); i != m.end(); ++i) {
143 if (i->second.modified) {
146 jw.
write_kv(ostr.str().c_str(), i->second.name);
175 jw.
write(param->id());
183 jw.
write(_toggle_behaviour);
192 if (!pmap.
hasId(
id)) {
194 _(
"unknown parameter: ") +
id);
199 float lower = 0, upper = 0;
201 int toggle_behaviour = 0;
224 }
else if (lower < pmin) {
231 }
else if (upper < pmin) {
268 _(
"recall MIDI state"),
269 _(
"invalid format, Parameter skipped: ") +
id);
274 _(
"recall MIDI state"),
275 _(
"Parameter range outside bounds, changed: ") +
id);
277 return new MidiController(pm, lower, upper, toggle, toggle_behaviour);
282 if (param->get_midi_blocked())
return ret;
284 switch (_toggle_behaviour) {
285 case Parameter::toggle_type::OnOff: {
286 bool s_o = (2*last_value > 127);
287 bool s_n = (2*n > 127);
289 if (param->on_off_value()) {
290 ret = param->midi_set(0, 127, _lower, _upper);
292 ret = param->midi_set(127, 127, _lower, _upper);
297 case Parameter::toggle_type::Constant: {
298 if (n == last_value || last_value == -1) {
299 if (param->on_off_value()) {
300 ret = param->midi_set(0, n, _lower, _upper);
302 ret = param->midi_set(127, n, _lower, _upper);
312 ret = param->midi_set(n, 127, _lower, _upper);
314 param->trigger_changed();
320 if (param->get_blocked())
return ret;
321 if (strcmp(param->id().c_str(),
"engine.mute")==0) {
322 if ( n == 0) n = 127;
325 ret = param->midi_set(n, 127, _lower, _upper);
331 if (param->get_blocked())
return ret;
333 bool s_o = (2*last_value > 360);
334 bool s_n = (2*n > 360);
336 if (param->on_off_value()) {
337 ret = param->midi_set_bpm(0, 360, _lower, _upper);
339 ret = param->midi_set_bpm(360, 360, _lower, _upper);
343 ret = param->midi_set_bpm(n, 360, _lower, _upper);
353 for (
unsigned int n = 0; n < array_size; n++) {
354 operator[](n).clear();
375 for (
unsigned int n = 0; n < array_size; n++) {
381 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i)
390 for (ControllerArray::size_type n = 0; n < size(); ++n) {
392 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i) {
393 if (i->hasParameter(param)) {
405 for (iterator pctr = begin(); pctr !=
end(); ++pctr) {
406 for (midi_controller_list::iterator i = pctr->begin(); i != pctr->end(); ++i) {
407 if (i->hasParameter(p)) {
432 if (f >= 0x1.0p23)
return (
unsigned int) f;
433 return (
unsigned int) (f + 0.49999997f);
439 if ((time-time1)> (1.05*time_diff) || (time-time1)*1.05 < (time_diff)) {
444 bpm_new = ((1000000000. / (time-time1) / 24) * 60);
448 if (collect >= (bpm_new*bpm_new*0.0002)+1) {
459 time_diff = time-time1;
470 last_midi_control_value(),
471 last_midi_control(-2),
472 changed_midi_control_value(),
486 midi_value_changed() {
488 last_midi_control_value[i] = -1;
489 changed_midi_control_value[i] = 0;
491 pgm_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_pgm_chg));
492 mute_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_mute_chg));
493 bank_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_bank_chg));
494 Glib::signal_timeout().connect(
495 sigc::mem_fun(
this, &MidiControllerList::check_midi_values), 60);
498 bool MidiControllerList::check_midi_values() {
501 if (changed_midi_control_value[n]) {
502 changed_midi_control_value[n] = 0;
503 saved_values[n] = last_midi_control_value[n];
504 midi_value_changed(n, saved_values[n]);
507 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
509 && i->toggle_behaviour() == Parameter::toggle_type::Constant) {
510 midi_value_changed(n, i->getParameter().on_off_value() * 127);
512 i->trigger_changed();
525 for (midi_controller_list::iterator i = cl.begin(); i != cl.end(); ++i) {
532 for (
unsigned int n = 0; n < map.size(); n++) {
537 void MidiControllerList::on_pgm_chg() {
542 if (pgm>=0) new_program(pgm);
545 void MidiControllerList::on_mute_chg() {
550 new_mute_state(mute);
553 void MidiControllerList::on_bank_chg() {
558 if (bk>=0) new_bank(bk);
564 last_midi_control = ctl;
566 last_midi_control = -2;
584 float lower,
float upper,
bool toggle,
int toggle_behaviour) {
591 if (last_midi_control < 0)
594 map[last_midi_control].push_front(
MidiController(param, lower, upper, toggle, toggle_behaviour));
601 int v = last_midi_control_value[n];
603 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
604 if (i->is_toggle()) {
605 v = i->getParameter().on_off_value() * 127;
607 midi_value_changed(n, v);
614 last_midi_control = ctr;
617 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
626 last_midi_control = 22;
629 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
650 std::set<Parameter*> pset;
651 for (
unsigned int i = 0; i < map.size(); i++) {
653 for (midi_controller_list::iterator j = ctr.begin(); j != ctr.end(); ++j) {
656 for (midi_controller_list::const_iterator jn = ctr_new.begin();
657 jn != ctr_new.end(); ++jn) {
658 if (j->getParameter() == jn->getParameter()) {
659 pset.insert(&j->getParameter());
664 pset.insert(&j->getParameter());
668 for (paramlist::iterator n = plist.begin(); n != plist.end(); ) {
669 paramlist::iterator n1 = n++;
670 if (pset.find(*n1) != pset.end()) {
677 unsigned int val = 0;
678 switch (transport_state) {
679 case JackTransportStopped:
682 case JackTransportRolling:
685 case JackTransportStarting:
692 last_midi_control = 24;
695 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
704 jack_midi_event_t in_event;
705 jack_nframes_t event_count = jack_midi_get_event_count(midi_input_port_buf);
707 for (i = 0; i < event_count; i++) {
708 jack_midi_event_get(&in_event, midi_input_port_buf, i);
709 if ((in_event.buffer[0] & 0xf0) == 0xc0) {
712 }
else if ((in_event.buffer[0] & 0xf0) == 0xb0) {
713 if (in_event.buffer[1]== 120) {
716 }
else if (in_event.buffer[1]== 32) {
720 set_ctr_val(in_event.buffer[1], in_event.buffer[2]);
722 }
else if ((in_event.buffer[0] ) > 0xf0) {
723 if ((in_event.buffer[0] ) == 0xf8) {
724 clock_gettime(CLOCK_MONOTONIC, &ts1);
727 time0 = (ts1.tv_sec*1000000000.0)+(ts1.tv_nsec)+
728 (1000000000.0/(
double)(sr/(double)in_event.time));
732 }
else if ((in_event.buffer[0] ) == 0xfa) {
734 }
else if ((in_event.buffer[0] ) == 0xfb) {
736 }
else if ((in_event.buffer[0] ) == 0xfc) {
738 }
else if ((in_event.buffer[0] ) == 0xf2) {
751 insert(
"system",
N_(
"System"));
752 insert(
"ui",
N_(
"User Interface"));
753 insert(
"ui.amp",
N_(
"User Interface"));
754 insert(
"engine",
N_(
"Audio Engine"));
759 for (map<string, bool>::iterator i = used.begin(); i != used.end(); ++i) {
768 void ParameterGroups::group_exists(
const string&
id) {
769 if (groups.find(
id) == groups.end()) {
776 void ParameterGroups::group_is_new(
const string&
id) {
777 if (groups.find(
id) != groups.end()) {
783 for (map<string, string>::iterator i = groups.begin(); i != groups.end(); ++i) {
784 printf(
"PG %s: %s\n", i->first.c_str(), i->second.c_str());
798 return groups.
get(group_id);
800 return groups[group_id];
827 if (!save_in_preset) {
834 : boost::noncopyable(),
842 save_in_preset(true),
871 "Parameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
881 bool Parameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
886 bool Parameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
891 void Parameter::trigger_changed() {
896 for (
int n = 0; ; n++) {
897 if (!vn[n].value_id) {
906 Glib::ustring::compose(_(
"parameter %1: value %2 out of range [%3, %4]"),
907 _id, value, lower, upper));
911 static const char *tpname[] = {
912 "float",
"int",
"bool",
"bool",
"filename",
"string",
"special"};
913 assert(0 <=
v_type and
v_type <
sizeof(tpname)/
sizeof(tpname[0]));
941 title, Glib::ustring::compose(
"Different ID's: %2 / %3",
946 title, Glib::ustring::compose(
"[%1]: Different name: %2 / %3",
951 title, Glib::ustring::compose(
"[%1]: Different group: %2 / %3",
956 title, Glib::ustring::compose(
"[%1]: Different desc: %2 / %3",
961 title, Glib::ustring::compose(
"[%1]: save_in_preset different: %2 / %3",
966 title, Glib::ustring::compose(
"[%1]: controllable different: %2 / %3",
971 title, Glib::ustring::compose(
"[%1]: used different: %2 / %3",
976 title, Glib::ustring::compose(
"[%1]: c_type different: %2 / %3",
981 title, Glib::ustring::compose(
"[%1]: v_type different: %2 / %3",
990 title, Glib::ustring::compose(
"[%1]: value address different: %2 / %3",
996 title, Glib::ustring::compose(
"[%1]: float lower different: %2 / %3",
1001 title, Glib::ustring::compose(
"[%1]: float upper different: %2 / %3",
1006 title, Glib::ustring::compose(
"[%1]: float step different: %2 / %3",
1011 title, Glib::ustring::compose(
"[%1]: float std value different: %2 / %3",
1017 title, Glib::ustring::compose(
"[%1]: float value different: %2 / %3",
1022 title, Glib::ustring::compose(
"[%1]: float json value different: %2 / %3",
1053 jw.
write_kv(
"std_value", std_value);
1058 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper(), step() {
1061 if (jp.
read_kv(
"lower", lower) ||
1064 jp.
read_kv(
"value", *value) ||
1065 jp.
read_kv(
"std_value", std_value)) {
1068 "FloatParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1079 float v =
min(
max(val, lower), upper);
1097 bool FloatParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1101 assert(n >= 0 && n <= high);
1102 v = llimit + (n / high) * (ulimit - llimit);
1105 v = (2*n > high ? 1.0 : 0.0);
1108 v = lower +
min(n, upper-lower);
1121 bool FloatParameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
1125 assert(n >= 0 && n <= high);
1126 if (high <= ulimit) {
1127 v =
max(llimit,
min(ulimit,n));
1129 v = llimit + (n / high) * (ulimit - llimit);
1133 v = (2*n > high ? 1.0 : 0.0);
1136 v = lower +
min(n, upper-lower);
1149 void FloatParameter::trigger_changed() {
1154 json_value = std_value;
1164 if (json_value < lower-std::abs(5*FLT_EPSILON*lower) || json_value > upper+std::abs(5*FLT_EPSILON*upper)) {
1166 json_value = std_value;
1171 return std::abs(json_value - *value) < 5*FLT_EPSILON;
1179 json_value = lower + (json_value - low) / (up - low) * (upper - lower);
1219 serializeValueNames(jw, value_names);
1224 float *v,
int sv,
int low,
bool ctrl,
bool no_init):
1225 FloatParameter(
id, name,
Enum, preset, v, sv, low, low+get_upper(vn), 1, ctrl, no_init),
1234 jw.
write(value_names[static_cast<int>(round(*value-lower))].value_id);
1238 int up =
static_cast<int>(round(upper));
1239 int low =
static_cast<int>(round(lower));
1241 for (; n <= up-low; n++) {
1242 if (v_id == value_names[n].value_id) {
1260 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1275 jw.
write_kv(
"std_value", std_value);
1280 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper() {
1283 if (jp.
read_kv(
"lower", lower) ||
1285 jp.
read_kv(
"value", *value) ||
1286 jp.
read_kv(
"std_value", std_value)) {
1289 "IntParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1300 int v =
min(
max(val, lower), upper);
1318 bool IntParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1328 v = lower +
min(static_cast<int>(n), upper-lower);
1341 void IntParameter::trigger_changed() {
1346 json_value = std_value;
1356 if (json_value < lower || json_value > upper) {
1362 return json_value == *value;
1386 serializeValueNames(jw, value_names);
1391 int *v,
int sv,
bool ctrl):
1401 for (; n <= upper; n++) {
1402 if (v_id == value_names[n].value_id) {
1411 jw.
write(value_names[*value].value_id);
1425 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1446 value_array.push_back(
id_label(value_id, value_label));
1451 "EnumValueNames", Glib::ustring::compose(
"unknown key: %1", jp.
current_value()));
1458 for (std::vector<id_label>::iterator i = value_array.begin(); i != value_array.end(); ++i) {
1468 std::vector<id_label> value_array;
1485 std::vector<id_label> value_array;
1515 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1518 "BoolParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1529 if (val != *value) {
1541 bool BoolParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1558 void BoolParameter::trigger_changed() {
1563 json_value = std_value;
1579 return json_value == *value;
1592 jw.
write_kv(
"value", value->get_path());
1593 jw.
write_kv(
"std_value", std_value->get_path());
1598 :
Parameter(
jp_next(jp,
"Parameter")), value(0), std_value(0), json_value(0) {
1609 "FileParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1617 Glib::RefPtr<Gio::File> v = Gio::File::create_for_path(path);
1635 std_value = Gio::File::create_for_path(filename);
1668 static string get_file_id(
const Glib::RefPtr<Gio::File>& f) {
1669 return f->query_info(G_FILE_ATTRIBUTE_ID_FILE)->get_attribute_string(G_FILE_ATTRIBUTE_ID_FILE);
1675 id = get_file_id(
value);
1676 }
catch(Gio::Error& ex) {
1680 id2 = get_file_id(v);
1681 }
catch(Gio::Error& ex) {
1688 return value->get_path();
1692 return value->get_parent()->get_path();
1696 return value->get_parse_name();
1700 return value->query_info(G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME)->get_display_name();
1704 value->copy(Gio::File::create_for_path(destination));
1722 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1725 "StringParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1736 if (val != *value) {
1745 return !value->empty();
1749 json_value = std_value;
1762 return json_value == *value;
1775 replace_mode(false) {
1779 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1787 jw.
write(
"FloatEnum");
1791 }
else if (p->
isInt()) {
1797 }
else if (p->
isBool()) {
1799 }
else if (p->
isFile()) {
1803 }
else if (dynamic_cast<JConvParameter*>(p) != 0) {
1805 }
else if (dynamic_cast<SeqParameter*>(p) != 0) {
1809 cerr <<
"skipping " << p->
id() << endl;
1818 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1846 "ParamMap", Glib::ustring::compose(
"unknown parameter type: %1", jp.
current_value()));
1861 void ParamMap::unique_id(
Parameter* param) {
1862 if (id_map.find(param->
id()) != id_map.end()) {
1867 void ParamMap::check_id(
const string&
id) {
1869 cerr <<
"string-id not found: " <<
id << endl;
1873 void ParamMap::check_p(
const char *p) {
1875 cerr <<
"char-id not found: " << p << endl;
1882 if (fmt ==
"json") {
1888 printf(
"parameter map dump\n");
1890 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1897 printf(
"---------------------\n");
1906 case None: jw->
write(
"None");
break;
1907 case Continuous: jw->
write(
"Cont");
break;
1908 case Switch: jw->
write(
"Swth");
break;
1909 case Enum: jw->
write(
"Enum");
break;
1910 default: assert(
false);
1912 if (save_in_preset) {
1913 jw->
write(
"preset");
1916 jw->
write(
"control");
1918 jw->
write(l_group());
1919 jw->
write(l_name());
1932 jw->
write(getLowerAsFloat());
1933 jw->
write(getUpperAsFloat());
1934 jw->
write(getStepAsFloat());
1938 for (
int n = 0; ; ++n) {
1939 if (!vn[n].value_id) {
1943 jw->
write(vn[n].value_id);
1944 jw->
write(vn[n].value_label ? vn[n].value_label : vn[n].value_id);
1952 printf(
"P: %s vt=%d ct=%d c=%d\n", _id.c_str(), v_type, c_type, controllable);
1959 map<string, Parameter*>::iterator ii = id_map.find(param->
id());
1960 if (ii != id_map.end()) {
1962 insert_remove(p,
false);
1968 id_map.insert(pair<string, Parameter*>(param->
id(), param));
1969 insert_remove(param,
true);
1977 insert_remove(p,
false);
1978 id_map.erase(p->
id());
1990 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1991 i->second->stdJSON_value();
1992 i->second->setJSON_value();
1996 static inline bool compare_groups(
const std::string&
id,
const char **groups) {
2000 for (
const char **g = groups; *g; g += 2) {
2007 if (strncmp(
id.c_str(), p, n) == 0 &&
id[n] ==
'.') {
2015 std::string group_id(pdef->
id);
2017 std::string on_off = group_id +
"on_off";
2018 std::string pp = group_id +
"pp";
2019 std::string position = group_id +
"position";
2021 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
2022 if (i->second->isInPreset()) {
2023 if (i->first != on_off && i->first != pp && i->first != position) {
2024 i->second->stdJSON_value();
2025 if (!i->second->compareJSON_value()) {
2038 std::string group_id(pdef->
id);
2040 std::string on_off = group_id +
"on_off";
2041 std::string pp = group_id +
"pp";
2042 std::string position = group_id +
"position";
2044 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
2045 if (i->second->isInPreset()) {
2046 if (i->first != on_off && i->first != pp && i->first != position) {
2047 i->second->stdJSON_value();
2048 i->second->setJSON_value();
ParameterV< float > FloatParameter
ParameterV< GxSeqSettings > SeqParameter
CmdConnection::msg_type end
int get_last_midi_control_value(unsigned int n)
void write_kv(const char *key, float v)
FloatEnumParameter(gx_system::JsonParser &jp)
virtual float getUpperAsFloat() const
virtual bool hasRange() const
virtual float getLowerAsFloat() const
virtual void readJSON_value(gx_system::JsonParser &jp)
bool set_bpm(int n, int last_value)
void begin_array(bool nl=false)
void modifyCurrent(Parameter ¶m, float lower, float upper, bool toggle, int toggle_behaviour)
int param2controller(Parameter ¶m, const MidiController **p)
ParameterV(const string &id, const string &name, ctrl_type ctp, bool preset, int *v, int sv, int lv, int uv, bool ctrl)
virtual bool hasRange() const
virtual int idx_from_id(string v_id)
void set_stream(ostream *o)
jack_nframes_t get_jack_sr()
MidiStandardControllers midi_std_ctr
map< string, Parameter * >::const_iterator iterator
Parameter(const string &id, const string &name, value_type vtp, ctrl_type ctp, bool preset, bool ctrl)
virtual void stdJSON_value()
string get_parse_name() const
virtual void serializeJSON(gx_system::JsonWriter &jw)
virtual void readJSON_value(gx_system::JsonParser &jp)
Parameter * readJSON_one(gx_system::JsonParser &jp)
friend void compare_parameter(const char *title, Parameter *p1, Parameter *p2, bool all)
list< Parameter * > paramlist
ParameterV< GxJConvSettings > JConvParameter
virtual void serializeJSON(gx_system::JsonWriter &jw)
void unregister(Parameter *p)
virtual bool hasRange() const
bool deleteParameter(Parameter &p)
void end_array(bool nl=false)
void set_config_mode(bool mode, int ctl=-1)
const string & name() const
void dump(const string &fmt)
virtual void readJSON_value(gx_system::JsonParser &jp)
virtual bool on_off_value()
void readJSON(gx_system::JsonParser &jp, ParamMap ¶m)
virtual bool compareJSON_value()
void range_warning(float value, float lower, float upper)
virtual bool on_off_value()
virtual void readJSON_value(gx_system::JsonParser &jp)
unsigned int rounded(float f)
virtual float getUpperAsFloat() const
bool set(const Glib::ustring &val) const
virtual float idx_from_id(string v_id)
virtual void writeJSON(gx_system::JsonWriter &jw) const
virtual void setJSON_value()
void writeJSON(gx_system::JsonWriter &jw)
string param_group(const string &group_id, bool nowarn=false)
virtual void writeJSON(gx_system::JsonWriter &jw) const
string get(const string &id)
virtual void stdJSON_value()
MidiStandardControllers()
virtual float getUpperAsFloat() const
virtual float getLowerAsFloat() const
virtual void writeJSON(gx_system::JsonWriter &jw) const
ctrl_type getControlType() const
void write_key(const char *p, bool nl=false)
void update_from_controllers()
virtual void setJSON_value()
void writeJSON(gx_system::JsonWriter &jw) const
int atomic_get(volatile int &p)
Glib::RefPtr< Gio::File > std_value
FloatEnumParameterD(gx_system::JsonParser &jp)
EnumParameter(gx_system::JsonParser &jp)
ParameterV< int > IntParameter
void compute_midi_in(void *midi_input_port_buf, void *arg)
sigc::signal< void > changed
virtual void serializeJSON(gx_system::JsonWriter &jw)
ParameterV< bool > BoolParameter
virtual float getStepAsFloat() const
#define debug_check(func,...)
void gx_print_error(const char *, const std::string &)
bool read_kv(const char *key, float &v)
virtual void readJSON_value(gx_system::JsonParser &jp)
virtual bool compareJSON_value()
void enum_parameter_load_values(gx_system::JsonParser &jp, std::vector< id_label > &value_array, const value_pair **value_names)
virtual float getLowerAsFloat() const
ParameterGroups & get_group_table()
bool time_to_bpm(double time, unsigned int *bpm_)
virtual void setJSON_value()
void check_expect(token expect)
const value_pair * value_names
void set_ctr_val(int ctr, int val)
virtual void serializeJSON(gx_system::JsonWriter &jw)
std::pair< std::string, std::string > id_label
virtual void serializeJSON(gx_system::JsonWriter &jw)
bool set_trans(int n, int last_value)
bool hasId(const string &id) const
virtual void stdJSON_value()
const char * get_typename() const
virtual bool compareJSON_value()
void begin_object(bool nl=false)
const value_pair * value_names
void writeJSON_one(gx_system::JsonWriter &jw, Parameter *p)
virtual bool on_off_value()
void update_from_controller(int ctr)
update all controlled parameters with last received value from MIDI controller ctr.
void set_controller_array(const ControllerArray &m)
virtual bool on_off_value()
virtual bool on_off_value()
FloatParameter & getFloat()
virtual void writeJSON(gx_system::JsonWriter &jw) const
void gx_print_warning(const char *, const std::string &)
list< MidiController > midi_controller_list
virtual const value_pair * getValueNames() const
virtual float getStepAsFloat() const
virtual void writeJSON(gx_system::JsonWriter &jw) const
void set_bpm_val(unsigned int val)
virtual bool compareJSON_value()
void writeJSON(gx_system::JsonWriter &jw) const
void atomic_set(volatile int *p, int v)
virtual void serializeJSON(gx_system::JsonWriter &jw)
static MidiController * readJSON(gx_system::JsonParser &jp, ParamMap ¶m)
virtual bool compareJSON_value()
Glib::RefPtr< Gio::File > value
string current_value() const
virtual float idx_from_id(string v_id)
virtual void readJSON_value(gx_system::JsonParser &jp)
bool atomic_compare_and_exchange(volatile int *p, int oldv, int newv)
void readJSON(gx_system::JsonParser &jp)
EnumParameterD(gx_system::JsonParser &jp)
bool set_midi(int n, int last_value)
virtual void stdJSON_value()
void process_trans(int transport_state)
static gx_system::JsonParser & jp_next(gx_system::JsonParser &jp, const char *key)
virtual int idx_from_id(string v_id)
void replace(int ctr, const string &name)
void set_standard(const string &filename)
void copy(const string &destination) const
FileParameter(const string &id, const string &filename, bool preset=false)
virtual void writeJSON(gx_system::JsonWriter &jw) const
ParameterV(const string &id, const string &name, ctrl_type ctp, bool preset, float *v, float sv, float lv, float uv, float tv, bool ctrl, bool no_init)
ParameterV(const string &id, const string &name, Glib::ustring *v, const Glib::ustring &sv, bool preset=false)
void set_path(const string &path)
void writeJSON(gx_system::JsonWriter &jw) const
string get_directory_path() const
float current_value_float()
static const char * value_label(const value_pair &vp)
bool set(float val) const
ParameterV(const string &id, const string &name, ctrl_type ctp, bool preset, bool *v, bool sv, bool ctrl)
void deleteParameter(Parameter ¶m)
virtual void serializeJSON(gx_system::JsonWriter &jw)
virtual void setJSON_value()
token next(token expect=no_token)
ParameterV< Glib::ustring > StringParameter
void write(float v, bool nl=false)
bool unit_has_std_values(const PluginDef *pdef) const
Glib::RefPtr< Gio::File > json_value
const string & id() const
virtual const value_pair * getValueNames() const
void request_midi_value_update()
bool is_equal(const Glib::RefPtr< Gio::File > &v) const
void set_last_midi_control_value(unsigned int n, int v)
bool set(const Glib::RefPtr< Gio::File > &val)
string get_display_name() const
virtual void serializeJSON(gx_system::JsonWriter &jw)
void readJSON(gx_system::JsonParser &jp)
void convert_from_range(float low, float up)
void remove_controlled_parameters(paramlist &plist, const ControllerArray *m)
void end_object(bool nl=false)
void reset_unit(const PluginDef *pdef) const
virtual void readJSON_value(gx_system::JsonParser &jp)
virtual void setJSON_value()
void dump(gx_system::JsonWriter *jw)
virtual void stdJSON_value()
virtual const value_pair * getValueNames() const
virtual void writeJSON(gx_system::JsonWriter &jw) const