Skip to content

Commit

Permalink
Greatly improve unmapped note handling in Surge
Browse files Browse the repository at this point in the history
1. Unmapped notes with native tunings now don't sound as opposed
   to sounding a constant frequency
2. Pitch bends across unmapped notes now do something reasonable

This brings our native mode in line with oddsound-mts for skipped note
handling

Address surge-synthesizer#4046
  • Loading branch information
baconpaul committed Jul 1, 2021
1 parent b9160f0 commit cfaa0ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/tuning-library
2 changes: 1 addition & 1 deletion src/common/SurgeStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ float glide_log(float x)

bool SurgeStorage::resetToCurrentScaleAndMapping()
{
currentTuning = Tunings::Tuning(currentScale, currentMapping);
currentTuning = Tunings::Tuning(currentScale, currentMapping).withSkippedNotesInterpolated();

auto t = currentTuning;

Expand Down
8 changes: 8 additions & 0 deletions src/common/SurgeSynthesizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ void SurgeSynthesizer::playNote(char channel, char key, char velocity, char detu
}
}

if (!storage.isStandardTuning)
{
if (!storage.currentTuning.isMidiNoteMapped(key))
{
return;
}
}

// For split/dual
// MIDI Channel 1 plays the split/dual
// MIDI Channel 2 plays A
Expand Down

0 comments on commit cfaa0ad

Please sign in to comment.