diff --git a/VASTvaporizer/Presets/AR Trance Gate Arp.vvp b/VASTvaporizer/Presets/AR Trance Gate Arp.vvp
index 7b60934..4234f18 100644
--- a/VASTvaporizer/Presets/AR Trance Gate Arp.vvp
+++ b/VASTvaporizer/Presets/AR Trance Gate Arp.vvp
@@ -1,9 +1,10 @@
-
+ CustomModulator2Text="Custom2" CustomModulator3Text="Custom3"
+ CustomModulator4Text="Custom4" PatchMPEPreset="" PatchMPEBendRange="0">
@@ -12,7 +13,7 @@
-
+
@@ -382,24 +383,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -501,24 +502,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -620,24 +621,24 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -664,171 +665,303 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="0"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="1"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="2"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="3"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="4"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="5"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="6"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="7"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="8"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="0"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="1"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="2"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="3"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="4"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="5"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="6"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="7"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="8"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="0"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="1"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="2"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="3"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="4"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="5"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="6"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="7"/>
+ maxHarmonics="1023" numWaveTableFreqs="27" wtPos="8"/>
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VASTvaporizer/Source/Engine/FX/VASTEffect.cpp b/VASTvaporizer/Source/Engine/FX/VASTEffect.cpp
index 57cadc9..74a8a3c 100644
--- a/VASTvaporizer/Source/Engine/FX/VASTEffect.cpp
+++ b/VASTvaporizer/Source/Engine/FX/VASTEffect.cpp
@@ -60,10 +60,10 @@ void CVASTEffect::createAndAddParameter(std::atomic** parameterVar, Audio
isAutomatableParameter, isDiscreteParameter, AudioProcessorParameter::Category::genericParameter));
my_parameters.insert(std::make_pair(uiSequence, p));
-
my_processor->m_mapModdestToParameterName.insert(std::make_pair(modMatrixDestination, newId));
my_processor->m_mapParameterNameToModdest.insert(std::make_pair(newId, modMatrixDestination));
my_processor->addModMatrixLookupTable(modMatrixDestination, r.start, r.end, r.skew, newId, p);
+
std::atomic* par = stateTree.getRawParameterValue(newId);
*parameterVar = par;
diff --git a/VASTvaporizer/Source/Engine/FX/VASTReverb.cpp b/VASTvaporizer/Source/Engine/FX/VASTReverb.cpp
index 336104c..23f1cfb 100644
--- a/VASTvaporizer/Source/Engine/FX/VASTReverb.cpp
+++ b/VASTvaporizer/Source/Engine/FX/VASTReverb.cpp
@@ -103,8 +103,10 @@ void CVASTReverb::initCompatibilityParameters() {
void CVASTReverb::parameterChanged(const String& parameterID, float newValue) {
if (parameterID.startsWith("m_bReverbOnOff")) {
- if (newValue == static_cast(SWITCH::SWITCH_ON))
+ if (newValue == static_cast(SWITCH::SWITCH_ON)) {
+ reset();
switchOn();
+ }
else
switchOff();
}
diff --git a/VASTvaporizer/Source/Engine/FX/VASTStereoDelay.cpp b/VASTvaporizer/Source/Engine/FX/VASTStereoDelay.cpp
index 912a980..e08897f 100644
--- a/VASTvaporizer/Source/Engine/FX/VASTStereoDelay.cpp
+++ b/VASTvaporizer/Source/Engine/FX/VASTStereoDelay.cpp
@@ -107,8 +107,10 @@ void CVASTStereoDelay::initCompatibilityParameters() {
void CVASTStereoDelay::parameterChanged(const String& parameterID, float newValue) {
if (parameterID.startsWith("m_bDelayOnOff")) {
- if (newValue == static_cast(SWITCH::SWITCH_ON))
+ if (newValue == static_cast(SWITCH::SWITCH_ON)) {
+ reset();
switchOn();
+ }
else
switchOff();
return;
diff --git a/VASTvaporizer/Source/Engine/VASTSettings.cpp b/VASTvaporizer/Source/Engine/VASTSettings.cpp
index ab57833..eff735a 100644
--- a/VASTvaporizer/Source/Engine/VASTSettings.cpp
+++ b/VASTvaporizer/Source/Engine/VASTSettings.cpp
@@ -957,6 +957,7 @@ float CVASTSettings::getParameterValueWithMatrixModulation(std::atomic *p
jassert((multiplier0to1 >= 0.f) && (multiplier0to1 <= 1.f));
double resultVal = my_processor->m_modMatrixLookupTable[destination].rangeStart + modStartPercentage * length + modLength * multiplier0to1;
+ resultVal = jlimit(my_processor->m_modMatrixLookupTable[destination].rangeStart, my_processor->m_modMatrixLookupTable[destination].rangeEnd, resultVal);
jassert((resultVal >= my_processor->m_modMatrixLookupTable[destination].rangeStart) && (resultVal <= my_processor->m_modMatrixLookupTable[destination].rangeEnd));
return resultVal;
}
diff --git a/VASTvaporizer/Source/Engine/VASTSingleNote.cpp b/VASTvaporizer/Source/Engine/VASTSingleNote.cpp
index 97a7759..d80443d 100644
--- a/VASTvaporizer/Source/Engine/VASTSingleNote.cpp
+++ b/VASTvaporizer/Source/Engine/VASTSingleNote.cpp
@@ -729,8 +729,8 @@ void CVASTSingleNote::samplerRenderNextBlock(AudioSampleBuffer* outputBuffer, in
{
lOutL += (l + r) * 0.5f;
}
- jassert((lOutL >= -6.f) && (lOutL <= 6.f));
- jassert((lOutR >= -6.f) && (lOutR <= 6.f));
+ //jassert((lOutL >= -6.f) && (lOutL <= 6.f));
+ //jassert((lOutR >= -6.f) && (lOutR <= 6.f));
//do loop fade in out
//if (bSwitchSamplerLoop || bSwitchSamplerLoopOnly || bSwitchSamplerLoopPingpong) {
diff --git a/VASTvaporizer/Source/Plugin/VASTAudioProcessor.cpp b/VASTvaporizer/Source/Plugin/VASTAudioProcessor.cpp
index 4209b07..2f453b8 100644
--- a/VASTvaporizer/Source/Plugin/VASTAudioProcessor.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTAudioProcessor.cpp
@@ -525,28 +525,6 @@ void VASTAudioProcessor::initializeToDefaults() {
m_parameterState.undoManager->beginNewTransaction(); //start new transcation only here?
}
-void VASTAudioProcessor::randomizePatch() {
- return; //TODO
-
- /*
- struct timeval tp;
- m_pVASTXperience.m_Set._gettimeofday(&tp);
- juce::Random rand(tp.tv_sec); //seed
- VASTPresetElement element;
- m_curPatchData = element;
- m_curPatchData.freetag = TRANS("Random");
-
- const ScopedWriteLock myScopedLock(m_pVASTXperience.m_Set.m_RoutingBuffers.mReadWriteLock);
-
- int numparam = getNumParameters();
- for (int parameterIndex = 0; parameterIndex < numparam; parameterIndex++) {
- auto* param = getParameters()[parameterIndex];
- float rand01 = rand.nextFloat(); //0..1
- param->setValue(rand01);
- }
- */
-}
-
void VASTAudioProcessor::setCurrentProgram(int index)
{
if (index >= getNumPrograms()) {
@@ -610,14 +588,12 @@ int VASTAudioProcessor::getNumPrograms()
int VASTAudioProcessor::getCurrentProgram()
{
- // int l_prog = m_curPatchData.presetarrayindex; // this is set lazy in thread
int l_prog = m_curPatchDataLoadRequestedIndex;
return l_prog;
}
int VASTAudioProcessor::getCurrentPresetProgram() const
{
- //int l_prog = m_curPatchData.presetarrayindex; // this is set lazy in thread
int l_prog = m_curPatchDataLoadRequestedIndex;
return l_prog;
}
@@ -1593,6 +1569,17 @@ void VASTAudioProcessor::toggleKeyboardHoldMode() {
m_pVASTXperience.m_Poly.setKeyboardHoldMode(m_keyboardHoldMode.load());
}
+/*
+AudioProcessorParameterWithID* VASTAudioProcessor::getParameterWithID(String paramID) {
+ std::map::iterator l_iter = m_mapParameterToID.find(paramID);
+ if (l_iter->first == paramID) {
+ if (l_iter->second != nullptr)
+ return l_iter->second;
+ }
+ return nullptr;
+}
+*/
+
void VASTAudioProcessor::addModMatrixLookupTable(int modMatrixDestination, float rangeStart, float rangeEnd, float rangeSkew, StringRef paramID, AudioProcessorParameterWithID* param) {
m_modMatrixLookupTable[modMatrixDestination].rangeStart = rangeStart;
m_modMatrixLookupTable[modMatrixDestination].rangeEnd = rangeEnd;
@@ -1739,7 +1726,19 @@ String VASTAudioProcessor::autoDestinationGetParam(int modmatdest) {
return it->second;
};
-//unused now
+void VASTAudioProcessor::setParameterFloat01(StringRef parName, float nvalue, bool bSilent) {
+ vassert((nvalue >= 0.f) && (nvalue <= 1.f));
+ AudioProcessorParameterWithID* param = m_parameterState.getParameter(parName);
+ if (param != nullptr) {
+ if (bSilent)
+ param->setValue(nvalue);
+ else
+ param->setValueNotifyingHost(nvalue);
+ }
+ else
+ vassertfalse;
+}
+
void VASTAudioProcessor::setParameterText(StringRef parName, StringRef textVal, bool bSilent) {
AudioProcessorParameterWithID* param = m_parameterState.getParameter(parName);
if (param != nullptr) {
@@ -1751,9 +1750,8 @@ void VASTAudioProcessor::setParameterText(StringRef parName, StringRef textVal,
else
param->setValueNotifyingHost(nvalue);
}
- //else {
- //jassert(false); //ignore - unused param in preset xml file
- //}
+ else
+ vassertfalse;
}
AudioProcessorValueTreeState& VASTAudioProcessor::getParameterTree() {
diff --git a/VASTvaporizer/Source/Plugin/VASTAudioProcessor.h b/VASTvaporizer/Source/Plugin/VASTAudioProcessor.h
index 348e97c..af18afd 100644
--- a/VASTvaporizer/Source/Plugin/VASTAudioProcessor.h
+++ b/VASTvaporizer/Source/Plugin/VASTAudioProcessor.h
@@ -195,6 +195,7 @@ class VASTAudioProcessor : public AudioProcessor
const String getName() const override;
void setParameterText(StringRef parName, StringRef textVal, bool bSilent);
+ void setParameterFloat01(StringRef parName, float nvalue, bool bSilent);
AudioProcessorValueTreeState& getParameterTree();
VASTVUMeterSource* getMeterSource();
char* _strncpy(char* dst, const char* src, size_t maxLen);
@@ -243,7 +244,6 @@ class VASTAudioProcessor : public AudioProcessor
static String getVSTPathAlternative();
static String getSettingsFilePath(bool read, bool& migrate_legacy);
bool loadUserPatchMetaData(File file, VASTPresetElement& lPreset);
- void randomizePatch(); //not yet implemented
String getVersionString();
static void crashHandler(void*);
diff --git a/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.cpp b/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.cpp
index 6cd83cb..8678edc 100644
--- a/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.cpp
@@ -15,7 +15,7 @@
//==============================================================================
VASTAudioProcessorEditor::VASTAudioProcessorEditor(VASTAudioProcessor& p)
-: AudioProcessorEditor(p), processor(&p) {
+: AudioProcessorEditor(p), myProcessor(&p) {
if (juce::Desktop::getInstance().isHeadless() == false)
{
@@ -26,9 +26,9 @@ VASTAudioProcessorEditor::VASTAudioProcessorEditor(VASTAudioProcessor& p)
if (m_iMaxHeight > screenH) m_iMaxHeight = screenH;
}
- processor->m_mapParameterNameToControl.clear(); //clear slider mapping
+ myProcessor->m_mapParameterNameToControl.clear(); //clear slider mapping
resizeCalledFromConstructor = true;
- vaporizerComponent.reset(new VASTVaporizerComponent(this, processor));
+ vaporizerComponent.reset(new VASTVaporizerComponent(this, myProcessor));
vaporizerComponent->setVisible(false);
m_VASTComponentsAll = juce::Array();
@@ -41,23 +41,23 @@ VASTAudioProcessorEditor::VASTAudioProcessorEditor(VASTAudioProcessor& p)
setResizable(true, true);
#endif
- if ((processor->m_iUserTargetPluginHeight == 0) || (processor->m_iUserTargetPluginWidth == 0)) {
- processor->m_iUserTargetPluginWidth = processor->m_iDefaultPluginWidth;
- processor->m_iUserTargetPluginHeight = processor->m_iDefaultPluginHeight;
+ if ((myProcessor->m_iUserTargetPluginHeight == 0) || (myProcessor->m_iUserTargetPluginWidth == 0)) {
+ myProcessor->m_iUserTargetPluginWidth = myProcessor->m_iDefaultPluginWidth;
+ myProcessor->m_iUserTargetPluginHeight = myProcessor->m_iDefaultPluginHeight;
}
tooltipWindow.setLookAndFeel(getProcessor()->getCurrentVASTLookAndFeel());
resizeCalledFromConstructor = true;
#if !defined JUCE_LINUX
- m_componentBoundsConstrainer.setFixedAspectRatio(processor->m_dPluginRatio);
+ m_componentBoundsConstrainer.setFixedAspectRatio(myProcessor->m_dPluginRatio);
m_componentBoundsConstrainer.setSizeLimits(m_iMinWidth, m_iMinHeight, m_iMaxWidth, m_iMaxHeight); //CHECK https://forum.juce.com/t/best-way-to-implement-resizable-plugin/12644/5
setConstrainer(&m_componentBoundsConstrainer);
#endif
setOpaque(true);
//setSize(1,1); //intermediate
- setSize(processor->m_iUserTargetPluginHeight * processor->m_dPluginRatio, processor->m_iUserTargetPluginHeight);
+ setSize(myProcessor->m_iUserTargetPluginHeight * myProcessor->m_dPluginRatio, myProcessor->m_iUserTargetPluginHeight);
startTimer(0, 100); //ui update
startTimer(1, 10); //param update
@@ -65,7 +65,7 @@ VASTAudioProcessorEditor::VASTAudioProcessorEditor(VASTAudioProcessor& p)
}
VASTAudioProcessorEditor::~VASTAudioProcessorEditor() {
- processor->resetCurrentEditorInitialized();
+ myProcessor->resetCurrentEditorInitialized();
this->removeAllChildren();
m_alertWindow = nullptr;
stopTimer(0);
@@ -99,14 +99,14 @@ void VASTAudioProcessorEditor::timerCallback(int timerID) {
return;
}
- if (!processor->isCurrentEditorInitialized()) {
+ if (!myProcessor->isCurrentEditorInitialized()) {
if (vaporizerComponent.get() != nullptr) {
addChildComponent(vaporizerComponent.get());
- vaporizerComponent->setVersionText(processor->getVersionString());
+ vaporizerComponent->setVersionText(myProcessor->getVersionString());
resizeCalledFromConstructor = false;
resized();
vaporizerComponent->setVisible(true);
- processor->setCurrentEditorInitialized();
+ myProcessor->setCurrentEditorInitialized();
}
else
return;
@@ -116,58 +116,58 @@ void VASTAudioProcessorEditor::timerCallback(int timerID) {
return; //not yet ready?
if (!isVisible()) {
- processor->m_editorIsProbablyVisible.store(false);
+ myProcessor->m_editorIsProbablyVisible.store(false);
return;
}
else
- processor->m_editorIsProbablyVisible.store(true);
+ myProcessor->m_editorIsProbablyVisible.store(true);
if (timerID == 1) { //component update
- if (processor->m_bShallComponentValueUpdate.load()) {
- if (processor->m_shallComponentUpdate != "") {
- VASTSlider* lslider = dynamic_cast(findChildComponetWithName(vaporizerComponent.get(), processor->m_shallComponentUpdate));
+ if (myProcessor->m_bShallComponentValueUpdate.load()) {
+ if (myProcessor->m_shallComponentUpdate != "") {
+ VASTSlider* lslider = dynamic_cast(findChildComponetWithName(vaporizerComponent.get(), myProcessor->m_shallComponentUpdate));
if (lslider != nullptr) {
- if (lslider->getComponentID().equalsIgnoreCase(processor->m_shallComponentUpdate)) {
- float sVal = lslider->getRange().getStart() + (lslider->getRange().getEnd() - lslider->getRange().getStart()) * jlimit(0.f, 1.f, processor->m_shallComponentUpdateValue);
+ if (lslider->getComponentID().equalsIgnoreCase(myProcessor->m_shallComponentUpdate)) {
+ float sVal = lslider->getRange().getStart() + (lslider->getRange().getEnd() - lslider->getRange().getStart()) * jlimit(0.f, 1.f, myProcessor->m_shallComponentUpdateValue);
lslider->setValue(sVal, NotificationType::sendNotificationAsync);
}
}
}
- processor->m_bShallComponentValueUpdate.store(false);
+ myProcessor->m_bShallComponentValueUpdate.store(false);
}
}
else { //ui update
- vaporizerComponent->setLicenseText(processor->getLicenseText(), processor->isInErrorState(), processor->getErrorState());
+ vaporizerComponent->setLicenseText(myProcessor->getLicenseText(), myProcessor->isInErrorState(), myProcessor->getErrorState());
- if (processor->m_showNewerVersionPopup) {
+ if (myProcessor->m_showNewerVersionPopup) {
showNewerVersionPopup();
}
- if (processor->needsUIInit()) {
+ if (myProcessor->needsUIInit()) {
vaporizerComponent->initAll();
- processor->clearUIInitFlag();
+ myProcessor->clearUIInitFlag();
}
- if (processor->needsUIInitAfterPresetLoad()) {
+ if (myProcessor->needsUIInitAfterPresetLoad()) {
vaporizerComponent->getOscillatorComponent(0)->initAll();
vaporizerComponent->getOscillatorComponent(1)->initAll();
vaporizerComponent->getOscillatorComponent(2)->initAll();
vaporizerComponent->getOscillatorComponent(3)->initAll();
vaporizerComponent->updateMatrixDisplay();
vaporizerComponent->updateHeader();
- processor->clearUIInitFlagAfterPresetLoad();
+ myProcessor->clearUIInitFlagAfterPresetLoad();
}
- if (processor->needsUIUpdate()) {
- if (processor->needsUIUpdate_tabs())
+ if (myProcessor->needsUIUpdate()) {
+ if (myProcessor->needsUIUpdate_tabs())
vaporizerComponent->updateAll();
- if (processor->needsUIUpdate_matrix())
+ if (myProcessor->needsUIUpdate_matrix())
vaporizerComponent->updateMatrixDisplay();
- if (processor->needsUIUpdate_sliders()) {
- if ((processor->needsUIUpdate_slider1dest() == -1) && (processor->needsUIUpdate_slider2dest() == -1)) { //repaint all sliders
- for (int i = 0; i < processor->m_mapParameterNameToControl.size(); i++) {
- VASTParameterSlider* lslider = dynamic_cast(processor->m_mapParameterNameToControl[i]);
+ if (myProcessor->needsUIUpdate_sliders()) {
+ if ((myProcessor->needsUIUpdate_slider1dest() == -1) && (myProcessor->needsUIUpdate_slider2dest() == -1)) { //repaint all sliders
+ for (int i = 0; i < myProcessor->m_mapParameterNameToControl.size(); i++) {
+ VASTParameterSlider* lslider = dynamic_cast(myProcessor->m_mapParameterNameToControl[i]);
if (lslider != nullptr) {
if (lslider->isShowing())
lslider->repaint();
@@ -175,11 +175,11 @@ void VASTAudioProcessorEditor::timerCallback(int timerID) {
}
}
else { //repaint only the two that are given
- String param1name = processor->autoDestinationGetParam(processor->needsUIUpdate_slider1dest());
- String param2name = processor->autoDestinationGetParam(processor->needsUIUpdate_slider2dest());
+ String param1name = myProcessor->autoDestinationGetParam(myProcessor->needsUIUpdate_slider1dest());
+ String param2name = myProcessor->autoDestinationGetParam(myProcessor->needsUIUpdate_slider2dest());
- for (int i = 0; i < processor->m_mapParameterNameToControl.size(); i++) {
- VASTParameterSlider* lslider = dynamic_cast(processor->m_mapParameterNameToControl[i]);
+ for (int i = 0; i < myProcessor->m_mapParameterNameToControl.size(); i++) {
+ VASTParameterSlider* lslider = dynamic_cast(myProcessor->m_mapParameterNameToControl[i]);
if (lslider != nullptr) {
if ((lslider->getComponentID().equalsIgnoreCase(param1name)) || (lslider->getComponentID().equalsIgnoreCase(param2name))) {
if (lslider->isShowing())
@@ -190,39 +190,39 @@ void VASTAudioProcessorEditor::timerCallback(int timerID) {
}
}
- if (processor->needsUIPresetUpdate()) {
+ if (myProcessor->needsUIPresetUpdate()) {
VASTPresetComponent* pres = vaporizerComponent->getConcertinaPanel()->getPresetOverlay();
if (pres != nullptr)
pres->updateAll();
- processor->clearUIPresetFlag();
+ myProcessor->clearUIPresetFlag();
}
- if (processor->needsUIPresetReloadUpdate()) {
+ if (myProcessor->needsUIPresetReloadUpdate()) {
VASTPresetComponent* pres = vaporizerComponent->getConcertinaPanel()->getPresetOverlay();
if (pres != nullptr)
pres->reloadPresets();
- processor->clearUIPresetReloadFlag();
+ myProcessor->clearUIPresetReloadFlag();
}
- processor->clearUIUpdateFlag();
+ myProcessor->clearUIUpdateFlag();
}
- if (processor->wantsUIAlert()) {
- processor->clearUIAlertFlag();
+ if (myProcessor->wantsUIAlert()) {
+ myProcessor->clearUIAlertFlag();
AlertWindow::showMessageBoxAsync(MessageBoxIconType::WarningIcon, TRANS("Load preset failed"), TRANS("Invalid data structure."), TRANS("Continue"), this);
}
VASTMasterVoicingComponent* voicingComp = vaporizerComponent->getMasterVoicingComponent();
if (voicingComp != nullptr) {
Label* labelV = voicingComp->getComponentCVoices();
- int numVoicesPlaying = processor->m_pVASTXperience.m_Poly.numNotesPlaying();
- int numOscsPlaying = processor->m_pVASTXperience.m_Poly.numOscsPlaying();
+ int numVoicesPlaying = myProcessor->m_pVASTXperience.m_Poly.numNotesPlaying();
+ int numOscsPlaying = myProcessor->m_pVASTXperience.m_Poly.numOscsPlaying();
labelV->setText(String(String(numVoicesPlaying) + "/" + String(numOscsPlaying)), NotificationType::dontSendNotification);
}
}
}
VASTAudioProcessor* VASTAudioProcessorEditor::getProcessor() {
- return processor;
+ return myProcessor;
}
void VASTAudioProcessorEditor::paint(Graphics& ) {
@@ -311,3 +311,789 @@ void VASTAudioProcessorEditor::showNewerVersionPopup() {
m_alertWindow = nullptr;
}), true);
}
+
+void VASTAudioProcessorEditor::randomizePatch() {
+ struct timeval tp;
+ myProcessor->m_pVASTXperience.m_Set._gettimeofday(&tp);
+ juce::Random rand(tp.tv_sec); //seed
+ VASTPresetElement lRandomPatch;
+ lRandomPatch.freetag = TRANS("Random");
+ lRandomPatch.presetname = TRANS("Random");
+
+ myProcessor->initializeToDefaults();
+ int numparam = myProcessor->getParameters().size();
+ for (int parameterIndex = 0; parameterIndex < numparam; parameterIndex++) {
+ AudioProcessorParameterWithID* param =(AudioProcessorParameterWithID*)myProcessor->getParameters()[parameterIndex];
+ if (param->getParameterID().equalsIgnoreCase("m_iWTEditorZoom"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_iWAVScale"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting1_OscA"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting2_OscA"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting1_OscB"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting2_OscB"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting1_OscC"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting2_OscC"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting1_OscD"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting2_OscD"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_uOscRouting2_OscD"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_fMasterTune")) //todo normalization
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_fMasterVolumedB")) //todo normalization
+ continue;
+ if (param->getParameterID().contains("m_fFilterDryWet"))
+ continue;
+ if (param->getParameterID().contains("Routing")) //todo
+ continue;
+ if (param->getParameterID().contains("Gain"))
+ continue;
+ if (param->getParameterID().equalsIgnoreCase("m_bARPOnOff"))
+ continue;
+ if (param->getParameterID().contains("Attack"))
+ continue;
+ if (param->getParameterID().contains("Decay"))
+ continue;
+ if (param->getParameterID().contains("Sustain"))
+ continue;
+ if (param->getParameterID().contains("Release"))
+ continue;
+ if (param->getParameterID().contains("Cents"))
+ continue;
+ if (param->getParameterID().contains("Oct"))
+ continue;
+ if (param->getParameterID().contains("Lowcut"))
+ continue;
+ if (param->getParameterID().contains("Highcut"))
+ continue;
+
+ if (param->getParameterID().contains("NumOscs")) {
+ float lrand = rand.nextFloat() * 0.2f;
+ param->setValueNotifyingHost(lrand);
+ continue;
+ }
+ if (param->getParameterID().contains("Scale")) {
+ float lrand = (0.5f-0.3f/2) + rand.nextFloat() * 0.3f;
+ if (rand.nextFloat() > 0.7f)
+ param->setValueNotifyingHost(lrand);
+ continue;
+ }
+ if (param->getParameterID().contains("Drive")) {
+ float lrand = (0.5f - 0.3f / 2) + rand.nextFloat() * 0.3f;
+ if (rand.nextFloat() > 0.5f)
+ param->setValueNotifyingHost(lrand);
+ continue;
+ }
+ if (param->getParameterID().contains("Reso")) {
+ float lrand = rand.nextFloat() * 0.3f;
+ if (rand.nextFloat() > 0.5f)
+ param->setValueNotifyingHost(lrand);
+ continue;
+ }
+ if (param->getParameterID().contains("Cutoff")) {
+ float lrand = (1.f - 0.5f) + rand.nextFloat() * 0.5f;
+ if (rand.nextFloat() > 0.5f)
+ param->setValueNotifyingHost(lrand);
+ continue;
+ }
+ if (param->getParameterID().contains("ReverbSize")) {
+ float lrand = (1.f - 0.5f) + rand.nextFloat() * 0.5f;
+ param->setValueNotifyingHost(lrand);
+ }
+ if (param->getParameterID().contains("ReverbDamping")) {
+ float lrand = rand.nextFloat() * 0.3f;
+ param->setValueNotifyingHost(lrand);
+ }
+
+ //standard
+ float rand01 = rand.nextFloat(); //0..1
+ param->setValueNotifyingHost(rand01);
+ }
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+
+ //modmatrix
+ float lRandVal = 0.1f;
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce16", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce15", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce14", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce13", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce12", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce11", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce10", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce9", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce8", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce7", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce6", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce5", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce4", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce3", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce2", "---", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_uModMatSrce1", "---", false);
+
+ //mseg
+ for (int mseg = 0; mseg < 5; mseg++) {
+ int pattern = abs(rand.nextInt()) % 6;
+ switch (pattern) {
+ case 0:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADR(mseg);
+ break;
+ case 1:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ break;
+ case 2:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToAHDSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToAHDSR(mseg);
+ break;
+ case 3:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToRamp(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToRamp(mseg);
+ break;
+ case 4:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToSine(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToSine(mseg);
+ break;
+ case 5:
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToStairs(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToStairs(mseg);
+ break;
+ default:
+ vassertfalse;
+ }
+ }
+
+ //stepseq
+ for (int stepseq = 0; stepseq < 3; stepseq++) {
+ int pattern = abs(rand.nextInt()) % 3;
+ switch (pattern) {
+ case 0:
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData[stepseq].initStepSeq(stepseq);
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData_changed[stepseq].initStepSeq(stepseq);
+ break;
+ case 1:
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData[stepseq].initStepSeqSidechain();
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData_changed[stepseq].initStepSeqSidechain();
+ break;
+ case 2:
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData[stepseq].initStepSeqStairs();
+ myProcessor->m_pVASTXperience.m_Set.m_StepSeqData_changed[stepseq].initStepSeqStairs();
+ break;
+ default:
+ vassertfalse;
+ }
+ }
+
+ //ARP
+ int pattern = abs(rand.nextInt()) % 16;
+ myProcessor->m_pVASTXperience.m_Set.m_ARPData.initDefaultPattern(pattern);
+ myProcessor->m_pVASTXperience.m_Set.m_ARPData_changed.initDefaultPattern(pattern);
+
+ //filters
+ myProcessor->setParameterText("m_bOnOff_Filter1", "Off", false);
+ myProcessor->setParameterText("m_bOnOff_Filter2", "Off", false);
+ myProcessor->setParameterText("m_bOnOff_Filter3", "Off", false);
+
+ lRandVal = 0.5f;
+ float lRandVal2 = 0.4f;
+ if (rand.nextFloat() > lRandVal) {
+ myProcessor->setParameterText("m_bOnOff_Filter1", "On", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscA", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscA", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscB", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscB", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscC", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscC", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscD", "Filter1", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscD", "Filter1", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting2_Filter1", "Master", false);
+
+ if (rand.nextFloat() > lRandVal) {
+ myProcessor->setParameterText("m_bOnOff_Filter2", "On", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscA", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscA", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscB", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscB", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscC", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscC", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscD", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscD", "Filter2", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting_Filter1", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting2_Filter1", "Master", false);
+
+ if (rand.nextFloat() > lRandVal) {
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscA", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscA", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscB", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscB", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscC", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscC", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting1_OscD", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uOscRouting2_OscD", "Filter3", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting_Filter1", "Filter2", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting2_Filter1", "Master", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting_Filter2", "Filter3", false);
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting2_Filter2", "Master", false);
+
+ if (rand.nextFloat() > lRandVal2) myProcessor->setParameterText("m_uFilterRouting2_Filter3", "Master", false);
+
+ myProcessor->setParameterText("m_bOnOff_Filter3", "On", false);
+ }
+ }
+ }
+ //fx
+ lRandVal = 0.2f;
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bAtomizerOnOff", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bAtomizerOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bAtomizerOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bBitcrushOnOff", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bBitcrushOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bBitcrushOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bChorusOnOff", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bChorusOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bChorusOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bCombOnOff", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bCombOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bCombOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bLimiterOffOn", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bLimiterOffOn_bus2", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bLimiterOffOn_bus3", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bDistortionOnOff", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bDistortionOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.02f) myProcessor->setParameterText("m_bDistortionOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bEQOnOff", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bEQOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bEQOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bFlangerOnOff", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bFlangerOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bFlangerOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bFormantOnOff", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bFormantOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bFormantOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bMBCompOffOn", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bMBCompOffOn_bus2", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bMBCompOffOn_bus3", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bPhaserOnOff", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bPhaserOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bPhaserOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bWaveshaperOnOff", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bWaveshaperOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bWaveshaperOnOff_bus3", "Off", false);
+ lRandVal = 0.8f;
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bReverbOnOff", "Off", false);
+ else
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bReverbOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bReverbOnOff_bus3", "Off", false);
+ if (rand.nextFloat() > lRandVal) myProcessor->setParameterText("m_bDelayOnOff", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bDelayOnOff_bus2", "Off", false);
+ if (rand.nextFloat() > 0.05f) myProcessor->setParameterText("m_bDelayOnOff_bus2", "Off", false);
+
+ lRandVal = 0.8f;
+ myProcessor->setParameterText("m_uFxBusRouting", "Master", false);
+ myProcessor->setParameterText("m_uFxBusRouting_Bus2", "Master", false);
+ myProcessor->setParameterText("m_uFxBusRouting_Bus3", "Master", false);
+ if (rand.nextFloat() > lRandVal) {
+ myProcessor->setParameterText("m_uFxBusRouting", "FxBus2", false);
+ if (rand.nextFloat() > lRandVal) {
+ myProcessor->setParameterText("m_uFxBusRouting", "FxBus3", false);
+ }
+ }
+ if (rand.nextFloat() > lRandVal) {
+ myProcessor->setParameterText("m_uFxBusRouting_Bus2", "FxBus3", false);
+ }
+
+ //categories
+ bool analog = false;
+ bool digital = false;
+ bool WTgenerate = true;
+
+ String ls_preset_category = "SY";
+ int li_category = abs(rand.nextInt()) % 28;
+ switch (li_category) {
+ case 0:
+ ls_preset_category = "AR"; // Arpeggio
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_bARPOnOff", "On", false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG1", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG2", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG3", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG4", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG5", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 1000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 1000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 1000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 1000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 1000), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 500), false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly4", false);
+ break;
+ case 1:
+ ls_preset_category = "AT"; // Atmosphere
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ digital = true;
+ break;
+ case 2:
+ ls_preset_category = "BA"; // Bass
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_fSustainLevel_MSEG1", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG2", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG3", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG4", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG5", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 2000), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 20), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 20), false);
+
+ myProcessor->setParameterText("m_bReverbOnOff", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "Off", false);
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bLegatoMode", "On", false);
+ if (rand.nextFloat() > 0.3f)
+ myProcessor->setParameterText("m_fPortamento", String(abs(rand.nextInt()) % 5000 + 1500), false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscA", "-2", false);
+ else
+ myProcessor->setParameterText("m_iOscOct_OscA", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscB", "-2", false);
+ else
+ myProcessor->setParameterText("m_iOscOct_OscB", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscC", "-2", false);
+ else
+ myProcessor->setParameterText("m_iOscOct_OscC", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscD", "-2", false);
+ else
+ myProcessor->setParameterText("m_iOscOct_OscD", "-1", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ analog = true;
+ break;
+ case 3:
+ ls_preset_category = "BR"; // Brass
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_fSustainLevel_MSEG1", String(abs(rand.nextInt()) % 10 + 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG2", String(abs(rand.nextInt()) % 10 + 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG3", String(abs(rand.nextInt()) % 10 + 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG4", String(abs(rand.nextInt()) % 10 + 20), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG5", String(abs(rand.nextInt()) % 10 + 20), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ analog = true;
+ break;
+ case 4:
+ ls_preset_category = "BL"; // Bell
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ digital = true;
+ break;
+ case 5:
+ ls_preset_category = "CH"; // Chord
+ myProcessor->setParameterText("m_fSustainLevel_MSEG1", String(abs(rand.nextInt()) % 20 + 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG2", String(abs(rand.nextInt()) % 20 + 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG3", String(abs(rand.nextInt()) % 20 + 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG4", String(abs(rand.nextInt()) % 20 + 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG5", String(abs(rand.nextInt()) % 20 + 10), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 5000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 5000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 5000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 5000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 5000 + 100), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ break;
+ case 6:
+ ls_preset_category = "DK"; // Drum kit
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "Off", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ break;
+ case 7:
+ ls_preset_category = "DR"; // Drum
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "Off", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ if (rand.nextFloat() > 0.1f) myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ break;
+ case 8:
+ ls_preset_category = "DL"; // Drum loop
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "Off", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "Off", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ break;
+ case 9:
+ ls_preset_category = "FX"; // Effect
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ if (rand.nextFloat() > 0.5f) myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ break;
+ case 10:
+ ls_preset_category = "GT"; // Guitar
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ break;
+ case 11:
+ ls_preset_category = "IN"; // Instrument
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "On", false);
+ digital = true;
+ break;
+ case 12:
+ ls_preset_category = "KB"; // Keyboard
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bReverbOnOff", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bReverbOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bChorusOnOff", "On", false);
+ myProcessor->setParameterText("m_bChorusOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bChorusOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ digital = true;
+ break;
+ case 13:
+ ls_preset_category = "LD"; // Lead
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bDelayOnOff", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ analog = true;
+ break;
+ case 14:
+ ls_preset_category = "MA"; // Mallet
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ digital = true;
+ break;
+ case 15:
+ ls_preset_category = "OR"; // Organ
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ digital = true;
+ break;
+ case 16:
+ ls_preset_category = "OC"; // Orchestral
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ break;
+ case 17:
+ ls_preset_category = "PD"; // Pad
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 5000 + 2000), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 3000 + 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 3000 + 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 3000 + 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 3000 + 500), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 3000 + 500), false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly32", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ break;
+ case 18:
+ ls_preset_category = "PN"; // Piano
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 1000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 1000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 1000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 1000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 1000 + 100), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 100 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 100 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 100 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 100 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 100 + 10), false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly32", false);
+ break;
+ case 19:
+ ls_preset_category = "PL"; // Plucked
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_fSustainLevel_MSEG1", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG2", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG3", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG4", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fSustainLevel_MSEG5", String(abs(rand.nextInt()) % 10), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG1", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG2", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG3", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG4", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fReleaseTime_MSEG5", String(abs(rand.nextInt()) % 3000 + 100), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG1", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG2", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG3", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG4", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_fAttackTime_MSEG5", String(abs(rand.nextInt()) % 50 + 10), false);
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ break;
+ case 20:
+ ls_preset_category = "RI"; // Riser
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ break;
+ case 21:
+ ls_preset_category = "RD"; // Reed
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ digital = true;
+ break;
+ case 22:
+ ls_preset_category = "ST"; // String
+ for (int mseg = 0; mseg < 5; mseg++) {
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData[mseg].initToADSR(mseg);
+ myProcessor->m_pVASTXperience.m_Set.m_MSEGData_changed[mseg].initToADSR(mseg);
+ }
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ analog = true;
+ break;
+ case 23:
+ ls_preset_category = "SY"; // Synth
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bDelayOnOff", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ break;
+ case 24:
+ ls_preset_category = "SQ"; // Sequence / Split
+ myProcessor->setParameterText("m_uPolyMode", "Mono", false);
+ myProcessor->setParameterText("m_bDelayOnOff", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ break;
+ case 25:
+ ls_preset_category = "TG"; // Trancegate
+ analog = true;
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bDelayOnOff", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus2", "On", false);
+ myProcessor->setParameterText("m_bDelayOnOff_bus3", "On", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "Off", false);
+ myProcessor->setParameterText("m_bARPOnOff", "On", false);
+ break;
+ case 26:
+ ls_preset_category = "VC"; // Vocal / Voice
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "Off", false);
+ break;
+ case 27:
+ ls_preset_category = "WW"; // Woodwind
+ myProcessor->setParameterText("m_uPolyMode", "Poly16", false);
+ myProcessor->setParameterText("m_bSamplerOnOff", "On", false);
+ myProcessor->setParameterText("m_bNoiseOnOff", "On", false);
+ digital = true;
+ break;
+ default:
+ vassertfalse;
+ }
+
+ //osc banks and wavetables
+ myProcessor->setParameterText("m_bOscOnOff_OscA", "Off", false);
+ myProcessor->setParameterText("m_bOscOnOff_OscB", "Off", false);
+ myProcessor->setParameterText("m_bOscOnOff_OscC", "Off", false);
+ myProcessor->setParameterText("m_bOscOnOff_OscD", "Off", false);
+ myProcessor->setParameterText("m_bOscOnOff_OscA", "On", false);
+ if (WTgenerate)
+ vaporizerComponent->getWaveTableEditorComponent()->randomizeBankWavetable(0, analog, digital);
+ if (rand.nextFloat() > 0.5f) myProcessor->setParameterFloat01("m_uModMatSrce1", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ myProcessor->setParameterText("m_uModMatDest1", "OscAWTPos", false);
+ if (rand.nextFloat() > 0.5f) {
+ myProcessor->setParameterText("m_bOscOnOff_OscB", "On", false);
+ if (WTgenerate)
+ vaporizerComponent->getWaveTableEditorComponent()->randomizeBankWavetable(1, analog, digital);
+ if (rand.nextFloat() > 0.5f) myProcessor->setParameterFloat01("m_uModMatSrce2", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ myProcessor->setParameterText("m_uModMatDest2", "OscBWTPos", false);
+ if (rand.nextFloat() > 0.5f) {
+ myProcessor->setParameterText("m_bOscOnOff_OscC", "On", false);
+ if (WTgenerate)
+ vaporizerComponent->getWaveTableEditorComponent()->randomizeBankWavetable(2, analog, digital);
+ if (rand.nextFloat() > 0.5f) myProcessor->setParameterFloat01("m_uModMatSrce3", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ myProcessor->setParameterText("m_uModMatDest3", "OscCWTPos", false);
+ if (rand.nextFloat() > 0.5f) {
+ myProcessor->setParameterText("m_bOscOnOff_OscD", "On", false);
+ if (WTgenerate)
+ vaporizerComponent->getWaveTableEditorComponent()->randomizeBankWavetable(3, analog, digital);
+ if (rand.nextFloat() > 0.5f) myProcessor->setParameterFloat01("m_uModMatSrce4", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ myProcessor->setParameterText("m_uModMatDest4", "OscDWTPos", false);
+ }
+ }
+ }
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscB", "500", false);
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscB", "700", false);
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscC", "500", false);
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscC", "700", false);
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscD", "500", false);
+ if (rand.nextFloat() > 0.9f)
+ myProcessor->setParameterText("m_fOscCents_OscD", "700", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscB", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscB", "1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscC", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscC", "1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscD", "-1", false);
+ if (rand.nextFloat() > 0.7f)
+ myProcessor->setParameterText("m_iOscOct_OscD", "1", false);
+ if (rand.nextFloat() > 0.2f)
+ myProcessor->setParameterText("m_fPortamento", "0", false);
+ if ((rand.nextFloat() > 0.40f) || (*myProcessor->m_pVASTXperience.m_Set.m_State->m_bOscOnOff_OscA == static_cast(SWITCH::SWITCH_OFF)))
+ myProcessor->setParameterText("m_uWTFX_OscA", "---", false);
+ else
+ if (rand.nextFloat() > 0.3f) {
+ myProcessor->setParameterText("m_uModMatDest5", "OscAWTFXVal", false);
+ myProcessor->setParameterFloat01("m_uModMatSrce5", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ }
+ if ((rand.nextFloat() > 0.50f) || (*myProcessor->m_pVASTXperience.m_Set.m_State->m_bOscOnOff_OscB == static_cast(SWITCH::SWITCH_OFF)))
+ myProcessor->setParameterText("m_uWTFX_OscB", "---", false);
+ else
+ if (rand.nextFloat() > 0.3f) {
+ myProcessor->setParameterText("m_uModMatDest6", "OscBWTFXVal", false);
+ myProcessor->setParameterFloat01("m_uModMatSrce6", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ }
+ if ((rand.nextFloat() > 0.60f) || (*myProcessor->m_pVASTXperience.m_Set.m_State->m_bOscOnOff_OscC == static_cast(SWITCH::SWITCH_OFF)))
+ myProcessor->setParameterText("m_uWTFX_OscC", "---", false);
+ else
+ if (rand.nextFloat() > 0.3f) {
+ myProcessor->setParameterText("m_uModMatDest7", "OscCWTFXVal", false);
+ myProcessor->setParameterFloat01("m_uModMatSrce7", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ }
+ if ((rand.nextFloat() > 0.70f) || (*myProcessor->m_pVASTXperience.m_Set.m_State->m_bOscOnOff_OscD == static_cast(SWITCH::SWITCH_OFF)))
+ myProcessor->setParameterText("m_uWTFX_OscD", "---", false);
+ else
+ if (rand.nextFloat() > 0.3f) {
+ myProcessor->setParameterText("m_uModMatDest8", "OscDWTFXVal", false);
+ myProcessor->setParameterFloat01("m_uModMatSrce8", (abs(rand.nextInt()) % 27 + 1) / 28.f, false);
+ }
+
+ //sampler
+ if (*myProcessor->m_pVASTXperience.m_Set.m_State->m_bSamplerOnOff == static_cast(SWITCH::SWITCH_ON)) {
+ vaporizerComponent->getWaveTableEditorComponent()->randomizeSample();
+ }
+
+ lRandomPatch.category = ls_preset_category;
+
+ myProcessor->m_presetData.exchangeCurPatchData(lRandomPatch);
+ vaporizerComponent->getWaveTableEditorComponent()->setOscBank(0);
+ myProcessor->requestUIInitAfterPrestLoad();
+}
diff --git a/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.h b/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.h
index c5652f4..2560b77 100644
--- a/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.h
+++ b/VASTvaporizer/Source/Plugin/VASTAudioProcessorEditor.h
@@ -70,9 +70,11 @@ class VASTAudioProcessorEditor : public AudioProcessorEditor, MultiTimer
myEditor->resized();
};
};
+
+ void randomizePatch();
private:
- VASTAudioProcessor* processor;
+ VASTAudioProcessor* myProcessor;
TooltipWindow tooltipWindow{ this, 200 }; //just add and leave here
std::unique_ptr m_alertWindow;
diff --git a/VASTvaporizer/Source/Plugin/VASTFilterComponent.cpp b/VASTvaporizer/Source/Plugin/VASTFilterComponent.cpp
index daf74c2..3446b22 100644
--- a/VASTvaporizer/Source/Plugin/VASTFilterComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTFilterComponent.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 7.0.8
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
@@ -699,7 +699,7 @@ VASTFilterComponent::VASTFilterComponent (AudioProcessorEditor *editor, AudioPro
c_filterDisplay->setProcessor(myProcessor);
c_filterDisplay->setEditor(myEditor);
setOpaque(true);
-
+
return; //dont call setSizes
//[/UserPreSize]
diff --git a/VASTvaporizer/Source/Plugin/VASTFilterComponent.h b/VASTvaporizer/Source/Plugin/VASTFilterComponent.h
index e30e28b..8e9877b 100644
--- a/VASTvaporizer/Source/Plugin/VASTFilterComponent.h
+++ b/VASTvaporizer/Source/Plugin/VASTFilterComponent.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 7.0.8
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
diff --git a/VASTvaporizer/Source/Plugin/VASTHeaderComponent.cpp b/VASTvaporizer/Source/Plugin/VASTHeaderComponent.cpp
index 3fc0d99..4092371 100644
--- a/VASTvaporizer/Source/Plugin/VASTHeaderComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTHeaderComponent.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 7.0.7
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
@@ -47,53 +47,53 @@ VASTHeaderComponent::VASTHeaderComponent (AudioProcessorEditor *editor, AudioPro
c_Preset.reset (new VASTComboPreset ("c_Preset"));
addAndMakeVisible (c_Preset.get());
- c_Preset->setTooltip (TRANS("Choose presets"));
+ c_Preset->setTooltip (TRANS ("Choose presets"));
c_Preset->setEditableText (false);
c_Preset->setJustificationType (juce::Justification::centredLeft);
- c_Preset->setTextWhenNothingSelected (TRANS("no preset"));
- c_Preset->setTextWhenNoChoicesAvailable (TRANS("no presets"));
+ c_Preset->setTextWhenNothingSelected (TRANS ("no preset"));
+ c_Preset->setTextWhenNoChoicesAvailable (TRANS ("no presets"));
c_Preset->addListener (this);
c_ReloadPresets.reset (new juce::TextButton ("c_ReloadPresets"));
addAndMakeVisible (c_ReloadPresets.get());
- c_ReloadPresets->setTooltip (TRANS("Reload presets from folder"));
- c_ReloadPresets->setButtonText (TRANS("Reload"));
+ c_ReloadPresets->setTooltip (TRANS ("Reload presets from folder"));
+ c_ReloadPresets->setButtonText (TRANS ("Reload"));
c_ReloadPresets->addListener (this);
c_SavePreset.reset (new juce::TextButton ("c_SavePreset"));
addAndMakeVisible (c_SavePreset.get());
- c_SavePreset->setTooltip (TRANS("Save preset"));
- c_SavePreset->setButtonText (TRANS("Save"));
+ c_SavePreset->setTooltip (TRANS ("Save preset"));
+ c_SavePreset->setButtonText (TRANS ("Save"));
c_SavePreset->addListener (this);
c_PresetUp.reset (new juce::TextButton ("c_PresetUp"));
addAndMakeVisible (c_PresetUp.get());
- c_PresetUp->setTooltip (TRANS("Preset Up (Shortcut PgUp)"));
- c_PresetUp->setButtonText (TRANS(">"));
+ c_PresetUp->setTooltip (TRANS ("Preset Up (Shortcut PgUp)"));
+ c_PresetUp->setButtonText (TRANS (">"));
c_PresetUp->addListener (this);
c_PresetDown.reset (new juce::TextButton ("c_PresetDown"));
addAndMakeVisible (c_PresetDown.get());
- c_PresetDown->setTooltip (TRANS("Preset Down (Shortcut PgDwn)"));
- c_PresetDown->setButtonText (TRANS("<"));
+ c_PresetDown->setTooltip (TRANS ("Preset Down (Shortcut PgDwn)"));
+ c_PresetDown->setButtonText (TRANS ("<"));
c_PresetDown->addListener (this);
c_Undo.reset (new juce::TextButton ("c_Undo"));
addAndMakeVisible (c_Undo.get());
- c_Undo->setTooltip (TRANS("Undo last change"));
- c_Undo->setButtonText (TRANS("Undo"));
+ c_Undo->setTooltip (TRANS ("Undo last change"));
+ c_Undo->setButtonText (TRANS ("Undo"));
c_Undo->addListener (this);
c_Redo.reset (new juce::TextButton ("c_Redo"));
addAndMakeVisible (c_Redo.get());
- c_Redo->setTooltip (TRANS("Redo last undo"));
- c_Redo->setButtonText (TRANS("Redo"));
+ c_Redo->setTooltip (TRANS ("Redo last undo"));
+ c_Redo->setButtonText (TRANS ("Redo"));
c_Redo->addListener (this);
c_LabelLicense.reset (new juce::Label ("c_LabelLicense",
- TRANS("Free version")));
+ TRANS ("Free version")));
addAndMakeVisible (c_LabelLicense.get());
- c_LabelLicense->setFont (juce::Font ("Syntax", 11.00f, juce::Font::plain));
+ c_LabelLicense->setFont (juce::Font ("Syntax", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
c_LabelLicense->setJustificationType (juce::Justification::centred);
c_LabelLicense->setEditable (false, false, false);
c_LabelLicense->setColour (juce::Label::textColourId, juce::Colour (0xff838d95));
@@ -102,9 +102,15 @@ VASTHeaderComponent::VASTHeaderComponent (AudioProcessorEditor *editor, AudioPro
c_InitPreset.reset (new juce::TextButton ("c_InitPreset"));
addAndMakeVisible (c_InitPreset.get());
- c_InitPreset->setButtonText (TRANS("Init"));
+ c_InitPreset->setButtonText (TRANS ("Init"));
c_InitPreset->addListener (this);
+ c_Randomize.reset (new juce::TextButton ("c_Randomize"));
+ addAndMakeVisible (c_Randomize.get());
+ c_Randomize->setTooltip (TRANS ("Randomize preset"));
+ c_Randomize->setButtonText (TRANS ("Random"));
+ c_Randomize->addListener (this);
+
//[UserPreSize]
c_PresetUp->addShortcut(KeyPress(KeyPress::pageUpKey));
@@ -144,7 +150,7 @@ VASTHeaderComponent::VASTHeaderComponent (AudioProcessorEditor *editor, AudioPro
String presetdisplay = myProcessor->m_presetData.getCurPatchData().category + " " + myProcessor->m_presetData.getCurPatchData().presetname;
c_Preset->setText(presetdisplay, juce::NotificationType::dontSendNotification);
-
+
return; //dont call setSize
//[/UserPreSize]
@@ -169,6 +175,7 @@ VASTHeaderComponent::~VASTHeaderComponent()
c_Redo = nullptr;
c_LabelLicense = nullptr;
c_InitPreset = nullptr;
+ c_Randomize = nullptr;
//[Destructor]. You can add your own custom destruction code here..
@@ -210,14 +217,15 @@ void VASTHeaderComponent::resized()
//[/UserPreResize]
c_Preset->setBounds (proportionOfWidth (0.0154f), proportionOfHeight (0.3947f), proportionOfWidth (0.7754f), proportionOfHeight (0.2368f));
- c_ReloadPresets->setBounds (proportionOfWidth (0.4062f), proportionOfHeight (0.7237f), proportionOfWidth (0.1939f), proportionOfHeight (0.2368f));
- c_SavePreset->setBounds (proportionOfWidth (0.0123f), proportionOfHeight (0.7237f), proportionOfWidth (0.1939f), proportionOfHeight (0.2368f));
- c_PresetUp->setBounds (proportionOfWidth (0.8985f), proportionOfHeight (0.3947f), proportionOfWidth (0.0954f), proportionOfHeight (0.2368f));
- c_PresetDown->setBounds (proportionOfWidth (0.8000f), proportionOfHeight (0.3947f), proportionOfWidth (0.0954f), proportionOfHeight (0.2368f));
- c_Undo->setBounds (proportionOfWidth (0.6031f), proportionOfHeight (0.7237f), proportionOfWidth (0.1939f), proportionOfHeight (0.2368f));
- c_Redo->setBounds (proportionOfWidth (0.8000f), proportionOfHeight (0.7237f), proportionOfWidth (0.1939f), proportionOfHeight (0.2368f));
+ c_ReloadPresets->setBounds (proportionOfWidth (0.3415f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
+ c_SavePreset->setBounds (proportionOfWidth (0.0154f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
+ c_PresetUp->setBounds (proportionOfWidth (0.8985f), proportionOfHeight (0.3947f), proportionOfWidth (0.0923f), proportionOfHeight (0.2368f));
+ c_PresetDown->setBounds (proportionOfWidth (0.8031f), proportionOfHeight (0.3947f), proportionOfWidth (0.0923f), proportionOfHeight (0.2368f));
+ c_Undo->setBounds (proportionOfWidth (0.5046f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
+ c_Redo->setBounds (proportionOfWidth (0.6677f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
c_LabelLicense->setBounds (proportionOfWidth (0.0092f), proportionOfHeight (0.1579f), proportionOfWidth (0.9815f), proportionOfHeight (0.1184f));
- c_InitPreset->setBounds (proportionOfWidth (0.2092f), proportionOfHeight (0.7237f), proportionOfWidth (0.1939f), proportionOfHeight (0.2368f));
+ c_InitPreset->setBounds (proportionOfWidth (0.1785f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
+ c_Randomize->setBounds (proportionOfWidth (0.8308f), proportionOfHeight (0.7237f), proportionOfWidth (0.1600f), proportionOfHeight (0.2368f));
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
@@ -237,8 +245,7 @@ void VASTHeaderComponent::comboBoxChanged (juce::ComboBox* comboBoxThatHasChange
//[/UsercomboBoxChanged_Post]
}
-
-void VASTHeaderComponent::buttonClicked(juce::Button* buttonThatWasClicked)
+void VASTHeaderComponent::buttonClicked (juce::Button* buttonThatWasClicked)
{
//[UserbuttonClicked_Pre]
//[/UserbuttonClicked_Pre]
@@ -430,6 +437,14 @@ void VASTHeaderComponent::buttonClicked(juce::Button* buttonThatWasClicked)
myEditor->vaporizerComponent->updateAll();
//[/UserButtonCode_c_InitPreset]
}
+ else if (buttonThatWasClicked == c_Randomize.get())
+ {
+ //[UserButtonCode_c_Randomize] -- add your button handler code here..
+ myEditor->vaporizerComponent->getWaveTableEditorComponent()->stopWTRecording();
+ myEditor->randomizePatch();
+ myEditor->vaporizerComponent->updateAll();
+ //[/UserButtonCode_c_Randomize]
+ }
//[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post]
@@ -491,27 +506,26 @@ BEGIN_JUCER_METADATA
editable="0" layout="33" items="" textWhenNonSelected="no preset"
textWhenNoItems="no presets"/>
+ explicitFocusOrder="0" pos="50.462% 72.368% 16% 23.684%" tooltip="Undo last change"
+ buttonText="Undo" connectedEdges="0" needsCallback="1" radioGroupId="0"/>
+
END_JUCER_METADATA
diff --git a/VASTvaporizer/Source/Plugin/VASTHeaderComponent.h b/VASTvaporizer/Source/Plugin/VASTHeaderComponent.h
index d9c41f5..a65804b 100644
--- a/VASTvaporizer/Source/Plugin/VASTHeaderComponent.h
+++ b/VASTvaporizer/Source/Plugin/VASTHeaderComponent.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 7.0.7
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
@@ -93,6 +93,7 @@ class VASTHeaderComponent : public Component,
std::unique_ptr c_Redo;
std::unique_ptr c_LabelLicense;
std::unique_ptr c_InitPreset;
+ std::unique_ptr c_Randomize;
//==============================================================================
diff --git a/VASTvaporizer/Source/Plugin/VASTKeyboardComponent.cpp b/VASTvaporizer/Source/Plugin/VASTKeyboardComponent.cpp
index ebe4be2..b3b0256 100644
--- a/VASTvaporizer/Source/Plugin/VASTKeyboardComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTKeyboardComponent.cpp
@@ -90,7 +90,7 @@ VASTKeyboardComponent::VASTKeyboardComponent (AudioProcessorEditor *editor, Audi
//[UserPreSize]
c_midiKeyboard->setVelocity(1.0, true); // use mouse position for velocity
- c_midiKeyboard->setMidiChannelsToDisplay(3); // display channel 1 & 2
+ c_midiKeyboard->setMidiChannelsToDisplay(0xffff); // display all channels
c_midiKeyboard->setMidiChannel(2); // own channel 2
c_midiKeyboard->setKeyPressBaseOctave(2); //checked
c_midiKeyboard->setOpaque(true);
diff --git a/VASTvaporizer/Source/Plugin/VASTMSEGEditor/VASTMSEGEditor.cpp b/VASTvaporizer/Source/Plugin/VASTMSEGEditor/VASTMSEGEditor.cpp
index 0b57c49..10ed0b3 100644
--- a/VASTvaporizer/Source/Plugin/VASTMSEGEditor/VASTMSEGEditor.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTMSEGEditor/VASTMSEGEditor.cpp
@@ -175,20 +175,22 @@ void VASTMSEGEditor::updateContent(bool force)
int beats = myData->getTimeBeats();
float displayPeriod = myData->calcTotalDuration();
- float millisPerBeat = myProcessor->m_pVASTXperience.m_Set.getMillisecondsPerBeat();
- float intRatio = myProcessor->m_pVASTXperience.m_Set.getIntervalRatio(beats);
- float stepsPerDisplay = (displayPeriod / (millisPerBeat * intRatio));
-
- Colour cGridlines = myProcessor->getCurrentVASTLookAndFeel()->findVASTColour(VASTColours::colFilterDisplayGrid).withAlpha(0.6f);
- g.setColour(cGridlines);
- float fGridWidth = m_drawwidth / stepsPerDisplay;
- for (int verti = 0; verti <= int(stepsPerDisplay); verti++) {
- float xpoint = verti;
- int mod = 1 / intRatio;
- if (mod < 1)
- mod = 1;
- (verti % mod == 0.f) ? g.setColour(cGridlines.withAlpha(1.0f)) : g.setColour(cGridlines.withAlpha(0.4f));
- g.drawLine(m_xbounds + xpoint * fGridWidth, 0.f, m_xbounds + xpoint * fGridWidth, m_drawheight, 1.f * myProcessor->getPluginScaleWidthFactor() * m_screenWidthScale);
+ if (displayPeriod > 0.f) {
+ float millisPerBeat = myProcessor->m_pVASTXperience.m_Set.getMillisecondsPerBeat();
+ float intRatio = myProcessor->m_pVASTXperience.m_Set.getIntervalRatio(beats);
+ float stepsPerDisplay = (displayPeriod / (millisPerBeat * intRatio));
+
+ Colour cGridlines = myProcessor->getCurrentVASTLookAndFeel()->findVASTColour(VASTColours::colFilterDisplayGrid).withAlpha(0.6f);
+ g.setColour(cGridlines);
+ float fGridWidth = m_drawwidth / stepsPerDisplay;
+ for (int verti = 0; verti <= int(stepsPerDisplay); verti++) {
+ float xpoint = verti;
+ int mod = 1 / intRatio;
+ if (mod < 1)
+ mod = 1;
+ (verti % mod == 0.f) ? g.setColour(cGridlines.withAlpha(1.0f)) : g.setColour(cGridlines.withAlpha(0.4f));
+ g.drawLine(m_xbounds + xpoint * fGridWidth, 0.f, m_xbounds + xpoint * fGridWidth, m_drawheight, 1.f * myProcessor->getPluginScaleWidthFactor() * m_screenWidthScale);
+ }
}
}
diff --git a/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetComponent.cpp b/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetComponent.cpp
index 5f9d0c2..5619fe2 100644
--- a/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetComponent.cpp
@@ -1036,6 +1036,7 @@ void VASTPresetComponent::buildTreeContent() {
ltreeAuthors.setProperty("name", "Authors", nullptr);
ltreeAuthors.setProperty("id", "root", nullptr);
StringArray usedAuthors = *myProcessor->m_presetData.getUsedAuthors();
+ usedAuthors.sortNatural();
for (int j = 0; j < usedAuthors.size(); j++) {
vadd.setProperty("name", usedAuthors[j], nullptr);
vadd.setProperty("id", "author", nullptr);
@@ -1054,6 +1055,7 @@ void VASTPresetComponent::buildTreeContent() {
ltreeTags.setProperty("name", "Tags", nullptr);
ltreeTags.setProperty("id", "root", nullptr);
StringArray usedTags = *myProcessor->m_presetData.getUsedTags();
+ usedTags.sortNatural();
for (int j = 0; j < usedTags.size(); j++) {
vadd.setProperty("name", usedTags[j], nullptr);
vadd.setProperty("id", "tag", nullptr);
diff --git a/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetData.cpp b/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetData.cpp
index 5baaf62..b48a95e 100644
--- a/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetData.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTPreset/VASTPresetData.cpp
@@ -136,8 +136,11 @@ void VASTPresetData::reloadPresetArrayThreaded(Component::SafePointerm_arraySwapLock);
presetData->swap_PresetArray.swapWith(l_thread_PresetArray);
+ l_thread_usedAuthors.sortNatural();
presetData->swap_usedAuthors.swapWith(l_thread_usedAuthors);
+ l_thread_usedCategories.sortNatural();
presetData->swap_usedCategories.swapWith(l_thread_usedCategories);
+ l_thread_usedTags.sortNatural();
presetData->swap_usedTags.swapWith(l_thread_usedTags);
l_thread_PresetArray.clear();
diff --git a/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.cpp b/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.cpp
index 46505ac..c774683 100644
--- a/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
@@ -45,7 +45,7 @@ VASTSamplerEditorComponentHeader::VASTSamplerEditorComponentHeader (VASTAudioPro
m_iWAVScale.reset (new VASTParameterSlider ("m_iWAVScale"));
addAndMakeVisible (m_iWAVScale.get());
- m_iWAVScale->setTooltip (TRANS("Display scaling of wav file"));
+ m_iWAVScale->setTooltip (TRANS ("Display scaling of wav file"));
m_iWAVScale->setRange (1, 256, 1);
m_iWAVScale->setSliderStyle (juce::Slider::IncDecButtons);
m_iWAVScale->setTextBoxStyle (juce::Slider::TextBoxLeft, false, 28, 20);
@@ -62,7 +62,7 @@ VASTSamplerEditorComponentHeader::VASTSamplerEditorComponentHeader (VASTAudioPro
c_wavName->setText (juce::String());
label14.reset (new juce::Label ("new label",
- TRANS("WAV")));
+ TRANS ("WAV")));
addAndMakeVisible (label14.get());
label14->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label14->setJustificationType (juce::Justification::centredRight);
@@ -73,14 +73,14 @@ VASTSamplerEditorComponentHeader::VASTSamplerEditorComponentHeader (VASTAudioPro
m_iWavWTPos.reset (new VASTParameterSlider ("m_iWavWTPos"));
addAndMakeVisible (m_iWavWTPos.get());
- m_iWavWTPos->setTooltip (TRANS("Number of positions to create from wav file"));
+ m_iWavWTPos->setTooltip (TRANS ("Number of positions to create from wav file"));
m_iWavWTPos->setRange (1, 256, 1);
m_iWavWTPos->setSliderStyle (juce::Slider::IncDecButtons);
m_iWavWTPos->setTextBoxStyle (juce::Slider::TextBoxLeft, false, 28, 20);
m_iWavWTPos->addListener (this);
label16.reset (new juce::Label ("new label",
- TRANS("FIT")));
+ TRANS ("FIT")));
addAndMakeVisible (label16.get());
label16->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label16->setJustificationType (juce::Justification::centredLeft);
@@ -114,7 +114,7 @@ VASTSamplerEditorComponentHeader::VASTSamplerEditorComponentHeader (VASTAudioPro
c_iconZeroLoop->setName ("c_iconZeroLoop");
label2.reset (new juce::Label ("new label",
- TRANS("SNAP")));
+ TRANS ("SNAP")));
addAndMakeVisible (label2.get());
label2->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label2->setJustificationType (juce::Justification::centredLeft);
@@ -125,7 +125,7 @@ VASTSamplerEditorComponentHeader::VASTSamplerEditorComponentHeader (VASTAudioPro
c_snap.reset (new juce::ToggleButton ("c_snap"));
addAndMakeVisible (c_snap.get());
- c_snap->setTooltip (TRANS("Snap editor functions to zero crossings "));
+ c_snap->setTooltip (TRANS ("Snap editor functions to zero crossings "));
c_snap->setButtonText (juce::String());
c_snap->addListener (this);
diff --git a/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.h b/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.h
index 279d10d..f9d856f 100644
--- a/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.h
+++ b/VASTvaporizer/Source/Plugin/VASTSamplerEditorComponentHeader.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
diff --git a/VASTvaporizer/Source/Plugin/VASTScopeDisplay/VASTOscilloscope.cpp b/VASTvaporizer/Source/Plugin/VASTScopeDisplay/VASTOscilloscope.cpp
index b438a5b..e115f4a 100644
--- a/VASTvaporizer/Source/Plugin/VASTScopeDisplay/VASTOscilloscope.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTScopeDisplay/VASTOscilloscope.cpp
@@ -608,6 +608,8 @@ void VASTOscilloscope::updateContent(bool force) {
for (int x = 0; x < waveformImage.getWidth(); x++) {
int xWT = int((x * step) + (m_safePhaseFloat * C_WAVE_TABLE_SIZE)) % C_WAVE_TABLE_SIZE;
float yVal = (*l_waveBuffer)[xWT];
+ if (isnan(yVal))
+ return;
if (b_hasNext) { //interpolate
float samp1 = l_waveBufferNextCopy[xWT];
//yVal = yVal * (1.0f - interpolquad) + samp1 * interpolquad;
@@ -968,7 +970,7 @@ void VASTOscilloscope::mouseDrag(const MouseEvent &e) { // show value
m_wtselend = (m_wtselend >(C_WAVE_TABLE_SIZE - 1)) ? C_WAVE_TABLE_SIZE - 1 : m_wtselend;
m_wtselend = m_wtselend < 0 ? 0 : m_wtselend;
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::DrawConnect, curvy, /*myWtEditor->getWtPos(), myWtEditor->getWtPos(),*/ m_wtselstart, m_wtselend, myWtEditor, m_val1, m_val2, nullptr); //connect value 0?
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::DrawConnect, curvy, /*myWtEditor->getWtPos(), myWtEditor->getWtPos(),*/ m_wtselstart, m_wtselend, myWtEditor, m_val1, m_val2, nullptr, true); //connect value 0?
edit_thread.detach();
}
else { //draw mode free
diff --git a/VASTvaporizer/Source/Plugin/VASTVaporizerComponent.cpp b/VASTvaporizer/Source/Plugin/VASTVaporizerComponent.cpp
index 2e69af5..a0857f2 100644
--- a/VASTvaporizer/Source/Plugin/VASTVaporizerComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTVaporizerComponent.cpp
@@ -75,7 +75,9 @@ VASTTabbedComponent::VASTTabbedComponent(TabbedButtonBar::Orientation orientatio
void VASTTabbedComponent::currentTabChanged(int index, const String&) {
if (!m_bInitialized)
return;
-
+ if (index == -1)
+ return;
+
VASTWaveTableEditorComponent* tab1 = dynamic_cast(getTabContentComponent(TabSequence::WTEDITOR));
if (tab1 == nullptr) return; //not initialized
@@ -599,7 +601,7 @@ bool VASTVaporizerComponent::keyPressed(const KeyPress& key, Component* originat
myWtEditor->updateAll(false);
}
else if (key.isKeyCode(78)) {//CTRL + n normalize
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
else if (key.isKeyCode(KeyPress::leftKey)) {//CTRL + Cursor left
diff --git a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTFreqDomainViewport.cpp b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTFreqDomainViewport.cpp
index 6274c45..340d23c 100644
--- a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTFreqDomainViewport.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTFreqDomainViewport.cpp
@@ -224,6 +224,8 @@ void VASTFreqDomainViewport::stopAutoUpdate() {
}
void VASTFreqDomainViewport::timerCallback() {
+ if (!myProcessor->m_initCompleted)
+ return;
updateContent(false);
}
diff --git a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTPositionViewport.cpp b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTPositionViewport.cpp
index c3c4d24..9b4313d 100644
--- a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTPositionViewport.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTPositionViewport.cpp
@@ -256,6 +256,8 @@ void VASTPositionViewport::stopAutoUpdate() {
}
void VASTPositionViewport::timerCallback() {
+ if (!myProcessor->m_initCompleted)
+ return;
updateContent(false);
}
@@ -617,7 +619,7 @@ void VASTPositionViewport::mouseDown(const MouseEvent &e) {
}
else if (result == 40) {
// Normalize selected cycles globally
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr, true);
edit_thread.detach();
//myWtEditor->normalizePositions(wtPosStart, wtPosEnd, wavetable.get(), myWtEditor->getBankWavetable());
@@ -625,7 +627,7 @@ void VASTPositionViewport::mouseDown(const MouseEvent &e) {
}
else if (result == 41) {
// Normalize selected cycles locally
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::NormalizePerCycle, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::NormalizePerCycle, 0.f, /*wtPosStart, wtPosEnd,*/ 0, 0, myWtEditor, 0.f, 0.f, nullptr, true);
edit_thread.detach();
//myWtEditor->normalizePositions(i, i, wavetable.get(), myWtEditor->getBankWavetable());
diff --git a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTSamplerViewport.cpp b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTSamplerViewport.cpp
index 0b1be5b..f56c1d9 100644
--- a/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTSamplerViewport.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWTEditor/VASTSamplerViewport.cpp
@@ -92,6 +92,8 @@ void VASTSamplerViewport::updateContentAsync() {
}
void VASTSamplerViewport::timerCallback() {
+ if (!myProcessor->m_initCompleted)
+ return;
if (m_needsUpdate)
updateContent(false);
else {
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.cpp b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.cpp
index 23a087e..7a60960 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.cpp
@@ -232,7 +232,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Phase, c_waveTableEditorView->getHeader()->c_Phase->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Phase, c_waveTableEditorView->getHeader()->c_Phase->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -242,7 +242,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Freq, c_waveTableEditorView->getHeader()->c_Freq->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Freq, c_waveTableEditorView->getHeader()->c_Freq->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -251,7 +251,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Offset, c_waveTableEditorView->getHeader()->c_Offset->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Offset, c_waveTableEditorView->getHeader()->c_Offset->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
@@ -262,7 +262,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BitDepth, c_waveTableEditorView->getHeader()->c_bitDepth->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BitDepth, c_waveTableEditorView->getHeader()->c_bitDepth->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -271,7 +271,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Smooth, c_waveTableEditorView->getHeader()->c_Smooth->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Smooth, c_waveTableEditorView->getHeader()->c_Smooth->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -280,7 +280,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Clean, c_waveTableEditorView->getHeader()->c_Clean->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Clean, c_waveTableEditorView->getHeader()->c_Clean->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -296,7 +296,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FreqMod, c_waveTableEditorView->getHeader()->c_FreqMod->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FreqMod, c_waveTableEditorView->getHeader()->c_FreqMod->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -312,7 +312,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Bend, c_waveTableEditorView->getHeader()->c_Bend->getValue() * 0.999f, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Bend, c_waveTableEditorView->getHeader()->c_Bend->getValue() * 0.999f, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
@@ -323,7 +323,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Bloat, c_waveTableEditorView->getHeader()->c_Bloat->getValue() * 0.999f, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Bloat, c_waveTableEditorView->getHeader()->c_Bloat->getValue() * 0.999f, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
@@ -333,7 +333,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
if (sliderThatWasLastMoved != sliderThatWasMoved) copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Level, c_waveTableEditorView->getHeader()->c_Level->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Level, c_waveTableEditorView->getHeader()->c_Level->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -343,7 +343,7 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
copySelectionToLocalBuffer();
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Connect, c_waveTableEditorView->getHeader()->c_Connect->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Connect, c_waveTableEditorView->getHeader()->c_Connect->getValue(), /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -381,6 +381,96 @@ void VASTWaveTableEditorComponent::sliderValueChanged(Slider* sliderThatWasMoved
}
+void VASTWaveTableEditorComponent::randomizeSample() {
+ struct timeval tp;
+ myProcessor->m_pVASTXperience.m_Set._gettimeofday(&tp);
+ juce::Random rand(tp.tv_sec); //seed
+
+ Array l_sampleFiles;
+ FileSearchPath sPath = FileSearchPath(myProcessor->m_UserWavRootFolder);
+ sPath.findChildFiles(l_sampleFiles, File::findFiles, true, "*.wav;*.aiff");
+ if (l_sampleFiles.size() != 0) {
+ File loadWAVFile = l_sampleFiles[abs(rand.nextInt()) % l_sampleFiles.size()];
+ VASTSamplerSound* lVASTSamplerSound = loadWavFile(loadWAVFile.getFullPathName());
+ if (lVASTSamplerSound != nullptr) {
+ VASTSynthesiserSound* lSynthSound = (VASTSynthesiserSound*)(myProcessor->m_pVASTXperience.m_Poly.getSynthesizer()->getSound(0));
+ lSynthSound->addSamplerSoundChanged(lVASTSamplerSound);
+ }
+ }
+}
+
+void VASTWaveTableEditorComponent::randomizeBankWavetable(int bank, bool analog, bool digital) {
+ setOscBank(bank);
+ if (!myProcessor->m_pVASTXperience.audioProcessLock()) {
+ myProcessor->setErrorState(myProcessor->vastErrorState::errorState18_prepareToPlayFailed);
+ }
+
+ struct timeval tp;
+ myProcessor->m_pVASTXperience.m_Set._gettimeofday(&tp);
+ juce::Random rand(tp.tv_sec); //seed
+ int l_numCycles = abs(rand.nextInt()) % 255;
+
+ if (analog || digital) {
+ Array l_presetWTFiles;
+ FileSearchPath sPath = FileSearchPath(myProcessor->m_UserWavetableRootFolder);
+ String searchMask = "";
+ if (analog)
+ searchMask = "*analog*.wav;*analog*.aiff";
+ else
+ if (digital)
+ searchMask = "*digital*.wav;*digital*.aiff";
+ sPath.findChildFiles(l_presetWTFiles, File::findFiles, true, searchMask);
+ if (l_presetWTFiles.size() != 0) {
+ File loadWTFile = l_presetWTFiles[abs(rand.nextInt()) % l_presetWTFiles.size()];
+ loadWTFileThread(loadWTFile, this);
+ myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].addSoftFadeEditor();
+ myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].setWavetableSoftFade(newWTToUpdate);
+ myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].removeSoftFadeEditor();
+ myProcessor->m_pVASTXperience.beginSoftFade();
+ myProcessor->m_pVASTXperience.endSoftFade();
+ }
+ }
+ else {
+ sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
+
+ myProcessor->m_pVASTXperience.m_Poly.m_OscBank[bank].recalcWavetable();
+ std::shared_ptr wavetable = std::make_shared(myProcessor->m_pVASTXperience.m_Set);
+ wavetable->addPosition();
+ if (bank == 0) {
+ //init bank A to saw
+ std::vector* samples = wavetable->getNaiveTable(0);
+ wavetable->getNaiveSamplesFromWave(*samples, abs(rand.nextInt()) % 7);
+ wavetable->setWaveTableName(TRANS("Random"));
+ wavetable->setNaiveTableFast(0, false, myProcessor->getWTmode());
+ }
+ myProcessor->m_pVASTXperience.m_Poly.m_OscBank[bank].setWavetableSoftFade(wavetable);
+ myProcessor->m_pVASTXperience.beginSoftFade();
+ myProcessor->m_pVASTXperience.endSoftFade();
+
+ setCopyPasteWavetable(getBankWavetable()); //set copy paste WT for convolution etc
+
+ startWTRecording();
+ int counter = 0;
+ while (counter < l_numCycles) {
+ int l_editorFunction = abs(rand.nextInt()) % 48;
+ float l_sliderValue = rand.nextFloat() * 100.f; //check ranges
+ float l_connectVal1 = rand.nextFloat() * 2.f - 1.f;
+ float l_connectVal2 = rand.nextFloat() * 2.f - 1.f;
+ threadedEditorFunction(l_editorFunction, l_sliderValue, sel->iWTSelectionStart, sel->iWTSelectionEnd, this, l_connectVal1, l_connectVal2, nullptr, false); //do not pregenerate
+ myProcessor->m_pVASTXperience.beginSoftFade();
+ myProcessor->m_pVASTXperience.endSoftFade();
+ counter++;
+ }
+ stopWTRecording();
+ }
+
+ normalizePositions(0, getBankWavetable()->getNumPositions()-1, getBankWavetable().get(), getBankWavetable(), false, myProcessor->getWTmode());
+
+ if (!myProcessor->m_pVASTXperience.audioProcessUnlock()) {
+ myProcessor->setErrorState(myProcessor->vastErrorState::errorState18_prepareToPlayFailed);
+ }
+}
+
void VASTWaveTableEditorComponent::setOscBank(int bank) {
m_bank = bank;
getBankWavetable()->setSelectedWtPos(0);
@@ -595,7 +685,7 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconNormalize.get()) {
//sSelection* sel = c_editorOscilloscope->getSelection();
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
//========================================================================================================
@@ -604,98 +694,98 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconSine.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sine, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sine, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconHalfSine.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HalfSine, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HalfSine, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconTriangle.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Triangle, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Triangle, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconZeros.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Zeros, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Zeros, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconSaw.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sawtooth, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sawtooth, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconSquare.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Square, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Square, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconRamp.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Ramp, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Ramp, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconRandom.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Random, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Random, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconSinc.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sinc, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Sinc, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconSampleHold.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::SampleHold, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::SampleHold, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconReverse.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Reverse, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Reverse, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconInvert.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Invert, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Invert, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconArcConnect.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::ArcConnect, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::ArcConnect, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
else if (buttonThatWasClicked == c_waveTableEditorView->getHeader()->c_iconRampConnect.get()) {
sSelection* sel = c_waveTableEditorView->getEditorOscilloscope()->getSelection();
if (sel->iWTSelectionStart != sel->iWTSelectionEnd) {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::RampConnect, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::RampConnect, 0, /*msbeg, msend,*/ sel->iWTSelectionStart, sel->iWTSelectionEnd, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
}
}
@@ -717,7 +807,7 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
int lSelected = c_waveTableEditorView->getHeader()->c_applyOptions->getSelectedItemIndex();
switch (lSelected) {
case ApplyOption::ApplyInterpolation: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Interpolate, c_waveTableEditorView->getHeader()->c_applyMax->getValue(), /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr); //modmax not used yet
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Interpolate, c_waveTableEditorView->getHeader()->c_applyMax->getValue(), /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true); //modmax not used yet
edit_thread.detach();
break;
}
@@ -727,7 +817,7 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
AlertWindow::showMessageBoxAsync(MessageBoxIconType::InfoIcon, TRANS("Nothing copied"), TRANS("The wavetable copy buffer is empty. Use copy function before."), TRANS("Continue"), this);
}
else {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::AmplModCopy, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr); //mod max not usable here
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::AmplModCopy, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true); //mod max not usable here
edit_thread.detach();
}
break;
@@ -738,7 +828,7 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
AlertWindow::showMessageBoxAsync(MessageBoxIconType::InfoIcon, TRANS("Nothing copied"), TRANS("The wavetable copy buffer is empty. Use copy function before."), TRANS("Continue"), this);
}
else {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::MixInCopy, c_waveTableEditorView->getHeader()->c_applyMax->getValue(), /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr); //modmax not used yet
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::MixInCopy, c_waveTableEditorView->getHeader()->c_applyMax->getValue(), /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true); //modmax not used yet
edit_thread.detach();
}
break;
@@ -749,30 +839,30 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
AlertWindow::showMessageBoxAsync(MessageBoxIconType::InfoIcon, TRANS("Nothing copied"), TRANS("The wavetable copy buffer is empty. Use copy function before."), TRANS("Continue"), this);
}
else {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Convolution, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr); //mod max not usable here
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Convolution, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true); //mod max not usable here
edit_thread.detach();
}
break;
}
case ApplyOption::ApplyTimeToFrequency: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::TimeToFrequency, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::TimeToFrequency, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case ApplyOption::ApplyFrequencyToTime: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FrequencyToTime, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FrequencyToTime, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case ApplyOption::ApplyNormalize: {
//sSelection* sel = c_editorOscilloscope->getSelection();
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::Normalize, 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case ApplyOption::ApplyNormalizePerCycle: {
//sSelection* sel = c_editorOscilloscope->getSelection();
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::NormalizePerCycle , 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::NormalizePerCycle , 0.f, /*msbeg, msend,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
@@ -785,57 +875,57 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
int lSelected = c_waveTableEditorView->getHeader()->c_generationOptions->getSelectedItemIndex();
switch (lSelected) {
case GenerateOption::GenerateHardSync: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HardSyncGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HardSyncGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GeneratePulseWaveModualtion: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::PWMGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::PWMGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateFrequencyModulation: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FMGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FMGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateBloatTable: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BloatGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BloatGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateBendTable: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BendGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BendGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateFormantsMale: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FormantsMaleGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FormantsMaleGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateFormantsFemale: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FormantsFemaleGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::FormantsFemaleGenerate, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateHarmonicMorph: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HarmonicMorph, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HarmonicMorph, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateHarmonicReduce: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HarmonicReduce, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HarmonicReduce, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateHighpassFilter: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HighpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::HighpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateLowpassFilter: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::LowpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::LowpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
@@ -847,22 +937,22 @@ void VASTWaveTableEditorComponent::buttonClicked(Button* buttonThatWasClicked)
wtselbeg = 0;
wtselend = C_WAVE_TABLE_SIZE;
}
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::LowpassSoft, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ wtselbeg, wtselend, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::LowpassSoft, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ wtselbeg, wtselend, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateBandpassFilter: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BandpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::BandpassFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GeneratePulseFilter: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::PulseFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::PulseFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
case GenerateOption::GenerateCombFilter: {
- std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::CombFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr);
+ std::thread edit_thread(&VASTWaveTableEditorComponent::threadedEditorFunction, EditorFunction::CombFilter, c_waveTableEditorView->getHeader()->c_genMax->getValue(), /*getWtPos(), 0,*/ 0, 0, this, 0.f, 0.f, nullptr, true);
edit_thread.detach();
break;
}
@@ -1037,7 +1127,7 @@ void VASTWaveTableEditorComponent::threadedFreehandDraw(/*int msbeg, int msend,*
//can be called as thread or with tranaction wavetable
//----------------------------------------------------------------------------------------------------------------------------------------------
-void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, double sliderValue, /*int msbeg, int msend,*/ int wtselstart, int wtselend, VASTWaveTableEditorComponent* editor, float connectval1, float connectval2, std::shared_ptr transactionWavetable) {
+void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, double sliderValue, /*int msbeg, int msend,*/ int wtselstart, int wtselend, VASTWaveTableEditorComponent* editor, float connectval1, float connectval2, std::shared_ptr transactionWavetable, bool pregenerate) {
if (getEditorThreadsRunning() >= C_MAX_EDITOR_THREADS) return; //just skip it - check number
int lIndexAtStart = editor->myProcessor->m_loadedPresetIndexCount;
getEditorThreadsRunning()++;
@@ -1292,7 +1382,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
j++;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, false, editor->myProcessor->getWTmode());
}
}
break;
@@ -1320,12 +1410,12 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (samples[i] < -1) samples[i] = -1;
j++;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, false, editor->myProcessor->getWTmode());
}
else { //single value
float val1 = connectval1;
samples[wtselstart] = val1;
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, false, editor->myProcessor->getWTmode());
}
}
break;
@@ -1337,7 +1427,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
}
case EditorFunction::NormalizePerCycle: {
- normalizePositions(msbeg, msend, wavetable.get(), activeWavetable, true, editor->myProcessor->getWTmode()); //static call
+ normalizePositions(msbeg, msend, wavetable.get(), activeWavetable, false, editor->myProcessor->getWTmode()); //static call
break;
}
case EditorFunction::Interpolate: {
@@ -1350,7 +1440,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float interp = dLinTerp(msbeg, msend, sample_beg, sample_end, wtPos);
samples[i] = interp;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
break;
}
@@ -1370,7 +1460,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
interpolated = (1.f - fracpart) * (*editor->getCopyPasteWavetable()->getNaiveTable(intpart))[i] + fracpart * (*editor->getCopyPasteWavetable()->getNaiveTable((intpart + 1)))[i];
samples[i] = (*activeWavetable->getNaiveTable(wtPos))[i] * interpolated;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
break;
}
@@ -1391,7 +1481,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float factor = (sliderValue * 0.01f);
samples[i] = (1.f - factor) * (*activeWavetable->getNaiveTable(wtPos))[i] + factor * interpolated;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
break;
}
@@ -1416,7 +1506,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
wavetable->setFreqDomainTables(wtPos, &domainBuffer, false, true, editor->myProcessor->getWTmode()); //CHECK clip --> to maintain volume
}
//when clipped need to normalize to global maximum
- editor->normalizePositions(msbeg, msend, wavetable.get(), wavetable, true, editor->myProcessor->getWTmode());
+ editor->normalizePositions(msbeg, msend, wavetable.get(), wavetable, pregenerate, editor->myProcessor->getWTmode());
break;
}
case EditorFunction::TimeToFrequency: {
@@ -1436,7 +1526,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
domainBuffer[i] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(0.f, domainBuffer[i]);
domainBuffer[i] = VASTFreqDomainViewport::setDomainBufferSlotImagPercentage(0.f, domainBuffer[i]); //what about imag?
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
break;
}
@@ -1463,7 +1553,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
for (int i = wtselstart; i <= wtselend; i++) {
samples[i] *= gain;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
break;
}
@@ -1479,7 +1569,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
naivePWMTable = activeWavetable->calcPWMNaiveWave(i, selPos, pwmQuota); //read original
if (!(std::adjacent_find(naivePWMTable.begin(), naivePWMTable.end(), std::not_equal_to()) == naivePWMTable.end())) { //are all elements the same?
- wavetable->setNaiveTable(wtPos, naivePWMTable, true, editor->myProcessor->getWTmode()); // preGenerate
+ wavetable->setNaiveTable(wtPos, naivePWMTable, pregenerate, editor->myProcessor->getWTmode()); // preGenerate
wtPos++;
}
}
@@ -1496,7 +1586,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float mod = maxFM * (float(wtPos) / (float(C_MAX_NUM_POSITIONS - 1)));
if (wtPos == 0) mod = 0.f;
frequencyModulate(*activeWavetable->getNaiveTable(selPos), samples, 0, C_WAVE_TABLE_SIZE - 1, mod);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
wavetable->setSelectedWtPos(0);
break;
@@ -1514,7 +1604,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
naiveSynchTable = activeWavetable->calcSyncNaiveWave(i, selPos, fQuota); //read original
if (!(std::adjacent_find(naiveSynchTable.begin(), naiveSynchTable.end(), std::not_equal_to()) == naiveSynchTable.end())) { //are all elements the same?
- wavetable->setNaiveTable(wtPos, naiveSynchTable, true, editor->myProcessor->getWTmode()); // preGenerate
+ wavetable->setNaiveTable(wtPos, naiveSynchTable, pregenerate, editor->myProcessor->getWTmode()); // preGenerate
wtPos++;
}
}
@@ -1531,7 +1621,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float mod = -maxBloat + 2.f * maxBloat * (float(wtPos) / (float(C_MAX_NUM_POSITIONS - 1)));
//if (wtPos == 0) mod = 0.f;
calcBloat(*activeWavetable->getNaiveTable(selPos), samples, 0, C_WAVE_TABLE_SIZE - 1, mod);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode()); //generate
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode()); //generate
}
wavetable->setSelectedWtPos(0);
break;
@@ -1546,7 +1636,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float mod = -maxBend + 2.f * maxBend * (float(wtPos) / (float(C_MAX_NUM_POSITIONS - 1)));
//if (wtPos == 0) mod = 0.f;
calcBend(*activeWavetable->getNaiveTable(selPos), samples, 0, C_WAVE_TABLE_SIZE - 1, mod);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
wavetable->setSelectedWtPos(0);
break;
@@ -1708,7 +1798,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(VASTFreqDomainViewport::getDomainBufferSlotRealPercentage(domainBuffer[slot]) + newPerc * sliderValue / 100.f, domainBuffer[slot]);
break;
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
wavetable->setSelectedWtPos(0);
break;
@@ -1871,7 +1961,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(VASTFreqDomainViewport::getDomainBufferSlotRealPercentage(domainBuffer[slot]) + newPerc * sliderValue / 100.f, domainBuffer[slot]);
break;
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
wavetable->setSelectedWtPos(0);
break;
@@ -1886,7 +1976,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -1895,7 +1985,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float newPerc = VASTFreqDomainViewport::getDomainBufferSlotRealPercentage(domainBuffer[1]) * (sliderValue) / 100.0f;
domainBuffer[1] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(0.f, domainBuffer[1]);
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
}
@@ -1912,7 +2002,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -1921,7 +2011,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (slot <= 1024) {
float newPerc = VASTFreqDomainViewport::getDomainBufferSlotRealPercentage(domainBuffer[slot]) * (100.f - sliderValue) / 100.0f;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
}
@@ -1940,7 +2030,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -1951,7 +2041,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float newPerc = 0.f;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
wavetable->setSelectedWtPos(0);
@@ -1968,7 +2058,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -1981,7 +2071,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float newPerc = 0.f;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
wavetable->setSelectedWtPos(0);
@@ -1998,7 +2088,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector samples = std::vector(C_WAVE_TABLE_SIZE);
@@ -2036,7 +2126,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
for (int i = wtselstart; i <= wtselend; i++) {
samples[i] *= gain;
}
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
}
wavetable->setSelectedWtPos(0);
@@ -2053,7 +2143,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -2071,7 +2161,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
newPerc = 0.f;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
wavetable->setSelectedWtPos(0);
@@ -2088,7 +2178,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -2097,7 +2187,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
float newPerc = VASTFreqDomainViewport::getDomainBufferSlotRealPercentage(domainBuffer[slot]) * (100.f - sliderValue) / 100.0f;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(newPerc, domainBuffer[slot]);
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
wavetable->setSelectedWtPos(0);
@@ -2114,7 +2204,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
if (wtPos == 0) {
samples = *activeWavetable->getNaiveTable(selPos);
- wavetable->setNaiveTable(wtPos, samples, true, editor->myProcessor->getWTmode());
+ wavetable->setNaiveTable(wtPos, samples, pregenerate, editor->myProcessor->getWTmode());
}
else {
std::vector> domainBuffer = *activeWavetable->getFreqDomainBuffer(selPos);
@@ -2123,7 +2213,7 @@ void VASTWaveTableEditorComponent::threadedEditorFunction(int editorFunction, do
int slot = j + 2;
domainBuffer[slot] = VASTFreqDomainViewport::setDomainBufferSlotRealPercentage(0.f, domainBuffer[slot]);
}
- wavetable->setFreqDomainTables(wtPos, &domainBuffer, true, false, editor->myProcessor->getWTmode()); //CHECK clip
+ wavetable->setFreqDomainTables(wtPos, &domainBuffer, pregenerate, false, editor->myProcessor->getWTmode()); //CHECK clip
}
}
wavetable->setSelectedWtPos(0);
@@ -3295,7 +3385,7 @@ void VASTWaveTableEditorComponent::wavSelectionToWavetablePatch(bool stereo, boo
wavSelectionToWt(0, wavetable);
wavetable->setSelection(0, wavetable->getNumPositions() - 1);
- threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable);
+ threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable, true);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].setWavetableSoftFade(wavetable);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].removeSoftFadeEditor();
@@ -3307,7 +3397,7 @@ void VASTWaveTableEditorComponent::wavSelectionToWavetablePatch(bool stereo, boo
wavSelectionToWt(1, wavetable);
wavetable->setSelection(0, wavetable->getNumPositions() - 1);
- threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable);
+ threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable, true);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].setWavetableSoftFade(wavetable);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].removeSoftFadeEditor();
@@ -3333,7 +3423,7 @@ void VASTWaveTableEditorComponent::wavSelectionToWavetablePatch(bool stereo, boo
wavSelectionToWt(0, wavetable);
wavetable->setSelection(0, wavetable->getNumPositions() - 1);
- threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable);
+ threadedEditorFunction(EditorFunction::Normalize, 0.f, /*0, wavetable->getNumPositions() - 1,*/ 0, 0, this, 0.f, 0.f, wavetable, true);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].setWavetableSoftFade(wavetable);
myProcessor->m_pVASTXperience.m_Poly.m_OscBank[m_bank].removeSoftFadeEditor();
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.h b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.h
index 2b01817..a76ee8e 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.h
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorComponent.h
@@ -89,6 +89,9 @@ class VASTWaveTableEditorComponent : public Component,
setDrawMode(dmode);
};
+ void randomizeBankWavetable(int bank, bool analog, bool digital);
+ void randomizeSample();
+
int getOscBank() const { return m_bank; };
void setOscBank(int bank);
std::shared_ptr getBankWavetable() const {
@@ -236,7 +239,7 @@ class VASTWaveTableEditorComponent : public Component,
static void loadWTFileThread(juce::File file, VASTWaveTableEditorComponent* editor);
static void saveWTFileThread(juce::File file, CVASTWaveTable* wavetable, StringPairArray sarray, VASTWaveTableEditorComponent* editor);
- static void threadedEditorFunction(int editorFunction, double sliderValue, /*int msbeg, int msend,*/ int wtselstart, int wtselend, VASTWaveTableEditorComponent* editor, float connectval1, float connectval2, std::shared_ptr transactionWavetable);
+ static void threadedEditorFunction(int editorFunction, double sliderValue, /*int msbeg, int msend,*/ int wtselstart, int wtselend, VASTWaveTableEditorComponent* editor, float connectval1, float connectval2, std::shared_ptr transactionWavetable, bool pregenerate);
static void threadedFreehandDraw(/*int msbeg, int msend,*/ VASTWaveTableEditorComponent* editor, juce::Array> spoints);
static void normalizePositions(int beg, int end, CVASTWaveTable* wavetable, std::shared_ptr bankWavetable, bool perCycle, int wtMode);
static void frequencyModulate(const std::vector &inSamples, std::vector &outSamples, int startSample, int endSample, float sinPhaseInc);
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.cpp b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.cpp
index c577a45..9476294 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.h b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.h
index 4bd153e..cf8c9c1 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.h
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorView.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.0.1
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.cpp b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.cpp
index ebd40b0..f77226d 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.cpp
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.1.2
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
@@ -46,7 +46,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
//[/Constructor_pre]
label10.reset (new juce::Label ("new label",
- TRANS("OSC D\n")));
+ TRANS ("OSC D\n")));
addAndMakeVisible (label10.get());
label10->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label10->setJustificationType (juce::Justification::centredLeft);
@@ -56,7 +56,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
label10->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label9.reset (new juce::Label ("new label",
- TRANS("OSC C")));
+ TRANS ("OSC C")));
addAndMakeVisible (label9.get());
label9->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label9->setJustificationType (juce::Justification::centredLeft);
@@ -66,7 +66,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
label9->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label7.reset (new juce::Label ("new label",
- TRANS("OSC A")));
+ TRANS ("OSC A")));
addAndMakeVisible (label7.get());
label7->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label7->setJustificationType (juce::Justification::centredLeft);
@@ -76,7 +76,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
label7->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label8.reset (new juce::Label ("new label",
- TRANS("OSC B")));
+ TRANS ("OSC B")));
addAndMakeVisible (label8.get());
label8->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label8->setJustificationType (juce::Justification::centredLeft);
@@ -87,7 +87,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Phase.reset (new VASTSlider ("c_Phase"));
addAndMakeVisible (c_Phase.get());
- c_Phase->setTooltip (TRANS("Change phase of selection"));
+ c_Phase->setTooltip (TRANS ("Change phase of selection"));
c_Phase->setRange (-100, 100, 0.001);
c_Phase->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Phase->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -96,7 +96,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Phase->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label108.reset (new juce::Label ("new label",
- TRANS("LEVEL")));
+ TRANS ("LEVEL")));
addAndMakeVisible (label108.get());
label108->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label108->setJustificationType (juce::Justification::centred);
@@ -106,7 +106,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
label108->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label135.reset (new juce::Label ("new label",
- TRANS("PHASE")));
+ TRANS ("PHASE")));
addAndMakeVisible (label135.get());
label135->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label135->setJustificationType (juce::Justification::centred);
@@ -117,7 +117,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Freq.reset (new VASTSlider ("c_Freq"));
addAndMakeVisible (c_Freq.get());
- c_Freq->setTooltip (TRANS("Change frequency of selection"));
+ c_Freq->setTooltip (TRANS ("Change frequency of selection"));
c_Freq->setRange (-4, 4, 0.001);
c_Freq->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Freq->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -126,7 +126,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Freq->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label2.reset (new juce::Label ("new label",
- TRANS("FREQ")));
+ TRANS ("FREQ")));
addAndMakeVisible (label2.get());
label2->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label2->setJustificationType (juce::Justification::centred);
@@ -137,7 +137,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Offset.reset (new VASTSlider ("c_Offset"));
addAndMakeVisible (c_Offset.get());
- c_Offset->setTooltip (TRANS("Change DC offset of selection"));
+ c_Offset->setTooltip (TRANS ("Change DC offset of selection"));
c_Offset->setRange (-100, 100, 0.001);
c_Offset->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Offset->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -147,7 +147,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_bitDepth.reset (new VASTSlider ("c_bitDepth"));
addAndMakeVisible (c_bitDepth.get());
- c_bitDepth->setTooltip (TRANS("Change bit depth of selection"));
+ c_bitDepth->setTooltip (TRANS ("Change bit depth of selection"));
c_bitDepth->setRange (1, 32, 1);
c_bitDepth->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_bitDepth->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -156,7 +156,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_bitDepth->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label3.reset (new juce::Label ("new label",
- TRANS("BITS")));
+ TRANS ("BITS")));
addAndMakeVisible (label3.get());
label3->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label3->setJustificationType (juce::Justification::centred);
@@ -166,7 +166,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
label3->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label4.reset (new juce::Label ("new label",
- TRANS("OFFSET")));
+ TRANS ("OFFSET")));
addAndMakeVisible (label4.get());
label4->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label4->setJustificationType (juce::Justification::centred);
@@ -177,7 +177,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Smooth.reset (new VASTSlider ("c_Smooth"));
addAndMakeVisible (c_Smooth.get());
- c_Smooth->setTooltip (TRANS("Smooth selection"));
+ c_Smooth->setTooltip (TRANS ("Smooth selection"));
c_Smooth->setRange (0, 100, 0.001);
c_Smooth->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Smooth->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -186,7 +186,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Smooth->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label5.reset (new juce::Label ("new label",
- TRANS("SMOOTH")));
+ TRANS ("SMOOTH")));
addAndMakeVisible (label5.get());
label5->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label5->setJustificationType (juce::Justification::centred);
@@ -197,7 +197,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Clean.reset (new VASTSlider ("c_Clean"));
addAndMakeVisible (c_Clean.get());
- c_Clean->setTooltip (TRANS("Clean selection (start and end of cycle)"));
+ c_Clean->setTooltip (TRANS ("Clean selection (start and end of cycle)"));
c_Clean->setRange (0, 100, 0.001);
c_Clean->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Clean->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -206,7 +206,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Clean->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label6.reset (new juce::Label ("new label",
- TRANS("CLEAN")));
+ TRANS ("CLEAN")));
addAndMakeVisible (label6.get());
label6->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label6->setJustificationType (juce::Justification::centred);
@@ -241,7 +241,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
m_iWTEditorZoom.reset (new VASTParameterSlider ("m_iWTEditorZoom"));
addAndMakeVisible (m_iWTEditorZoom.get());
- m_iWTEditorZoom->setTooltip (TRANS("Zoom frequency domain display"));
+ m_iWTEditorZoom->setTooltip (TRANS ("Zoom frequency domain display"));
m_iWTEditorZoom->setExplicitFocusOrder (1);
m_iWTEditorZoom->setRange (1, 16, 1);
m_iWTEditorZoom->setSliderStyle (juce::Slider::IncDecButtons);
@@ -258,7 +258,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_wtName->setText (juce::String());
label13.reset (new juce::Label ("new label",
- TRANS("TABLE")));
+ TRANS ("TABLE")));
addAndMakeVisible (label13.get());
label13->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label13->setJustificationType (juce::Justification::centredRight);
@@ -269,7 +269,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_FreqMod.reset (new VASTSlider ("c_FreqMod"));
addAndMakeVisible (c_FreqMod.get());
- c_FreqMod->setTooltip (TRANS("Frequency modulation of selection"));
+ c_FreqMod->setTooltip (TRANS ("Frequency modulation of selection"));
c_FreqMod->setRange (0, 20, 0.001);
c_FreqMod->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_FreqMod->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -278,7 +278,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_FreqMod->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label15.reset (new juce::Label ("new label",
- TRANS("FMOD")));
+ TRANS ("FMOD")));
addAndMakeVisible (label15.get());
label15->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label15->setJustificationType (juce::Justification::centred);
@@ -289,7 +289,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_genMax.reset (new VASTSlider ("c_genMax"));
addAndMakeVisible (c_genMax.get());
- c_genMax->setTooltip (TRANS("Maximum modulation value of generation"));
+ c_genMax->setTooltip (TRANS ("Maximum modulation value of generation"));
c_genMax->setRange (0, 100, 0.001);
c_genMax->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_genMax->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -300,7 +300,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Bend.reset (new VASTSlider ("c_Bend"));
addAndMakeVisible (c_Bend.get());
- c_Bend->setTooltip (TRANS("Bend selection"));
+ c_Bend->setTooltip (TRANS ("Bend selection"));
c_Bend->setRange (-100, 100, 0.001);
c_Bend->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Bend->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -309,7 +309,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Bend->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label18.reset (new juce::Label ("new label",
- TRANS("BEND")));
+ TRANS ("BEND")));
addAndMakeVisible (label18.get());
label18->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label18->setJustificationType (juce::Justification::centred);
@@ -320,7 +320,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Bloat.reset (new VASTSlider ("c_Bloat"));
addAndMakeVisible (c_Bloat.get());
- c_Bloat->setTooltip (TRANS("Inflate selection"));
+ c_Bloat->setTooltip (TRANS ("Inflate selection"));
c_Bloat->setRange (-100, 100, 0.001);
c_Bloat->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Bloat->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -329,7 +329,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Bloat->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label19.reset (new juce::Label ("new label",
- TRANS("BLOAT")));
+ TRANS ("BLOAT")));
addAndMakeVisible (label19.get());
label19->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label19->setJustificationType (juce::Justification::centred);
@@ -340,7 +340,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Level.reset (new VASTSlider ("c_Level"));
addAndMakeVisible (c_Level.get());
- c_Level->setTooltip (TRANS("Change level of selection"));
+ c_Level->setTooltip (TRANS ("Change level of selection"));
c_Level->setRange (-100, 100, 0.01);
c_Level->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Level->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -446,45 +446,45 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_applyOptions.reset (new VASTComboBox ("c_applyOptions"));
addAndMakeVisible (c_applyOptions.get());
- c_applyOptions->setTooltip (TRANS("Option that shall be applied from begin to end of multi selection"));
+ c_applyOptions->setTooltip (TRANS ("Option that shall be applied from begin to end of multi selection"));
c_applyOptions->setExplicitFocusOrder (1);
c_applyOptions->setEditableText (false);
c_applyOptions->setJustificationType (juce::Justification::centredLeft);
c_applyOptions->setTextWhenNothingSelected (juce::String());
- c_applyOptions->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_applyOptions->addItem (TRANS("Interpolation"), 1);
- c_applyOptions->addItem (TRANS("Amplitude Modulation"), 2);
- c_applyOptions->addItem (TRANS("Mix In"), 3);
- c_applyOptions->addItem (TRANS("Convolution"), 4);
- c_applyOptions->addItem (TRANS("Time > Frequency"), 5);
- c_applyOptions->addItem (TRANS("Frequency > Time"), 6);
- c_applyOptions->addItem (TRANS("Normalize (Table)"), 7);
- c_applyOptions->addItem (TRANS("Normalize (Each)"), 8);
+ c_applyOptions->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_applyOptions->addItem (TRANS ("Interpolation"), 1);
+ c_applyOptions->addItem (TRANS ("Amplitude Modulation"), 2);
+ c_applyOptions->addItem (TRANS ("Mix In"), 3);
+ c_applyOptions->addItem (TRANS ("Convolution"), 4);
+ c_applyOptions->addItem (TRANS ("Time > Frequency"), 5);
+ c_applyOptions->addItem (TRANS ("Frequency > Time"), 6);
+ c_applyOptions->addItem (TRANS ("Normalize (Table)"), 7);
+ c_applyOptions->addItem (TRANS ("Normalize (Each)"), 8);
c_applyOptions->addListener (this);
c_generationOptions.reset (new VASTComboBox ("c_generationOptions"));
addAndMakeVisible (c_generationOptions.get());
- c_generationOptions->setTooltip (TRANS("Option that shall be generated"));
+ c_generationOptions->setTooltip (TRANS ("Option that shall be generated"));
c_generationOptions->setExplicitFocusOrder (1);
c_generationOptions->setEditableText (false);
c_generationOptions->setJustificationType (juce::Justification::centredLeft);
c_generationOptions->setTextWhenNothingSelected (juce::String());
- c_generationOptions->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_generationOptions->addItem (TRANS("HardSync"), 1);
- c_generationOptions->addItem (TRANS("Pulse Mod (PWM)"), 2);
- c_generationOptions->addItem (TRANS("Frequency Mod (FM)"), 3);
- c_generationOptions->addItem (TRANS("Bloat"), 4);
- c_generationOptions->addItem (TRANS("Bend"), 5);
- c_generationOptions->addItem (TRANS("Formants (Male)"), 6);
- c_generationOptions->addItem (TRANS("Formants (Female)"), 7);
- c_generationOptions->addItem (TRANS("Harmonic Morph"), 8);
- c_generationOptions->addItem (TRANS("Harmonic Reduce"), 9);
- c_generationOptions->addItem (TRANS("Highpass Filter"), 10);
- c_generationOptions->addItem (TRANS("Lowpass Filter"), 11);
- c_generationOptions->addItem (TRANS("Lowpass Soft"), 12);
- c_generationOptions->addItem (TRANS("Bandpass Filter"), 13);
- c_generationOptions->addItem (TRANS("Pulse Filter"), 14);
- c_generationOptions->addItem (TRANS("Comb Filter"), 15);
+ c_generationOptions->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_generationOptions->addItem (TRANS ("HardSync"), 1);
+ c_generationOptions->addItem (TRANS ("Pulse Mod (PWM)"), 2);
+ c_generationOptions->addItem (TRANS ("Frequency Mod (FM)"), 3);
+ c_generationOptions->addItem (TRANS ("Bloat"), 4);
+ c_generationOptions->addItem (TRANS ("Bend"), 5);
+ c_generationOptions->addItem (TRANS ("Formants (Male)"), 6);
+ c_generationOptions->addItem (TRANS ("Formants (Female)"), 7);
+ c_generationOptions->addItem (TRANS ("Harmonic Morph"), 8);
+ c_generationOptions->addItem (TRANS ("Harmonic Reduce"), 9);
+ c_generationOptions->addItem (TRANS ("Highpass Filter"), 10);
+ c_generationOptions->addItem (TRANS ("Lowpass Filter"), 11);
+ c_generationOptions->addItem (TRANS ("Lowpass Soft"), 12);
+ c_generationOptions->addItem (TRANS ("Bandpass Filter"), 13);
+ c_generationOptions->addItem (TRANS ("Pulse Filter"), 14);
+ c_generationOptions->addItem (TRANS ("Comb Filter"), 15);
c_generationOptions->addListener (this);
c_iconApply.reset (new VASTDrawableButton ("c_iconApply",apply_svg, apply_svgSize, "Apply option from begin to end of multi selection"));
@@ -497,7 +497,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Connect.reset (new VASTSlider ("c_Connect"));
addAndMakeVisible (c_Connect.get());
- c_Connect->setTooltip (TRANS("Connect start value of selection with end value of selection with arc or ramp "));
+ c_Connect->setTooltip (TRANS ("Connect start value of selection with end value of selection with arc or ramp "));
c_Connect->setRange (-100, 100, 0.001);
c_Connect->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_Connect->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -506,7 +506,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_Connect->setColour (juce::Slider::textBoxOutlineColourId, juce::Colour (0x00808080));
label11.reset (new juce::Label ("new label",
- TRANS("CNECT")));
+ TRANS ("CNECT")));
addAndMakeVisible (label11.get());
label11->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label11->setJustificationType (juce::Justification::centred);
@@ -517,7 +517,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_applyMax.reset (new VASTSlider ("c_applyMax"));
addAndMakeVisible (c_applyMax.get());
- c_applyMax->setTooltip (TRANS("Maximum modulation value for applied modulation"));
+ c_applyMax->setTooltip (TRANS ("Maximum modulation value for applied modulation"));
c_applyMax->setRange (0, 100, 0.001);
c_applyMax->setSliderStyle (juce::Slider::RotaryVerticalDrag);
c_applyMax->setTextBoxStyle (juce::Slider::NoTextBox, false, 30, 14);
@@ -528,16 +528,16 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_WTableNext.reset (new juce::TextButton ("c_WTableNext"));
addAndMakeVisible (c_WTableNext.get());
- c_WTableNext->setTooltip (TRANS("Load next wavetable"));
- c_WTableNext->setButtonText (TRANS(">"));
+ c_WTableNext->setTooltip (TRANS ("Load next wavetable"));
+ c_WTableNext->setButtonText (TRANS (">"));
c_WTablePrevious.reset (new juce::TextButton ("c_WTablePrevious"));
addAndMakeVisible (c_WTablePrevious.get());
- c_WTablePrevious->setTooltip (TRANS("Load previous wavetable"));
- c_WTablePrevious->setButtonText (TRANS("<"));
+ c_WTablePrevious->setTooltip (TRANS ("Load previous wavetable"));
+ c_WTablePrevious->setButtonText (TRANS ("<"));
label12.reset (new juce::Label ("new label",
- TRANS("SOLO")));
+ TRANS ("SOLO")));
addAndMakeVisible (label12.get());
label12->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label12->setJustificationType (juce::Justification::centredLeft);
@@ -548,65 +548,65 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_soloSelection.reset (new juce::ToggleButton ("c_soloSelection"));
addAndMakeVisible (c_soloSelection.get());
- c_soloSelection->setTooltip (TRANS("Only play the selected wavetable positions in oscillator"));
+ c_soloSelection->setTooltip (TRANS ("Only play the selected wavetable positions in oscillator"));
c_soloSelection->setButtonText (juce::String());
c_gridMode.reset (new VASTComboBox ("c_gridMode"));
addAndMakeVisible (c_gridMode.get());
- c_gridMode->setTooltip (TRANS("Grid mode in wavetable editor"));
+ c_gridMode->setTooltip (TRANS ("Grid mode in wavetable editor"));
c_gridMode->setExplicitFocusOrder (1);
c_gridMode->setEditableText (false);
c_gridMode->setJustificationType (juce::Justification::centredLeft);
c_gridMode->setTextWhenNothingSelected (juce::String());
- c_gridMode->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_gridMode->addItem (TRANS("No Grid"), 1);
- c_gridMode->addItem (TRANS("4x4"), 2);
- c_gridMode->addItem (TRANS("8x8"), 3);
- c_gridMode->addItem (TRANS("16x16"), 4);
- c_gridMode->addItem (TRANS("32x32"), 5);
- c_gridMode->addItem (TRANS("64x64"), 6);
- c_gridMode->addItem (TRANS("128x128"), 7);
+ c_gridMode->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_gridMode->addItem (TRANS ("No Grid"), 1);
+ c_gridMode->addItem (TRANS ("4x4"), 2);
+ c_gridMode->addItem (TRANS ("8x8"), 3);
+ c_gridMode->addItem (TRANS ("16x16"), 4);
+ c_gridMode->addItem (TRANS ("32x32"), 5);
+ c_gridMode->addItem (TRANS ("64x64"), 6);
+ c_gridMode->addItem (TRANS ("128x128"), 7);
c_gridMode->addListener (this);
c_drawMode.reset (new VASTComboBox ("c_drawMode"));
addAndMakeVisible (c_drawMode.get());
- c_drawMode->setTooltip (TRANS("Draw mode in wavetable editor"));
+ c_drawMode->setTooltip (TRANS ("Draw mode in wavetable editor"));
c_drawMode->setExplicitFocusOrder (1);
c_drawMode->setEditableText (false);
c_drawMode->setJustificationType (juce::Justification::centredLeft);
c_drawMode->setTextWhenNothingSelected (juce::String());
- c_drawMode->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_drawMode->addItem (TRANS("Select"), 1);
- c_drawMode->addItem (TRANS("Line/Arc"), 2);
- c_drawMode->addItem (TRANS("Draw"), 3);
+ c_drawMode->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_drawMode->addItem (TRANS ("Select"), 1);
+ c_drawMode->addItem (TRANS ("Line/Arc"), 2);
+ c_drawMode->addItem (TRANS ("Draw"), 3);
c_drawMode->addListener (this);
c_binMode.reset (new VASTComboBox ("c_binMode"));
addAndMakeVisible (c_binMode.get());
- c_binMode->setTooltip (TRANS("Bin mode for editing frequency domain"));
+ c_binMode->setTooltip (TRANS ("Bin mode for editing frequency domain"));
c_binMode->setExplicitFocusOrder (1);
c_binMode->setEditableText (false);
c_binMode->setJustificationType (juce::Justification::centredLeft);
c_binMode->setTextWhenNothingSelected (juce::String());
- c_binMode->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_binMode->addItem (TRANS("Clip"), 1);
- c_binMode->addItem (TRANS("Normalize"), 2);
+ c_binMode->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_binMode->addItem (TRANS ("Clip"), 1);
+ c_binMode->addItem (TRANS ("Normalize"), 2);
c_binMode->addListener (this);
c_binEditMode.reset (new VASTComboBox ("c_binEditMode"));
addAndMakeVisible (c_binEditMode.get());
- c_binEditMode->setTooltip (TRANS("Bin edit mode for editing frequency domain"));
+ c_binEditMode->setTooltip (TRANS ("Bin edit mode for editing frequency domain"));
c_binEditMode->setExplicitFocusOrder (1);
c_binEditMode->setEditableText (false);
c_binEditMode->setJustificationType (juce::Justification::centredLeft);
c_binEditMode->setTextWhenNothingSelected (juce::String());
- c_binEditMode->setTextWhenNoChoicesAvailable (TRANS("(no choices)"));
- c_binEditMode->addItem (TRANS("SingleBin"), 1);
- c_binEditMode->addItem (TRANS("Every2nd"), 2);
- c_binEditMode->addItem (TRANS("Every3rd"), 3);
- c_binEditMode->addItem (TRANS("Pile"), 4);
- c_binEditMode->addItem (TRANS("DragShift"), 5);
- c_binEditMode->addItem (TRANS("DragStretch"), 6);
+ c_binEditMode->setTextWhenNoChoicesAvailable (TRANS ("(no choices)"));
+ c_binEditMode->addItem (TRANS ("SingleBin"), 1);
+ c_binEditMode->addItem (TRANS ("Every2nd"), 2);
+ c_binEditMode->addItem (TRANS ("Every3rd"), 3);
+ c_binEditMode->addItem (TRANS ("Pile"), 4);
+ c_binEditMode->addItem (TRANS ("DragShift"), 5);
+ c_binEditMode->addItem (TRANS ("DragStretch"), 6);
c_binEditMode->addListener (this);
c_iconSampleHold.reset (new VASTDrawableButton ("c_iconSampleHold",waves_samplehold_svg, waves_samplehold_svgSize, "Initialize selection of position with sample and hold wave"));
@@ -614,7 +614,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_iconSampleHold->setName ("c_iconSampleHold");
c_positionLabel.reset (new juce::Label ("c_positionLabel",
- TRANS("-")));
+ TRANS ("-")));
addAndMakeVisible (c_positionLabel.get());
c_positionLabel->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
c_positionLabel->setJustificationType (juce::Justification::centred);
@@ -624,7 +624,7 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_positionLabel->setColour (juce::TextEditor::backgroundColourId, juce::Colour (0x00000000));
label14.reset (new juce::Label ("new label",
- TRANS("SNAP")));
+ TRANS ("SNAP")));
addAndMakeVisible (label14.get());
label14->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label14->setJustificationType (juce::Justification::centredLeft);
@@ -639,16 +639,16 @@ VASTWaveTableEditorViewHeader::VASTWaveTableEditorViewHeader (AudioProcessorEdit
c_snap.reset (new juce::ToggleButton ("c_snap"));
addAndMakeVisible (c_snap.get());
- c_snap->setTooltip (TRANS("Snap editor functions to zero crossings"));
+ c_snap->setTooltip (TRANS ("Snap editor functions to zero crossings"));
c_snap->setButtonText (juce::String());
c_stretch.reset (new juce::ToggleButton ("c_stretch"));
addAndMakeVisible (c_stretch.get());
- c_stretch->setTooltip (TRANS("Stretch editor functions to zero crossings"));
+ c_stretch->setTooltip (TRANS ("Stretch editor functions to zero crossings"));
c_stretch->setButtonText (juce::String());
label16.reset (new juce::Label ("new label",
- TRANS("STRETCH")));
+ TRANS ("STRETCH")));
addAndMakeVisible (label16.get());
label16->setFont (juce::Font ("Code Pro Demo", 11.00f, juce::Font::plain).withTypefaceStyle ("Regular"));
label16->setJustificationType (juce::Justification::centredLeft);
@@ -948,21 +948,21 @@ void VASTWaveTableEditorViewHeader::resized()
//[UserPreResize] Add your own custom resize code here..
//[/UserPreResize]
- label10->setBounds (proportionOfWidth (0.1013f), proportionOfHeight (0.5313f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
+ label10->setBounds (proportionOfWidth (0.1013f), proportionOfHeight (0.5312f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
label9->setBounds (proportionOfWidth (0.1013f), proportionOfHeight (0.3333f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
label7->setBounds (proportionOfWidth (0.0238f), proportionOfHeight (0.3333f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
- label8->setBounds (proportionOfWidth (0.0238f), proportionOfHeight (0.5313f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
+ label8->setBounds (proportionOfWidth (0.0238f), proportionOfHeight (0.5312f), proportionOfWidth (0.0788f), proportionOfHeight (0.1250f));
c_Phase->setBounds (proportionOfWidth (0.2175f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label108->setBounds (proportionOfWidth (0.1537f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
label135->setBounds (proportionOfWidth (0.2013f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_Freq->setBounds (proportionOfWidth (0.2650f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label2->setBounds (proportionOfWidth (0.2475f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
- c_Offset->setBounds (proportionOfWidth (0.4063f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
+ c_Offset->setBounds (proportionOfWidth (0.4062f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
c_bitDepth->setBounds (proportionOfWidth (0.3588f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label3->setBounds (proportionOfWidth (0.3400f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
label4->setBounds (proportionOfWidth (0.3887f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_Smooth->setBounds (proportionOfWidth (0.5475f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
- label5->setBounds (proportionOfWidth (0.5313f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
+ label5->setBounds (proportionOfWidth (0.5312f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_Clean->setBounds (proportionOfWidth (0.5950f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label6->setBounds (proportionOfWidth (0.5825f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_oscA->setBounds (proportionOfWidth (0.0050f), proportionOfHeight (0.3125f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
@@ -970,18 +970,18 @@ void VASTWaveTableEditorViewHeader::resized()
c_oscC->setBounds (proportionOfWidth (0.0800f), proportionOfHeight (0.3125f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
c_oscD->setBounds (proportionOfWidth (0.0800f), proportionOfHeight (0.5000f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
m_iWTEditorZoom->setBounds (proportionOfWidth (0.9200f), proportionOfHeight (0.7708f), proportionOfWidth (0.0788f), proportionOfHeight (0.1667f));
- c_wtName->setBounds (proportionOfWidth (0.2325f), proportionOfHeight (0.0417f), proportionOfWidth (0.1888f), proportionOfHeight (0.1563f));
+ c_wtName->setBounds (proportionOfWidth (0.2325f), proportionOfHeight (0.0417f), proportionOfWidth (0.1888f), proportionOfHeight (0.1562f));
label13->setBounds (proportionOfWidth (0.1437f), proportionOfHeight (0.0625f), proportionOfWidth (0.0900f), proportionOfHeight (0.1250f));
c_FreqMod->setBounds (proportionOfWidth (0.3113f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label15->setBounds (proportionOfWidth (0.2950f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
- c_genMax->setBounds (proportionOfWidth (0.6563f), proportionOfHeight (0.7604f), proportionOfWidth (0.0300f), proportionOfHeight (0.1875f));
+ c_genMax->setBounds (proportionOfWidth (0.6562f), proportionOfHeight (0.7604f), proportionOfWidth (0.0300f), proportionOfHeight (0.1875f));
c_Bend->setBounds (proportionOfWidth (0.4537f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label18->setBounds (proportionOfWidth (0.4375f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_Bloat->setBounds (proportionOfWidth (0.5012f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label19->setBounds (proportionOfWidth (0.4825f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_Level->setBounds (proportionOfWidth (0.1700f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
c_iconSelectAll->setBounds (proportionOfWidth (0.0050f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
- c_iconAddPos->setBounds (proportionOfWidth (0.0313f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
+ c_iconAddPos->setBounds (proportionOfWidth (0.0312f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_iconDelPos->setBounds (proportionOfWidth (0.0587f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_iconPaste->setBounds (proportionOfWidth (0.1525f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_iconDuplicate->setBounds (proportionOfWidth (0.0862f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
@@ -999,26 +999,26 @@ void VASTWaveTableEditorViewHeader::resized()
c_iconSinc->setBounds (((proportionOfWidth (0.7125f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f), proportionOfHeight (0.3125f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
c_iconReverse->setBounds (proportionOfWidth (0.9525f), proportionOfHeight (0.4896f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
c_iconInvert->setBounds (proportionOfWidth (0.9525f), proportionOfHeight (0.3125f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
- c_iconClearWT->setBounds (proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f), proportionOfHeight (0.0313f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
- c_iconLoadWT->setBounds (proportionOfWidth (0.0050f), proportionOfHeight (0.0313f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
+ c_iconClearWT->setBounds (proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f), proportionOfHeight (0.0312f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
+ c_iconLoadWT->setBounds (proportionOfWidth (0.0050f), proportionOfHeight (0.0312f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
c_iconArcConnect->setBounds (proportionOfWidth (1.0112f), proportionOfHeight (0.3125f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_iconRampConnect->setBounds (proportionOfWidth (1.0112f), proportionOfHeight (0.4896f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
- c_iconSave->setBounds ((proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f), proportionOfHeight (0.0313f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
- c_applyOptions->setBounds (proportionOfWidth (0.2650f), proportionOfHeight (0.7813f), proportionOfWidth (0.1400f), proportionOfHeight (0.1563f));
- c_generationOptions->setBounds (proportionOfWidth (0.4838f), proportionOfHeight (0.7813f), proportionOfWidth (0.1400f), proportionOfHeight (0.1563f));
+ c_iconSave->setBounds ((proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f), proportionOfHeight (0.0312f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
+ c_applyOptions->setBounds (proportionOfWidth (0.2650f), proportionOfHeight (0.7812f), proportionOfWidth (0.1400f), proportionOfHeight (0.1562f));
+ c_generationOptions->setBounds (proportionOfWidth (0.4838f), proportionOfHeight (0.7812f), proportionOfWidth (0.1400f), proportionOfHeight (0.1562f));
c_iconApply->setBounds (proportionOfWidth (0.4138f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_iconGenerate->setBounds (proportionOfWidth (0.6325f), proportionOfHeight (0.7708f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
c_Connect->setBounds (proportionOfWidth (0.6425f), proportionOfHeight (0.2292f), proportionOfWidth (0.0462f), proportionOfHeight (0.3750f));
label11->setBounds (proportionOfWidth (0.6300f), proportionOfHeight (0.5938f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
c_applyMax->setBounds (proportionOfWidth (0.4387f), proportionOfHeight (0.7500f), proportionOfWidth (0.0300f), proportionOfHeight (0.1875f));
- c_WTableNext->setBounds (proportionOfWidth (0.4500f), proportionOfHeight (0.0313f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
- c_WTablePrevious->setBounds (proportionOfWidth (0.4250f), proportionOfHeight (0.0313f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
+ c_WTableNext->setBounds (proportionOfWidth (0.4500f), proportionOfHeight (0.0312f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
+ c_WTablePrevious->setBounds (proportionOfWidth (0.4250f), proportionOfHeight (0.0312f), proportionOfWidth (0.0250f), proportionOfHeight (0.1771f));
label12->setBounds (proportionOfWidth (0.9275f), proportionOfHeight (0.0625f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
- c_soloSelection->setBounds (proportionOfWidth (0.9063f), proportionOfHeight (0.0417f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
- c_gridMode->setBounds (proportionOfWidth (0.8075f), proportionOfHeight (0.0521f), proportionOfWidth (0.0838f), proportionOfHeight (0.1563f));
- c_drawMode->setBounds (proportionOfWidth (0.7125f), proportionOfHeight (0.0521f), proportionOfWidth (0.0838f), proportionOfHeight (0.1563f));
- c_binMode->setBounds (proportionOfWidth (0.8075f), proportionOfHeight (0.7813f), proportionOfWidth (0.0838f), proportionOfHeight (0.1563f));
- c_binEditMode->setBounds (proportionOfWidth (0.7125f), proportionOfHeight (0.7813f), proportionOfWidth (0.0838f), proportionOfHeight (0.1563f));
+ c_soloSelection->setBounds (proportionOfWidth (0.9062f), proportionOfHeight (0.0417f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
+ c_gridMode->setBounds (proportionOfWidth (0.8075f), proportionOfHeight (0.0521f), proportionOfWidth (0.0838f), proportionOfHeight (0.1562f));
+ c_drawMode->setBounds (proportionOfWidth (0.7125f), proportionOfHeight (0.0521f), proportionOfWidth (0.0838f), proportionOfHeight (0.1562f));
+ c_binMode->setBounds (proportionOfWidth (0.8075f), proportionOfHeight (0.7812f), proportionOfWidth (0.0838f), proportionOfHeight (0.1562f));
+ c_binEditMode->setBounds (proportionOfWidth (0.7125f), proportionOfHeight (0.7812f), proportionOfWidth (0.0838f), proportionOfHeight (0.1562f));
c_iconSampleHold->setBounds ((((proportionOfWidth (0.7125f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f), proportionOfHeight (0.3125f), proportionOfWidth (0.0437f), proportionOfHeight (0.1771f));
c_positionLabel->setBounds (proportionOfWidth (0.6250f), proportionOfHeight (0.0625f), proportionOfWidth (0.0862f), proportionOfHeight (0.1250f));
label14->setBounds (proportionOfWidth (0.5025f), proportionOfHeight (0.0625f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
@@ -1026,7 +1026,7 @@ void VASTWaveTableEditorViewHeader::resized()
c_snap->setBounds (proportionOfWidth (0.4813f), proportionOfHeight (0.0417f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
c_stretch->setBounds (proportionOfWidth (0.5463f), proportionOfHeight (0.0417f), proportionOfWidth (0.0213f), proportionOfHeight (0.1771f));
label16->setBounds (proportionOfWidth (0.5663f), proportionOfHeight (0.0625f), proportionOfWidth (0.0775f), proportionOfHeight (0.1250f));
- c_iconRecordWT->setBounds (((proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f) - 2, proportionOfHeight (0.0313f), proportionOfWidth (0.0437f), juce::roundToInt (proportionOfHeight (0.1771f) * 1.0000f));
+ c_iconRecordWT->setBounds (((proportionOfWidth (0.0050f) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f)) + proportionOfWidth (0.0437f) - 2, proportionOfHeight (0.0312f), proportionOfWidth (0.0437f), juce::roundToInt (proportionOfHeight (0.1771f) * 1.0000f));
//[UserResized] Add your own custom resize handling here..
//c_editorOscilloscope->resized();
diff --git a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.h b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.h
index 55ae530..0c07a7b 100644
--- a/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.h
+++ b/VASTvaporizer/Source/Plugin/VASTWaveTableEditorViewHeader.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created with Projucer version: 6.1.2
+ Created with Projucer version: 7.0.9
------------------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 3ec370e..10fa79a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.4.5
\ No newline at end of file
+3.4.8
\ No newline at end of file