zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 1a7bf04b9f89d2168241b57c6ce7fda87053a7f5
parent c816179faa83bcb3e3161eef7198476d4826a31b
Author: fundamental <[email protected]>
Date:   Fri, 17 Oct 2014 11:26:29 -0400

Add reader for octavesize in Microtonal

Diffstat:
Msrc/Misc/Microtonal.cpp | 6++++++
Msrc/Misc/Microtonal.h | 3++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/Misc/Microtonal.cpp b/src/Misc/Microtonal.cpp @@ -66,6 +66,12 @@ rtosc::Ports Microtonal::ports = { rString(Pname, MICROTONAL_MAX_NAME_LEN, "Microtonal Name"), rString(Pcomment, MICROTONAL_MAX_NAME_LEN, "Microtonal Name"), + + {"octavesize:", 0, 0, [](const char*, RtData &d) + { + Microtonal &m = *(Microtonal*)d.obj; + d.reply(d.loc, "i", m.getoctavesize()); + }}, }; diff --git a/src/Misc/Microtonal.h b/src/Misc/Microtonal.h @@ -117,7 +117,8 @@ class Microtonal static rtosc::Ports ports; private: int linetotunings(unsigned int nline, const char *line); - int loadline(FILE *file, char *line); //loads a line from the text file, while ignoring the lines beggining with "!" + //loads a line from the text file, while ignoring the lines beggining with "!" + int loadline(FILE *file, char *line); //Grab a 0..127 integer from the provided descriptor unsigned char octavesize; struct {