spessasynth_core 3.26.3 → 3.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/sequencer/play.js
CHANGED
|
@@ -264,11 +264,20 @@ export function _playTo(time, ticks = undefined)
|
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
// restore programs
|
|
267
|
-
if (programs[channelNumber].
|
|
267
|
+
if (programs[channelNumber].actualBank >= 0)
|
|
268
268
|
{
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
const p = programs[channelNumber];
|
|
270
|
+
if (p.program !== -1)
|
|
271
|
+
{
|
|
272
|
+
// a program change has occurred, apply the actual bank when program change was executed
|
|
273
|
+
this.synth.controllerChange(channelNumber, midiControllers.bankSelect, p.actualBank);
|
|
274
|
+
this.synth.programChange(channelNumber, p.program);
|
|
275
|
+
}
|
|
276
|
+
else
|
|
277
|
+
{
|
|
278
|
+
// no program change, apply the current bank select
|
|
279
|
+
this.synth.controllerChange(channelNumber, midiControllers.bankSelect, p.bank);
|
|
280
|
+
}
|
|
272
281
|
}
|
|
273
282
|
}
|
|
274
283
|
}
|
|
@@ -557,6 +557,15 @@ class BasicSoundBank
|
|
|
557
557
|
delete this.instruments;
|
|
558
558
|
delete this.samples;
|
|
559
559
|
}
|
|
560
|
+
|
|
561
|
+
// noinspection JSUnusedGlobalSymbols
|
|
562
|
+
/**
|
|
563
|
+
* Clears the cache for all the presets
|
|
564
|
+
*/
|
|
565
|
+
clearCache()
|
|
566
|
+
{
|
|
567
|
+
this.presets.forEach(p => p.clearCache());
|
|
568
|
+
}
|
|
560
569
|
}
|
|
561
570
|
|
|
562
571
|
BasicSoundBank.prototype.write = write;
|