Skip to content

Commit

Permalink
Fix clicking at the start of non-0 samples
Browse files Browse the repository at this point in the history
  • Loading branch information
spessasus committed Sep 16, 2024
1 parent aea2cce commit 4d2985f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SpessaSynth",
"version": "3.20.18",
"version": "3.20.19",
"type": "module",
"scripts": {
"start": "node src/website/server/server.js"
Expand Down
4 changes: 2 additions & 2 deletions src/spessasynth_lib/soundfont/read_sf2/generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ generatorLimits[generatorTypes.delayVibLFO] = {min: -12000, max: 5000, def: -120
generatorLimits[generatorTypes.freqVibLFO] = {min: -16000, max: 4500, def: 0};

// mod env
generatorLimits[generatorTypes.delayModEnv] = {min: -12000, max: 5000, def: -12000};
generatorLimits[generatorTypes.attackModEnv] = {min: -12000, max: 8000, def: -12000};
generatorLimits[generatorTypes.delayModEnv] = {min: -32768, max: 5000, def: -32768}; // -32768 indicates instant phase, this is done to prevent click at the start of filter modenv
generatorLimits[generatorTypes.attackModEnv] = {min: -32768, max: 8000, def: -32768};
generatorLimits[generatorTypes.holdModEnv] = {min: -12000, max: 5000, def: -12000};
generatorLimits[generatorTypes.decayModEnv] = {min: -12000, max: 8000, def: -12000};
generatorLimits[generatorTypes.sustainModEnv] = {min: 0, max: 1000, def: 0};
Expand Down
4 changes: 2 additions & 2 deletions src/spessasynth_lib/synthetizer/worklet_processor.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for (let i = 0; i < timecentLookupTable.length; i++) {
*/
export function timecentsToSeconds(timecents)
{
if(timecents <= -12000) return 0;
if(timecents <= -32767) return 0;
return timecentLookupTable[timecents - MIN_TIMECENT];
}

Expand Down
2 changes: 1 addition & 1 deletion src/website/minified/demo_main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/website/minified/local_main.min.js

Large diffs are not rendered by default.

0 comments on commit 4d2985f

Please sign in to comment.