Skip to content

Instantly share code, notes, and snippets.

View ffAudio's full-sized avatar

Daniel Walz ffAudio

View GitHub Profile
@ffAudio
ffAudio / ChoiceParameterRadioGroup.cpp
Last active June 10, 2019 12:31
A Component to synchronise a RadioButtonGroup with an AudioParameterChoice
class ChoiceParameterRadioGroup : public Component,
private Button::Listener,
private AudioProcessorValueTreeState::Listener
{
public:
enum Orientation
{
horizontal,
vertical
};
@ffAudio
ffAudio / ElapsedTime.h
Last active March 28, 2019 16:19
JUCE ElapsedTime
/**
Stop watch to measure time intervals
\code{.cpp}
ElapsedTime timer;
// do stuff
DBG ("Doing stuff took: " << String (timer.elapsed()) << " milliseconds");
timer.pause();
// that doesn't count
timer.resume();
@ffAudio
ffAudio / RelativeTimeToString.cpp
Last active February 6, 2018 22:53
Addition for juce::RelativeTime to write a technical string
String RelativeTime::toString (bool includeDays) const
{
String result;
result.preallocateBytes (32);
if (numSeconds < 0)
result << '-';
bool empty = true;
@ffAudio
ffAudio / PluginEditor.cpp
Created June 20, 2017 10:47
A simple JUCE plugin that saves text in float parameters
/*
==============================================================================
PluginEditor.cpp
==============================================================================
*/
#include "PluginProcessor.h"
#include "PluginEditor.h"