Skip to content

Commit

Permalink
Add standardization mapping for binding parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamindehli committed May 25, 2024
1 parent 34be593 commit bc14603
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/classes/Binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ export class Binding {
this.seqLoopMode = props?.seqLoopMode;
}
init(decentSampler) {
// Both AMP_VOLUME and TAG_VOLUME are valid parameters, but TAG_VOLUME is used in documentation
if (this.type === "amp" && this.level === "tag" && this.parameter === "AMP_VOLUME") {
console.log("converting AMP_VOLUME to TAG_VOLUME")
this.parameter = "TAG_VOLUME";
}

// Use named indexes instead of position
if (this.type !== undefined && this.level !== undefined && this.parameter !== undefined) {
this.controllableParameterRef = this.getControllableParameterRef(decentSampler);
if (this.controllableParameterRef.hasAdditionalParam("controlIndex")) {
Expand All @@ -70,6 +77,7 @@ export class Binding {
this.groupIndex = this.groupIndex || this.position;
}
}


if (this.groupIndex !== undefined) {
this.groupRef = this.getGroupRefFromGroupIndex(decentSampler);
Expand Down

0 comments on commit bc14603

Please sign in to comment.