This commit is contained in:
Armin 2026-07-23 23:40:48 +02:00
commit d21bc831e1
178 changed files with 24136 additions and 0 deletions

View file

@ -0,0 +1,31 @@
/*
==============================================================================
CustomSynthesizer.h
Created: 9 Jun 2024 10:37:38am
Author: binya
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
/** JUCE's voice and sound paradigm is not so helpful for us, so we use a blank sound class and pass in our parameters directly to the voices. */
class BlankSynthesizerSound final : public juce::SynthesiserSound
{
public:
bool appliesToNote(int) override { return true; }
bool appliesToChannel(int) override { return true; }
};
/** We add some custom methods because our Synthesizer does not own its voices */
class CustomSynthesizer final : public juce::Synthesiser
{
public:
juce::SynthesiserVoice* removeVoiceWithoutDeleting(const int index)
{
const juce::ScopedLock sl(lock);
return voices.removeAndReturn(index);
}
};