commit 5d043110871ea3bcf20afa33b71897e63b02a5dd
parent 26687a1a449247027ac173eed8c555323961a5d6
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Tue, 13 Aug 2013 12:55:59 -0400
Fix Missing PartUI Handlers Seen in Rebase
Diffstat:
6 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/Misc/Part.cpp b/src/Misc/Part.cpp
@@ -62,6 +62,9 @@ static Ports partPorts = {
rToggle(Ppolymode, "Polyphoney mode"),
rToggle(Plegatomode, "Legato enable"),
rParam(Pkeylimit, "Key limit per part"),
+ rParam(info.Ptype, "Class of Instrument"),
+ rString(info.Pauthor, MAX_INFO_TEXT_SIZE, "Instrument Author"),
+ rString(info.Pcomments, MAX_INFO_TEXT_SIZE, "Instrument Comments"),
{"captureMin:", NULL, NULL, [](const char *, RtData &r)
{Part *p = (Part*)r.obj; p->Pminkey = p->lastnote;}},
{"captureMax:", NULL, NULL, [](const char *, RtData &r)
@@ -101,6 +104,7 @@ static Ports kitPorts = {
rToggle(Psubenabled, "SUBsynth enable"),
rToggle(Ppadenabled, "PADsynth enable"),
rParam(Psendtoparteffect, "Effect Levels"),
+ rString(Pname, PART_MAX_NAME_LEN, "Kit User Specified Label"),
//{"padpars:b", "::", 0
// [](
};
@@ -117,7 +121,7 @@ Part::Part(Microtonal *microtonal_, FFTwrapper *fft_)
partoutr = new float [synth->buffersize];
for(int n = 0; n < NUM_KIT_ITEMS; ++n) {
- kit[n].Pname = new unsigned char [PART_MAX_NAME_LEN];
+ kit[n].Pname = new char [PART_MAX_NAME_LEN];
//XXX this is wasting memory, but making interfacing with the back
//layers more nice, if this seems to increase memory usage figure out a
//sane way of tracking the changing pointers (otherwise enjoy the bloat)
diff --git a/src/Misc/Part.h b/src/Misc/Part.h
@@ -92,7 +92,7 @@ class Part
//the part's kit
struct Kit {
unsigned char Penabled, Pmuted, Pminkey, Pmaxkey;
- unsigned char *Pname;
+ char *Pname;
unsigned char Padenabled, Psubenabled, Ppadenabled;
unsigned char Psendtoparteffect;
ADnoteParameters *adpars;
@@ -129,8 +129,8 @@ class Part
unsigned char *Pname; //name of the instrument
struct { //instrument additional information
unsigned char Ptype;
- unsigned char Pauthor[MAX_INFO_TEXT_SIZE + 1];
- unsigned char Pcomments[MAX_INFO_TEXT_SIZE + 1];
+ char Pauthor[MAX_INFO_TEXT_SIZE + 1];
+ char Pcomments[MAX_INFO_TEXT_SIZE + 1];
} info;
diff --git a/src/UI/Fl_Osc_Input.H b/src/UI/Fl_Osc_Input.H
@@ -10,4 +10,6 @@ class Fl_Osc_Input: public Fl_Input, public Fl_Osc_Widget
//Normal Initialization
void init(const char *path);
+
+ virtual void OSC_value(const char *value) override;
};
diff --git a/src/UI/Fl_Osc_Input.cpp b/src/UI/Fl_Osc_Input.cpp
@@ -13,3 +13,8 @@ void Fl_Osc_Input::init(const char *path)
ext = path;
oscRegister(path);
}
+
+void Fl_Osc_Input::OSC_value(const char *v)
+{
+ value(v);
+}
diff --git a/src/UI/Fl_Osc_Widget.H b/src/UI/Fl_Osc_Widget.H
@@ -20,6 +20,7 @@ class Fl_Osc_Widget
virtual void OSC_value(int);
virtual void OSC_value(char);
virtual void OSC_value(unsigned,void*);
+ virtual void OSC_value(const char *);
//labeled forwarding methods
virtual void OSC_value(float x, const char *);
@@ -27,6 +28,7 @@ class Fl_Osc_Widget
virtual void OSC_value(int x, const char *);
virtual void OSC_value(char x, const char *);
virtual void OSC_value(unsigned x, void *v, const char *);
+ virtual void OSC_value(const char *x, const char *);
//Raw messages
virtual void OSC_raw(const char *);
diff --git a/src/UI/Fl_Osc_Widget.cpp b/src/UI/Fl_Osc_Widget.cpp
@@ -26,6 +26,7 @@ void Fl_Osc_Widget::OSC_value(bool) {}
void Fl_Osc_Widget::OSC_value(int) {}
void Fl_Osc_Widget::OSC_value(char) {}
void Fl_Osc_Widget::OSC_value(unsigned,void*) {}
+void Fl_Osc_Widget::OSC_value(const char *) {}
//labeled forwarding methods
void Fl_Osc_Widget::OSC_value(float x, const char *) {OSC_value(x);}
@@ -33,6 +34,7 @@ void Fl_Osc_Widget::OSC_value(bool x, const char *) {OSC_value(x);}
void Fl_Osc_Widget::OSC_value(int x, const char *) {OSC_value(x);}
void Fl_Osc_Widget::OSC_value(char x, const char *) {OSC_value(x);}
void Fl_Osc_Widget::OSC_value(unsigned x, void *v, const char *) {OSC_value(x,v);}
+void Fl_Osc_Widget::OSC_value(const char *x, const char *) {OSC_value(x);}
void Fl_Osc_Widget::OSC_raw(const char *)
{}