mirror of
https://codeberg.org/armin/sm-26.git
synced 2026-10-11 17:01:53 +02:00
Expand preset bank to 128 categorized presets, shorten sync delays, add menu UI polish and hold-to-repeat nav
This commit is contained in:
parent
1a36b5baf0
commit
78e8ee80ad
10 changed files with 761 additions and 413 deletions
|
|
@ -64,6 +64,16 @@ void SynthEngine::setPresetIndex (int i)
|
|||
loadPreset (*PresetStore::findByIndex (i));
|
||||
}
|
||||
|
||||
double SynthEngine::delayTimeMs() const
|
||||
{
|
||||
if (getParam (PDSYNC) > 0.5f)
|
||||
{
|
||||
const int stepIdx = juce::jlimit (0, 15, (int) juce::roundToInt (getParam (PDSTEPS) * 15.0f));
|
||||
return stepsBeats()[stepIdx] * 60000.0 / lastBpmValue;
|
||||
}
|
||||
return paramReal (PDTIME, getParam (PDTIME));
|
||||
}
|
||||
|
||||
void SynthEngine::setParam (int id, float n01)
|
||||
{
|
||||
if (id < 0 || id >= kNumParams) return;
|
||||
|
|
@ -257,7 +267,7 @@ void SynthEngine::process (AudioBuffer<float>& buffer, MidiBuffer& midi,
|
|||
const int wave2 = paramWaveIndex (snap[(size_t) PO2WAVE]);
|
||||
|
||||
bool delaySync = snap[(size_t) PDSYNC] > 0.5f;
|
||||
int stepIdx = juce::jlimit (0, 15, (int) juce::roundToInt (snap[(size_t) PDSTEPS]));
|
||||
int stepIdx = juce::jlimit (0, 15, (int) juce::roundToInt (snap[(size_t) PDSTEPS] * 15.0f));
|
||||
float delayMsParam = paramReal (PDTIME, snap[(size_t) PDTIME]);
|
||||
float delaySec;
|
||||
if (delaySync)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue