@waveform-playlist/browser 17.0.0-next.7 → 17.0.0-next.8
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/README.md +4 -4
- package/dist/index.d.mts +48 -39
- package/dist/index.d.ts +48 -39
- package/dist/index.js +103 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -102
- package/dist/index.mjs.map +1 -1
- package/dist/tone.js +2 -2
- package/dist/tone.js.map +1 -1
- package/dist/tone.mjs +2 -2
- package/dist/tone.mjs.map +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ React components, hooks, and context providers for building a multitrack Web Aud
|
|
|
10
10
|
- **Split context providers** — `WaveformPlaylistProvider` (multitrack, Tone.js-backed) and `MediaElementPlaylistProvider` (single-track, `<audio>`-backed with pitch-preserving playback rate)
|
|
11
11
|
- **Focused context hooks** — one hook per group of fields that change together (`useIsPlaying`, `useCurrentTime`, `useSelection`, `useAnnotations`, `usePlaybackControls`, `usePlaybackRefs`, `usePlaylistView`, `usePlaylistTimeline`, `usePlaylistMixer`, `useLoop`, `useEditorControls` and more), so a component re-renders only for the group it reads, not on every pointer move, slider step or annotation boundary
|
|
12
12
|
- **Audio effects** — 20 Tone.js effects (reverb, delay, modulation, filter, distortion, dynamics, spatial) with runtime parameter control, master and per-track chains, plus WAM 2.0 plugin hosting
|
|
13
|
-
- **Recording** — pairs with `@waveform-playlist/recording` for mic input, overdubbing, and live waveform preview; punch-in takes replace overlapped content, and `useRecordingSession({ isRecording, trackId })` (or `setRecordingActive(active,
|
|
13
|
+
- **Recording** — pairs with `@waveform-playlist/recording` for mic input, overdubbing, and live waveform preview; punch-in takes replace overlapped content, and `useRecordingSession({ isRecording, trackId })` (or `setRecordingActive(active, recordingTrackId)` directly) suppresses the end-of-timeline auto-stop and mutes the recorded-over track for the take (its Mute button shows it and is disabled; the track's own mute is not changed, so a mute set during the take stays)
|
|
14
14
|
- **Annotations & spectrogram** — optional integration contexts for `@waveform-playlist/annotations` and `@waveform-playlist/spectrogram`. Under either provider, `<WaveformAnnotationBoxes>` (a part of the view; it wires the drag of the box edges itself) and `<AnnotationList>` (the text list, anywhere under the provider) draw the annotations
|
|
15
15
|
- **WAV export** — render the full mix (including effects) offline to a downloadable WAV file
|
|
16
16
|
- **MediaElement player mode** — a lightweight single-track player with pitch-preserving speed control, for podcast/audiobook-style use cases that don't need multitrack mixing
|
|
@@ -104,11 +104,11 @@ Under either provider:
|
|
|
104
104
|
| Hook | Exposes | Re-renders on |
|
|
105
105
|
|------|---------|---------------|
|
|
106
106
|
| `useArrangement` | The provider's `Arrangement`: change the tracks through it | never |
|
|
107
|
-
| `useEditorControls` | Actions — track mute/solo/volume/pan (by track id), track order, zoom, loop, undo/redo (on the arrangement, engine or not), `setRecordingActive` (recording-session suppression +
|
|
107
|
+
| `useEditorControls` | Actions — track mute/solo/volume/pan (by track id; each an undo step, `{ gesture }` makes a slider drag one), track order, zoom, loop, undo/redo (on the arrangement, engine or not), `setRecordingActive` (recording-session suppression + the take's mute on the recorded track) | never |
|
|
108
108
|
| `useEngineRefs` | `playoutRef` (the engine), `getPlaybackTime()`, `getAudioContextTime()`, `getLookAhead()`, `getOutputLatency()`, `playbackStartTimeRef`, `audioStartPositionRef` | never |
|
|
109
109
|
| `usePlaylistTimeline` | `tracks` (loaded clips only, read-only), `peaksDataArray` (with placeholder records for clips still loading), `duration` (loaded audio), `isReady` | every clip operation (a trim once, on release), a zoom (`peaksDataArray` is computed per zoom level), audio or peaks arriving, `isReady` changing |
|
|
110
|
-
| `usePlaylistMixer` | `trackStates` (one entry per track in the order of `tracks`, also while a track loads), `masterVolume` | every mute, solo, volume or pan change (each step of a slider drag); tracks added, removed, renamed or reordered |
|
|
111
|
-
| `useTrack` | Among the children of `<WaveformTrackControls>` only: the track whose panel is being drawn (id, name, mixer state, `isSelected`, `
|
|
110
|
+
| `usePlaylistMixer` | `trackStates` (one entry per track in the order of `tracks`, also while a track loads), `masterVolume` | every mute, solo, volume or pan change (each step of a slider drag, an undo or a redo of one); a take starting or ending on a track; tracks added, removed, renamed or reordered |
|
|
111
|
+
| `useTrack` | Among the children of `<WaveformTrackControls>` only: the track whose panel is being drawn (id, name, mixer state, `isSelected`, `isRecording`) and actions bound to it (`setMuted`, `setVolume`, `moveUp`, …) | a change of that track's state, position or selection |
|
|
112
112
|
| `useTrackReorderPreview` | `trackDragPreview` | every drag-over of a track reorder |
|
|
113
113
|
| `useLoop` | `isLoopEnabled`, `loopStart`, `loopEnd` | a loop change |
|
|
114
114
|
| `useSelectedTrackId` | `selectedTrackId` | another track being selected |
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactNode, RefObject } from 'react';
|
|
3
3
|
import { EffectsFunction, TrackEffectsFunction, SoundFontCache } from '@waveform-playlist/playout';
|
|
4
|
-
import { PlaylistEngine, Arrangement, PlayoutAdapter, EngineState, LoadSource, ArrangementSourcesValue } from '@waveform-playlist/engine';
|
|
4
|
+
import { MixerChangeOptions, PlaylistEngine, Arrangement, PlayoutAdapter, EngineState, LoadSource, ArrangementSourcesValue } from '@waveform-playlist/engine';
|
|
5
5
|
import { ValueSourceHandle, AnnotationData, AnnotationStore, ClipTrack, PeakData, Fade, MidiNoteData, WaveformDataObject, KeyboardShortcut, ArrangementTrack, AnnotationStoreOptions, RecordingProgressSource, AnnotationAction, RenderAnnotationItemProps, TrackKind, RenderMode, AnnotationActionOptions, TrackSpectrogramOverrides, SpectrogramConfig, ColorMapValue, SpectrogramCanvasRegistration } from '@waveform-playlist/core';
|
|
6
6
|
import { TimeFormat, WaveformPlaylistTheme, RenderPlayheadFunction, TrackMenuItem, BeatsAndBarsSnapTo } from '@waveform-playlist/ui-components';
|
|
7
7
|
import { FadeConfig, MediaElementPlayout } from '@waveform-playlist/media-element-playout';
|
|
@@ -284,10 +284,10 @@ interface EditorControlsContextValue {
|
|
|
284
284
|
* from a control; this is for the view's own press and drag handling.
|
|
285
285
|
*/
|
|
286
286
|
setCurrentTime: (time: number) => void;
|
|
287
|
-
setTrackMute: (trackId: string, muted: boolean) => void;
|
|
288
|
-
setTrackSolo: (trackId: string, soloed: boolean) => void;
|
|
289
|
-
setTrackVolume: (trackId: string, volume: number) => void;
|
|
290
|
-
setTrackPan: (trackId: string, pan: number) => void;
|
|
287
|
+
setTrackMute: (trackId: string, muted: boolean, options?: MixerChangeOptions) => void;
|
|
288
|
+
setTrackSolo: (trackId: string, soloed: boolean, options?: MixerChangeOptions) => void;
|
|
289
|
+
setTrackVolume: (trackId: string, volume: number, options?: MixerChangeOptions) => void;
|
|
290
|
+
setTrackPan: (trackId: string, pan: number, options?: MixerChangeOptions) => void;
|
|
291
291
|
/** Move a track to a new index in the vertical track order. Purely
|
|
292
292
|
* organizational — playback is not interrupted. An undo step of the
|
|
293
293
|
* arrangement (#812). */
|
|
@@ -308,18 +308,21 @@ interface EditorControlsContextValue {
|
|
|
308
308
|
redo: () => void;
|
|
309
309
|
/** Mark a recording session active/inactive. While active: (1) the
|
|
310
310
|
* end-of-audio auto-stop is suppressed so overdub playback runs past the
|
|
311
|
-
* end of existing material, and (2) with
|
|
312
|
-
*
|
|
313
|
-
* recording replaces whatever the
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
|
|
311
|
+
* end of existing material, and (2) with a `recordingTrackId`, that track
|
|
312
|
+
* is marked in the arrangement as the one the take is recording onto
|
|
313
|
+
* (`setTrackRecording`, #843): punch-in recording replaces whatever the
|
|
314
|
+
* take overlaps (#579), so the doomed material must not play under the
|
|
315
|
+
* overdub. The take's mute plays the track muted and is no undo step.
|
|
316
|
+
* `trackStates` and the track's Mute button show it muted, the built-in
|
|
317
|
+
* `<TrackMuteButton />` of that track is disabled, and
|
|
318
|
+
* `useTrack().isRecording` is true for it, while
|
|
319
|
+
* `arrangement.getMixer()` keeps the track's own mute: nothing is written
|
|
320
|
+
* to it, so a mute changed during the take stays after it. One track is
|
|
321
|
+
* recorded onto at a time: naming one clears any other, and
|
|
322
|
+
* `setRecordingActive(false)` clears every track. `useRecordingSession`
|
|
323
|
+
* calls it for the length of a take; overdub flows should also call it
|
|
324
|
+
* eagerly (before `play()`). */
|
|
325
|
+
setRecordingActive: (active: boolean, recordingTrackId?: string | null) => void;
|
|
323
326
|
}
|
|
324
327
|
/**
|
|
325
328
|
* Refs and functions of the multitrack engine (#688). Like
|
|
@@ -575,6 +578,7 @@ type TrackClipPeaks = ClipPeaks[];
|
|
|
575
578
|
|
|
576
579
|
interface TrackState {
|
|
577
580
|
name: string;
|
|
581
|
+
/** The track's own mute, or true while a take is recording onto it (#843). */
|
|
578
582
|
muted: boolean;
|
|
579
583
|
soloed: boolean;
|
|
580
584
|
volume: number;
|
|
@@ -1734,8 +1738,9 @@ declare const DefaultTrackControls: react__default.MemoExoticComponent<typeof De
|
|
|
1734
1738
|
declare const TrackName: react__default.FC;
|
|
1735
1739
|
/**
|
|
1736
1740
|
* Mutes and unmutes the track. Disabled while a take is recorded onto the
|
|
1737
|
-
* track (`useTrack().
|
|
1738
|
-
*
|
|
1741
|
+
* track (`useTrack().isRecording`): the take plays the track muted and
|
|
1742
|
+
* the button shows it pressed, so a click would set the track's own mute
|
|
1743
|
+
* from the take's mute (#812, #843).
|
|
1739
1744
|
*/
|
|
1740
1745
|
declare const TrackMuteButton: react__default.FC;
|
|
1741
1746
|
/** Solos and unsolos the track. */
|
|
@@ -1777,6 +1782,7 @@ interface TrackContextValue {
|
|
|
1777
1782
|
index: number;
|
|
1778
1783
|
/** The track's name, or "Track N" (N is the position, from 1) when it has none and while it is loading. */
|
|
1779
1784
|
name: string;
|
|
1785
|
+
/** The track's own mute, or true while a take is recording onto it (`isRecording`). */
|
|
1780
1786
|
muted: boolean;
|
|
1781
1787
|
soloed: boolean;
|
|
1782
1788
|
/** 0 to 1. */
|
|
@@ -1796,16 +1802,18 @@ interface TrackContextValue {
|
|
|
1796
1802
|
hasSpectrogram: boolean;
|
|
1797
1803
|
/**
|
|
1798
1804
|
* True while a take is being recorded onto this track (`setRecordingActive`,
|
|
1799
|
-
* `useRecordingSession`). The track
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1805
|
+
* `useRecordingSession`). The track plays muted for the take and `muted` is
|
|
1806
|
+
* true, while the track's own mute (`arrangement.getMixer()`) is not
|
|
1807
|
+
* changed by the take: a mute set meanwhile stays after it (#843). The
|
|
1808
|
+
* built-in `<TrackMuteButton />` is disabled while this is true; an app's
|
|
1809
|
+
* own mute control can do the same, since toggling from `muted` here would
|
|
1810
|
+
* set the track's own mute from the take's mute.
|
|
1803
1811
|
*/
|
|
1804
|
-
|
|
1805
|
-
setMuted: (muted: boolean) => void;
|
|
1806
|
-
setSoloed: (soloed: boolean) => void;
|
|
1807
|
-
setVolume: (volume: number) => void;
|
|
1808
|
-
setPan: (pan: number) => void;
|
|
1812
|
+
isRecording: boolean;
|
|
1813
|
+
setMuted: (muted: boolean, options?: MixerChangeOptions) => void;
|
|
1814
|
+
setSoloed: (soloed: boolean, options?: MixerChangeOptions) => void;
|
|
1815
|
+
setVolume: (volume: number, options?: MixerChangeOptions) => void;
|
|
1816
|
+
setPan: (pan: number, options?: MixerChangeOptions) => void;
|
|
1809
1817
|
/** Makes this the selected track. */
|
|
1810
1818
|
select: () => void;
|
|
1811
1819
|
/** Moves the track one position up. Nothing happens for the first track. */
|
|
@@ -1855,20 +1863,21 @@ interface RecordingSessionOptions {
|
|
|
1855
1863
|
/**
|
|
1856
1864
|
* Tells the playlist that a take is being recorded into a track, for as long
|
|
1857
1865
|
* as `isRecording` is true (#685). The provider then keeps playback running
|
|
1858
|
-
* past the end of the audio and
|
|
1859
|
-
* the take
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
1867
|
-
*
|
|
1866
|
+
* past the end of the audio and marks the track in the arrangement as the
|
|
1867
|
+
* one the take is recording onto (`setTrackRecording`, #843), which plays it
|
|
1868
|
+
* muted for the take, so what it already holds does not play under a
|
|
1869
|
+
* punch-in that replaces it (`trackStates` shows the track muted, its
|
|
1870
|
+
* built-in Mute button is disabled and `useTrack().isRecording` is true).
|
|
1871
|
+
* The track's own mute is not written, so a mute changed during the take
|
|
1872
|
+
* stays after it. The take's mute is cleared when the take ends, the track
|
|
1873
|
+
* changes or the component unmounts; the provider also clears it in its own
|
|
1874
|
+
* cleanup (its unmount or an `<Activity>` hide) while a track is still
|
|
1875
|
+
* recording. An `<Activity>` hide of the component ends the session the same
|
|
1876
|
+
* way, and the reveal mutes the track again.
|
|
1868
1877
|
*
|
|
1869
1878
|
* Call it in the component that calls `useIntegratedRecording`, under
|
|
1870
1879
|
* `WaveformPlaylistProvider`. `<WaveformRecordingPreview>` only draws the
|
|
1871
|
-
* take: without this hook the
|
|
1880
|
+
* take: without this hook the track is not muted for the take and plays as it is.
|
|
1872
1881
|
*
|
|
1873
1882
|
* A handler that starts playback together with the recording should also call
|
|
1874
1883
|
* `setRecordingActive(true, trackId)` (from `useEditorControls()`) before
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactNode, RefObject } from 'react';
|
|
3
3
|
import { EffectsFunction, TrackEffectsFunction, SoundFontCache } from '@waveform-playlist/playout';
|
|
4
|
-
import { PlaylistEngine, Arrangement, PlayoutAdapter, EngineState, LoadSource, ArrangementSourcesValue } from '@waveform-playlist/engine';
|
|
4
|
+
import { MixerChangeOptions, PlaylistEngine, Arrangement, PlayoutAdapter, EngineState, LoadSource, ArrangementSourcesValue } from '@waveform-playlist/engine';
|
|
5
5
|
import { ValueSourceHandle, AnnotationData, AnnotationStore, ClipTrack, PeakData, Fade, MidiNoteData, WaveformDataObject, KeyboardShortcut, ArrangementTrack, AnnotationStoreOptions, RecordingProgressSource, AnnotationAction, RenderAnnotationItemProps, TrackKind, RenderMode, AnnotationActionOptions, TrackSpectrogramOverrides, SpectrogramConfig, ColorMapValue, SpectrogramCanvasRegistration } from '@waveform-playlist/core';
|
|
6
6
|
import { TimeFormat, WaveformPlaylistTheme, RenderPlayheadFunction, TrackMenuItem, BeatsAndBarsSnapTo } from '@waveform-playlist/ui-components';
|
|
7
7
|
import { FadeConfig, MediaElementPlayout } from '@waveform-playlist/media-element-playout';
|
|
@@ -284,10 +284,10 @@ interface EditorControlsContextValue {
|
|
|
284
284
|
* from a control; this is for the view's own press and drag handling.
|
|
285
285
|
*/
|
|
286
286
|
setCurrentTime: (time: number) => void;
|
|
287
|
-
setTrackMute: (trackId: string, muted: boolean) => void;
|
|
288
|
-
setTrackSolo: (trackId: string, soloed: boolean) => void;
|
|
289
|
-
setTrackVolume: (trackId: string, volume: number) => void;
|
|
290
|
-
setTrackPan: (trackId: string, pan: number) => void;
|
|
287
|
+
setTrackMute: (trackId: string, muted: boolean, options?: MixerChangeOptions) => void;
|
|
288
|
+
setTrackSolo: (trackId: string, soloed: boolean, options?: MixerChangeOptions) => void;
|
|
289
|
+
setTrackVolume: (trackId: string, volume: number, options?: MixerChangeOptions) => void;
|
|
290
|
+
setTrackPan: (trackId: string, pan: number, options?: MixerChangeOptions) => void;
|
|
291
291
|
/** Move a track to a new index in the vertical track order. Purely
|
|
292
292
|
* organizational — playback is not interrupted. An undo step of the
|
|
293
293
|
* arrangement (#812). */
|
|
@@ -308,18 +308,21 @@ interface EditorControlsContextValue {
|
|
|
308
308
|
redo: () => void;
|
|
309
309
|
/** Mark a recording session active/inactive. While active: (1) the
|
|
310
310
|
* end-of-audio auto-stop is suppressed so overdub playback runs past the
|
|
311
|
-
* end of existing material, and (2) with
|
|
312
|
-
*
|
|
313
|
-
* recording replaces whatever the
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
|
|
311
|
+
* end of existing material, and (2) with a `recordingTrackId`, that track
|
|
312
|
+
* is marked in the arrangement as the one the take is recording onto
|
|
313
|
+
* (`setTrackRecording`, #843): punch-in recording replaces whatever the
|
|
314
|
+
* take overlaps (#579), so the doomed material must not play under the
|
|
315
|
+
* overdub. The take's mute plays the track muted and is no undo step.
|
|
316
|
+
* `trackStates` and the track's Mute button show it muted, the built-in
|
|
317
|
+
* `<TrackMuteButton />` of that track is disabled, and
|
|
318
|
+
* `useTrack().isRecording` is true for it, while
|
|
319
|
+
* `arrangement.getMixer()` keeps the track's own mute: nothing is written
|
|
320
|
+
* to it, so a mute changed during the take stays after it. One track is
|
|
321
|
+
* recorded onto at a time: naming one clears any other, and
|
|
322
|
+
* `setRecordingActive(false)` clears every track. `useRecordingSession`
|
|
323
|
+
* calls it for the length of a take; overdub flows should also call it
|
|
324
|
+
* eagerly (before `play()`). */
|
|
325
|
+
setRecordingActive: (active: boolean, recordingTrackId?: string | null) => void;
|
|
323
326
|
}
|
|
324
327
|
/**
|
|
325
328
|
* Refs and functions of the multitrack engine (#688). Like
|
|
@@ -575,6 +578,7 @@ type TrackClipPeaks = ClipPeaks[];
|
|
|
575
578
|
|
|
576
579
|
interface TrackState {
|
|
577
580
|
name: string;
|
|
581
|
+
/** The track's own mute, or true while a take is recording onto it (#843). */
|
|
578
582
|
muted: boolean;
|
|
579
583
|
soloed: boolean;
|
|
580
584
|
volume: number;
|
|
@@ -1734,8 +1738,9 @@ declare const DefaultTrackControls: react__default.MemoExoticComponent<typeof De
|
|
|
1734
1738
|
declare const TrackName: react__default.FC;
|
|
1735
1739
|
/**
|
|
1736
1740
|
* Mutes and unmutes the track. Disabled while a take is recorded onto the
|
|
1737
|
-
* track (`useTrack().
|
|
1738
|
-
*
|
|
1741
|
+
* track (`useTrack().isRecording`): the take plays the track muted and
|
|
1742
|
+
* the button shows it pressed, so a click would set the track's own mute
|
|
1743
|
+
* from the take's mute (#812, #843).
|
|
1739
1744
|
*/
|
|
1740
1745
|
declare const TrackMuteButton: react__default.FC;
|
|
1741
1746
|
/** Solos and unsolos the track. */
|
|
@@ -1777,6 +1782,7 @@ interface TrackContextValue {
|
|
|
1777
1782
|
index: number;
|
|
1778
1783
|
/** The track's name, or "Track N" (N is the position, from 1) when it has none and while it is loading. */
|
|
1779
1784
|
name: string;
|
|
1785
|
+
/** The track's own mute, or true while a take is recording onto it (`isRecording`). */
|
|
1780
1786
|
muted: boolean;
|
|
1781
1787
|
soloed: boolean;
|
|
1782
1788
|
/** 0 to 1. */
|
|
@@ -1796,16 +1802,18 @@ interface TrackContextValue {
|
|
|
1796
1802
|
hasSpectrogram: boolean;
|
|
1797
1803
|
/**
|
|
1798
1804
|
* True while a take is being recorded onto this track (`setRecordingActive`,
|
|
1799
|
-
* `useRecordingSession`). The track
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
1802
|
-
*
|
|
1805
|
+
* `useRecordingSession`). The track plays muted for the take and `muted` is
|
|
1806
|
+
* true, while the track's own mute (`arrangement.getMixer()`) is not
|
|
1807
|
+
* changed by the take: a mute set meanwhile stays after it (#843). The
|
|
1808
|
+
* built-in `<TrackMuteButton />` is disabled while this is true; an app's
|
|
1809
|
+
* own mute control can do the same, since toggling from `muted` here would
|
|
1810
|
+
* set the track's own mute from the take's mute.
|
|
1803
1811
|
*/
|
|
1804
|
-
|
|
1805
|
-
setMuted: (muted: boolean) => void;
|
|
1806
|
-
setSoloed: (soloed: boolean) => void;
|
|
1807
|
-
setVolume: (volume: number) => void;
|
|
1808
|
-
setPan: (pan: number) => void;
|
|
1812
|
+
isRecording: boolean;
|
|
1813
|
+
setMuted: (muted: boolean, options?: MixerChangeOptions) => void;
|
|
1814
|
+
setSoloed: (soloed: boolean, options?: MixerChangeOptions) => void;
|
|
1815
|
+
setVolume: (volume: number, options?: MixerChangeOptions) => void;
|
|
1816
|
+
setPan: (pan: number, options?: MixerChangeOptions) => void;
|
|
1809
1817
|
/** Makes this the selected track. */
|
|
1810
1818
|
select: () => void;
|
|
1811
1819
|
/** Moves the track one position up. Nothing happens for the first track. */
|
|
@@ -1855,20 +1863,21 @@ interface RecordingSessionOptions {
|
|
|
1855
1863
|
/**
|
|
1856
1864
|
* Tells the playlist that a take is being recorded into a track, for as long
|
|
1857
1865
|
* as `isRecording` is true (#685). The provider then keeps playback running
|
|
1858
|
-
* past the end of the audio and
|
|
1859
|
-
* the take
|
|
1860
|
-
*
|
|
1861
|
-
*
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1864
|
-
*
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
1867
|
-
*
|
|
1866
|
+
* past the end of the audio and marks the track in the arrangement as the
|
|
1867
|
+
* one the take is recording onto (`setTrackRecording`, #843), which plays it
|
|
1868
|
+
* muted for the take, so what it already holds does not play under a
|
|
1869
|
+
* punch-in that replaces it (`trackStates` shows the track muted, its
|
|
1870
|
+
* built-in Mute button is disabled and `useTrack().isRecording` is true).
|
|
1871
|
+
* The track's own mute is not written, so a mute changed during the take
|
|
1872
|
+
* stays after it. The take's mute is cleared when the take ends, the track
|
|
1873
|
+
* changes or the component unmounts; the provider also clears it in its own
|
|
1874
|
+
* cleanup (its unmount or an `<Activity>` hide) while a track is still
|
|
1875
|
+
* recording. An `<Activity>` hide of the component ends the session the same
|
|
1876
|
+
* way, and the reveal mutes the track again.
|
|
1868
1877
|
*
|
|
1869
1878
|
* Call it in the component that calls `useIntegratedRecording`, under
|
|
1870
1879
|
* `WaveformPlaylistProvider`. `<WaveformRecordingPreview>` only draws the
|
|
1871
|
-
* take: without this hook the
|
|
1880
|
+
* take: without this hook the track is not muted for the take and plays as it is.
|
|
1872
1881
|
*
|
|
1873
1882
|
* A handler that starts playback together with the recording should also call
|
|
1874
1883
|
* `setRecordingActive(true, trackId)` (from `useEditorControls()`) before
|