getPreviousMasterPan
getPreviousMasterPan(): number;
Get the previous master pan value before it was reset. This is useful when you want to restore the pan to its previous state after a temporary change or reset.
| Return Type | Description |
|---|---|
number | The previous master pan value (between -1 and 1) |
Example
soundHub.setGlobalPan(0.5); // Pan right
// Later, reset the pan
soundHub.resetGlobalPan();
// Restore the previous pan
soundHub.setGlobalPan(soundHub.getPreviousMasterPan()); // Restores to 0.5