Separate visualiser parameters into separate file and fix compilation of osci-render and sosci

separate-effects
James H Ball 2025-05-08 22:10:34 +01:00
rodzic 303cb68484
commit cf193dc9bc
10 zmienionych plików z 410 dodań i 399 usunięć

Wyświetl plik

@ -12,6 +12,8 @@ EffectPluginEditor::EffectPluginEditor(EffectAudioProcessor& p)
setLookAndFeel(&lookAndFeel);
audioProcessor.visualiserParameters.ambientEffect->setValue(0);
audioProcessor.visualiserParameters.shutterSync->setBoolValue(true);
audioProcessor.visualiserParameters.upsamplingEnabled->setBoolValue(false);
addAndMakeVisible(visualiser);
addAndMakeVisible(titleVisualiser);

Wyświetl plik

@ -2,7 +2,7 @@
#include <JuceHeader.h>
#include <any>
#include "visualiser/VisualiserSettings.h"
#include "visualiser/VisualiserParameters.h"
#include "audio/BitCrushEffect.h"
#include "audio/AutoGainControlEffect.h"
#include "txt/TextParser.h"

Wyświetl plik

@ -72,7 +72,7 @@ void FileParser::parse(juce::String fileId, juce::String fileName, juce::String
} else if (extension == ".svg") {
svg = std::make_shared<SvgParser>(stream->readEntireStreamAsString());
} else if (extension == ".txt") {
text = std::make_shared<TextParser>(audioProcessor, stream->readEntireStreamAsString(), font);
text = std::make_shared<TextParser>(stream->readEntireStreamAsString(), audioProcessor.font);
} else if (extension == ".lua") {
lua = std::make_shared<LuaParser>(fileId, stream->readEntireStreamAsString(), errorCallback, fallbackLuaScript);
} else if (extension == ".gpla") {

Wyświetl plik

@ -1,6 +1,5 @@
#include "TextParser.h"
#include "../svg/SvgParser.h"
#include "../PluginProcessor.h"
TextParser::TextParser(juce::String text, juce::Font& font) : text(text), font(font) {

Wyświetl plik

@ -0,0 +1,397 @@
#pragma once
#define VERSION_HINT 2
#include <JuceHeader.h>
#include "../audio/SmoothEffect.h"
#include "../audio/StereoEffect.h"
enum class ScreenOverlay : int {
INVALID = -1,
Empty = 1,
Graticule = 2,
Smudged = 3,
SmudgedGraticule = 4,
#if OSCI_PREMIUM
Real = 5,
VectorDisplay = 6,
MAX = 6,
#else
MAX = 4,
#endif
};
class ScreenOverlayParameter : public osci::IntParameter {
public:
ScreenOverlayParameter(juce::String name, juce::String id, int versionHint, ScreenOverlay value) : osci::IntParameter(name, id, versionHint, (int) value, 1, (int)ScreenOverlay::MAX) {}
juce::String getText(float value, int maximumStringLength = 100) const override {
switch ((ScreenOverlay)(int)getUnnormalisedValue(value)) {
case ScreenOverlay::Empty:
return "Empty";
case ScreenOverlay::Graticule:
return "Graticule";
case ScreenOverlay::Smudged:
return "Smudged";
case ScreenOverlay::SmudgedGraticule:
return "Smudged Graticule";
#if OSCI_PREMIUM
case ScreenOverlay::Real:
return "Real Oscilloscope";
case ScreenOverlay::VectorDisplay:
return "Vector Display";
#endif
default:
return "Unknown";
}
}
float getValueForText(const juce::String& text) const override {
int unnormalisedValue;
if (text == "Empty") {
unnormalisedValue = (int)ScreenOverlay::Empty;
} else if (text == "Graticule") {
unnormalisedValue = (int)ScreenOverlay::Graticule;
} else if (text == "Smudged") {
unnormalisedValue = (int)ScreenOverlay::Smudged;
} else if (text == "Smudged Graticule") {
unnormalisedValue = (int)ScreenOverlay::SmudgedGraticule;
#if OSCI_PREMIUM
} else if (text == "Real Oscilloscope") {
unnormalisedValue = (int)ScreenOverlay::Real;
} else if (text == "Vector Display") {
unnormalisedValue = (int)ScreenOverlay::VectorDisplay;
#endif
} else {
unnormalisedValue = (int)ScreenOverlay::Empty;
}
return getNormalisedValue(unnormalisedValue);
}
void save(juce::XmlElement* xml) {
xml->setAttribute("screenOverlay", getText(getValue()));
}
void load(juce::XmlElement* xml) {
setValueNotifyingHost(getValueForText(xml->getStringAttribute("screenOverlay")));
}
#if OSCI_PREMIUM
bool isRealisticDisplay() {
ScreenOverlay type = (ScreenOverlay)(int)getValueUnnormalised();
return type == ScreenOverlay::Real || type == ScreenOverlay::VectorDisplay;
}
#endif
};
class VisualiserParameters {
public:
double getIntensity() {
return intensityEffect->getActualValue() / 100;
}
double getPersistence() {
return persistenceEffect->getActualValue() - 1.33;
}
double getHue() {
return hueEffect->getActualValue();
}
double getLineSaturation() {
return lineSaturationEffect->getActualValue();
}
#if OSCI_PREMIUM
double getScreenSaturation() {
return screenSaturationEffect->getActualValue();
}
double getScreenHue() {
return screenHueEffect->getActualValue();
}
double getAfterglow() {
return afterglowEffect->getActualValue();
}
double getOverexposure() {
return overexposureEffect->getActualValue();
}
bool isFlippedVertical() {
return flipVertical->getBoolValue();
}
bool isFlippedHorizontal() {
return flipHorizontal->getBoolValue();
}
bool isGoniometer() {
return goniometer->getBoolValue();
}
bool getShutterSync() {
return shutterSync->getBoolValue();
}
#endif
double getFocus() {
return focusEffect->getActualValue() / 100;
}
double getNoise() {
return noiseEffect->getActualValue() / 5;
}
double getGlow() {
return glowEffect->getActualValue() * 3;
}
double getAmbient() {
return ambientEffect->getActualValue();
}
ScreenOverlay getScreenOverlay() {
return (ScreenOverlay)screenOverlay->getValueUnnormalised();
}
bool getUpsamplingEnabled() {
return upsamplingEnabled->getBoolValue();
}
bool isSweepEnabled() {
return sweepEnabled->getBoolValue();
}
double getSweepSeconds() {
return sweepMsEffect->getActualValue() / 1000.0;
}
double getTriggerValue() {
return triggerValueEffect->getActualValue();
}
ScreenOverlayParameter* screenOverlay = new ScreenOverlayParameter("Screen Overlay", "screenOverlay", VERSION_HINT, ScreenOverlay::SmudgedGraticule);
osci::BooleanParameter* upsamplingEnabled = new osci::BooleanParameter("Upsample Audio", "upsamplingEnabled", VERSION_HINT, true, "Upsamples the audio before visualising it to make it appear more realistic, at the expense of performance.");
osci::BooleanParameter* sweepEnabled = new osci::BooleanParameter("Sweep", "sweepEnabled", VERSION_HINT, false, "Plots the audio signal over time, sweeping from left to right");
osci::BooleanParameter* visualiserFullScreen = new osci::BooleanParameter("Visualiser Fullscreen", "visualiserFullScreen", VERSION_HINT, false, "Makes the software visualiser fullscreen.");
#if OSCI_PREMIUM
osci::BooleanParameter* flipVertical = new osci::BooleanParameter("Flip Vertical", "flipVertical", VERSION_HINT, false, "Flips the visualiser vertically.");
osci::BooleanParameter* flipHorizontal = new osci::BooleanParameter("Flip Horizontal", "flipHorizontal", VERSION_HINT, false, "Flips the visualiser horizontally.");
osci::BooleanParameter* goniometer = new osci::BooleanParameter("Goniometer", "goniometer", VERSION_HINT, false, "Rotates the visualiser to replicate a goniometer display to show the phase relationship between two channels.");
osci::BooleanParameter* shutterSync = new osci::BooleanParameter("Shutter Sync", "shutterSync", VERSION_HINT, false, "Controls whether the camera's shutter speed is in sync with framerate. This makes the brightness of a single frame constant. This can be beneficial when the drawing frequency and frame rate are in sync.");
std::shared_ptr<osci::Effect> screenSaturationEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Screen Saturation",
"Controls how saturated the colours are on the oscilloscope screen.",
"screenSaturation",
VERSION_HINT, 1.0, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> screenHueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Screen Hue",
"Controls the hue shift of the oscilloscope screen.",
"screenHue",
VERSION_HINT, 0, 0, 359, 1
)
);
std::shared_ptr<osci::Effect> afterglowEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Afterglow",
"Controls how quickly the image disappears after glowing brightly. Closely related to persistence.",
"afterglow",
VERSION_HINT, 1.0, 0.0, 10.0
)
);
std::shared_ptr<osci::Effect> overexposureEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Overexposure",
"Controls at which point the line becomes overexposed and clips, turning white.",
"overexposure",
VERSION_HINT, 0.5, 0.0, 1.0
)
);
std::shared_ptr<StereoEffect> stereoEffectApplication = std::make_shared<StereoEffect>();
std::shared_ptr<osci::Effect> stereoEffect = std::make_shared<osci::Effect>(
stereoEffectApplication,
new osci::EffectParameter(
"Stereo",
"Turns mono audio that is uninteresting to visualise into stereo audio that is interesting to visualise.",
"stereo",
VERSION_HINT, 0.0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> scaleEffect = std::make_shared<osci::Effect>(
[this](int index, osci::Point input, const std::vector<std::atomic<double>>& values, double sampleRate) {
input.scale(values[0].load(), values[1].load(), 1.0);
return input;
}, std::vector<osci::EffectParameter*>{
new osci::EffectParameter(
"X Scale",
"Controls the horizontal scale of the oscilloscope display.",
"xScale",
VERSION_HINT, 1.0, -3.0, 3.0
),
new osci::EffectParameter(
"Y Scale",
"Controls the vertical scale of the oscilloscope display.",
"yScale",
VERSION_HINT, 1.0, -3.0, 3.0
),
});
std::shared_ptr<osci::Effect> offsetEffect = std::make_shared<osci::Effect>(
[this](int index, osci::Point input, const std::vector<std::atomic<double>>& values, double sampleRate) {
input.translate(values[0].load(), values[1].load(), 0.0);
return input;
}, std::vector<osci::EffectParameter*>{
new osci::EffectParameter(
"X Offset",
"Controls the horizontal position offset of the oscilloscope display.",
"xOffset",
VERSION_HINT, 0.0, -1.0, 1.0
),
new osci::EffectParameter(
"Y Offset",
"Controls the vertical position offset of the oscilloscope display.",
"yOffset",
VERSION_HINT, 0.0, -1.0, 1.0
),
});
#endif
std::shared_ptr<osci::Effect> persistenceEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Persistence",
"Controls how long the light glows for on the oscilloscope display.",
"persistence",
VERSION_HINT, 0.5, 0, 6.0
)
);
std::shared_ptr<osci::Effect> hueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Hue",
"Controls the hue of the beam of the oscilloscope.",
"hue",
VERSION_HINT, 125, 0, 359, 1
)
);
std::shared_ptr<osci::Effect> intensityEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Intensity",
"Controls how bright the electron beam of the oscilloscope is.",
"intensity",
VERSION_HINT, 5.0, 0.0, 10.0
)
);
std::shared_ptr<osci::Effect> lineSaturationEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Saturation",
"Controls how saturated the colours are on the oscilloscope lines.",
"lineSaturation",
VERSION_HINT, 1.0, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> focusEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Focus",
"Controls how focused the electron beam of the oscilloscope is.",
"focus",
VERSION_HINT, 1.0, 0.3, 10.0
)
);
std::shared_ptr<osci::Effect> noiseEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Noise",
"Controls how much noise/grain is added to the oscilloscope display.",
"noise",
VERSION_HINT, 0.0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> glowEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Glow",
"Controls how much the light glows on the oscilloscope display.",
"glow",
VERSION_HINT, 0.3, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> ambientEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Ambient Light",
"Controls how much ambient light is added to the oscilloscope display.",
"ambient",
VERSION_HINT, 0.7, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> smoothEffect = std::make_shared<osci::Effect>(
std::make_shared<SmoothEffect>(),
new osci::EffectParameter(
"Smoothing",
"This works as a low-pass frequency filter, effectively reducing the sample rate of the audio being visualised.",
"visualiserSmoothing",
VERSION_HINT, 0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> sweepMsEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Sweep (ms)",
"The number of milliseconds it takes for the oscilloscope to sweep from left to right.",
"sweepMs",
VERSION_HINT, 10.0, 0.0, 1000.0
)
);
std::shared_ptr<osci::Effect> triggerValueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Trigger Value",
"The trigger value sets the signal level that starts waveform capture to display a stable waveform.",
"triggerValue",
VERSION_HINT, 0.0, -1.0, 1.0
)
);
std::vector<std::shared_ptr<osci::Effect>> effects = {
persistenceEffect,
hueEffect,
intensityEffect,
lineSaturationEffect,
focusEffect,
noiseEffect,
glowEffect,
ambientEffect,
sweepMsEffect,
triggerValueEffect,
#if OSCI_PREMIUM
afterglowEffect,
screenSaturationEffect,
screenHueEffect,
overexposureEffect,
#endif
};
std::vector<std::shared_ptr<osci::Effect>> audioEffects = {
smoothEffect,
#if OSCI_PREMIUM
stereoEffect,
scaleEffect,
offsetEffect,
#endif
};
std::vector<osci::BooleanParameter*> booleans = {
upsamplingEnabled,
visualiserFullScreen,
sweepEnabled,
#if OSCI_PREMIUM
flipVertical,
flipHorizontal,
goniometer,
shutterSync,
#endif
};
std::vector<osci::IntParameter*> integers = {
screenOverlay,
};
};

Wyświetl plik

@ -4,7 +4,7 @@
#include <algorithm>
#include "VisualiserSettings.h"
#include "VisualiserParameters.h"
struct Texture {
GLuint id;

Wyświetl plik

@ -9,396 +9,7 @@
#include "../components/SwitchButton.h"
#include "../audio/SmoothEffect.h"
#include "../audio/StereoEffect.h"
enum class ScreenOverlay : int {
INVALID = -1,
Empty = 1,
Graticule = 2,
Smudged = 3,
SmudgedGraticule = 4,
#if OSCI_PREMIUM
Real = 5,
VectorDisplay = 6,
MAX = 6,
#else
MAX = 4,
#endif
};
class ScreenOverlayParameter : public osci::IntParameter {
public:
ScreenOverlayParameter(juce::String name, juce::String id, int versionHint, ScreenOverlay value) : osci::IntParameter(name, id, versionHint, (int) value, 1, (int)ScreenOverlay::MAX) {}
juce::String getText(float value, int maximumStringLength = 100) const override {
switch ((ScreenOverlay)(int)getUnnormalisedValue(value)) {
case ScreenOverlay::Empty:
return "Empty";
case ScreenOverlay::Graticule:
return "Graticule";
case ScreenOverlay::Smudged:
return "Smudged";
case ScreenOverlay::SmudgedGraticule:
return "Smudged Graticule";
#if OSCI_PREMIUM
case ScreenOverlay::Real:
return "Real Oscilloscope";
case ScreenOverlay::VectorDisplay:
return "Vector Display";
#endif
default:
return "Unknown";
}
}
float getValueForText(const juce::String& text) const override {
int unnormalisedValue;
if (text == "Empty") {
unnormalisedValue = (int)ScreenOverlay::Empty;
} else if (text == "Graticule") {
unnormalisedValue = (int)ScreenOverlay::Graticule;
} else if (text == "Smudged") {
unnormalisedValue = (int)ScreenOverlay::Smudged;
} else if (text == "Smudged Graticule") {
unnormalisedValue = (int)ScreenOverlay::SmudgedGraticule;
#if OSCI_PREMIUM
} else if (text == "Real Oscilloscope") {
unnormalisedValue = (int)ScreenOverlay::Real;
} else if (text == "Vector Display") {
unnormalisedValue = (int)ScreenOverlay::VectorDisplay;
#endif
} else {
unnormalisedValue = (int)ScreenOverlay::Empty;
}
return getNormalisedValue(unnormalisedValue);
}
void save(juce::XmlElement* xml) {
xml->setAttribute("screenOverlay", getText(getValue()));
}
void load(juce::XmlElement* xml) {
setValueNotifyingHost(getValueForText(xml->getStringAttribute("screenOverlay")));
}
#if OSCI_PREMIUM
bool isRealisticDisplay() {
ScreenOverlay type = (ScreenOverlay)(int)getValueUnnormalised();
return type == ScreenOverlay::Real || type == ScreenOverlay::VectorDisplay;
}
#endif
};
class VisualiserParameters {
public:
double getIntensity() {
return intensityEffect->getActualValue() / 100;
}
double getPersistence() {
return persistenceEffect->getActualValue() - 1.33;
}
double getHue() {
return hueEffect->getActualValue();
}
double getLineSaturation() {
return lineSaturationEffect->getActualValue();
}
#if OSCI_PREMIUM
double getScreenSaturation() {
return screenSaturationEffect->getActualValue();
}
double getScreenHue() {
return screenHueEffect->getActualValue();
}
double getAfterglow() {
return afterglowEffect->getActualValue();
}
double getOverexposure() {
return overexposureEffect->getActualValue();
}
bool isFlippedVertical() {
return flipVertical->getBoolValue();
}
bool isFlippedHorizontal() {
return flipHorizontal->getBoolValue();
}
bool isGoniometer() {
return goniometer->getBoolValue();
}
bool getShutterSync() {
return shutterSync->getBoolValue();
}
#endif
double getFocus() {
return focusEffect->getActualValue() / 100;
}
double getNoise() {
return noiseEffect->getActualValue() / 5;
}
double getGlow() {
return glowEffect->getActualValue() * 3;
}
double getAmbient() {
return ambientEffect->getActualValue();
}
ScreenOverlay getScreenOverlay() {
return (ScreenOverlay)screenOverlay->getValueUnnormalised();
}
bool getUpsamplingEnabled() {
return upsamplingEnabled->getBoolValue();
}
bool isSweepEnabled() {
return sweepEnabled->getBoolValue();
}
double getSweepSeconds() {
return sweepMsEffect->getActualValue() / 1000.0;
}
double getTriggerValue() {
return triggerValueEffect->getActualValue();
}
ScreenOverlayParameter* screenOverlay = new ScreenOverlayParameter("Screen Overlay", "screenOverlay", VERSION_HINT, ScreenOverlay::SmudgedGraticule);
osci::BooleanParameter* upsamplingEnabled = new osci::BooleanParameter("Upsample Audio", "upsamplingEnabled", VERSION_HINT, true, "Upsamples the audio before visualising it to make it appear more realistic, at the expense of performance.");
osci::BooleanParameter* sweepEnabled = new osci::BooleanParameter("Sweep", "sweepEnabled", VERSION_HINT, false, "Plots the audio signal over time, sweeping from left to right");
osci::BooleanParameter* visualiserFullScreen = new osci::BooleanParameter("Visualiser Fullscreen", "visualiserFullScreen", VERSION_HINT, false, "Makes the software visualiser fullscreen.");
#if OSCI_PREMIUM
osci::BooleanParameter* flipVertical = new osci::BooleanParameter("Flip Vertical", "flipVertical", VERSION_HINT, false, "Flips the visualiser vertically.");
osci::BooleanParameter* flipHorizontal = new osci::BooleanParameter("Flip Horizontal", "flipHorizontal", VERSION_HINT, false, "Flips the visualiser horizontally.");
osci::BooleanParameter* goniometer = new osci::BooleanParameter("Goniometer", "goniometer", VERSION_HINT, false, "Rotates the visualiser to replicate a goniometer display to show the phase relationship between two channels.");
osci::BooleanParameter* shutterSync = new osci::BooleanParameter("Shutter Sync", "shutterSync", VERSION_HINT, false, "Controls whether the camera's shutter speed is in sync with framerate. This makes the brightness of a single frame constant. This can be beneficial when the drawing frequency and frame rate are in sync.");
std::shared_ptr<osci::Effect> screenSaturationEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Screen Saturation",
"Controls how saturated the colours are on the oscilloscope screen.",
"screenSaturation",
VERSION_HINT, 1.0, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> screenHueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Screen Hue",
"Controls the hue shift of the oscilloscope screen.",
"screenHue",
VERSION_HINT, 0, 0, 359, 1
)
);
std::shared_ptr<osci::Effect> afterglowEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Afterglow",
"Controls how quickly the image disappears after glowing brightly. Closely related to persistence.",
"afterglow",
VERSION_HINT, 1.0, 0.0, 10.0
)
);
std::shared_ptr<osci::Effect> overexposureEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Overexposure",
"Controls at which point the line becomes overexposed and clips, turning white.",
"overexposure",
VERSION_HINT, 0.5, 0.0, 1.0
)
);
std::shared_ptr<StereoEffect> stereoEffectApplication = std::make_shared<StereoEffect>();
std::shared_ptr<osci::Effect> stereoEffect = std::make_shared<osci::Effect>(
stereoEffectApplication,
new osci::EffectParameter(
"Stereo",
"Turns mono audio that is uninteresting to visualise into stereo audio that is interesting to visualise.",
"stereo",
VERSION_HINT, 0.0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> scaleEffect = std::make_shared<osci::Effect>(
[this](int index, osci::Point input, const std::vector<std::atomic<double>>& values, double sampleRate) {
input.scale(values[0].load(), values[1].load(), 1.0);
return input;
}, std::vector<osci::EffectParameter*>{
new osci::EffectParameter(
"X Scale",
"Controls the horizontal scale of the oscilloscope display.",
"xScale",
VERSION_HINT, 1.0, -3.0, 3.0
),
new osci::EffectParameter(
"Y Scale",
"Controls the vertical scale of the oscilloscope display.",
"yScale",
VERSION_HINT, 1.0, -3.0, 3.0
),
});
std::shared_ptr<osci::Effect> offsetEffect = std::make_shared<osci::Effect>(
[this](int index, osci::Point input, const std::vector<std::atomic<double>>& values, double sampleRate) {
input.translate(values[0].load(), values[1].load(), 0.0);
return input;
}, std::vector<osci::EffectParameter*>{
new osci::EffectParameter(
"X Offset",
"Controls the horizontal position offset of the oscilloscope display.",
"xOffset",
VERSION_HINT, 0.0, -1.0, 1.0
),
new osci::EffectParameter(
"Y Offset",
"Controls the vertical position offset of the oscilloscope display.",
"yOffset",
VERSION_HINT, 0.0, -1.0, 1.0
),
});
#endif
std::shared_ptr<osci::Effect> persistenceEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Persistence",
"Controls how long the light glows for on the oscilloscope display.",
"persistence",
VERSION_HINT, 0.5, 0, 6.0
)
);
std::shared_ptr<osci::Effect> hueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Hue",
"Controls the hue of the beam of the oscilloscope.",
"hue",
VERSION_HINT, 125, 0, 359, 1
)
);
std::shared_ptr<osci::Effect> intensityEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Intensity",
"Controls how bright the electron beam of the oscilloscope is.",
"intensity",
VERSION_HINT, 5.0, 0.0, 10.0
)
);
std::shared_ptr<osci::Effect> lineSaturationEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Line Saturation",
"Controls how saturated the colours are on the oscilloscope lines.",
"lineSaturation",
VERSION_HINT, 1.0, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> focusEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Focus",
"Controls how focused the electron beam of the oscilloscope is.",
"focus",
VERSION_HINT, 1.0, 0.3, 10.0
)
);
std::shared_ptr<osci::Effect> noiseEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Noise",
"Controls how much noise/grain is added to the oscilloscope display.",
"noise",
VERSION_HINT, 0.0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> glowEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Glow",
"Controls how much the light glows on the oscilloscope display.",
"glow",
VERSION_HINT, 0.3, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> ambientEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Ambient Light",
"Controls how much ambient light is added to the oscilloscope display.",
"ambient",
VERSION_HINT, 0.7, 0.0, 5.0
)
);
std::shared_ptr<osci::Effect> smoothEffect = std::make_shared<osci::Effect>(
std::make_shared<SmoothEffect>(),
new osci::EffectParameter(
"Smoothing",
"This works as a low-pass frequency filter, effectively reducing the sample rate of the audio being visualised.",
"visualiserSmoothing",
VERSION_HINT, 0, 0.0, 1.0
)
);
std::shared_ptr<osci::Effect> sweepMsEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Sweep (ms)",
"The number of milliseconds it takes for the oscilloscope to sweep from left to right.",
"sweepMs",
VERSION_HINT, 10.0, 0.0, 1000.0
)
);
std::shared_ptr<osci::Effect> triggerValueEffect = std::make_shared<osci::Effect>(
new osci::EffectParameter(
"Trigger Value",
"The trigger value sets the signal level that starts waveform capture to display a stable waveform.",
"triggerValue",
VERSION_HINT, 0.0, -1.0, 1.0
)
);
std::vector<std::shared_ptr<osci::Effect>> effects = {
persistenceEffect,
hueEffect,
intensityEffect,
lineSaturationEffect,
focusEffect,
noiseEffect,
glowEffect,
ambientEffect,
sweepMsEffect,
triggerValueEffect,
#if OSCI_PREMIUM
afterglowEffect,
screenSaturationEffect,
screenHueEffect,
overexposureEffect,
#endif
};
std::vector<std::shared_ptr<osci::Effect>> audioEffects = {
smoothEffect,
#if OSCI_PREMIUM
stereoEffect,
scaleEffect,
offsetEffect,
#endif
};
std::vector<osci::BooleanParameter*> booleans = {
upsamplingEnabled,
visualiserFullScreen,
sweepEnabled,
#if OSCI_PREMIUM
flipVertical,
flipHorizontal,
goniometer,
shutterSync,
#endif
};
std::vector<osci::IntParameter*> integers = {
screenOverlay,
};
};
#include "VisualiserParameters.h"
class GroupedSettings : public juce::GroupComponent {
public:

Wyświetl plik

@ -5,7 +5,7 @@
aaxIdentifier="sh.ball.osci-bitcrush" cppLanguageStandard="20"
projectLineFeed="&#10;" headerPath="./include" version="1.0.0.0"
companyName="James H Ball" companyWebsite="https://osci-render.com"
companyEmail="james@ball.sh" defines="NOMINMAX=1&#10;INTERNET_FLAG_NO_AUTO_REDIRECT=0&#10;OSCI_PREMIUM=0"
companyEmail="james@ball.sh" defines="NOMINMAX=1&#10;INTERNET_FLAG_NO_AUTO_REDIRECT=0&#10;OSCI_PREMIUM=1"
pluginManufacturerCode="Jhba" pluginCode="Bitc" pluginAUMainType="'aufx'"
pluginFormats="buildAU,buildVST3">
<MAINGROUP id="j5Ge2T" name="osci-bitcrush">
@ -133,14 +133,12 @@
file="Source/visualiser/TexturedFragmentShader.glsl"/>
<FILE id="EW75fo" name="TexturedVertexShader.glsl" compile="0" resource="0"
file="Source/visualiser/TexturedVertexShader.glsl"/>
<FILE id="ox2Zqq" name="VisualiserParameters.h" compile="0" resource="0"
file="Source/visualiser/VisualiserParameters.h"/>
<FILE id="ZlNZVD" name="VisualiserRenderer.cpp" compile="1" resource="0"
file="Source/visualiser/VisualiserRenderer.cpp"/>
<FILE id="TpzEdc" name="VisualiserRenderer.h" compile="0" resource="0"
file="Source/visualiser/VisualiserRenderer.h"/>
<FILE id="wdZb9U" name="VisualiserSettings.cpp" compile="1" resource="0"
file="Source/visualiser/VisualiserSettings.cpp"/>
<FILE id="v3pCdC" name="VisualiserSettings.h" compile="0" resource="0"
file="Source/visualiser/VisualiserSettings.h"/>
</GROUP>
<FILE id="pSNQax" name="EffectPluginEditor.cpp" compile="1" resource="0"
file="Source/EffectPluginEditor.cpp"/>

Wyświetl plik

@ -621,6 +621,8 @@
file="Source/visualiser/VisualiserComponent.cpp"/>
<FILE id="frfxSR" name="VisualiserComponent.h" compile="0" resource="0"
file="Source/visualiser/VisualiserComponent.h"/>
<FILE id="MwblOp" name="VisualiserParameters.h" compile="0" resource="0"
file="Source/visualiser/VisualiserParameters.h"/>
<FILE id="zN66Ve" name="VisualiserRenderer.cpp" compile="1" resource="0"
file="Source/visualiser/VisualiserRenderer.cpp"/>
<FILE id="fPgwyr" name="VisualiserRenderer.h" compile="0" resource="0"

Wyświetl plik

@ -186,6 +186,8 @@
file="Source/visualiser/VisualiserComponent.cpp"/>
<FILE id="MH6n0v" name="VisualiserComponent.h" compile="0" resource="0"
file="Source/visualiser/VisualiserComponent.h"/>
<FILE id="IzKiqO" name="VisualiserParameters.h" compile="0" resource="0"
file="Source/visualiser/VisualiserParameters.h"/>
<FILE id="A9Zk5z" name="VisualiserRenderer.cpp" compile="1" resource="0"
file="Source/visualiser/VisualiserRenderer.cpp"/>
<FILE id="XquFmM" name="VisualiserRenderer.h" compile="0" resource="0"