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)"},
111 string MidiStandardControllers::midi_to_note(
int ctr) {
112 static const char* notes[12] = {
"C",
"C#",
"D",
"D#",
"E",
"F",
"F#",
"G",
"G#",
"A",
"A#",
"B" };
113 int octave = (ctr / 12) - 1;
116 string p = b.str().substr(0, 1);
117 int index = (ctr % 12);
118 string note = notes[index];
122 string MidiStandardControllers::ctr_desc(
int ctr) {
123 string p = midi_to_note(ctr-200);
124 return "Note On ( " + p +
" )";
128 for (
unsigned int i = 0; i <
sizeof(midi_std_itab)/
sizeof(midi_std_itab[0]); i++) {
129 m.insert(pair<int, modstring>(midi_std_itab[i].ctrl, modstring(midi_std_itab[i].name)));
131 for (
unsigned int i = 0; i < 127; i++) {
132 const int mm = i + 200;
133 m.insert(pair<int, modstring>(mm, modstring(ctr_desc(mm).c_str())));
138 map<int, modstring>::iterator i = m.find(ctr);
141 if (i->second.modified) {
143 i->second.name = m[ctr].std;
144 m[ctr].modified =
false;
152 m[ctr] = modstring(name,
true, 0);
154 i->second.modified =
true;
155 i->second.name = name;
162 for (map<int, modstring>::const_iterator i = m.begin(); i != m.end(); ++i) {
163 if (i->second.modified) {
166 jw.
write_kv(ostr.str().c_str(), i->second.name);
195 jw.
write(param->id());
203 jw.
write(_toggle_behaviour);
212 if (!pmap.
hasId(
id)) {
214 _(
"unknown parameter: ") +
id);
219 float lower = 0, upper = 0;
221 int toggle_behaviour = 0;
244 }
else if (lower < pmin) {
251 }
else if (upper < pmin) {
288 _(
"recall MIDI state"),
289 _(
"invalid format, Parameter skipped: ") +
id);
294 _(
"recall MIDI state"),
295 _(
"Parameter range outside bounds, changed: ") +
id);
297 return new MidiController(pm, lower, upper, toggle, toggle_behaviour);
302 if (param->get_midi_blocked())
return ret;
304 switch (_toggle_behaviour) {
305 case Parameter::toggle_type::OnOff: {
306 bool s_o = (2*last_value > 127);
307 bool s_n = (2*n > 127);
309 if (param->on_off_value()) {
310 ret = param->midi_set(0, 127, _lower, _upper);
312 ret = param->midi_set(127, 127, _lower, _upper);
317 case Parameter::toggle_type::Constant: {
318 if (n == last_value || last_value == -1) {
319 if (param->on_off_value()) {
320 ret = param->midi_set(0, n, _lower, _upper);
322 ret = param->midi_set(127, n, _lower, _upper);
332 ret = param->midi_set(n, 127, _lower, _upper);
334 param->trigger_changed();
340 if (param->get_blocked())
return ret;
341 if (strcmp(param->id().c_str(),
"engine.mute")==0) {
342 if ( n == 0) n = 127;
345 ret = param->midi_set(n, 127, _lower, _upper);
351 if (param->get_blocked())
return ret;
353 bool s_o = (2*last_value > 360);
354 bool s_n = (2*n > 360);
356 if (param->on_off_value()) {
357 ret = param->midi_set_bpm(0, 360, _lower, _upper);
359 ret = param->midi_set_bpm(360, 360, _lower, _upper);
363 ret = param->midi_set_bpm(n, 360, _lower, _upper);
373 for (
unsigned int n = 0; n < array_size; n++) {
374 operator[](n).clear();
395 for (
unsigned int n = 0; n < array_size; n++) {
401 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i)
410 for (ControllerArray::size_type n = 0; n < size(); ++n) {
412 for (midi_controller_list::const_iterator i = cl.begin(); i != cl.end(); ++i) {
413 if (i->hasParameter(param)) {
425 for (iterator pctr = begin(); pctr !=
end(); ++pctr) {
426 for (midi_controller_list::iterator i = pctr->begin(); i != pctr->end(); ++i) {
427 if (i->hasParameter(p)) {
452 if (f >= 0x1.0p23)
return (
unsigned int) f;
453 return (
unsigned int) (f + 0.49999997f);
459 if ((time-time1)> (1.05*time_diff) || (time-time1)*1.05 < (time_diff)) {
464 bpm_new = ((1000000000. / (time-time1) / 24) * 60);
468 if (collect >= (bpm_new*bpm_new*0.0002)+1) {
479 time_diff = time-time1;
490 last_midi_control_value(),
491 last_midi_control(-2),
492 changed_midi_control_value(),
507 midi_value_changed() {
509 last_midi_control_value[i] = -1;
510 changed_midi_control_value[i] = 0;
512 pgm_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_pgm_chg));
513 mute_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_mute_chg));
514 bank_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_bank_chg));
515 val_chg.connect(sigc::mem_fun(*
this, &MidiControllerList::on_val_chg));
520 bool MidiControllerList::check_midi_values() {
523 if (changed_midi_control_value[n]) {
524 changed_midi_control_value[n] = 0;
525 saved_values[n] = last_midi_control_value[n];
526 midi_value_changed(n, saved_values[n]);
529 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
531 && i->toggle_behaviour() == Parameter::toggle_type::Constant) {
532 midi_value_changed(n, i->getParameter().on_off_value() * 127);
534 i->trigger_changed();
542 void MidiControllerList::on_val_chg() {
545 if (changed_midi_control_value[n]) {
546 changed_midi_control_value[n] = 0;
547 saved_values[n] = last_midi_control_value[n];
548 midi_value_changed(n, saved_values[n]);
551 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
553 && i->toggle_behaviour() == Parameter::toggle_type::Constant) {
554 midi_value_changed(n, i->getParameter().on_off_value() * 127);
556 i->trigger_changed();
568 for (midi_controller_list::iterator i = cl.begin(); i != cl.end(); ++i) {
575 for (
unsigned int n = 0; n < map.size(); n++) {
580 void MidiControllerList::on_pgm_chg() {
585 if (pgm>=0) new_program(pgm);
588 void MidiControllerList::on_mute_chg() {
593 new_mute_state(mute);
596 void MidiControllerList::on_bank_chg() {
601 if (bk>=0) new_bank(bk);
607 last_midi_control = ctl;
609 last_midi_control = -2;
627 float lower,
float upper,
bool toggle,
int toggle_behaviour) {
634 if (last_midi_control < 0)
637 map[last_midi_control].push_front(
MidiController(param, lower, upper, toggle, toggle_behaviour));
644 int v = last_midi_control_value[n];
646 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
647 if (i->is_toggle()) {
648 v = i->getParameter().on_off_value() * 127;
650 midi_value_changed(n, v);
657 last_midi_control = ctr;
660 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
669 last_midi_control = 22;
672 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
693 std::set<Parameter*> pset;
694 for (
unsigned int i = 0; i < map.size(); i++) {
696 for (midi_controller_list::iterator j = ctr.begin(); j != ctr.end(); ++j) {
699 for (midi_controller_list::const_iterator jn = ctr_new.begin();
700 jn != ctr_new.end(); ++jn) {
701 if (j->getParameter() == jn->getParameter()) {
702 pset.insert(&j->getParameter());
707 pset.insert(&j->getParameter());
711 for (paramlist::iterator n = plist.begin(); n != plist.end(); ) {
712 paramlist::iterator n1 = n++;
713 if (pset.find(*n1) != pset.end()) {
720 unsigned int val = 0;
721 switch (transport_state) {
722 case JackTransportStopped:
725 case JackTransportRolling:
728 case JackTransportStarting:
735 last_midi_control = 24;
738 for (midi_controller_list::iterator i = ctr_list.begin(); i != ctr_list.end(); ++i) {
748 jack_midi_event_t in_event;
749 jack_nframes_t event_count = jack_midi_get_event_count(midi_input_port_buf);
751 for (i = 0; i < event_count; i++) {
752 jack_midi_event_get(&in_event, midi_input_port_buf, i);
753 if ((in_event.buffer[0] & 0xf0) == 0xc0) {
756 }
else if ((in_event.buffer[0] & 0xf0) == 0xb0) {
757 if (in_event.buffer[1]== 120) {
760 }
else if (in_event.buffer[1]== 32) {
764 set_ctr_val(in_event.buffer[1], in_event.buffer[2]);
767 }
else if ((in_event.buffer[0] & 0xf0) == 0x90) {
771 }
else if ((in_event.buffer[0] ) > 0xf0) {
772 if ((in_event.buffer[0] ) == 0xf8) {
773 clock_gettime(CLOCK_MONOTONIC, &ts1);
776 time0 = (ts1.tv_sec*1000000000.0)+(ts1.tv_nsec)+
777 (1000000000.0/(
double)(sr/(double)in_event.time));
782 }
else if ((in_event.buffer[0] ) == 0xfa) {
785 }
else if ((in_event.buffer[0] ) == 0xfb) {
787 }
else if ((in_event.buffer[0] ) == 0xfc) {
790 }
else if ((in_event.buffer[0] ) == 0xf2) {
803 insert(
"system",
N_(
"System"));
804 insert(
"ui",
N_(
"User Interface"));
805 insert(
"ui.amp",
N_(
"User Interface"));
806 insert(
"engine",
N_(
"Audio Engine"));
811 for (map<string, bool>::iterator i = used.begin(); i != used.end(); ++i) {
820 void ParameterGroups::group_exists(
const string&
id) {
821 if (groups.find(
id) == groups.end()) {
828 void ParameterGroups::group_is_new(
const string&
id) {
829 if (groups.find(
id) != groups.end()) {
835 for (map<string, string>::iterator i = groups.begin(); i != groups.end(); ++i) {
836 printf(
"PG %s: %s\n", i->first.c_str(), i->second.c_str());
850 return groups.
get(group_id);
852 return groups[group_id];
857 if (groups.find(
id) == groups.end()) {
887 if (!save_in_preset) {
894 : boost::noncopyable(),
902 save_in_preset(true),
931 "Parameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
941 bool Parameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
946 bool Parameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
951 void Parameter::trigger_changed() {
956 for (
int n = 0; ; n++) {
957 if (!vn[n].value_id) {
966 Glib::ustring::compose(_(
"parameter %1: value %2 out of range [%3, %4]"),
967 _id, value, lower, upper));
971 static const char *tpname[] = {
972 "float",
"int",
"bool",
"bool",
"filename",
"string",
"special"};
973 assert(0 <=
v_type and
v_type <
sizeof(tpname)/
sizeof(tpname[0]));
1001 title, Glib::ustring::compose(
"Different ID's: %2 / %3",
1006 title, Glib::ustring::compose(
"[%1]: Different name: %2 / %3",
1011 title, Glib::ustring::compose(
"[%1]: Different group: %2 / %3",
1016 title, Glib::ustring::compose(
"[%1]: Different desc: %2 / %3",
1021 title, Glib::ustring::compose(
"[%1]: save_in_preset different: %2 / %3",
1026 title, Glib::ustring::compose(
"[%1]: controllable different: %2 / %3",
1031 title, Glib::ustring::compose(
"[%1]: used different: %2 / %3",
1036 title, Glib::ustring::compose(
"[%1]: c_type different: %2 / %3",
1041 title, Glib::ustring::compose(
"[%1]: v_type different: %2 / %3",
1050 title, Glib::ustring::compose(
"[%1]: value address different: %2 / %3",
1056 title, Glib::ustring::compose(
"[%1]: float lower different: %2 / %3",
1061 title, Glib::ustring::compose(
"[%1]: float upper different: %2 / %3",
1066 title, Glib::ustring::compose(
"[%1]: float step different: %2 / %3",
1071 title, Glib::ustring::compose(
"[%1]: float std value different: %2 / %3",
1077 title, Glib::ustring::compose(
"[%1]: float value different: %2 / %3",
1082 title, Glib::ustring::compose(
"[%1]: float json value different: %2 / %3",
1113 jw.
write_kv(
"std_value", std_value);
1118 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper(), step() {
1121 if (jp.
read_kv(
"lower", lower) ||
1124 jp.
read_kv(
"value", *value) ||
1125 jp.
read_kv(
"std_value", std_value)) {
1128 "FloatParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1139 float v =
min(
max(val, lower), upper);
1157 bool FloatParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1161 assert(n >= 0 && n <= high);
1162 v = llimit + (n / high) * (ulimit - llimit);
1165 v = (2*n > high ? 1.0 : 0.0);
1168 v = lower +
min(n, upper-lower);
1181 bool FloatParameter::midi_set_bpm(
float n,
float high,
float llimit,
float ulimit) {
1185 assert(n >= 0 && n <= high);
1186 if (high <= ulimit) {
1187 v =
max(llimit,
min(ulimit,n));
1189 v = llimit + (n / high) * (ulimit - llimit);
1193 v = (2*n > high ? 1.0 : 0.0);
1196 v = lower +
min(n, upper-lower);
1209 void FloatParameter::trigger_changed() {
1214 json_value = std_value;
1224 if (json_value < lower-std::abs(5*FLT_EPSILON*lower) || json_value > upper+std::abs(5*FLT_EPSILON*upper)) {
1226 json_value = std_value;
1231 return std::abs(json_value - *value) < 5*FLT_EPSILON;
1239 json_value = lower + (json_value - low) / (up - low) * (upper - lower);
1279 serializeValueNames(jw, value_names);
1284 float *v,
int sv,
int low,
bool ctrl,
bool no_init):
1285 FloatParameter(
id, name,
Enum, preset, v, sv, low, low+get_upper(vn), 1, ctrl, no_init),
1294 jw.
write(value_names[static_cast<int>(round(*value-lower))].value_id);
1298 int up =
static_cast<int>(round(upper));
1299 int low =
static_cast<int>(round(lower));
1301 for (; n <= up-low; n++) {
1302 if (v_id == value_names[n].value_id) {
1320 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1335 jw.
write_kv(
"std_value", std_value);
1340 :
Parameter(
jp_next(jp,
"Parameter")), json_value(0), value(&value_storage), std_value(0), lower(), upper() {
1343 if (jp.
read_kv(
"lower", lower) ||
1345 jp.
read_kv(
"value", *value) ||
1346 jp.
read_kv(
"std_value", std_value)) {
1349 "IntParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1360 int v =
min(
max(val, lower), upper);
1378 bool IntParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1388 v = lower +
min(static_cast<int>(n), upper-lower);
1401 void IntParameter::trigger_changed() {
1406 json_value = std_value;
1416 if (json_value < lower || json_value > upper) {
1422 return json_value == *value;
1446 serializeValueNames(jw, value_names);
1451 int *v,
int sv,
bool ctrl):
1461 for (; n <= upper; n++) {
1462 if (v_id == value_names[n].value_id) {
1471 jw.
write(value_names[*value].value_id);
1485 _(
"read parameter"), (boost::format(_(
"parameter %1%: unknown enum value: %2%"))
1506 value_array.push_back(
id_label(value_id, value_label));
1511 "EnumValueNames", Glib::ustring::compose(
"unknown key: %1", jp.
current_value()));
1518 for (std::vector<id_label>::iterator i = value_array.begin(); i != value_array.end(); ++i) {
1528 std::vector<id_label> value_array;
1545 std::vector<id_label> value_array;
1575 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1578 "BoolParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1589 if (val != *value) {
1601 bool BoolParameter::midi_set(
float n,
float high,
float llimit,
float ulimit) {
1618 void BoolParameter::trigger_changed() {
1623 json_value = std_value;
1639 return json_value == *value;
1652 jw.
write_kv(
"value", value->get_path());
1653 jw.
write_kv(
"std_value", std_value->get_path());
1658 :
Parameter(
jp_next(jp,
"Parameter")), value(0), std_value(0), json_value(0) {
1669 "FileParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1677 Glib::RefPtr<Gio::File> v = Gio::File::create_for_path(path);
1695 std_value = Gio::File::create_for_path(filename);
1728 static string get_file_id(
const Glib::RefPtr<Gio::File>& f) {
1729 return f->query_info(G_FILE_ATTRIBUTE_ID_FILE)->get_attribute_string(G_FILE_ATTRIBUTE_ID_FILE);
1735 id = get_file_id(
value);
1736 }
catch(Gio::Error& ex) {
1740 id2 = get_file_id(v);
1741 }
catch(Gio::Error& ex) {
1748 return value->get_path();
1752 return value->get_parent()->get_path();
1756 return value->get_parse_name();
1760 return value->query_info(G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME)->get_display_name();
1764 value->copy(Gio::File::create_for_path(destination));
1782 if (jp.
read_kv(
"value", *value) || jp.
read_kv(
"std_value", std_value)) {
1785 "StringParameter", Glib::ustring::compose(
"%1: unknown key: %2",
_id, jp.
current_value()));
1796 if (val != *value) {
1805 return !value->empty();
1809 json_value = std_value;
1822 return json_value == *value;
1835 replace_mode(false) {
1839 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1847 jw.
write(
"FloatEnum");
1851 }
else if (p->
isInt()) {
1857 }
else if (p->
isBool()) {
1859 }
else if (p->
isFile()) {
1863 }
else if (dynamic_cast<JConvParameter*>(p) != 0) {
1865 }
else if (dynamic_cast<SeqParameter*>(p) != 0) {
1869 cerr <<
"skipping " << p->
id() << endl;
1878 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1906 "ParamMap", Glib::ustring::compose(
"unknown parameter type: %1", jp.
current_value()));
1921 void ParamMap::unique_id(
Parameter* param) {
1922 if (id_map.find(param->
id()) != id_map.end()) {
1927 void ParamMap::check_id(
const string&
id) {
1929 cerr <<
"string-id not found: " <<
id << endl;
1933 void ParamMap::check_p(
const char *p) {
1935 cerr <<
"char-id not found: " << p << endl;
1942 if (fmt ==
"json") {
1948 printf(
"parameter map dump\n");
1950 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
1957 printf(
"---------------------\n");
1966 case None: jw->
write(
"None");
break;
1967 case Continuous: jw->
write(
"Cont");
break;
1968 case Switch: jw->
write(
"Swth");
break;
1969 case Enum: jw->
write(
"Enum");
break;
1970 default: assert(
false);
1972 if (save_in_preset) {
1973 jw->
write(
"preset");
1976 jw->
write(
"control");
1978 jw->
write(l_group());
1979 jw->
write(l_name());
1992 jw->
write(getLowerAsFloat());
1993 jw->
write(getUpperAsFloat());
1994 jw->
write(getStepAsFloat());
1998 for (
int n = 0; ; ++n) {
1999 if (!vn[n].value_id) {
2003 jw->
write(vn[n].value_id);
2004 jw->
write(vn[n].value_label ? vn[n].value_label : vn[n].value_id);
2012 printf(
"P: %s vt=%d ct=%d c=%d\n", _id.c_str(), v_type, c_type, controllable);
2019 map<string, Parameter*>::iterator ii = id_map.find(param->
id());
2020 if (ii != id_map.end()) {
2022 insert_remove(p,
false);
2028 id_map.insert(pair<string, Parameter*>(param->
id(), param));
2029 insert_remove(param,
true);
2037 insert_remove(p,
false);
2038 id_map.erase(p->
id());
2050 for (
iterator i = id_map.begin(); i != id_map.end(); ++i) {
2051 i->second->stdJSON_value();
2052 i->second->setJSON_value();
2056 static inline bool compare_groups(
const std::string&
id,
const char **groups) {
2060 for (
const char **g = groups; *g; g += 2) {
2067 if (strncmp(
id.c_str(), p, n) == 0 &&
id[n] ==
'.') {
2075 std::string group_id(pdef->
id);
2077 std::string on_off = group_id +
"on_off";
2078 std::string pp = group_id +
"pp";
2079 std::string position = group_id +
"position";
2081 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
2082 if (i->second->isInPreset()) {
2083 if (i->first != on_off && i->first != pp && i->first != position) {
2084 i->second->stdJSON_value();
2085 if (!i->second->compareJSON_value()) {
2098 std::string group_id(pdef->
id);
2100 std::string on_off = group_id +
"on_off";
2101 std::string pp = group_id +
"pp";
2102 std::string position = group_id +
"position";
2104 if (i->first.compare(0, group_id.size(), group_id) == 0 || compare_groups(i->first, pdef->
groups)) {
2105 if (i->second->isInPreset()) {
2106 if (i->first != on_off && i->first != pp && i->first != position) {
2107 i->second->stdJSON_value();
2108 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)
bool group_exist(const string &id)
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