|
|
@ -90,7 +90,7 @@ mdaEPiano::mdaEPiano() // mdaEPiano::mdaEPiano(audioMasterCallback audioMaster) |
|
|
|
kgrp[31].pos = 406046; kgrp[31].end = 414486; kgrp[31].loop = 2306; //ghost
|
|
|
|
kgrp[31].pos = 406046; kgrp[31].end = 414486; kgrp[31].loop = 2306; //ghost
|
|
|
|
kgrp[32].pos = 414487; kgrp[32].end = 422408; kgrp[32].loop = 2169; |
|
|
|
kgrp[32].pos = 414487; kgrp[32].end = 422408; kgrp[32].loop = 2169; |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
//extra xfade looping...
|
|
|
|
//extra xfade looping...
|
|
|
|
for (int32_t k = 0; k < 28; k++) |
|
|
|
for (int32_t k = 0; k < 28; k++) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -100,8 +100,6 @@ mdaEPiano::mdaEPiano() // mdaEPiano::mdaEPiano(audioMasterCallback audioMaster) |
|
|
|
float xf = 1.0f; |
|
|
|
float xf = 1.0f; |
|
|
|
float dxf = -0.02f; |
|
|
|
float dxf = -0.02f; |
|
|
|
|
|
|
|
|
|
|
|
Serial.println("3"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (xf > 0.0f) |
|
|
|
while (xf > 0.0f) |
|
|
|
{ |
|
|
|
{ |
|
|
|
waves[p0] = (short)((1.0f - xf) * (float)waves[p0] + xf * (float)waves[p1]); |
|
|
|
waves[p0] = (short)((1.0f - xf) * (float)waves[p0] + xf * (float)waves[p1]); |
|
|
@ -110,7 +108,8 @@ mdaEPiano::mdaEPiano() // mdaEPiano::mdaEPiano(audioMasterCallback audioMaster) |
|
|
|
p1--; |
|
|
|
p1--; |
|
|
|
xf += dxf; |
|
|
|
xf += dxf; |
|
|
|
} |
|
|
|
} |
|
|
|
}*/ |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
//initialise...
|
|
|
|
//initialise...
|
|
|
|
for (int32_t v = 0; v < NVOICES; v++) |
|
|
|
for (int32_t v = 0; v < NVOICES; v++) |
|
|
@ -206,131 +205,6 @@ void mdaEPiano::fillpatch(int32_t p, char *name, float p0, float p1, float p2, f |
|
|
|
float mdaEPiano::getParameter(int32_t index) { |
|
|
|
float mdaEPiano::getParameter(int32_t index) { |
|
|
|
return programs[curProgram].param[index]; |
|
|
|
return programs[curProgram].param[index]; |
|
|
|
} |
|
|
|
} |
|
|
|
/*
|
|
|
|
|
|
|
|
void mdaEPiano::setProgramName(char *name) { strcpy(programs[curProgram].name, name); } |
|
|
|
|
|
|
|
void mdaEPiano::getProgramName(char *name) { strcpy(name, programs[curProgram].name); } |
|
|
|
|
|
|
|
void mdaEPiano::setBlockSize(int32_t blockSize) { AudioEffectX::setBlockSize(blockSize); } |
|
|
|
|
|
|
|
bool mdaEPiano::getEffectName(char* name) { strcpy(name, "ePiano"); return true; } |
|
|
|
|
|
|
|
bool mdaEPiano::getVendorString(char* text) { strcpy(text, "mda"); return true; } |
|
|
|
|
|
|
|
bool mdaEPiano::getProductString(char* text) { strcpy(text, "mda ePiano"); return true; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool mdaEPiano::getOutputProperties(int32_t index, VstPinProperties* properties) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(index<NOUTS) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(index) sprintf(properties->label, "ePiano"); |
|
|
|
|
|
|
|
else sprintf(properties->label, "ePiano"); |
|
|
|
|
|
|
|
properties->flags = kVstPinIsActive; |
|
|
|
|
|
|
|
if(index<2) properties->flags |= kVstPinIsStereo; //make channel 1+2 stereo
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool mdaEPiano::getProgramNameIndexed(int32_t category, int32_t index, char* text) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ((unsigned int)index < NPROGS) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
strcpy(text, programs[index].name); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool mdaEPiano::copyProgram(int32_t destination) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(destination<NPROGS) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
programs[destination] = programs[curProgram]; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int32_t mdaEPiano::canDo(char* text) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(strcmp(text, "receiveVstEvents") == 0) return 1; |
|
|
|
|
|
|
|
if(strcmp(text, "receiveVstMidiEvent") == 0) return 1; |
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mdaEPiano::getParameterName(int32_t index, char *label) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch (index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case 0: strcpy(label, "Envelope Decay"); break; |
|
|
|
|
|
|
|
case 1: strcpy(label, "Envelope Release"); break; |
|
|
|
|
|
|
|
case 2: strcpy(label, "Hardness"); break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 3: strcpy(label, "Treble Boost"); break; |
|
|
|
|
|
|
|
case 4: strcpy(label, "Modulation"); break; |
|
|
|
|
|
|
|
case 5: strcpy(label, "LFO Rate"); break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 6: strcpy(label, "Velocity Sense"); break; |
|
|
|
|
|
|
|
case 7: strcpy(label, "Stereo Width"); break; |
|
|
|
|
|
|
|
case 8: strcpy(label, "Polyphony"); break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 9: strcpy(label, "Fine Tuning"); break; |
|
|
|
|
|
|
|
case 10: strcpy(label, "Random Tuning"); break; |
|
|
|
|
|
|
|
default: strcpy(label, "Overdrive"); break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mdaEPiano::getParameterDisplay(int32_t index, char *text) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char string[16]; |
|
|
|
|
|
|
|
float * param = programs[curProgram].param; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch(index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
case 3: |
|
|
|
|
|
|
|
case 9: sprintf(string, "%.0f", 100.0f * param[index] - 50.0f); break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 4: if(param[index] > 0.5f) |
|
|
|
|
|
|
|
sprintf(string, "Trem %.0f", 200.0f * param[index] - 100.0f); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
sprintf(string, "Pan %.0f", 100.0f - 200.0f * param[index]); break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 5: sprintf(string, "%.2f", (float)exp(6.22f * param[5] - 2.61f)); break; //LFO Hz
|
|
|
|
|
|
|
|
case 7: sprintf(string, "%.0f", 200.0f * param[index]); break; |
|
|
|
|
|
|
|
case 8: sprintf(string, "%d", poly); break; |
|
|
|
|
|
|
|
case 10: sprintf(string, "%.1f", 50.0f * param[index] * param[index]); break; |
|
|
|
|
|
|
|
case 11: sprintf(string, "%.1f", 100.0f * param[index]); break; |
|
|
|
|
|
|
|
default: sprintf(string, "%.0f", 100.0f * param[index]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
string[8] = 0; |
|
|
|
|
|
|
|
strcpy(text, (char *)string); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mdaEPiano::getParameterLabel(int32_t index, char *label) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
switch(index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case 5: strcpy(label, "Hz"); break; |
|
|
|
|
|
|
|
case 8: strcpy(label, "voices"); break; |
|
|
|
|
|
|
|
case 9: |
|
|
|
|
|
|
|
case 10: strcpy(label, "cents"); break; |
|
|
|
|
|
|
|
default: strcpy(label, "%"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mdaEPiano::guiGetDisplay(int32_t index, char *label) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
getParameterName(index, label); |
|
|
|
|
|
|
|
strcat(label, " = "); |
|
|
|
|
|
|
|
getParameterDisplay(index, label + strlen(label)); |
|
|
|
|
|
|
|
getParameterLabel(index, label + strlen(label)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void mdaEPiano::process(int16_t *outputs_r, int16_t *outputs_l) |
|
|
|
void mdaEPiano::process(int16_t *outputs_r, int16_t *outputs_l) |
|
|
|
{ |
|
|
|
{ |
|
|
|