2020-06-13 10:56:20 +02:00
|
|
|
//
|
|
|
|
// Created by versustune on 09.06.20.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef VENO_VENOINSTANCE_H
|
|
|
|
#define VENO_VENOINSTANCE_H
|
|
|
|
|
|
|
|
#include "JuceHeader.h"
|
|
|
|
#include "Audio/Synth/SynthInstance.h"
|
|
|
|
#include "Utils/FFT.h"
|
|
|
|
#include "Audio/VenoBuffer.h"
|
2020-06-13 16:52:16 +02:00
|
|
|
#include "Audio/Engine/VenoMatrix.h"
|
2020-06-14 21:14:28 +02:00
|
|
|
#include "Core/VeNoState.h"
|
2020-06-13 10:56:20 +02:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2020-06-13 16:52:16 +02:00
|
|
|
class VenoInstance
|
|
|
|
{
|
2020-06-13 10:56:20 +02:00
|
|
|
private:
|
|
|
|
std::shared_ptr<SynthInstance> m_synthInstance;
|
|
|
|
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> instances;
|
|
|
|
std::string m_id;
|
|
|
|
public:
|
2020-06-13 16:52:16 +02:00
|
|
|
explicit VenoInstance (std::string id);
|
|
|
|
~VenoInstance ();
|
|
|
|
static std::shared_ptr<VenoInstance> createInstance (const std::string& id);
|
|
|
|
static std::shared_ptr<VenoInstance> getInstance (const std::string& id);
|
|
|
|
static void deleteInstance (const std::string& processId);
|
|
|
|
const std::shared_ptr<SynthInstance>& getSynthInstance () const;
|
2020-06-13 10:56:20 +02:00
|
|
|
FFT fft;
|
|
|
|
std::shared_ptr<VenoBuffer> audioBuffer;
|
2020-06-13 16:52:16 +02:00
|
|
|
VenoMatrix matrix{m_id}; //matrix need a own xml profile to save and restore!
|
2020-06-14 21:14:28 +02:00
|
|
|
VeNoState* state;
|
|
|
|
static std::unordered_map<std::string, std::shared_ptr<VenoInstance>> getAll ();
|
2020-06-13 10:56:20 +02:00
|
|
|
};
|
|
|
|
#endif //VENO_VENOINSTANCE_H
|