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());
191 if (!pmap.
hasId(
id)) {
193 _(
"unknown parameter: ") +
id);
198 float lower = 0, upper = 0;
222 }
else if (lower < pmin) {
229 }
else if (upper < pmin) {
259 _(
"recall MIDI state"),
260 _(
"invalid format, Parameter skipped: ") +
id);
265 _(
"recall MIDI state"),
266 _(
"Parameter range outside bounds, changed: ") +
id);
273 if (param->get_midi_blocked())
return ret;
275 bool s_o = (2*last_value > 127);
276 bool s_n = (2*n > 127);
278 if (param->on_off_value()) {
279 ret = param->midi_set(0, 127, _lower, _upper);
281 ret = param->midi_set(127, 127, _lower, _upper);
289 ret = param->midi_set(n, 127, _lower, _upper);
291 param->trigger_changed();
297 if (param->get_blocked())
return ret;
298 if (strcmp(param->id().c_str(),
"engine.mute")==0) {
299 if ( n == 0) n = 127;
302 ret = param->midi_set(n, 127, _lower, _upper);
308 if (param->get_blocked())
return ret;
310 bool s_o = (2*last_value > 360);
311 bool s_n = (2*n > 360);
313 if (param->on_off_value()) {
314 ret = param->midi_set_bpm(0, 360, _lower, _upper);
316 ret = param->midi_set_bpm(360, 360, _lower, _upper);
320 ret = param->midi_set_bpm(n, 360, _lower, _upper);
330 for (
unsigned int n = 0; n < array_size; n++) {
331 operator[](n).clear();
352 for (
unsigned int n = 0; n < array_size; n++) {
358 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i)
367 for (ControllerArray::size_type n = 0; n < size(); ++n) {
369 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i) {
370 if (i->hasParameter(param)) {
382 for (iterator pctr = begin(); pctr !=
end(); ++pctr) {
383 for (midi_controller_list::iterator i = pctr->begin(); i != pctr->end(); ++i) {
384 if (i->hasParameter(p)) {
409 if (f >= 0x1.0p23)
return (
unsigned int) f;
410 return (
unsigned int) (f + 0.49999997f);
416 if ((time-time1)> (1.05*time_diff) || (time-time1)*1.05 < (time_diff)) {
421 bpm_new = ((1000000000. / (time-time1) / 24) * 60);
425 if (collect >= (bpm_new*bpm_new*0.0002)+1) {
436 time_diff = time-time1;
447 last_midi_control_value(),
448 last_midi_control(-2),
462 midi_value_changed() {
464 last_midi_control_value[i] = -1;
466 pgm_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_pgm_chg));
467 mute_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_mute_chg));
468 bank_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_bank_chg));
469 Glib::signal_timeout().connect(
470 sigc::mem_fun(
this, &MidiControllerList::check_midi_values), 60);
473 bool MidiControllerList::check_midi_values() {
476 if (saved_values[n] != last_midi_control_value[n]) {
477 saved_values[n] = last_midi_control_value[n];
478 midi_value_changed(n, saved_values[n]);
481 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
482 i->trigger_changed();
495 for (midi_controller_list::iterator i = cl.begin(); i != cl.end(); ++i) {
502 for (
unsigned int n = 0; n < map.size(); n++) {
507 void MidiControllerList::on_pgm_chg() {
512 if (pgm>=0) new_program(pgm);
515 void MidiControllerList::on_mute_chg() {
520 new_mute_state(mute);
523 void MidiControllerList::on_bank_chg() {
528 if (bk>=0) new_bank(bk);
534 last_midi_control = ctl;
536 last_midi_control = -2;
554 float lower,
float upper,
bool toggle) {
561 if (last_midi_control < 0)
564 map[last_midi_control].push_front(
MidiController(param, lower, upper, toggle));
571 int v = last_midi_control_value[n];
573 midi_value_changed(n, v);
580 last_midi_control = ctr;
583 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
592 last_midi_control = 22;
595 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
616 std::set<Parameter*> pset;
617 for (
unsigned int i = 0; i < map.size(); i++) {
619 for (midi_controller_list::iterator j = ctr.begin(); j != ctr.end(); ++j) {
622 for (midi_controller_list::const_iterator jn = ctr_new.begin();
623 jn != ctr_new.end(); ++jn) {
624 if (j->getParameter() == jn->getParameter()) {
625 pset.insert(&j->getParameter());
630 pset.insert(&j->getParameter());
634 for (paramlist::iterator n = plist.begin(); n != plist.end(); ) {
635 paramlist::iterator n1 = n++;
636 if (pset.find(*n1) != pset.end()) {
643 unsigned int val = 0;
644 switch (transport_state) {
645 case JackTransportStopped:
648 case JackTransportRolling:
651 case JackTransportStarting:
658 last_midi_control = 24;
661 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
670 jack_midi_event_t in_event;
671 jack_nframes_t event_count = jack_midi_get_event_count(midi_input_port_buf);
673 for (i = 0; i < event_count; i++) {
674 jack_midi_event_get(&in_event, midi_input_port_buf, i);
675 if ((in_event.buffer[0] & 0xf0) == 0xc0) {
678 }
else if ((in_event.buffer[0] & 0xf0) == 0xb0) {
679 if (in_event.buffer[1]== 120) {
682 }
else if (in_event.buffer[1]== 32) {
686 set_ctr_val(in_event.buffer[1], in_event.buffer[2]);
688 }
else if ((in_event.buffer[0] ) > 0xf0) {
689 if ((in_event.buffer[0] ) == 0xf8) {
690 clock_gettime(CLOCK_MONOTONIC, &ts1);
693 time0 = (ts1.tv_sec*1000000000.0)+(ts1.tv_nsec)+
694 (1000000000.0/(
double)(sr/(double)in_event.time));
698 }
else if ((in_event.buffer[0] ) == 0xfa) {
700 }
else if ((in_event.buffer[0] ) == 0xfb) {
702 }
else if ((in_event.buffer[0] ) == 0xfc) {
704 }
else if ((in_event.buffer[0] ) == 0xf2) {
717 insert(
"system",
N_(
"System"));
718 insert(
"ui",
N_(
"User Interface"));
719 insert(
"ui.amp",
N_(
"User Interface"));
720 insert(
"engine",
N_(
"Audio Engine"));
725 for (map<string, bool>::iterator i = used.begin(); i != used.end(); ++i) {
734 void ParameterGroups::group_exists(
const string&
id) {
735 if (groups.find(
id) == groups.end()) {
742 void ParameterGroups::group_is_new(
const string&
id) {
743 if (groups.find(
id) != groups.end()) {
749 for (map<string, string>::iterator i = groups.begin(); i != groups.end(); ++i) {
750 printf(
"PG %s: %s\n", i->first.c_str(), i->second.c_str());
764 return groups.
get(group_id);
766 return groups[group_id];
793 if (!save_in_preset) {
800 : boost::noncopyable(),
808 save_in_preset(true),
837 "Parameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
847 bool Parameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
852 bool Parameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
857 void Parameter::trigger_changed() {
862 for (
int n = 0; ; n++) {
863 if (!vn[n].value_id) {
872 Glib::ustring::compose(_(
"parameter %1: value %2 out of range [%3, %4]"),
873 _id, value, lower, upper));
877 static const char *tpname[] = {
878 "float",
"int",
"bool",
"bool",
"filename",
"string",
"special"};
879 assert(0 <=
v_type and
v_type <
sizeof(tpname)/
sizeof(tpname[0]));
907 title, Glib::ustring::compose(
"Different ID's: %2 / %3",
912 title, Glib::ustring::compose(
"[%1]: Different name: %2 / %3",
917 title, Glib::ustring::compose(
"[%1]: Different group: %2 / %3",
922 title, Glib::ustring::compose(
"[%1]: Different desc: %2 / %3",
927 title, Glib::ustring::compose(
"[%1]: save_in_preset different: %2 / %3",
932 title, Glib::ustring::compose(
"[%1]: controllable different: %2 / %3",
937 title, Glib::ustring::compose(
"[%1]: used different: %2 / %3",
942 title, Glib::ustring::compose(
"[%1]: c_type different: %2 / %3",
947 title, Glib::ustring::compose(
"[%1]: v_type different: %2 / %3",
956 title, Glib::ustring::compose(
"[%1]: value address different: %2 / %3",
962 title, Glib::ustring::compose(
"[%1]: float lower different: %2 / %3",
967 title, Glib::ustring::compose(
"[%1]: float upper different: %2 / %3",
972 title, Glib::ustring::compose(
"[%1]: float step different: %2 / %3",
977 title, Glib::ustring::compose(
"[%1]: float std value different: %2 / %3",
983 title, Glib::ustring::compose(
"[%1]: float value different: %2 / %3",
988 title, Glib::ustring::compose(
"[%1]: float json value different: %2 / %3",
1019 jw.
write_kv(
"std_value", std_value);
1024 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper(), step() {
1027 if (jp.
read_kv(
"lower", lower) ||
1030 jp.
read_kv(
"value", *value) ||
1031 jp.
read_kv(
"std_value", std_value)) {
1034 "FloatParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1045 float v =
min(
max(val, lower), upper);
1063 bool FloatParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1067 assert(n >= 0 && n <= high);
1068 v = llimit + (n / high) * (ulimit - llimit);
1071 v = (2*n > high ? 1.0 : 0.0);
1074 v = lower +
min(n, upper-lower);
1087 bool FloatParameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
1091 assert(n >= 0 && n <= high);
1092 if (high <= ulimit) {
1093 v =
max(llimit,
min(ulimit,n));
1095 v = llimit + (n / high) * (ulimit - llimit);
1099 v = (2*n > high ? 1.0 : 0.0);
1102 v = lower +
min(n, upper-lower);
1115 void FloatParameter::trigger_changed() {
1120 json_value = std_value;
1130 if (json_value < lower-abs(5*FLT_EPSILON*lower) || json_value > upper+abs(5*FLT_EPSILON*upper)) {
1132 json_value = std_value;
1137 return abs(json_value - *value) < 5*FLT_EPSILON;
1145 json_value = lower + (json_value - low) / (up - low) * (upper - lower);
1185 serializeValueNames(jw, value_names);
1190 float *v,
int sv,
int low,
bool ctrl,
bool no_init):
1191 FloatParameter(
id, name,
Enum, preset, v, sv, low, low+get_upper(vn), 1, ctrl, no_init),
1200 jw.
write(value_names[static_cast<int>(round(*value-lower))].value_id);
1204 int up =
static_cast<int>(round(upper));
1205 int low =
static_cast<int>(round(lower));
1207 for (; n <= up-low; n++) {
1208 if (v_id == value_names[n].value_id) {
1226 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1241 jw.
write_kv(
"std_value", std_value);
1246 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper() {
1249 if (jp.
read_kv(
"lower", lower) ||
1251 jp.
read_kv(
"value", *value) ||
1252 jp.
read_kv(
"std_value", std_value)) {
1255 "IntParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1266 int v =
min(
max(val, lower), upper);
1284 bool IntParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1294 v = lower +
min(static_cast<int>(n), upper-lower);
1307 void IntParameter::trigger_changed() {
1312 json_value = std_value;
1322 if (json_value < lower || json_value > upper) {
1328 return json_value == *value;
1352 serializeValueNames(jw, value_names);
1357 int *v,
int sv,
bool ctrl):
1367 for (; n <= upper; n++) {
1368 if (v_id == value_names[n].value_id) {
1377 jw.
write(value_names[*value].value_id);
1391 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1412 value_array.push_back(
id_label(value_id, value_label));
1417 "EnumValueNames", Glib::ustring::compose(
"unknown key: %1", jp.
current_value()));
1424 for (std::vector<id_label>::iterator i = value_array.begin(); i != value_array.end(); ++i) {
1434 std::vector<id_label> value_array;
1451 std::vector<id_label> value_array;
1481 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1484 "BoolParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1495 if (val != *value) {
1507 bool BoolParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1524 void BoolParameter::trigger_changed() {
1529 json_value = std_value;
1545 return json_value == *value;
1558 jw.
write_kv(
"value", value->get_path());
1559 jw.
write_kv(
"std_value", std_value->get_path());
1564 :
Parameter(
jp_next(jp,
"Parameter")), value(0), std_value(0), json_value(0) {
1575 "FileParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1583 Glib::RefPtr<Gio::File> v = Gio::File::create_for_path(path);
1601 std_value = Gio::File::create_for_path(filename);
1634 static string get_file_id(
const Glib::RefPtr<Gio::File>& f) {
1635 return f->query_info(G_FILE_ATTRIBUTE_ID_FILE)->get_attribute_string(G_FILE_ATTRIBUTE_ID_FILE);
1641 id = get_file_id(
value);
1642 }
catch(Gio::Error& ex) {
1646 id2 = get_file_id(v);
1647 }
catch(Gio::Error& ex) {
1654 return value->get_path();
1658 return value->get_parent()->get_path();
1662 return value->get_parse_name();
1666 return value->query_info(G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME)->get_display_name();
1670 value->copy(Gio::File::create_for_path(destination));
1688 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1691 "StringParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1702 if (val != *value) {
1711 return !value->empty();
1715 json_value = std_value;
1728 return json_value == *value;
1742 replace_mode(false) {
1746 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1754 jw.
write(
"FloatEnum");
1758 }
else if (p->
isInt()) {
1764 }
else if (p->
isBool()) {
1766 }
else if (p->
isFile()) {
1770 }
else if (dynamic_cast<JConvParameter*>(p) != 0) {
1774 cerr <<
"skipping " << p->
id() << endl;
1783 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1809 "ParamMap", Glib::ustring::compose(
"unknown parameter type: %1", jp.
current_value()));
1824 void ParamMap::unique_id(
Parameter* param) {
1825 if (id_map.find(param->
id()) != id_map.end()) {
1830 void ParamMap::check_id(
const string&
id) {
1832 cerr <<
"string-id not found: " <<
id << endl;
1836 void ParamMap::check_p(
const char *p) {
1838 cerr <<
"char-id not found: " << p << endl;
1845 if (fmt ==
"json") {
1851 printf(
"parameter map dump\n");
1853 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1860 printf(
"---------------------\n");
1869 case None: jw->
write(
"None");
break;
1870 case Continuous: jw->
write(
"Cont");
break;
1871 case Switch: jw->
write(
"Swth");
break;
1872 case Enum: jw->
write(
"Enum");
break;
1873 default: assert(
false);
1875 if (save_in_preset) {
1876 jw->
write(
"preset");
1879 jw->
write(
"control");
1881 jw->
write(l_group());
1882 jw->
write(l_name());
1895 jw->
write(getLowerAsFloat());
1896 jw->
write(getUpperAsFloat());
1897 jw->
write(getStepAsFloat());
1901 for (
int n = 0; ; ++n) {
1902 if (!vn[n].value_id) {
1906 jw->
write(vn[n].value_id);
1907 jw->
write(vn[n].value_label ? vn[n].value_label : vn[n].value_id);
1915 printf(
"P: %s vt=%d ct=%d c=%d\n", _id.c_str(), v_type, c_type, controllable);
1922 map<string, Parameter*>::iterator ii = id_map.find(param->
id());
1923 if (ii != id_map.end()) {
1925 insert_remove(p,
false);
1931 id_map.insert(pair<string, Parameter*>(param->
id(), param));
1932 insert_remove(param,
true);
1940 insert_remove(p,
false);
1941 id_map.erase(p->
id());
1953 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1954 i->second->stdJSON_value();
1955 i->second->setJSON_value();
1959 static inline bool compare_groups(
const std::string&
id,
const char **groups) {
1963 for (
const char **g = groups; *g; g += 2) {
1970 if (strncmp(
id.c_str(), p, n) == 0 &&
id[n] ==
'.') {
1978 std::string group_id(pdef->
id);
1980 std::string on_off = group_id +
"on_off";
1981 std::string pp = group_id +
"pp";
1982 std::string position = group_id +
"position";
1984 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
1985 if (i->second->isInPreset()) {
1986 if (i->first != on_off && i->first != pp && i->first != position) {
1987 i->second->stdJSON_value();
1988 if (!i->second->compareJSON_value()) {
2001 std::string group_id(pdef->
id);
2003 std::string on_off = group_id +
"on_off";
2004 std::string pp = group_id +
"pp";
2005 std::string position = group_id +
"position";
2007 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
2008 if (i->second->isInPreset()) {
2009 if (i->first != on_off && i->first != pp && i->first != position) {
2010 i->second->stdJSON_value();
2011 i->second->setJSON_value();
ParameterV< float > FloatParameter
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)
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
void modifyCurrent(Parameter ¶m, float lower, float upper, bool toggle)
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