mirror of
https://codeberg.org/armin/beamgrid.git
synced 2026-09-01 04:10:47 +02:00
add LICENSE, update README, update source
This commit is contained in:
parent
6ab142e450
commit
e0177ed26f
9 changed files with 395 additions and 53 deletions
|
|
@ -41,12 +41,17 @@ BeamgridAudioProcessor::createParameterLayout()
|
|||
juce::NormalisableRange<float> (0.0f, 1.0f, 0.001f), 0.5f,
|
||||
juce::AudioParameterFloatAttributes().withLabel ("")));
|
||||
|
||||
params.push_back (std::make_unique<juce::AudioParameterFloat>(
|
||||
"smooth", "Smoothing",
|
||||
juce::NormalisableRange<float> (0.0f, 1.0f, 0.001f), 0.35f,
|
||||
juce::AudioParameterFloatAttributes().withLabel ("")));
|
||||
|
||||
juce::NormalisableRange<float> barsRange (8.0f, 128.0f,
|
||||
[] (float, float, float v) { return v; }, // convertFrom0To1
|
||||
[] (float, float, float v) { return v; }, // convertTo0To1
|
||||
[] (float, float, float v) // snapToLegalValue
|
||||
[] (float start, float end, float v) { return start + v * (end - start); }, // convertFrom0To1
|
||||
[] (float start, float end, float v) { return (v - start) / (end - start); }, // convertTo0To1
|
||||
[] (float, float, float v) // snapToLegalValue
|
||||
{
|
||||
const float steps[] = { 8.0f, 16.0f, 32.0f, 64.0f, 96.0f, 128.0f };
|
||||
const float steps[] = { 8.0f, 16.0f, 32.0f, 64.0f, 128.0f };
|
||||
float best = steps[0];
|
||||
float bestDist = std::abs (v - best);
|
||||
for (float s : steps)
|
||||
|
|
@ -64,6 +69,12 @@ BeamgridAudioProcessor::createParameterLayout()
|
|||
params.push_back (std::make_unique<juce::AudioParameterFloat>(
|
||||
"bars", "Bars", barsRange, 64.0f));
|
||||
|
||||
params.push_back (std::make_unique<juce::AudioParameterInt>(
|
||||
"mode", "Mode", 1, 3, 1));
|
||||
|
||||
params.push_back (std::make_unique<juce::AudioParameterInt>(
|
||||
"leds", "LEDs/Bar", 4, 48, 16));
|
||||
|
||||
return { params.begin(), params.end() };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue