@songram/songram-daw-engine 3.4.1 → 3.6.0

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/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Naomi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.d.ts CHANGED
@@ -1913,6 +1913,7 @@ export declare class MidiToneTrack implements PlayableTrack {
1913
1913
  private muteGain;
1914
1914
  private track;
1915
1915
  private effectsCleanup?;
1916
+ private _destination;
1916
1917
  constructor(options: MidiToneTrackOptions);
1917
1918
  /**
1918
1919
  * Trigger a note using the appropriate synth.
@@ -1946,6 +1947,10 @@ export declare class MidiToneTrack implements PlayableTrack {
1946
1947
  setPan(pan: number): void;
1947
1948
  setMute(muted: boolean): void;
1948
1949
  setSolo(soloed: boolean): void;
1950
+ /**
1951
+ * Hot-swap the effects chain without stopping playback.
1952
+ */
1953
+ setEffects(effectsFn?: TrackEffectsFunction): void;
1949
1954
  dispose(): void;
1950
1955
  get id(): string;
1951
1956
  get duration(): number;
@@ -2173,6 +2178,8 @@ export declare interface PlayableTrack {
2173
2178
  setPan(pan: number): void;
2174
2179
  setMute(muted: boolean): void;
2175
2180
  setSolo(soloed: boolean): void;
2181
+ /** Hot-swap effects chain without stopping playback. */
2182
+ setEffects(effectsFn?: TrackEffectsFunction): void;
2176
2183
  dispose(): void;
2177
2184
  }
2178
2185
 
@@ -2261,6 +2268,12 @@ export declare class PlaylistEngine {
2261
2268
  setTrackMute(trackId: string, muted: boolean): void;
2262
2269
  setTrackSolo(trackId: string, soloed: boolean): void;
2263
2270
  setTrackPan(trackId: string, pan: number): void;
2271
+ /**
2272
+ * Hot-swap a track's effects chain without stopping playback or rebuilding.
2273
+ * The effects function is called with the track's audio graph end node and
2274
+ * the master volume destination. Returns an optional cleanup function.
2275
+ */
2276
+ setTrackEffects(trackId: string, effectsFn?: ClipTrack['effects']): void;
2264
2277
  zoomIn(): void;
2265
2278
  zoomOut(): void;
2266
2279
  setZoomLevel(samplesPerPixel: number): void;
@@ -2302,6 +2315,8 @@ export declare interface PlayoutAdapter {
2302
2315
  setTracks(tracks: ClipTrack[]): void;
2303
2316
  /** Incrementally add a single track without rebuilding the entire playout. */
2304
2317
  addTrack?(track: ClipTrack): void;
2318
+ /** Hot-swap a track's effects chain without stopping playback or rebuilding. */
2319
+ setTrackEffects?(trackId: string, effectsFn?: ClipTrack['effects']): void;
2305
2320
  play(startTime: number, endTime?: number): void;
2306
2321
  pause(): void;
2307
2322
  stop(): void;
@@ -2870,6 +2885,7 @@ export declare class SoundFontToneTrack implements PlayableTrack {
2870
2885
  private muteGain;
2871
2886
  private track;
2872
2887
  private effectsCleanup?;
2888
+ private _destination;
2873
2889
  constructor(options: SoundFontToneTrackOptions);
2874
2890
  /**
2875
2891
  * Trigger a note by creating a native AudioBufferSourceNode from the SoundFont cache.
@@ -2898,6 +2914,10 @@ export declare class SoundFontToneTrack implements PlayableTrack {
2898
2914
  setPan(pan: number): void;
2899
2915
  setMute(muted: boolean): void;
2900
2916
  setSolo(soloed: boolean): void;
2917
+ /**
2918
+ * Hot-swap the effects chain without stopping playback.
2919
+ */
2920
+ setEffects(effectsFn?: TrackEffectsFunction): void;
2901
2921
  dispose(): void;
2902
2922
  get id(): string;
2903
2923
  get duration(): number;
@@ -3437,6 +3457,7 @@ export declare class ToneTrack {
3437
3457
  private muteGain;
3438
3458
  private track;
3439
3459
  private effectsCleanup?;
3460
+ private _destination;
3440
3461
  private _scheduleGuardOffset;
3441
3462
  constructor(options: ToneTrackOptions);
3442
3463
  /**
@@ -3485,6 +3506,12 @@ export declare class ToneTrack {
3485
3506
  setPan(pan: number): void;
3486
3507
  setMute(muted: boolean): void;
3487
3508
  setSolo(soloed: boolean): void;
3509
+ /**
3510
+ * Hot-swap the effects chain without stopping playback.
3511
+ * Disconnects the old effects (if any), runs the new effects function,
3512
+ * and reconnects the audio graph. Active sources keep playing.
3513
+ */
3514
+ setEffects(effectsFn?: TrackEffectsFunction): void;
3488
3515
  dispose(): void;
3489
3516
  get id(): string;
3490
3517
  get duration(): number;