Skip to content

Commit 558aa8f

Browse files
refactor parameters and arguments of makeSamplerWidget
1 parent 4e7e7ce commit 558aa8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/activity.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,12 +2936,12 @@ class Activity {
29362936
};
29372937

29382938
//To create a sampler widget
2939-
this.makeSamplerWidget = (sampleFile, sampleData) => {
2939+
this.makeSamplerWidget = (sampleName, sampleData) => {
29402940
let samplerStack = [
29412941
[0, "sampler", 300 - this.blocksContainer.x, 300 - this.blocksContainer.y, [null, 1, 8]],
29422942
[1, "settimbre", 0, 0, [0, 2, 6, 7]],
29432943
[2, ["customsample", { value: ["", "", "do", 4] }], 0, 0, [1, 3, 4, 5]],
2944-
[3, ["audiofile", { value: [sampleFile.name, sampleData] }], 0, 0, [2]],
2944+
[3, ["audiofile", { value: [sampleName, sampleData] }], 0, 0, [2]],
29452945
[4, ["solfege", { value: "do" }], 0, 0, [2]],
29462946
[5, ["number", { value: 4 }], 0, 0, [2]],
29472947
[6, "vspace", 0, 0, [1, null]],
@@ -6500,7 +6500,7 @@ class Activity {
65006500
);
65016501
}
65026502
else if (files[0].type === "audio/wav") {
6503-
obj = this.makeSamplerWidget(files[0], reader.result);
6503+
obj = this.makeSamplerWidget(files[0].name, reader.result);
65046504
}
65056505
else {
65066506
obj = JSON.parse(cleanData);

0 commit comments

Comments
 (0)