mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 04:10:46 +02:00
Prototype
This commit is contained in:
parent
c117906a7f
commit
4271fc34bb
14 changed files with 950 additions and 169 deletions
|
|
@ -4,11 +4,11 @@
|
|||
#include "dsp/SynthVoice.h"
|
||||
#include "dsp/StepSequencer.h"
|
||||
|
||||
class MonoStepAudioProcessor final : public juce::AudioProcessor
|
||||
class MonostepAudioProcessor final : public juce::AudioProcessor
|
||||
{
|
||||
public:
|
||||
MonoStepAudioProcessor();
|
||||
~MonoStepAudioProcessor() override = default;
|
||||
MonostepAudioProcessor();
|
||||
~MonostepAudioProcessor() override = default;
|
||||
|
||||
void prepareToPlay (double sampleRate, int samplesPerBlock) override;
|
||||
void releaseResources() override;
|
||||
|
|
@ -17,7 +17,7 @@ public:
|
|||
juce::AudioProcessorEditor* createEditor() override;
|
||||
bool hasEditor() const override { return true; }
|
||||
|
||||
const juce::String getName() const override { return "MonoStep"; }
|
||||
const juce::String getName() const override { return "Monostep"; }
|
||||
bool acceptsMidi() const override { return true; }
|
||||
bool producesMidi() const override { return false; }
|
||||
double getTailLengthSeconds() const override { return 0.0; }
|
||||
|
|
@ -43,6 +43,19 @@ public:
|
|||
void setStepNote (int idx, int semitone);
|
||||
void setStepCents (int idx, float cents);
|
||||
void setStepSlide (int idx, bool slide);
|
||||
void setStepAccent (int idx, bool accent);
|
||||
void shiftPattern (int dir);
|
||||
|
||||
int getNumPresets() const;
|
||||
const char* getPresetName (int index) const;
|
||||
void applyPreset (int index);
|
||||
void randomizePattern();
|
||||
void randomizeParams();
|
||||
void randomizeOsc();
|
||||
void randomizeFilter();
|
||||
void randomizeEnv();
|
||||
void randomizeSeqSettings();
|
||||
void randomizeFx();
|
||||
|
||||
juce::String getStepNoteName (int idx) const;
|
||||
|
||||
|
|
@ -52,6 +65,7 @@ private:
|
|||
static juce::AudioProcessorValueTreeState::ParameterLayout createParameterLayout();
|
||||
|
||||
void updateVoiceParams();
|
||||
void applyParamValue (const juce::String& id, float value);
|
||||
float midiToFreq (float note) const;
|
||||
void storeSequence (juce::ValueTree& seq) const;
|
||||
void loadSequence (const juce::ValueTree& seq);
|
||||
|
|
@ -61,8 +75,11 @@ private:
|
|||
|
||||
std::atomic<float>* osc1WaveParam = nullptr;
|
||||
std::atomic<float>* osc2WaveParam = nullptr;
|
||||
std::atomic<float>* osc1CoarseParam = nullptr;
|
||||
std::atomic<float>* osc2CoarseParam = nullptr;
|
||||
std::atomic<float>* detuneParam = nullptr;
|
||||
std::atomic<float>* mixParam = nullptr;
|
||||
std::atomic<float>* osc1PhaseParam = nullptr;
|
||||
std::atomic<float>* cutoffParam = nullptr;
|
||||
std::atomic<float>* resParam = nullptr;
|
||||
std::atomic<float>* attackParam = nullptr;
|
||||
|
|
@ -75,12 +92,16 @@ private:
|
|||
std::atomic<float>* seqRateParam = nullptr;
|
||||
std::atomic<float>* seqRootParam = nullptr;
|
||||
std::atomic<float>* seqOctaveParam = nullptr;
|
||||
std::atomic<float>* seqSwingParam = nullptr;
|
||||
std::atomic<float>* seqSwingParam = nullptr;
|
||||
std::atomic<float>* seqGateLenParam = nullptr;
|
||||
std::atomic<float>* driveParam = nullptr;
|
||||
std::atomic<float>* ringModParam = nullptr;
|
||||
std::atomic<float>* accentParam = nullptr;
|
||||
|
||||
monostep::StepSequencer sequencer;
|
||||
monostep::SynthVoice voice;
|
||||
juce::AudioBuffer<float> scratch;
|
||||
juce::Random random;
|
||||
|
||||
double sampleRate = 44100.0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue