feat: parse patch files from json
This commit is contained in:
@@ -18,9 +18,10 @@ class Application {
|
||||
void InitAudio();
|
||||
void UpdateOnNoteInput();
|
||||
void PlayBufferedAudio();
|
||||
|
||||
|
||||
public:
|
||||
Application(/* args */);
|
||||
~Application();
|
||||
void Run();
|
||||
void ParsePatch(std::string file_path);
|
||||
};
|
||||
|
||||
@@ -29,6 +29,7 @@ class Oscillator {
|
||||
~Oscillator();
|
||||
OscillatorType GetType() { return m_osc; }
|
||||
void SetType(OscillatorType osc);
|
||||
void SetType(std::string const& osc_name);
|
||||
float GetVolume() { return m_volume; }
|
||||
void SetVolume(float volume) { m_volume = volume; }
|
||||
float GetKey() { return m_key; }
|
||||
|
||||
@@ -17,6 +17,7 @@ class Synth {
|
||||
std::vector<IEffect*> m_effects;
|
||||
std::vector<float> m_out_signal;
|
||||
LFO* m_lfo;
|
||||
float m_lfo_level;
|
||||
void ZeroSignal();
|
||||
void GetNote();
|
||||
void TriggerNoteOnEffects();
|
||||
@@ -36,5 +37,8 @@ class Synth {
|
||||
const bool& GetIsNoteTriggered() { return is_note_triggered; }
|
||||
ADSR* GetADSR() { return (ADSR*)m_effects[0]; }
|
||||
Filter* GetFilter() { return (Filter*)m_effects[1]; }
|
||||
LFO* GetLFO() { return m_lfo; }
|
||||
const float& GetLFOLevel() { return m_lfo_level; }
|
||||
void SetLFOLevel(float lvl) { assert(0.f >= lvl <= 1.f); m_lfo_level = lvl; }
|
||||
void SetFilter(FilterType type);
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "OscillatorType.h"
|
||||
#include "raygui.h"
|
||||
#include "raysan/raygui.h"
|
||||
#include <vector>
|
||||
#include "Filter.h"
|
||||
|
||||
|
||||
24765
inc/nlohmann/json.hpp
Normal file
24765
inc/nlohmann/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user