mirror of
https://codeberg.org/armin/chromaflock.git
synced 2026-09-01 04:10:47 +02:00
rework arpeggiator patterns
This commit is contained in:
parent
56fc80c405
commit
7c444ad849
4 changed files with 71 additions and 18 deletions
|
|
@ -283,7 +283,8 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create
|
|||
juce::StringArray{"Up / Minor", "Down / Minor", "Up & Down / Major",
|
||||
"Down & Up / Major", "Random", "As Played", "Chord", "Up & Down X",
|
||||
"Down & Up X", "Random Once", "Octave Up", "Octave Down", "Pinky Up",
|
||||
"Pinky Down", "Up / Major", "Down / Major", "Up & Down / Minor"}, 0));
|
||||
"Pinky Down", "Up / Major", "Down / Major", "Up & Down / Minor",
|
||||
"C3/C4 1", "C3/C4 2", "C3/C4 3"}, 0));
|
||||
layout.add(std::make_unique<juce::AudioParameterChoice>(
|
||||
juce::ParameterID{"arpOctaves", 1}, "Arp Octaves",
|
||||
juce::StringArray{"1", "2", "3"}, 1));
|
||||
|
|
@ -292,7 +293,7 @@ juce::AudioProcessorValueTreeState::ParameterLayout ChromaFlockProcessor::create
|
|||
juce::StringArray{"Up", "Down"}, 0));
|
||||
layout.add(std::make_unique<juce::AudioParameterChoice>(
|
||||
juce::ParameterID{"arpRate", 1}, "Arp Rate",
|
||||
juce::StringArray{"1/16", "1/8", "1/4", "1/2", "1", "2"}, 1));
|
||||
juce::StringArray{"1/32", "1/16", "1/8", "1/4", "1/2", "1", "2"}, 1));
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
|
@ -413,8 +414,8 @@ void ChromaFlockProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce::
|
|||
|
||||
bool arpOn = getRaw("arpEnabled") > 0.5f;
|
||||
if (arpOn) {
|
||||
static const double arpRateBeats[] = {0.25, 0.5, 1.0, 2.0, 4.0, 8.0};
|
||||
int rateIdx = juce::jlimit(0, 5, juce::roundToInt(getRaw("arpRate")));
|
||||
static const double arpRateBeats[] = {0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0};
|
||||
int rateIdx = juce::jlimit(0, 6, juce::roundToInt(getRaw("arpRate")));
|
||||
arp.setParameters(true,
|
||||
juce::roundToInt(getRaw("arpPattern")),
|
||||
juce::roundToInt(getRaw("arpOctaves")) + 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue