diff --git a/docs/js/lib/AudioSourceNode.d.ts b/docs/js/lib/AudioSourceNode.d.ts index c83e339..dc3408f 100644 --- a/docs/js/lib/AudioSourceNode.d.ts +++ b/docs/js/lib/AudioSourceNode.d.ts @@ -1,43 +1,4 @@ -/** - * Ramp types for audio adjustments - */ -export declare enum AudioRampType { - /** - * Linear ramp - */ - LINEAR = "linear", - /** - * Exponential ramp - */ - EXPONENTIAL = "exponential", - /** - * Natural ramp. Depending on the adjustment being made, this will either be a - * logarithmic adjustment, or an equal-power adjustment. In general, this option - * will produce the best sounding results compared to the other options, and in - * general should always be preferred over the others. - */ - NATURAL = "natural" -} -/** - * Adjustment options to use when changing volume, panning, etc. - */ -export type AudioAdjustmentOptions = { - /** - * Ramping method to use. Use 'natural' option for good equal power crossfading. - * Supports a custom ramp by providing an array of numbers, where 0 is the initial state, and - * 1 is the adjusted state. Going below 0 or above 1 does what you would expect, going beyond - * the initial and adjusted state respectively. - */ - ramp: AudioRampType | number[] | null; - /** - * Delay of seconds before applying this adjustment. - */ - delay?: number; - /** - * Duration of seconds this adjustment should take, after the delay. - */ - duration?: number; -}; +import { AudioAdjustmentOptions } from './automation.js'; /** * AudioSourceNode, interchangeable with the standard AudioBufferSourceNode. * diff --git a/docs/js/lib/AudioSourceNode.js b/docs/js/lib/AudioSourceNode.js index 2303c6f..322f6da 100644 --- a/docs/js/lib/AudioSourceNode.js +++ b/docs/js/lib/AudioSourceNode.js @@ -1,24 +1,3 @@ -/** - * Ramp types for audio adjustments - */ -export var AudioRampType; -(function (AudioRampType) { - /** - * Linear ramp - */ - AudioRampType["LINEAR"] = "linear"; - /** - * Exponential ramp - */ - AudioRampType["EXPONENTIAL"] = "exponential"; - /** - * Natural ramp. Depending on the adjustment being made, this will either be a - * logarithmic adjustment, or an equal-power adjustment. In general, this option - * will produce the best sounding results compared to the other options, and in - * general should always be preferred over the others. - */ - AudioRampType["NATURAL"] = "natural"; -})(AudioRampType || (AudioRampType = {})); /** * AudioSourceNode, interchangeable with the standard AudioBufferSourceNode. * @@ -318,4 +297,4 @@ class AudioSourceNode { } } export default AudioSourceNode; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXVkaW9Tb3VyY2VOb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0F1ZGlvU291cmNlTm9kZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBTixJQUFZLGFBa0JYO0FBbEJELFdBQVksYUFBYTtJQUNyQjs7T0FFRztJQUNILGtDQUFpQixDQUFBO0lBRWpCOztPQUVHO0lBQ0gsNENBQTJCLENBQUE7SUFFM0I7Ozs7O09BS0c7SUFDSCxvQ0FBbUIsQ0FBQTtBQUN2QixDQUFDLEVBbEJXLGFBQWEsS0FBYixhQUFhLFFBa0J4QjtBQXlCRDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBOEJHO0FBQ0gsTUFBTSxlQUFlO0lBa0JZO0lBQXFDO0lBakIxRCxVQUFVLENBQXdCO0lBQ3pCLFFBQVEsQ0FBVztJQUNuQixnQkFBZ0IsQ0FBbUI7SUFFNUMsSUFBSSxHQUFrQixJQUFJLENBQUM7SUFFbkMsd0NBQXdDO0lBQ3ZCLFFBQVEsQ0FBZTtJQUNoQyxNQUFNLENBQXFCO0lBQzNCLFFBQVEsQ0FBdUI7SUFDdkMseUdBQXlHO0lBQ3hGLGlCQUFpQixHQUFpQixJQUFJLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUMvRCxnQkFBZ0IsR0FBa0IsSUFBSSxDQUFDO0lBRXRDLGNBQWMsR0FBVyxDQUFDLENBQUM7SUFDM0IsZUFBZSxHQUFXLENBQUMsQ0FBQztJQUVyQyxZQUE2QixZQUEwQixFQUFXLFdBQXVCO1FBQTVELGlCQUFZLEdBQVosWUFBWSxDQUFjO1FBQVcsZ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eEMsQ0FBQztJQUVELElBQUksZ0JBQWdCO1FBQ2hCLE9BQU8sSUFBSSxDQUFDLFVBQVUsQ0FBQyxnQkFBZ0IsQ0FBQztJQUM1QyxDQUFDO0lBRUQsSUFBSSxxQkFBcUI7UUFDckIsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLHFCQUFxQixDQUFDO0lBQ2pELENBQUM7SUFFRCxnQkFBZ0IsQ0FDWixJQUFhLEVBQ2IsUUFBeUQsRUFDekQsT0FBMkM7UUFFM0MsSUFBSSxDQUFDLFVBQVUsQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQzlELENBQUM7SUFFRCxtQkFBbUIsQ0FDZixJQUFhLEVBQ2IsUUFBeUQsRUFDekQsT0FBd0M7UUFFeEMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxtQkFBbUIsQ0FBQyxJQUFJLEVBQUUsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0lBQ2pFLENBQUM7SUFFRCxhQUFhLENBQUMsS0FBWTtRQUN0QixPQUFPLElBQUksQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ2hELENBQUM7Q0FDSjtBQUVELGVBQWUsZUFBZSxDQUFDIn0= \ No newline at end of file diff --git a/docs/js/lib/MusicMixer.d.ts b/docs/js/lib/MusicMixer.d.ts index 700e75f..3e95b2e 100644 --- a/docs/js/lib/MusicMixer.d.ts +++ b/docs/js/lib/MusicMixer.d.ts @@ -1,5 +1,6 @@ -import AudioSourceNode, { AudioAdjustmentOptions } from './AudioSourceNode.js'; +import AudioSourceNode from './AudioSourceNode.js'; import { Track, TrackGroup } from './Track.js'; +import { AudioAdjustmentOptions } from './automation.js'; /** * MusicMixer */ diff --git a/docs/js/lib/MusicMixer.js b/docs/js/lib/MusicMixer.js index e5af066..08b23fe 100644 --- a/docs/js/lib/MusicMixer.js +++ b/docs/js/lib/MusicMixer.js @@ -1,5 +1,6 @@ -import AudioSourceNode, { AudioRampType } from './AudioSourceNode.js'; +import AudioSourceNode from './AudioSourceNode.js'; import TrackSingle, { TrackGroup } from './Track.js'; +import automation from './automation.js'; import buildOptions from './defaults.js'; import * as defaults from './defaults.js'; /** @@ -82,53 +83,10 @@ class MusicMixer { * @returns {MusicMixer} this MusicMixer */ volume(volume, options) { - const currentValue = this.gainNode.gain.value; - const difference = volume - currentValue; const adjustment = options ? buildOptions(options, defaults.automationDefault) : defaults.automationDefault; - // Stop automations and immediately ramp. - if (Math.abs(difference) < Number.EPSILON) { - this.gainNode.gain.cancelAndHoldAtTime(this.currentTime); - this.gainNode.gain.setValueAtTime(currentValue, this.currentTime); - this.gainNode.gain.linearRampToValueAtTime(volume, adjustment.delay + this.currentTime); - return this; - } - this.gainNode.gain.cancelAndHoldAtTime(adjustment.delay + this.currentTime); - this.gainNode.gain.setValueAtTime(currentValue, adjustment.delay + this.currentTime); - if (Array.isArray(adjustment.ramp)) { - const valueCurve = []; - for (const markiplier of adjustment.ramp) { - valueCurve.push(currentValue + difference * markiplier); - } - this.gainNode.gain.setValueCurveAtTime(valueCurve, adjustment.delay + this.currentTime, adjustment.duration); - return this; - } - switch (adjustment.ramp) { - case AudioRampType.EXPONENTIAL: { - this.gainNode.gain.exponentialRampToValueAtTime(volume, adjustment.delay + adjustment.duration + this.currentTime); - break; - } - case AudioRampType.LINEAR: { - this.gainNode.gain.linearRampToValueAtTime(volume, adjustment.delay + adjustment.duration + this.currentTime); - break; - } - case AudioRampType.NATURAL: { - // Logarithmic approach to value, it is 95% the way there after 3 timeConstant, so we linearly ramp at that point - const timeConstant = adjustment.duration / 4; - this.gainNode.gain.setTargetAtTime(volume, adjustment.delay + this.currentTime, timeConstant); - this.gainNode.gain.cancelAndHoldAtTime(adjustment.delay + timeConstant * 3 + this.currentTime); - // The following event is implicitly added, per WebAudio spec. - // https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelandholdattime - // this.gainNode.gain.setValueAtTime(currentValue + (difference * (1 - Math.pow(Math.E, -3))), timeConstant * 3 + this.currentTime); - this.gainNode.gain.linearRampToValueAtTime(volume, adjustment.delay + adjustment.duration + this.currentTime); - break; - } - default: { - this.gainNode.gain.setValueAtTime(volume, adjustment.delay); - break; - } - } + automation(this.audioContext, this.gainNode.gain, volume, adjustment); return this; } get currentTime() { @@ -136,4 +94,4 @@ class MusicMixer { } } export default MusicMixer; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTXVzaWNNaXhlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9NdXNpY01peGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sZUFBZSxFQUFFLEVBQTBCLGFBQWEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQzlGLE9BQU8sV0FBVyxFQUFFLEVBQVMsVUFBVSxFQUFFLE1BQU0sWUFBWSxDQUFDO0FBQzVELE9BQU8sWUFBWSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEtBQUssUUFBUSxNQUFNLGVBQWUsQ0FBQztBQUUxQzs7R0FFRztBQUNILE1BQU0sVUFBVTtJQUNLLFlBQVksR0FBaUIsSUFBSSxZQUFZLEVBQUUsQ0FBQztJQUNoRCxRQUFRLENBQVc7SUFDNUIsTUFBTSxHQUVWLEVBQUUsQ0FBQztJQUVQO1FBQ0ksSUFBSSxDQUFDLFFBQVEsR0FBRyxJQUFJLENBQUMsWUFBWSxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBQy9DLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDekQsQ0FBQztJQUVEOzs7OztPQUtHO0lBQ0ksVUFBVSxDQUFDLElBQWE7UUFDM0IsTUFBTSxXQUFXLEdBQU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PLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDN0IsQ0FBQztJQUVEOzs7OztPQUtHO0lBQ0ksTUFBTSxDQUFDLE1BQWMsRUFBRSxPQUFnQztRQUMxRCxNQUFNLFVBQVUsR0FBRyxPQUFPO1lBQ3RCLENBQUMsQ0FBQyxZQUFZLENBQUMsT0FBTyxFQUFFLFFBQVEsQ0FBQyxpQkFBaUIsQ0FBQztZQUNuRCxDQUFDLENBQUMsUUFBUSxDQUFDLGlCQUFpQixDQUFDO1FBRWpDLFVBQVUsQ0FBQyxJQUFJLENBQUMsWUFBWSxFQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxVQUFVLENBQUMsQ0FBQztRQUV0RSxPQUFPLElBQUksQ0FBQztJQUNoQixDQUFDO0lBRUQsSUFBSSxXQUFXO1FBQ1gsT0FBTyxJQUFJLENBQUMsWUFBWSxDQUFDLFdBQVcsQ0FBQztJQUN6QyxDQUFDO0NBQ0o7QUFFRCxlQUFlLFVBQVUsQ0FBQyJ9 \ No newline at end of file diff --git a/docs/js/lib/Track.d.ts b/docs/js/lib/Track.d.ts index a67863c..77bb15d 100644 --- a/docs/js/lib/Track.d.ts +++ b/docs/js/lib/Track.d.ts @@ -1,4 +1,5 @@ -import AudioSourceNode, { AudioAdjustmentOptions } from './AudioSourceNode.js'; +import AudioSourceNode from './AudioSourceNode.js'; +import { AudioAdjustmentOptions } from './automation.js'; /** * Type representing a beat of a Track. Contains cancellation logic so third-parties can cancel specific * beat rules on a given Track. Also used for passing beat events to callbacks. diff --git a/docs/js/lib/Track.js b/docs/js/lib/Track.js index 24a638f..5126728 100644 --- a/docs/js/lib/Track.js +++ b/docs/js/lib/Track.js @@ -331,4 +331,4 @@ class TrackGroup { } export default TrackSingle; export { TrackGroup }; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHJhY2suanMiLCJzb3VyY2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UUsUUFBc0I7UUFDekQsSUFBSSxDQUFDLFlBQVksRUFBRSxDQUFDLFNBQVMsQ0FBQyxJQUFJLEVBQUUsUUFBUSxDQUFDLENBQUM7UUFDOUMsT0FBTyxJQUFJLENBQUM7SUFDaEIsQ0FBQztDQUNKO0FBRUQsZUFBZSxXQUFXLENBQUM7QUFDM0IsT0FBTyxFQUFTLFVBQVUsRUFBRSxDQUFDIn0= \ No newline at end of file diff --git a/docs/js/lib/automation.d.ts b/docs/js/lib/automation.d.ts new file mode 100644 index 0000000..70b2132 --- /dev/null +++ b/docs/js/lib/automation.d.ts @@ -0,0 +1,44 @@ +/** + * Ramp types for audio adjustments + */ +export declare enum AudioRampType { + /** + * Linear ramp + */ + LINEAR = "linear", + /** + * Exponential ramp + */ + EXPONENTIAL = "exponential", + /** + * Natural ramp. Depending on the adjustment being made, this will either be a + * logarithmic adjustment, or an equal-power adjustment. In general, this option + * will produce the best sounding results compared to the other options, and in + * general should always be preferred over the others. + */ + NATURAL = "natural" +} +/** + * Adjustment options to use when changing volume, panning, etc. + */ +export type AudioAdjustmentOptions = { + /** + * Ramping method to use. Use 'natural' option for good equal power crossfading. + * Supports a custom ramp by providing an array of numbers, where 0 is the initial state, and + * 1 is the adjusted state. Going below 0 or above 1 does what you would expect, going beyond + * the initial and adjusted state respectively. + */ + ramp: AudioRampType | number[] | null; + /** + * Delay of seconds before applying this adjustment. + */ + delay?: number; + /** + * Duration of seconds this adjustment should take, after the delay. + */ + duration?: number; +}; +/** + * Automation function for AudioParam + */ +export default function automation(audioContext: AudioContext, audioParam: AudioParam, value: number, options: Required): void; diff --git a/docs/js/lib/automation.js b/docs/js/lib/automation.js new file mode 100644 index 0000000..ba09c88 --- /dev/null +++ b/docs/js/lib/automation.js @@ -0,0 +1,71 @@ +/** + * Ramp types for audio adjustments + */ +export var AudioRampType; +(function (AudioRampType) { + /** + * Linear ramp + */ + AudioRampType["LINEAR"] = "linear"; + /** + * Exponential ramp + */ + AudioRampType["EXPONENTIAL"] = "exponential"; + /** + * Natural ramp. Depending on the adjustment being made, this will either be a + * logarithmic adjustment, or an equal-power adjustment. In general, this option + * will produce the best sounding results compared to the other options, and in + * general should always be preferred over the others. + */ + AudioRampType["NATURAL"] = "natural"; +})(AudioRampType || (AudioRampType = {})); +/** + * Automation function for AudioParam + */ +export default function automation(audioContext, audioParam, value, options) { + const currentValue = audioParam.value; + const difference = value - currentValue; + // Stop automations and immediately ramp. + if (Math.abs(difference) < Number.EPSILON) { + audioParam.cancelAndHoldAtTime(audioContext.currentTime); + audioParam.setValueAtTime(currentValue, audioContext.currentTime); + audioParam.linearRampToValueAtTime(value, options.delay + audioContext.currentTime); + return; + } + audioParam.cancelAndHoldAtTime(options.delay + audioContext.currentTime); + audioParam.setValueAtTime(currentValue, options.delay + audioContext.currentTime); + if (Array.isArray(options.ramp)) { + const valueCurve = []; + for (const markiplier of options.ramp) { + valueCurve.push(currentValue + difference * markiplier); + } + audioParam.setValueCurveAtTime(valueCurve, options.delay + audioContext.currentTime, options.duration); + return; + } + switch (options.ramp) { + case AudioRampType.EXPONENTIAL: { + audioParam.exponentialRampToValueAtTime(value, options.delay + options.duration + audioContext.currentTime); + break; + } + case AudioRampType.LINEAR: { + audioParam.linearRampToValueAtTime(value, options.delay + options.duration + audioContext.currentTime); + break; + } + case AudioRampType.NATURAL: { + // Logarithmic approach to value, it is 95% the way there after 3 timeConstant, so we linearly ramp at that point + const timeConstant = options.duration / 4; + audioParam.setTargetAtTime(value, options.delay + audioContext.currentTime, timeConstant); + audioParam.cancelAndHoldAtTime(options.delay + timeConstant * 3 + audioContext.currentTime); + // The following event is implicitly added, per WebAudio spec. + // https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelandholdattime + // this.gainNode.gain.setValueAtTime(currentValue + (difference * (1 - Math.pow(Math.E, -3))), timeConstant * 3 + this.currentTime); + audioParam.linearRampToValueAtTime(value, options.delay + options.duration + audioContext.currentTime); + break; + } + default: { + audioParam.setValueAtTime(value, options.delay); + break; +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0FBQyxLQUFLLEdBQUcsT0FBTyxDQUFDLFFBQVEsR0FBRyxZQUFZLENBQUMsV0FBVyxDQUM5RCxDQUFDO1lBQ0YsTUFBTTtRQUNWLENBQUM7UUFDRCxLQUFLLGFBQWEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLGlIQUFpSDtZQUNqSCxNQUFNLFlBQVksR0FBRyxPQUFPLENBQUMsUUFBUSxHQUFHLENBQUMsQ0FBQztZQUMxQyxVQUFVLENBQUMsZUFBZSxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsS0FBSyxHQUFHLFlBQVksQ0FBQyxXQUFXLEVBQUUsWUFBWSxDQUFDLENBQUM7WUFDMUYsVUFBVSxDQUFDLG1CQUFtQixDQUFDLE9BQU8sQ0FBQyxLQUFLLEdBQUcsWUFBWSxHQUFHLENBQUMsR0FBRyxZQUFZLENBQUMsV0FBVyxDQUFDLENBQUM7WUFDNUYsOERBQThEO1lBQzlELCtFQUErRTtZQUMvRSxvSUFBb0k7WUFDcEksVUFBVSxDQUFDLHVCQUF1QixDQUM5QixLQUFLLEVBQ0wsT0FBTyxDQUFDLEtBQUssR0FBRyxPQUFPLENBQUMsUUFBUSxHQUFHLFlBQVksQ0FBQyxXQUFXLENBQzlELENBQUM7WUFDRixNQUFNO1FBQ1YsQ0FBQztRQUNELE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFDTixVQUFVLENBQUMsY0FBYyxDQUFDLEtBQUssRUFBRSxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDaEQsTUFBTTtRQUNWLENBQUM7SUFDTCxDQUFDO0FBQ0wsQ0FBQyJ9 \ No newline at end of file diff --git a/docs/js/lib/defaults.d.ts b/docs/js/lib/defaults.d.ts index 999366a..31b654b 100644 --- a/docs/js/lib/defaults.d.ts +++ b/docs/js/lib/defaults.d.ts @@ -1,5 +1,5 @@ import { TrackSwapOptions, TrackSwapAdvancedOptions } from './Track.js'; -import { AudioAdjustmentOptions } from './AudioSourceNode.js'; +import { AudioAdjustmentOptions } from './automation.js'; declare function buildOptions(trackSwapOptions: TrackSwapOptions | TrackSwapAdvancedOptions | undefined | null, defaultSwapOptions: TrackSwapAdvancedOptions): TrackSwapAdvancedOptions; declare function buildOptions(audioAdjustmentOptions: AudioAdjustmentOptions | undefined | null, defaultAudioAdjustmentOptions: Required): Required; declare function buildOptions(audioAdjustmentOptions: AudioAdjustmentOptions | undefined | null, defaultSwapOptions: TrackSwapAdvancedOptions): TrackSwapAdvancedOptions; diff --git a/docs/js/lib/defaults.js b/docs/js/lib/defaults.js index af9c99d..19a8948 100644 --- a/docs/js/lib/defaults.js +++ b/docs/js/lib/defaults.js @@ -1,4 +1,4 @@ -import { AudioRampType } from './AudioSourceNode.js'; +import { AudioRampType } from './automation.js'; function buildOptions(options, defaultOptions) { if ('swap' in defaultOptions) { console.warn('A caller passed a defaultOptions object of type TrackSwapOptions. Only TrackSwapAdvancedOptions ' + @@ -183,4 +183,4 @@ export const automationDefault = Object.freeze({ delay: 0, duration: 1 / 711, }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZGVmYXVsdHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUEwQixhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQWM3RSxTQUFTLFlBQVksQ0FDakIsT0FBZ0csRUFDaEcsY0FBMkU7SUFFM0UsSUFBSSxNQUFNLElBQUksY0FBYyxFQUFFLENBQUM7UUFDM0IsT0FBTyxDQUFDLElBQUksQ0FDUixrR0FBa0c7WUFDOUYsNkRBQTZELENBQ3BFLENBQUM7SUFDTixDQUFDO0lBRUQsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ1gsT0FBTyxjQUFjLENBQUM7SUFDMUIsQ0FBQztJQU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UFBTSxDQUFDLE1BQU0sQ0FBQztJQUNqRixJQUFJLEVBQUUsYUFBYSxDQUFDLFdBQVc7SUFDL0IsS0FBSyxFQUFFLENBQUM7SUFDUixRQUFRLEVBQUUsR0FBRztDQUNoQixDQUFDLENBQUM7QUFFSDs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLGlCQUFpQixHQUFxQyxNQUFNLENBQUMsTUFBTSxDQUFDO0lBQzdFLElBQUksRUFBRSxhQUFhLENBQUMsT0FBTztJQUMzQixLQUFLLEVBQUUsQ0FBQztJQUNSLFFBQVEsRUFBRSxJQUFJO0NBQ2pCLENBQUMsQ0FBQztBQUVIOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQXFDLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDN0UsSUFBSSxFQUFFLGFBQWEsQ0FBQyxPQUFPO0lBQzNCLEtBQUssRUFBRSxDQUFDO0lBQ1IsUUFBUSxFQUFFLENBQUMsR0FBRyxHQUFHO0NBQ3BCLENBQUMsQ0FBQyJ9 \ No newline at end of file diff --git a/src/AudioSourceNode.ts b/src/AudioSourceNode.ts index 4ed5ccb..bcd2db7 100644 --- a/src/AudioSourceNode.ts +++ b/src/AudioSourceNode.ts @@ -1,48 +1,4 @@ -/** - * Ramp types for audio adjustments - */ -export enum AudioRampType { - /** - * Linear ramp - */ - LINEAR = 'linear', - - /** - * Exponential ramp - */ - EXPONENTIAL = 'exponential', - - /** - * Natural ramp. Depending on the adjustment being made, this will either be a - * logarithmic adjustment, or an equal-power adjustment. In general, this option - * will produce the best sounding results compared to the other options, and in - * general should always be preferred over the others. - */ - NATURAL = 'natural', -} - -/** - * Adjustment options to use when changing volume, panning, etc. - */ -export type AudioAdjustmentOptions = { - /** - * Ramping method to use. Use 'natural' option for good equal power crossfading. - * Supports a custom ramp by providing an array of numbers, where 0 is the initial state, and - * 1 is the adjusted state. Going below 0 or above 1 does what you would expect, going beyond - * the initial and adjusted state respectively. - */ - ramp: AudioRampType | number[] | null; - - /** - * Delay of seconds before applying this adjustment. - */ - delay?: number; - - /** - * Duration of seconds this adjustment should take, after the delay. - */ - duration?: number; -}; +import { AudioAdjustmentOptions } from './automation.js'; /** * AudioSourceNode, interchangeable with the standard AudioBufferSourceNode. diff --git a/src/MusicMixer.ts b/src/MusicMixer.ts index 1511499..d2e0cb5 100644 --- a/src/MusicMixer.ts +++ b/src/MusicMixer.ts @@ -1,5 +1,6 @@ -import AudioSourceNode, { AudioAdjustmentOptions, AudioRampType } from './AudioSourceNode.js'; +import AudioSourceNode from './AudioSourceNode.js'; import TrackSingle, { Track, TrackGroup } from './Track.js'; +import automation, { AudioAdjustmentOptions } from './automation.js'; import buildOptions from './defaults.js'; import * as defaults from './defaults.js'; @@ -91,71 +92,11 @@ class MusicMixer { * @returns {MusicMixer} this MusicMixer */ public volume(volume: number, options?: AudioAdjustmentOptions): MusicMixer { - const currentValue = this.gainNode.gain.value; - const difference = volume - currentValue; const adjustment = options ? buildOptions(options, defaults.automationDefault) : defaults.automationDefault; - // Stop automations and immediately ramp. - if (Math.abs(difference) < Number.EPSILON) { - this.gainNode.gain.cancelAndHoldAtTime(this.currentTime); - this.gainNode.gain.setValueAtTime(currentValue, this.currentTime); - this.gainNode.gain.linearRampToValueAtTime(volume, adjustment.delay + this.currentTime); - return this; - } - - this.gainNode.gain.cancelAndHoldAtTime(adjustment.delay + this.currentTime); - this.gainNode.gain.setValueAtTime(currentValue, adjustment.delay + this.currentTime); - if (Array.isArray(adjustment.ramp)) { - const valueCurve = []; - for (const markiplier of adjustment.ramp) { - valueCurve.push(currentValue + difference * markiplier); - } - this.gainNode.gain.setValueCurveAtTime( - valueCurve, - adjustment.delay + this.currentTime, - adjustment.duration, - ); - return this; - } - - switch (adjustment.ramp) { - case AudioRampType.EXPONENTIAL: { - this.gainNode.gain.exponentialRampToValueAtTime( - volume, - adjustment.delay + adjustment.duration + this.currentTime, - ); - break; - } - case AudioRampType.LINEAR: { - this.gainNode.gain.linearRampToValueAtTime( - volume, - adjustment.delay + adjustment.duration + this.currentTime, - ); - break; - } - case AudioRampType.NATURAL: { - // Logarithmic approach to value, it is 95% the way there after 3 timeConstant, so we linearly ramp at that point - const timeConstant = adjustment.duration / 4; - this.gainNode.gain.setTargetAtTime(volume, adjustment.delay + this.currentTime, timeConstant); - this.gainNode.gain.cancelAndHoldAtTime( - adjustment.delay + timeConstant * 3 + this.currentTime, - ); - // The following event is implicitly added, per WebAudio spec. - // https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelandholdattime - // this.gainNode.gain.setValueAtTime(currentValue + (difference * (1 - Math.pow(Math.E, -3))), timeConstant * 3 + this.currentTime); - this.gainNode.gain.linearRampToValueAtTime( - volume, - adjustment.delay + adjustment.duration + this.currentTime, - ); - break; - } - default: { - this.gainNode.gain.setValueAtTime(volume, adjustment.delay); - break; - } - } + automation(this.audioContext, this.gainNode.gain, volume, adjustment); return this; } diff --git a/src/Track.ts b/src/Track.ts index 8b1a0e4..2e98fd9 100644 --- a/src/Track.ts +++ b/src/Track.ts @@ -1,4 +1,5 @@ -import AudioSourceNode, { AudioAdjustmentOptions } from './AudioSourceNode.js'; +import AudioSourceNode from './AudioSourceNode.js'; +import { AudioAdjustmentOptions } from './automation.js'; import buildOptions, * as defaults from './defaults.js'; /** diff --git a/src/automation.ts b/src/automation.ts new file mode 100644 index 0000000..7e02693 --- /dev/null +++ b/src/automation.ts @@ -0,0 +1,116 @@ +/** + * Ramp types for audio adjustments + */ +export enum AudioRampType { + /** + * Linear ramp + */ + LINEAR = 'linear', + + /** + * Exponential ramp + */ + EXPONENTIAL = 'exponential', + + /** + * Natural ramp. Depending on the adjustment being made, this will either be a + * logarithmic adjustment, or an equal-power adjustment. In general, this option + * will produce the best sounding results compared to the other options, and in + * general should always be preferred over the others. + */ + NATURAL = 'natural', +} + +/** + * Adjustment options to use when changing volume, panning, etc. + */ +export type AudioAdjustmentOptions = { + /** + * Ramping method to use. Use 'natural' option for good equal power crossfading. + * Supports a custom ramp by providing an array of numbers, where 0 is the initial state, and + * 1 is the adjusted state. Going below 0 or above 1 does what you would expect, going beyond + * the initial and adjusted state respectively. + */ + ramp: AudioRampType | number[] | null; + + /** + * Delay of seconds before applying this adjustment. + */ + delay?: number; + + /** + * Duration of seconds this adjustment should take, after the delay. + */ + duration?: number; +}; + +/** + * Automation function for AudioParam + */ +export default function automation( + audioContext: AudioContext, + audioParam: AudioParam, + value: number, + options: Required, +): void { + const currentValue = audioParam.value; + const difference = value - currentValue; + + // Stop automations and immediately ramp. + if (Math.abs(difference) < Number.EPSILON) { + audioParam.cancelAndHoldAtTime(audioContext.currentTime); + audioParam.setValueAtTime(currentValue, audioContext.currentTime); + audioParam.linearRampToValueAtTime(value, options.delay + audioContext.currentTime); + return; + } + + audioParam.cancelAndHoldAtTime(options.delay + audioContext.currentTime); + audioParam.setValueAtTime(currentValue, options.delay + audioContext.currentTime); + if (Array.isArray(options.ramp)) { + const valueCurve = []; + for (const markiplier of options.ramp) { + valueCurve.push(currentValue + difference * markiplier); + } + audioParam.setValueCurveAtTime( + valueCurve, + options.delay + audioContext.currentTime, + options.duration, + ); + return; + } + + switch (options.ramp) { + case AudioRampType.EXPONENTIAL: { + audioParam.exponentialRampToValueAtTime( + value, + options.delay + options.duration + audioContext.currentTime, + ); + break; + } + case AudioRampType.LINEAR: { + audioParam.linearRampToValueAtTime( + value, + options.delay + options.duration + audioContext.currentTime, + ); + break; + } + case AudioRampType.NATURAL: { + // Logarithmic approach to value, it is 95% the way there after 3 timeConstant, so we linearly ramp at that point + const timeConstant = options.duration / 4; + audioParam.setTargetAtTime(value, options.delay + audioContext.currentTime, timeConstant); + audioParam.cancelAndHoldAtTime(options.delay + timeConstant * 3 + audioContext.currentTime); + // The following event is implicitly added, per WebAudio spec. + // https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelandholdattime + // this.gainNode.gain.setValueAtTime(currentValue + (difference * (1 - Math.pow(Math.E, -3))), timeConstant * 3 + this.currentTime); + audioParam.linearRampToValueAtTime( + value, + options.delay + options.duration + audioContext.currentTime, + ); + break; + } + default: { + audioParam.setValueAtTime(value, options.delay); + break; + } + } +} diff --git a/src/defaults.ts b/src/defaults.ts index e2440d5..8c1b73f 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -1,5 +1,5 @@ import { TrackSwapOptions, TrackSwapAdvancedOptions } from './Track.js'; -import { AudioAdjustmentOptions, AudioRampType } from './AudioSourceNode.js'; +import { AudioAdjustmentOptions, AudioRampType } from './automation.js'; function buildOptions( trackSwapOptions: TrackSwapOptions | TrackSwapAdvancedOptions | undefined | null, diff --git a/src/tsconfig.json b/src/tsconfig.json index 5396d50..696dcc2 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,5 +1,5 @@ { - "files": ["AudioSourceNode.ts", "MusicMixer.ts", "Track.ts", "defaults.ts"], + "files": ["AudioSourceNode.ts", "MusicMixer.ts", "Track.ts", "automation.ts", "defaults.ts"], "compilerOptions": { "composite": true,