diff --git a/README.md b/README.md index 2c7d627..37833c7 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ remember to export `VST_SDK_DIR` to the path of your `vstsdk2.4/` ## TODO * convert crap\_noise to the template format -* get presets, no pardon me, Banks And Patches working in vst * rename plugins (fix capitalization consistency and such) +* make style consistent * remove crap\_ prefixes? * move to subdirs? * make crap faster (hand-written SSE2? compiler directives?) diff --git a/template-vst.cpp b/template-vst.cpp index f4494f6..eec7bc5 100644 --- a/template-vst.cpp +++ b/template-vst.cpp @@ -21,6 +21,9 @@ public: bool setProcessPrecision(VstInt32 precision); void setSampleRate(float); + void setProgramName(char *); + void getProgramName(char *); + bool getProgramNameIndexed(VstInt32, VstInt32, char *); bool getEffectName(char *); bool getVendorString(char *); bool getProductString(char *); @@ -35,6 +38,8 @@ public: #endif private: + char programName[kVstMaxProgNameLen]; + #if (PARAMETERS > 0) param params[PARAMETERS]; #endif @@ -54,6 +59,8 @@ plugin::plugin(audioMasterCallback audioMaster) setNumOutputs(2); setUniqueID(ID); canProcessReplacing(); + canDoubleReplacing(); + vst_strncpy(programName, "Init", kVstMaxProgNameLen); #if (PARAMETERS > 0) ::construct_params(params); #endif @@ -131,6 +138,26 @@ plugin::getVendorString(char *text) return true; } +void +plugin::setProgramName (char *text) +{ + vst_strncpy(programName, text, kVstMaxProgNameLen); +} + +void +plugin::getProgramName (char *text) +{ + vst_strncpy(text, programName, kVstMaxProgNameLen); +} + +bool +plugin::getProgramNameIndexed(VstInt32 category, VstInt32 index, char *text) +{ + if (index != 0) return false; + vst_strncpy(text, programName, kVstMaxProgNameLen); + return true; +} + #if (PARAMETERS > 0) void plugin::setParameter(VstInt32 index, float value)