Skip to content

Commit

Permalink
Phaser Stages Modulation
Browse files Browse the repository at this point in the history
  • Loading branch information
choptop84 committed Aug 5, 2024
1 parent b5448fe commit 1f05eba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editor/SongEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4126,7 +4126,7 @@ export class SongEditor {
settingList.push("phaser");
settingList.push("phaser frequency");
settingList.push("phaser feedback");
//settingList.push("phaser stages");
settingList.push("phaser stages");
}
}

Expand Down
5 changes: 5 additions & 0 deletions synth/synth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8317,6 +8317,11 @@ class InstrumentState {
let phaserStagesStart = Math.max(Config.phaserMinStages, Math.min(Config.phaserMaxStages, phaserStagesSlider * phaserStagesEnvelopeStart));
let phaserStagesEnd = Math.max(Config.phaserMinStages, Math.min(Config.phaserMaxStages, phaserStagesSlider * phaserStagesEnvelopeEnd));

if (synth.isModActive(Config.modulators.dictionary["phaser stages"].index, channelIndex, instrumentIndex)) {
phaserStagesStart = Math.round(synth.getModValue(Config.modulators.dictionary["phaser stages"].index, channelIndex, instrumentIndex, false));
phaserStagesEnd = Math.round(synth.getModValue(Config.modulators.dictionary["phaser stages"].index, channelIndex, instrumentIndex, false))
}

this.phaserStages = phaserStagesStart;
this.phaserStagesDelta = (phaserStagesEnd - phaserStagesStart) / roundedSamplesPerTick;
}
Expand Down

0 comments on commit 1f05eba

Please sign in to comment.