mirror of
https://codeberg.org/armin/wavetable.git
synced 2026-09-01 05:50:46 +02:00
A few tweaks for MTS support
This commit is contained in:
parent
c90a502035
commit
796228e041
5 changed files with 20 additions and 11 deletions
|
|
@ -8,12 +8,10 @@ WavetableVoice::WavetableVoice (WavetableAudioProcessor& p)
|
|||
, sub (proc.analogTables)
|
||||
{
|
||||
filter.setNumChannels (2);
|
||||
mtsClient = MTS_RegisterClient();
|
||||
}
|
||||
|
||||
WavetableVoice::~WavetableVoice()
|
||||
{
|
||||
MTS_DeregisterClient (mtsClient);
|
||||
}
|
||||
|
||||
void WavetableVoice::noteStarted()
|
||||
|
|
@ -247,9 +245,9 @@ void WavetableVoice::updateParams (int blockSize)
|
|||
|
||||
proc.modMatrix.setPolyValue (*this, proc.modSrcNote, note.initialNote / 127.0f);
|
||||
|
||||
double retune_semitones = 0.0;
|
||||
if (mtsClient)
|
||||
retune_semitones = MTS_RetuningInSemitones (mtsClient, note.initialNote, -1);
|
||||
double retuneSemitones = 0.0;
|
||||
if (proc.mtsClient)
|
||||
retuneSemitones = MTS_RetuningInSemitones (proc.mtsClient, note.initialNote, -1);
|
||||
|
||||
for (int i = 0; i < Cfg::numOSCs; i++)
|
||||
{
|
||||
|
|
@ -257,7 +255,7 @@ void WavetableVoice::updateParams (int blockSize)
|
|||
|
||||
currentMidiNotes[i] = noteSmoother.getCurrentValue() * 127.0f;
|
||||
if (glideInfo.glissando) currentMidiNotes[i] = (float) juce::roundToInt (currentMidiNotes[i]);
|
||||
currentMidiNotes[i] += float (retune_semitones);
|
||||
currentMidiNotes[i] += float (retuneSemitones);
|
||||
currentMidiNotes[i] += float (note.totalPitchbendInSemitones);
|
||||
currentMidiNotes[i] += getValue (proc.oscParams[i].tune) + getValue (proc.oscParams[i].finetune) / 100.0f;
|
||||
|
||||
|
|
@ -275,7 +273,7 @@ void WavetableVoice::updateParams (int blockSize)
|
|||
{
|
||||
subNote = noteSmoother.getCurrentValue() * 127.0f;
|
||||
if (glideInfo.glissando) subNote = (float) juce::roundToInt (subNote);
|
||||
subNote += retune_semitones;
|
||||
subNote += float (retuneSemitones);
|
||||
subNote += float (note.totalPitchbendInSemitones);
|
||||
subNote += getValue (proc.subParams.tune);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue