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,53 @@
/*
==============================================================================
CustomSamplerSound.h
Created: 5 Sep 2023 3:35:11pm
Author: binya
==============================================================================
*/
#pragma once
#include <JuceHeader.h>
#include "../PluginParameters.h"
/** A class defining all parameters for a note played by CustomSamplerVoice.cpp */
class SamplerParameters final
{
public:
SamplerParameters(const juce::AudioProcessorValueTreeState& apvts, PluginParameters::State& pluginState, const juce::AudioBuffer<float>& sample, int sampleRate);
void sampleChanged(int newSampleRate);
/** Fetch the playback mode, as the proper enum type */
PluginParameters::PLAYBACK_MODES getPlaybackMode() const;
/** Fetch the sound's FX chain permutation */
std::array<PluginParameters::FxTypes, 4> getFxOrder() const;
/** The sound to play */
const juce::AudioBuffer<float>& sample;
int sampleRate;
/** Playback details */
juce::AudioParameterFloat* gain, * speedFactor, * octaveSpeedFactor, * attack, * release, * attackShape, * releaseShape, * a4_freq, * pitchWheelRange, * wideTuningControl;
juce::AudioParameterInt* semitoneTuning, * centTuning, * waveformSemitoneTuning, * waveformCentTuning, * crossfadeSamples;
juce::AudioParameterBool* monoOutput, * disableVelocity, * skipAntialiasing, * applyFXPre, * playUntilEnd, * disableWavetableMode, * isLooping, * loopingHasStart, * loopingHasEnd;
ListenableAtomic<int>& sampleStart, & sampleEnd, & loopStart, & loopEnd;
juce::AudioParameterInt* midiStart, * midiEnd, * midiRoot;
juce::AudioParameterBool* followMidiPitch;
/** FX parameters */
juce::AudioParameterBool* reverbEnabled, * distortionEnabled, * eqEnabled, * chorusEnabled;
juce::AudioParameterFloat* reverbMix, * reverbSize, * reverbDamping, * reverbLows, * reverbHighs, * reverbPredelay;
juce::AudioParameterFloat* distortionMix, * distortionDensity, * distortionHighpass;
juce::AudioParameterFloat* eqLowGain, * eqMidGain, * eqHighGain, * eqLowFreq, * eqHighFreq;
juce::AudioParameterFloat* chorusMix, * chorusRate, * chorusDepth, * chorusFeedback, * chorusCenterDelay;
private:
juce::AudioParameterChoice* playbackMode;
juce::AudioParameterInt* fxOrder;
};