WIP
This commit is contained in:
parent
3fda15966c
commit
61482e8d4c
36 changed files with 325 additions and 122 deletions
|
@ -3,7 +3,7 @@
|
||||||
#include "Veno/Core/AudioConfig.h"
|
#include "Veno/Core/AudioConfig.h"
|
||||||
|
|
||||||
VenoAudioProcessor::VenoAudioProcessor ()
|
VenoAudioProcessor::VenoAudioProcessor ()
|
||||||
/*#ifndef JucePlugin_PreferredChannelConfigurations
|
#ifndef JucePlugin_PreferredChannelConfigurations
|
||||||
: AudioProcessor (BusesProperties()
|
: AudioProcessor (BusesProperties()
|
||||||
#if ! JucePlugin_IsMidiEffect
|
#if ! JucePlugin_IsMidiEffect
|
||||||
#if ! JucePlugin_IsSynth
|
#if ! JucePlugin_IsSynth
|
||||||
|
@ -12,17 +12,17 @@ VenoAudioProcessor::VenoAudioProcessor ()
|
||||||
.withOutput ("Output", AudioChannelSet::stereo(), true)
|
.withOutput ("Output", AudioChannelSet::stereo(), true)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
#endif*/
|
#endif
|
||||||
: AudioProcessor(BusesProperties().withInput("Input", AudioChannelSet::stereo(), true).withOutput("Output",
|
|
||||||
AudioChannelSet::stereo(),
|
|
||||||
true))
|
|
||||||
{
|
{
|
||||||
instance = VenoInstance::createInstance(m_id);
|
instance = VenoInstance::createInstance(m_id);
|
||||||
|
AudioConfig::registerInstance(m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
VenoAudioProcessor::~VenoAudioProcessor ()
|
VenoAudioProcessor::~VenoAudioProcessor ()
|
||||||
{
|
{
|
||||||
|
instance.reset();
|
||||||
VenoInstance::deleteInstance(m_id);
|
VenoInstance::deleteInstance(m_id);
|
||||||
|
AudioConfig::deleteInstance(m_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const String VenoAudioProcessor::getName () const
|
const String VenoAudioProcessor::getName () const
|
||||||
|
@ -129,7 +129,6 @@ void VenoAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& m
|
||||||
auto c = buffer.getReadPointer(i);
|
auto c = buffer.getReadPointer(i);
|
||||||
for (int j = 0; j < buffer.getNumSamples(); ++j)
|
for (int j = 0; j < buffer.getNumSamples(); ++j)
|
||||||
{
|
{
|
||||||
instance->fft.pushNextSampleIntoFifo(c[j]);
|
|
||||||
instance->audioBuffer->addMonoSample(c[j], j);
|
instance->audioBuffer->addMonoSample(c[j], j);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
{
|
{
|
||||||
|
@ -141,6 +140,7 @@ void VenoAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
instance->audioBuffer->calcPeak ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
@ -157,10 +157,19 @@ AudioProcessorEditor* VenoAudioProcessor::createEditor ()
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void VenoAudioProcessor::getStateInformation (MemoryBlock& destData)
|
void VenoAudioProcessor::getStateInformation (MemoryBlock& destData)
|
||||||
{
|
{
|
||||||
|
auto matrixXML = instance->matrix.saveMatrixToXML();
|
||||||
|
if (matrixXML != nullptr) {
|
||||||
|
copyXmlToBinary(*matrixXML, destData);
|
||||||
|
} else {
|
||||||
|
DBG("Sorry something went wrong! xml is nullptr");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VenoAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
void VenoAudioProcessor::setStateInformation (const void* data, int sizeInBytes)
|
||||||
{
|
{
|
||||||
|
std::unique_ptr<XmlElement> xmlState(getXmlFromBinary(data, sizeInBytes));
|
||||||
|
if (xmlState != nullptr)
|
||||||
|
instance->matrix.getMatrixFromXML(xmlState);
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioProcessor* JUCE_CALLTYPE createPluginFilter ()
|
AudioProcessor* JUCE_CALLTYPE createPluginFilter ()
|
||||||
|
|
|
@ -33,5 +33,5 @@ public:
|
||||||
std::string m_id = Uuid().toString().toStdString();
|
std::string m_id = Uuid().toString().toStdString();
|
||||||
std::shared_ptr<VenoInstance> instance;
|
std::shared_ptr<VenoInstance> instance;
|
||||||
private:
|
private:
|
||||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoAudioProcessor)
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoAudioProcessor);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
#version 330 core
|
#version 330 core
|
||||||
in vec4 newColor;
|
in vec4 newColor;
|
||||||
|
in vec4 newGradientColor;
|
||||||
|
in vec4 sPosition;
|
||||||
|
|
||||||
out vec4 fragColor;
|
out vec4 fragColor;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
fragColor = newColor;
|
if (newColor == newGradientColor) {
|
||||||
|
fragColor = newColor;
|
||||||
|
} else {
|
||||||
|
vec2 st = sPosition.xy;
|
||||||
|
float mixValue = distance(st, vec2(0, 0));
|
||||||
|
vec3 color = mix(newGradientColor.xyz, newColor.xyz, mixValue);
|
||||||
|
fragColor = vec4(color, mixValue);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,10 +1,15 @@
|
||||||
#version 330 core
|
#version 330 core
|
||||||
in vec4 position;
|
in vec4 position;
|
||||||
uniform vec4 color = vec4(1f, 1f, 1f, 1f);
|
uniform vec4 color = vec4(1f, 1f, 1f, 1f);
|
||||||
|
uniform vec4 gradientColor = vec4(1f, 1f, 1f, 1f);
|
||||||
|
|
||||||
out vec4 newColor;
|
out vec4 newColor;
|
||||||
|
out vec4 newGradientColor;
|
||||||
|
out vec4 sPosition;
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = position;
|
gl_Position = position;
|
||||||
newColor = color;
|
newColor = color;
|
||||||
|
newGradientColor = gradientColor;
|
||||||
|
sPosition = position;
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 62 KiB |
136
Source/Veno/Audio/Engine/VeNoMatrix.cpp
Normal file
136
Source/Veno/Audio/Engine/VeNoMatrix.cpp
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
//
|
||||||
|
// Created by versustune on 13.06.20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "VeNoMatrix.h"
|
||||||
|
#include "../../Utils/StringUtils.h"
|
||||||
|
|
||||||
|
VeNoMatrix::VeNoMatrix (const std::string& processId) : m_processId (processId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VeNoMatrix::~VeNoMatrix ()
|
||||||
|
{
|
||||||
|
for (auto& m_slot : m_slots)
|
||||||
|
{
|
||||||
|
delete m_slot.second;
|
||||||
|
m_slots.erase (m_slot.first);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& value : m_modulationValues)
|
||||||
|
{
|
||||||
|
delete value.second;
|
||||||
|
m_modulationValues.erase (value.first);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& value : m_modulators)
|
||||||
|
{
|
||||||
|
delete value.second;
|
||||||
|
m_modulators.erase (value.first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void VeNoMatrix::removeModulateValue (const std::string& name)
|
||||||
|
{
|
||||||
|
m_modulationValues.erase (name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VeNoMatrix::removeModulator (const std::string& name)
|
||||||
|
{
|
||||||
|
m_modulators.erase (name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VeNoMatrix::addModulateValue (const std::string& name, ModulateValue* modulateValue)
|
||||||
|
{
|
||||||
|
m_modulationValues.emplace (std::pair<const std::string&, ModulateValue*> (name, modulateValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
void VeNoMatrix::addModulator (const std::string& name, Modulator* modulator)
|
||||||
|
{
|
||||||
|
m_modulators.emplace (std::pair<const std::string&, Modulator*> (name, modulator));
|
||||||
|
}
|
||||||
|
|
||||||
|
//matrix is not in the valueTree-state is some own implementation!
|
||||||
|
void VeNoMatrix::updateSlots ()
|
||||||
|
{
|
||||||
|
for (auto& m_source : m_modulators)
|
||||||
|
{
|
||||||
|
m_source.second->update ();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& m_slot : m_slots)
|
||||||
|
{
|
||||||
|
auto source = m_modulators[m_slot.second->source];
|
||||||
|
auto value = m_modulationValues[m_slot.second->name];
|
||||||
|
auto amount = m_slot.second->amount;
|
||||||
|
value->addValue (source->getValue () * amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void VeNoMatrix::setMatrixModulation (const std::string& name, const std::string& source, float amount)
|
||||||
|
{
|
||||||
|
auto c = std::string (source + name);
|
||||||
|
if (m_slots.find (c) == m_slots.end ())
|
||||||
|
{
|
||||||
|
m_slots[c] = new VeNoMatrixTarget ();
|
||||||
|
m_slots[c]->source = source;
|
||||||
|
m_slots[c]->name = name;
|
||||||
|
}
|
||||||
|
m_slots[c]->amount = amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<XmlElement> VeNoMatrix::saveMatrixToXML ()
|
||||||
|
{
|
||||||
|
auto* tree = new ValueTree ();
|
||||||
|
for (auto& m_slot : m_slots)
|
||||||
|
{
|
||||||
|
std::string name = m_slot.second->source + m_slot.second->name;
|
||||||
|
tree->setProperty (String (name), String (m_slot.second->toString ()), nullptr);
|
||||||
|
}
|
||||||
|
auto xml = tree->createXml ();
|
||||||
|
delete tree;
|
||||||
|
return xml;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VeNoMatrix::getMatrixFromXML (std::unique_ptr<XmlElement>& xml)
|
||||||
|
{
|
||||||
|
// first we need to delete the state!
|
||||||
|
for (auto& m_slot : m_slots)
|
||||||
|
{
|
||||||
|
delete m_slot.second;
|
||||||
|
m_slots.erase (m_slot.first);
|
||||||
|
}
|
||||||
|
// recreate the matrix from xml...
|
||||||
|
auto tree = juce::ValueTree::fromXml (*xml);
|
||||||
|
for (int i = 0; i < tree.getNumChildren (); ++i)
|
||||||
|
{
|
||||||
|
auto name = tree.getPropertyName (i);
|
||||||
|
auto child = tree.getPropertyAsValue (name, nullptr);
|
||||||
|
auto slot = VeNoMatrixTarget::fromString (child.toString ().toStdString ());
|
||||||
|
if (slot != nullptr)
|
||||||
|
{
|
||||||
|
m_slots[name.toString ().toStdString ()] = slot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// crate a string to save to ValueTree-State
|
||||||
|
std::string VeNoMatrixTarget::toString () const
|
||||||
|
{
|
||||||
|
return std::string (source + "_#_" + name + "_#_" + std::to_string (amount));
|
||||||
|
}
|
||||||
|
|
||||||
|
// recreate from ValueTree-State... <3 is a very special format
|
||||||
|
VeNoMatrixTarget* VeNoMatrixTarget::fromString (const std::string& value)
|
||||||
|
{
|
||||||
|
auto out = VeNo::StringUtils::split (value, "_#_");
|
||||||
|
// if size is not 3 this is invalid! return nullptr!
|
||||||
|
if (out.size () == 3)
|
||||||
|
{
|
||||||
|
auto returnValue = new VeNoMatrixTarget ();
|
||||||
|
returnValue->source = out[0];
|
||||||
|
returnValue->name = out[1];
|
||||||
|
returnValue->amount = std::atof (out[2].c_str ());
|
||||||
|
return new VeNoMatrixTarget ();
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
|
@ -10,33 +10,39 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "Modulator.h"
|
#include "Modulator.h"
|
||||||
#include "ModulateValue.h"
|
#include "ModulateValue.h"
|
||||||
|
#include "JuceHeader.h"
|
||||||
|
|
||||||
// class that modulate everything :D
|
// class that modulate everything :D
|
||||||
struct VenoMatrixTarget
|
struct VeNoMatrixTarget
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
|
std::string source;
|
||||||
float amount = 0; // always 0 to 1 <-- apply amount to modulator
|
float amount = 0; // always 0 to 1 <-- apply amount to modulator
|
||||||
|
std::string toString() const;
|
||||||
|
static VeNoMatrixTarget* fromString(const std::string& value);
|
||||||
};
|
};
|
||||||
struct VenoMatrixSlot
|
|
||||||
{
|
//@todo rebuild to new unlimited implementation!
|
||||||
std::string sourceName;
|
// and make compatible with the value class that is used for saving and sync the ValueTree...
|
||||||
VenoMatrixTarget targets[8];
|
class VeNoMatrix
|
||||||
};
|
|
||||||
class VenoMatrix
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit VenoMatrix (const std::string& processId);
|
explicit VeNoMatrix (const std::string& processId);
|
||||||
~VenoMatrix ();
|
~VeNoMatrix ();
|
||||||
void updateSlots ();
|
void updateSlots ();
|
||||||
void addModulator (const std::string& name, Modulator* modulator);
|
void addModulator (const std::string& name, Modulator* modulator);
|
||||||
void addModulateValue (const std::string& name, ModulateValue* modulateValue);
|
void addModulateValue (const std::string& name, ModulateValue* modulateValue);
|
||||||
void removeModulator (const std::string& name);
|
void removeModulator (const std::string& name);
|
||||||
void removeModulateValue (const std::string& name);
|
void removeModulateValue (const std::string& name);
|
||||||
VenoMatrixSlot* getSlotById (int id);
|
void setMatrixModulation(const std::string& name, const std::string& source, float amount);
|
||||||
|
std::unique_ptr<XmlElement> saveMatrixToXML();
|
||||||
|
void getMatrixFromXML(std::unique_ptr<XmlElement>& xml);
|
||||||
private:
|
private:
|
||||||
std::unordered_map<std::string, Modulator*> m_modulators; //all sources
|
std::unordered_map<std::string, Modulator*> m_modulators; //all sources
|
||||||
std::unordered_map<std::string, ModulateValue*> m_modulationValues;
|
std::unordered_map<std::string, ModulateValue*> m_modulationValues;
|
||||||
VenoMatrixSlot* m_slots[8]{}; // 8 source slots
|
std::unordered_map<std::string, VeNoMatrixTarget*> m_slots;
|
||||||
std::string m_processId;
|
std::string m_processId;
|
||||||
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VeNoMatrix)
|
||||||
};
|
};
|
||||||
#endif //VENO_VENOMATRIX_H
|
#endif //VENO_VENOMATRIX_H
|
|
@ -1,81 +0,0 @@
|
||||||
//
|
|
||||||
// Created by versustune on 13.06.20.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "VenoMatrix.h"
|
|
||||||
|
|
||||||
VenoMatrix::VenoMatrix (const std::string& processId) : m_processId(processId)
|
|
||||||
{
|
|
||||||
for (auto& m_slot : m_slots)
|
|
||||||
{
|
|
||||||
m_slot = new VenoMatrixSlot();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VenoMatrix::~VenoMatrix ()
|
|
||||||
{
|
|
||||||
for (auto& m_slot : m_slots)
|
|
||||||
{
|
|
||||||
delete m_slot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VenoMatrixSlot* VenoMatrix::getSlotById (int id)
|
|
||||||
{
|
|
||||||
return m_slots[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
void VenoMatrix::removeModulateValue (const std::string& name)
|
|
||||||
{
|
|
||||||
m_modulationValues.erase(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VenoMatrix::removeModulator (const std::string& name)
|
|
||||||
{
|
|
||||||
m_modulators.erase(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
void VenoMatrix::addModulateValue (const std::string& name, ModulateValue* modulateValue)
|
|
||||||
{
|
|
||||||
m_modulationValues.emplace(std::pair<const std::string&, ModulateValue*>(name, modulateValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
void VenoMatrix::addModulator (const std::string& name, Modulator* modulator)
|
|
||||||
{
|
|
||||||
m_modulators.emplace(std::pair<const std::string&, Modulator*>(name, modulator));
|
|
||||||
}
|
|
||||||
|
|
||||||
void VenoMatrix::updateSlots ()
|
|
||||||
{
|
|
||||||
for (auto& m_slot : m_slots)
|
|
||||||
{
|
|
||||||
if (m_slot->sourceName == "none")
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (m_modulators.find(m_slot->sourceName) != m_modulators.end())
|
|
||||||
{
|
|
||||||
auto modulator = m_modulators[m_slot->sourceName];
|
|
||||||
if (modulator == nullptr)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
modulator->update();
|
|
||||||
for (auto& value : m_slot->targets)
|
|
||||||
{
|
|
||||||
if (value.name != "none")
|
|
||||||
{
|
|
||||||
if (m_modulationValues.find(value.name) != m_modulationValues.end())
|
|
||||||
{
|
|
||||||
auto modValue = m_modulationValues[value.name];
|
|
||||||
if (modValue == nullptr)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
modValue->addValue(modulator->getValue() * value.amount);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,6 +6,7 @@
|
||||||
#define VENO_SYNTHINSTANCE_H
|
#define VENO_SYNTHINSTANCE_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "JuceHeader.h"
|
||||||
|
|
||||||
// class that hold all voices, oscillators and other stuff :)
|
// class that hold all voices, oscillators and other stuff :)
|
||||||
class SynthInstance
|
class SynthInstance
|
||||||
|
@ -16,5 +17,6 @@ public:
|
||||||
explicit SynthInstance (std::string processId);
|
explicit SynthInstance (std::string processId);
|
||||||
~SynthInstance () = default;
|
~SynthInstance () = default;
|
||||||
protected:
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SynthInstance)
|
||||||
};
|
};
|
||||||
#endif //VENO_SYNTHINSTANCE_H
|
#endif //VENO_SYNTHINSTANCE_H
|
||||||
|
|
|
@ -33,9 +33,9 @@ void VenoBuffer::reset (int size)
|
||||||
left[i] = 0;
|
left[i] = 0;
|
||||||
right[i] = 0;
|
right[i] = 0;
|
||||||
}
|
}
|
||||||
leftPeak = 0;
|
leftPeak = -30;
|
||||||
rightPeak = 0;
|
rightPeak = -30;
|
||||||
monoPeak = 0;
|
monoPeak = -30;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VenoBuffer::addMonoSample (float value, int index)
|
void VenoBuffer::addMonoSample (float value, int index)
|
||||||
|
@ -55,10 +55,6 @@ void VenoBuffer::addRightSample (float value, int index)
|
||||||
|
|
||||||
void VenoBuffer::calcPeak ()
|
void VenoBuffer::calcPeak ()
|
||||||
{
|
{
|
||||||
if (monoPeak != 0 && rightPeak != 0 && leftPeak != 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
float leftRMS = 0;
|
float leftRMS = 0;
|
||||||
float rightRMS = 0;
|
float rightRMS = 0;
|
||||||
auto size = buffer.size();
|
auto size = buffer.size();
|
||||||
|
@ -70,7 +66,6 @@ void VenoBuffer::calcPeak ()
|
||||||
rightPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (rightRMS / size), -30.0f), -30.0f, 0.0f);
|
rightPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (rightRMS / size), -30.0f), -30.0f, 0.0f);
|
||||||
leftPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (leftRMS / size), -30.0f), -30.0f, 0.0f);
|
leftPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (std::sqrt (leftRMS / size), -30.0f), -30.0f, 0.0f);
|
||||||
monoPeak = leftPeak;
|
monoPeak = leftPeak;
|
||||||
//monoPeak = VeNo::Utils::clamp (Decibels::gainToDecibels (monoPeak, -70.0f), -70.0f, 0.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<float>& VenoBuffer::getBuffer () const
|
const std::vector<float>& VenoBuffer::getBuffer () const
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#define VENO_VENOBUFFER_H
|
#define VENO_VENOBUFFER_H
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "JuceHeader.h"
|
||||||
|
|
||||||
class VenoBuffer
|
class VenoBuffer
|
||||||
{
|
{
|
||||||
|
@ -27,5 +28,7 @@ public:
|
||||||
const std::vector<float>& getBuffer () const;
|
const std::vector<float>& getBuffer () const;
|
||||||
const std::vector<float>& getRight () const;
|
const std::vector<float>& getRight () const;
|
||||||
const std::vector<float>& getLeft () const;
|
const std::vector<float>& getLeft () const;
|
||||||
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoBuffer);
|
||||||
};
|
};
|
||||||
#endif //VENO_VENOBUFFER_H
|
#endif //VENO_VENOBUFFER_H
|
||||||
|
|
|
@ -48,6 +48,13 @@ void WaveTableGenerator::cleanTables ()
|
||||||
{
|
{
|
||||||
for (auto& m_waveTable : m_waveTables)
|
for (auto& m_waveTable : m_waveTables)
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < numWaveTableSlots; ++i)
|
||||||
|
{
|
||||||
|
if (m_waveTable != nullptr && m_waveTable->m_WaveTables[i] != nullptr) {
|
||||||
|
delete[] m_waveTable->m_WaveTables[i]->m_waveTable;
|
||||||
|
delete m_waveTable->m_WaveTables[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
delete m_waveTable;
|
delete m_waveTable;
|
||||||
}
|
}
|
||||||
m_isInit = false;
|
m_isInit = false;
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
|
|
||||||
#ifndef VENO_WAVETABLEGENERATOR_H
|
#ifndef VENO_WAVETABLEGENERATOR_H
|
||||||
#define VENO_WAVETABLEGENERATOR_H
|
#define VENO_WAVETABLEGENERATOR_H
|
||||||
|
|
||||||
|
#include "JuceHeader.h"
|
||||||
|
|
||||||
struct WaveTableObject
|
struct WaveTableObject
|
||||||
{
|
{
|
||||||
double m_topFreq;
|
double m_topFreq;
|
||||||
|
@ -47,5 +50,6 @@ protected:
|
||||||
bool m_isInit = false;
|
bool m_isInit = false;
|
||||||
WaveTableGenerator () = default;
|
WaveTableGenerator () = default;
|
||||||
~WaveTableGenerator () = default;
|
~WaveTableGenerator () = default;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WaveTableGenerator)
|
||||||
};
|
};
|
||||||
#endif //VENO_WAVETABLEGENERATOR_H
|
#endif //VENO_WAVETABLEGENERATOR_H
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include "../Audio/WaveTable/WaveTableGenerator.h"
|
#include "../Audio/WaveTable/WaveTableGenerator.h"
|
||||||
|
|
||||||
std::shared_ptr<AudioConfig> AudioConfig::m_instance;
|
std::shared_ptr<AudioConfig> AudioConfig::m_instance;
|
||||||
|
std::unordered_map<std::string, std::string> AudioConfig::m_instances;
|
||||||
|
|
||||||
float AudioConfig::getSampleRate ()
|
float AudioConfig::getSampleRate ()
|
||||||
{
|
{
|
||||||
|
@ -43,16 +44,35 @@ void AudioConfig::setNeedToReInit (bool _needToReInit)
|
||||||
std::shared_ptr<AudioConfig> AudioConfig::getInstance ()
|
std::shared_ptr<AudioConfig> AudioConfig::getInstance ()
|
||||||
{
|
{
|
||||||
if (AudioConfig::m_instance == nullptr)
|
if (AudioConfig::m_instance == nullptr)
|
||||||
AudioConfig::m_instance = std::make_shared<AudioConfig>();
|
AudioConfig::m_instance = std::make_shared<AudioConfig> ();
|
||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioConfig::initWaveTables ()
|
void AudioConfig::initWaveTables ()
|
||||||
{
|
{
|
||||||
WaveTableGenerator::getInstance().init();
|
WaveTableGenerator::getInstance ().init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioConfig::~AudioConfig ()
|
AudioConfig::~AudioConfig ()
|
||||||
{
|
{
|
||||||
WaveTableGenerator::getInstance().cleanTables();
|
WaveTableGenerator::getInstance ().cleanTables ();
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioConfig::AudioConfig ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudioConfig::registerInstance (std::string id)
|
||||||
|
{
|
||||||
|
m_instances[id] = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AudioConfig::deleteInstance (std::string id)
|
||||||
|
{
|
||||||
|
m_instances.erase (id);
|
||||||
|
if (m_instances.size () == 0)
|
||||||
|
{
|
||||||
|
m_instance.reset ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ private:
|
||||||
float m_sampleRate = 44100;
|
float m_sampleRate = 44100;
|
||||||
float m_bufferSize = 512; //maybe we need that... but this will update always!
|
float m_bufferSize = 512; //maybe we need that... but this will update always!
|
||||||
bool m_needToReInit = false; //this is to reInit the Oscillators, ADSR and other stuff
|
bool m_needToReInit = false; //this is to reInit the Oscillators, ADSR and other stuff
|
||||||
|
static std::unordered_map<std::string, std::string> m_instances;
|
||||||
public:
|
public:
|
||||||
static std::shared_ptr<AudioConfig> getInstance ();
|
static std::shared_ptr<AudioConfig> getInstance ();
|
||||||
float getSampleRate ();
|
float getSampleRate ();
|
||||||
|
@ -26,7 +27,11 @@ public:
|
||||||
bool isNeedToReInit () const;
|
bool isNeedToReInit () const;
|
||||||
void setNeedToReInit (bool _needToReInit);
|
void setNeedToReInit (bool _needToReInit);
|
||||||
static void initWaveTables ();
|
static void initWaveTables ();
|
||||||
|
AudioConfig();
|
||||||
~AudioConfig ();
|
~AudioConfig ();
|
||||||
|
static void registerInstance (std::string id);
|
||||||
|
static void deleteInstance (std::string id);
|
||||||
protected:
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioConfig);
|
||||||
};
|
};
|
||||||
#endif //VENO_AUDIOCONFIG_H
|
#endif //VENO_AUDIOCONFIG_H
|
||||||
|
|
|
@ -41,5 +41,6 @@ public:
|
||||||
void repaintAll();
|
void repaintAll();
|
||||||
protected:
|
protected:
|
||||||
void initConfig ();
|
void initConfig ();
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Config);
|
||||||
};
|
};
|
||||||
#endif //VENO_CONFIG_H
|
#endif //VENO_CONFIG_H
|
||||||
|
|
|
@ -12,6 +12,7 @@ class VeNoState
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
std::string m_pid = "";
|
std::string m_pid = "";
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VeNoState);
|
||||||
public:
|
public:
|
||||||
VeNoState(std::string pid);
|
VeNoState(std::string pid);
|
||||||
~VeNoState();
|
~VeNoState();
|
||||||
|
|
|
@ -27,7 +27,9 @@ VenoFonts* VenoFonts::getInstance ()
|
||||||
|
|
||||||
void VenoFonts::destroyAll ()
|
void VenoFonts::destroyAll ()
|
||||||
{
|
{
|
||||||
delete instance;
|
if (instance != nullptr) {
|
||||||
|
delete instance;
|
||||||
|
}
|
||||||
instance = nullptr;
|
instance = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,4 +45,6 @@ VenoFonts::~VenoFonts ()
|
||||||
{
|
{
|
||||||
delete arvo;
|
delete arvo;
|
||||||
delete lcdFont;
|
delete lcdFont;
|
||||||
|
arvo = nullptr;
|
||||||
|
lcdFont = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ protected:
|
||||||
static VenoFonts* instance;
|
static VenoFonts* instance;
|
||||||
Font* lcdFont;
|
Font* lcdFont;
|
||||||
Font* arvo;
|
Font* arvo;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoFonts)
|
||||||
public:
|
public:
|
||||||
VenoFonts ();
|
VenoFonts ();
|
||||||
~VenoFonts ();
|
~VenoFonts ();
|
||||||
|
|
|
@ -29,5 +29,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
std::string m_processId;
|
std::string m_processId;
|
||||||
std::shared_ptr<LabelComponent> m_label;
|
std::shared_ptr<LabelComponent> m_label;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BaseComponent);
|
||||||
};
|
};
|
||||||
#endif //VENO_BASECOMPONENT_H
|
#endif //VENO_BASECOMPONENT_H
|
||||||
|
|
|
@ -24,5 +24,6 @@ protected:
|
||||||
void drawHeadline (Graphics& g);
|
void drawHeadline (Graphics& g);
|
||||||
void drawFooter (Graphics& g);
|
void drawFooter (Graphics& g);
|
||||||
std::unique_ptr<Waveforms> waveform;
|
std::unique_ptr<Waveforms> waveform;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SidebarLCD);
|
||||||
};
|
};
|
||||||
#endif //VENO_SIDEBARLCD_H
|
#endif //VENO_SIDEBARLCD_H
|
||||||
|
|
|
@ -63,6 +63,9 @@ void Waveforms::renderOpenGL ()
|
||||||
auto color = theme->getColour (ThemeColour::lcd);
|
auto color = theme->getColour (ThemeColour::lcd);
|
||||||
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||||
color.getFloatAlpha ());
|
color.getFloatAlpha ());
|
||||||
|
// same color currently! will set to a diff if peak is detected!
|
||||||
|
shaderProgram->setUniform ("gradientColor", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||||
|
color.getFloatAlpha ());
|
||||||
if (m_isWelcome || m_isStarting || m_isChangingData)
|
if (m_isWelcome || m_isStarting || m_isChangingData)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -92,6 +95,8 @@ void Waveforms::compileOpenGLShaderProgram ()
|
||||||
&& shaderProgramAttempt->link ())
|
&& shaderProgramAttempt->link ())
|
||||||
{
|
{
|
||||||
shaderProgram = std::move (shaderProgramAttempt);
|
shaderProgram = std::move (shaderProgramAttempt);
|
||||||
|
} else {
|
||||||
|
DBG(shaderProgramAttempt->getLastError().toStdString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,10 +149,17 @@ void Waveforms::drawAudioOutput ()
|
||||||
glBegin (GL_LINE_STRIP);
|
glBegin (GL_LINE_STRIP);
|
||||||
float posX = -1;
|
float posX = -1;
|
||||||
float inc = 2.0f / buffer.size ();
|
float inc = 2.0f / buffer.size ();
|
||||||
for (float i : buffer)
|
for (int j = 0; j < buffer.size(); ++j)
|
||||||
{
|
{
|
||||||
glVertex2f (posX, i);
|
try
|
||||||
posX += inc;
|
{
|
||||||
|
glVertex2f (posX, buffer.at(j));
|
||||||
|
posX += inc;
|
||||||
|
} catch (_exception e)
|
||||||
|
{
|
||||||
|
//something is wrong skip the draw and end it!
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
glEnd ();
|
glEnd ();
|
||||||
}
|
}
|
||||||
|
@ -160,7 +172,6 @@ void Waveforms::drawPeakMeter ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
|
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
|
||||||
instance->audioBuffer->calcPeak ();
|
|
||||||
repaint();
|
repaint();
|
||||||
// draw peak signal
|
// draw peak signal
|
||||||
auto leftChannel = getdBForChannel (instance->audioBuffer->leftPeak);
|
auto leftChannel = getdBForChannel (instance->audioBuffer->leftPeak);
|
||||||
|
@ -276,6 +287,8 @@ void Waveforms::selectColourByPeak (float value)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto color = theme->getColour (ThemeColour::lcd);
|
auto color = theme->getColour (ThemeColour::lcd);
|
||||||
|
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||||
|
color.getFloatAlpha ());
|
||||||
if (value > 0.87)
|
if (value > 0.87)
|
||||||
{
|
{
|
||||||
color = theme->getColour (ThemeColour::clip);
|
color = theme->getColour (ThemeColour::clip);
|
||||||
|
@ -284,7 +297,7 @@ void Waveforms::selectColourByPeak (float value)
|
||||||
{
|
{
|
||||||
color = theme->getColour (ThemeColour::warning);
|
color = theme->getColour (ThemeColour::warning);
|
||||||
}
|
}
|
||||||
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
shaderProgram->setUniform ("gradientColor", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||||
color.getFloatAlpha ());
|
color.getFloatAlpha ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ protected:
|
||||||
int m_time_needed_startup = 0;
|
int m_time_needed_startup = 0;
|
||||||
int m_time_needed = 0;
|
int m_time_needed = 0;
|
||||||
bool needToClear = false;
|
bool needToClear = false;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Waveforms);
|
||||||
public:
|
public:
|
||||||
explicit Waveforms (const std::string& processId);
|
explicit Waveforms (const std::string& processId);
|
||||||
~Waveforms () override;
|
~Waveforms () override;
|
||||||
|
|
|
@ -38,6 +38,7 @@ ConfigComponent::~ConfigComponent ()
|
||||||
color.reset();
|
color.reset();
|
||||||
}
|
}
|
||||||
m_colors.clear();
|
m_colors.clear();
|
||||||
|
m_preColours.reset(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeColour ConfigComponent::getColorForId (int id)
|
ThemeColour ConfigComponent::getColorForId (int id)
|
||||||
|
|
|
@ -18,6 +18,8 @@ Sidebar::~Sidebar ()
|
||||||
{
|
{
|
||||||
m_lcd.reset(nullptr);
|
m_lcd.reset(nullptr);
|
||||||
m_configButton.reset(nullptr);
|
m_configButton.reset(nullptr);
|
||||||
|
m_mixer.reset(nullptr);
|
||||||
|
VenoLogo::deleteInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sidebar::resized ()
|
void Sidebar::resized ()
|
||||||
|
|
|
@ -23,5 +23,6 @@ protected:
|
||||||
std::unique_ptr<SidebarLCD> m_lcd;
|
std::unique_ptr<SidebarLCD> m_lcd;
|
||||||
std::unique_ptr<SidebarMixer> m_mixer;
|
std::unique_ptr<SidebarMixer> m_mixer;
|
||||||
std::unique_ptr<VenoConfigButton> m_configButton;
|
std::unique_ptr<VenoConfigButton> m_configButton;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Sidebar)
|
||||||
};
|
};
|
||||||
#endif //VENO_SIDEBAR_H
|
#endif //VENO_SIDEBAR_H
|
||||||
|
|
|
@ -18,5 +18,7 @@ public:
|
||||||
static void deleteInstance ();
|
static void deleteInstance ();
|
||||||
VenoLogo ();
|
VenoLogo ();
|
||||||
~VenoLogo () = default;
|
~VenoLogo () = default;
|
||||||
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoLogo)
|
||||||
};
|
};
|
||||||
#endif //VENO_VENOLOGO_H
|
#endif //VENO_VENOLOGO_H
|
||||||
|
|
|
@ -11,6 +11,8 @@ class FlatLook : public LookAndFeel_V4
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
public:
|
public:
|
||||||
|
FlatLook() = default;
|
||||||
|
~FlatLook() override = default;
|
||||||
void drawButtonBackground (Graphics& graphics, Button& button, const Colour& backgroundColour,
|
void drawButtonBackground (Graphics& graphics, Button& button, const Colour& backgroundColour,
|
||||||
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
|
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown) override;
|
||||||
|
|
||||||
|
@ -29,5 +31,6 @@ public:
|
||||||
int buttonH, ComboBox &box) override;
|
int buttonH, ComboBox &box) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlatLook);
|
||||||
};
|
};
|
||||||
#endif //VENO_FLATLOOK_H
|
#endif //VENO_FLATLOOK_H
|
||||||
|
|
|
@ -15,6 +15,7 @@ LookHandler::~LookHandler ()
|
||||||
//delete this shit!
|
//delete this shit!
|
||||||
delete m_feels[0];
|
delete m_feels[0];
|
||||||
delete m_feels[1];
|
delete m_feels[1];
|
||||||
|
m_look.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LookHandler::selectLook (int index)
|
void LookHandler::selectLook (int index)
|
||||||
|
|
|
@ -26,5 +26,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
//currently both available themes are CrazyLook <-- (this is a fun one xD) and FlatLook
|
//currently both available themes are CrazyLook <-- (this is a fun one xD) and FlatLook
|
||||||
LookAndFeel_V4* m_feels[2] = {new FlatLook(), new CrazyLook()};
|
LookAndFeel_V4* m_feels[2] = {new FlatLook(), new CrazyLook()};
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookHandler);
|
||||||
};
|
};
|
||||||
#endif //VENO_LOOKHANDLER_H
|
#endif //VENO_LOOKHANDLER_H
|
||||||
|
|
|
@ -27,5 +27,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
std::map<ThemeColour, Colour*> m_colours;
|
std::map<ThemeColour, Colour*> m_colours;
|
||||||
std::shared_ptr<PropertiesFile> m_configFile;
|
std::shared_ptr<PropertiesFile> m_configFile;
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Theme);
|
||||||
};
|
};
|
||||||
#endif //VENO_THEME_H
|
#endif //VENO_THEME_H
|
||||||
|
|
|
@ -3,11 +3,13 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
#include "JuceHeader.h"
|
||||||
|
|
||||||
void VeNo::Logger::debugMessage (const std::string& message)
|
void VeNo::Logger::debugMessage (const std::string& message)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::cout << "\u001b[38;5;172m[DEBUG]\u001b[0m\t" << message << "\n";
|
std::cout << "\u001b[38;5;172m[DEBUG]\u001b[0m\t" << message << "\n";
|
||||||
|
DBG("\u001b[38;5;172m[DEBUG]\u001b[0m\t" + message + "\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
Source/Veno/Utils/StringUtils.cpp
Normal file
20
Source/Veno/Utils/StringUtils.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
//
|
||||||
|
// Created by Maurice on 08.07.2020.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "StringUtils.h"
|
||||||
|
|
||||||
|
std::vector<std::string> VeNo::StringUtils::split (std::string input, std::string separator)
|
||||||
|
{
|
||||||
|
std::vector<std::string> result;
|
||||||
|
std::string_view::size_type position, start = 0;
|
||||||
|
|
||||||
|
while (std::string_view::npos != (position = input.find (separator, start)))
|
||||||
|
{
|
||||||
|
result.push_back (input.substr (start, position - start));
|
||||||
|
start = position + separator.size ();
|
||||||
|
}
|
||||||
|
|
||||||
|
result.push_back (input.substr (start));
|
||||||
|
return result;
|
||||||
|
}
|
22
Source/Veno/Utils/StringUtils.h
Normal file
22
Source/Veno/Utils/StringUtils.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
//
|
||||||
|
// Created by Maurice on 08.07.2020.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef VENO_STRINGUTILS_H
|
||||||
|
#define VENO_STRINGUTILS_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace VeNo
|
||||||
|
{
|
||||||
|
class StringUtils
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static std::vector<std::string> split (std::string input, std::string separator = " ");
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif //VENO_STRINGUTILS_H
|
|
@ -9,7 +9,7 @@
|
||||||
#include "Audio/Synth/SynthInstance.h"
|
#include "Audio/Synth/SynthInstance.h"
|
||||||
#include "Utils/FFT.h"
|
#include "Utils/FFT.h"
|
||||||
#include "Audio/VenoBuffer.h"
|
#include "Audio/VenoBuffer.h"
|
||||||
#include "Audio/Engine/VenoMatrix.h"
|
#include "Audio/Engine/VeNoMatrix.h"
|
||||||
#include "Core/VeNoState.h"
|
#include "Core/VeNoState.h"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
@ -26,10 +26,11 @@ public:
|
||||||
static std::shared_ptr<VenoInstance> getInstance (const std::string& id);
|
static std::shared_ptr<VenoInstance> getInstance (const std::string& id);
|
||||||
static void deleteInstance (const std::string& processId);
|
static void deleteInstance (const std::string& processId);
|
||||||
const std::shared_ptr<SynthInstance>& getSynthInstance () const;
|
const std::shared_ptr<SynthInstance>& getSynthInstance () const;
|
||||||
FFT fft;
|
|
||||||
std::shared_ptr<VenoBuffer> audioBuffer;
|
std::shared_ptr<VenoBuffer> audioBuffer;
|
||||||
VenoMatrix matrix{m_id}; //matrix need a own xml profile to save and restore!
|
VeNoMatrix matrix{m_id}; //matrix need a own xml profile to save and restore!
|
||||||
VeNoState* state;
|
VeNoState* state;
|
||||||
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> getAll ();
|
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> getAll ();
|
||||||
|
protected:
|
||||||
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VenoInstance);
|
||||||
};
|
};
|
||||||
#endif //VENO_VENOINSTANCE_H
|
#endif //VENO_VENOINSTANCE_H
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
<FILE id="McoT9E" name="FFT.h" compile="0" resource="0" file="Source/Veno/Utils/FFT.h"/>
|
<FILE id="McoT9E" name="FFT.h" compile="0" resource="0" file="Source/Veno/Utils/FFT.h"/>
|
||||||
<FILE id="fnGWyM" name="Logger.cpp" compile="1" resource="0" file="Source/Veno/Utils/Logger.cpp"/>
|
<FILE id="fnGWyM" name="Logger.cpp" compile="1" resource="0" file="Source/Veno/Utils/Logger.cpp"/>
|
||||||
<FILE id="wYGzZw" name="Logger.h" compile="0" resource="0" file="Source/Veno/Utils/Logger.h"/>
|
<FILE id="wYGzZw" name="Logger.h" compile="0" resource="0" file="Source/Veno/Utils/Logger.h"/>
|
||||||
|
<FILE id="xJwmEr" name="StringUtils.cpp" compile="1" resource="0" file="Source/Veno/Utils/StringUtils.cpp"/>
|
||||||
|
<FILE id="C21Iyn" name="StringUtils.h" compile="0" resource="0" file="Source/Veno/Utils/StringUtils.h"/>
|
||||||
</GROUP>
|
</GROUP>
|
||||||
<FILE id="XtqjAL" name="VenoInstance.h" compile="0" resource="0" file="Source/Veno/VenoInstance.h"/>
|
<FILE id="XtqjAL" name="VenoInstance.h" compile="0" resource="0" file="Source/Veno/VenoInstance.h"/>
|
||||||
<FILE id="LItgbD" name="VenoInstance.cpp" compile="1" resource="0"
|
<FILE id="LItgbD" name="VenoInstance.cpp" compile="1" resource="0"
|
||||||
|
@ -42,8 +44,8 @@
|
||||||
<FILE id="Tpzeeh" name="ModulateValue.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/ModulateValue.h"/>
|
<FILE id="Tpzeeh" name="ModulateValue.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/ModulateValue.h"/>
|
||||||
<FILE id="dB1Djv" name="Modulator.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/Modulator.cpp"/>
|
<FILE id="dB1Djv" name="Modulator.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/Modulator.cpp"/>
|
||||||
<FILE id="eA6ftc" name="Modulator.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/Modulator.h"/>
|
<FILE id="eA6ftc" name="Modulator.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/Modulator.h"/>
|
||||||
<FILE id="rkTKQ1" name="VenoMatrix.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/VenoMatrix.cpp"/>
|
<FILE id="rkTKQ1" name="VeNoMatrix.cpp" compile="1" resource="0" file="Source/Veno/Audio/Engine/VeNoMatrix.cpp"/>
|
||||||
<FILE id="v4AuOK" name="VenoMatrix.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/VenoMatrix.h"/>
|
<FILE id="v4AuOK" name="VeNoMatrix.h" compile="0" resource="0" file="Source/Veno/Audio/Engine/VeNoMatrix.h"/>
|
||||||
</GROUP>
|
</GROUP>
|
||||||
<FILE id="tHbIrz" name="VenoBuffer.cpp" compile="1" resource="0" file="Source/Veno/Audio/VenoBuffer.cpp"/>
|
<FILE id="tHbIrz" name="VenoBuffer.cpp" compile="1" resource="0" file="Source/Veno/Audio/VenoBuffer.cpp"/>
|
||||||
<FILE id="ufeJaH" name="VenoBuffer.h" compile="0" resource="0" file="Source/Veno/Audio/VenoBuffer.h"/>
|
<FILE id="ufeJaH" name="VenoBuffer.h" compile="0" resource="0" file="Source/Veno/Audio/VenoBuffer.h"/>
|
||||||
|
|
Loading…
Reference in a new issue