@dawcore/components 0.0.39-next.14 → 0.0.39-next.15
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 +1 -1
- package/dist/index.d.mts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +169 -111
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -512,7 +512,7 @@ Methods:
|
|
|
512
512
|
|
|
513
513
|
### `<daw-track>`
|
|
514
514
|
|
|
515
|
-
Declarative track data. Attributes: `src`, `name`, `volume`, `pan`, `muted`, `soloed`, `kind` (`'audio' | 'midi'`, default `'audio'`: what the track holds; set it before the track is added), `render-mode` (`'waveform' | 'spectrogram'`, default `'waveform'`: how an audio track is drawn; a MIDI track is always a piano roll). JS property: `spectrogramConfig` (per-track spectrogram override). Also exposes the per-track effects API (see [Effects](#effects)). The attributes are the declaration and are never written by the editor; the properties `name`, `volume`, `pan`, `muted` and `soloed` read the arrangement live (after an Undo they show the restored values), and setting one, or changing its attribute, is one undo step. `index` is the track's position in the arrangement. An element whose track left the arrangement (an Undo of its arrival, a removal made on the arrangement) or that waits while a handed-in arrangement is set is detached: `:state(detached)` in CSS, its properties read the declaration, and a change warns and does nothing. Moving a `<daw-track>` in the DOM reorders the track; an Undo moves no element. Fires `daw-track-update` `{ trackId, changed }` after a property changes. Loading does not clear the undo history.
|
|
515
|
+
Declarative track data. Attributes: `src`, `name`, `volume`, `pan`, `pan-law` (`'mono'` or `'stereo'`: the pan law the track enters with; without it the track's first decoded audio decides, and the track keeps that law whatever clips follow; the live `panLaw` property reads it), `muted`, `soloed`, `kind` (`'audio' | 'midi'`, default `'audio'`: what the track holds; set it before the track is added), `render-mode` (`'waveform' | 'spectrogram'`, default `'waveform'`: how an audio track is drawn; a MIDI track is always a piano roll). JS property: `spectrogramConfig` (per-track spectrogram override). Also exposes the per-track effects API (see [Effects](#effects)). The attributes are the declaration and are never written by the editor; the properties `name`, `volume`, `pan`, `panLaw`, `muted` and `soloed` read the arrangement live (after an Undo they show the restored values), and setting one, or changing its attribute, is one undo step (`panLaw = 'auto'` on a track that has entered changes nothing: a decided law does not go back). `index` is the track's position in the arrangement. An element whose track left the arrangement (an Undo of its arrival, a removal made on the arrangement) or that waits while a handed-in arrangement is set is detached: `:state(detached)` in CSS, its properties read the declaration, and a change warns and does nothing. Moving a `<daw-track>` in the DOM reorders the track; an Undo moves no element. Fires `daw-track-update` `{ trackId, changed }` after a property changes. Loading does not clear the undo history.
|
|
516
516
|
|
|
517
517
|
### `<daw-clip>`
|
|
518
518
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost } from 'lit';
|
|
3
|
-
import { AnnotationData, AnnotationShortcutMap, MidiNoteData, TrackKind, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, AudioClip, SnapTo, ColorMapValue, ClipTrack, KeyBinding, KeyboardShortcut } from '@waveform-playlist/core';
|
|
3
|
+
import { AnnotationData, AnnotationShortcutMap, MidiNoteData, PanLaw, TrackKind, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, AudioClip, SnapTo, ColorMapValue, ClipTrack, KeyBinding, KeyboardShortcut } from '@waveform-playlist/core';
|
|
4
4
|
import WaveformData from 'waveform-data';
|
|
5
5
|
import { Arrangement, TrackMixerValues, PlayoutAdapter, PlaylistEngine } from '@waveform-playlist/engine';
|
|
6
6
|
import { MidiLoadOptions, MidiLoadResult } from '@dawcore/midi';
|
|
@@ -298,6 +298,18 @@ declare class DawTrackElement extends LitElement {
|
|
|
298
298
|
set volume(value: number);
|
|
299
299
|
get pan(): number;
|
|
300
300
|
set pan(value: number);
|
|
301
|
+
/**
|
|
302
|
+
* The track's pan law (#684): `'mono'` (equal power, −3 dB per side at
|
|
303
|
+
* centre) or `'stereo'` (unity at centre, panning folds one channel into
|
|
304
|
+
* the other). `pan-law` declares the law the track enters with; without
|
|
305
|
+
* it the track's first decoded audio decides, and the track then keeps
|
|
306
|
+
* that law whatever clips follow. Live: reads the arrangement's value
|
|
307
|
+
* (`'auto'` while the track has no audio), and the editor writes no
|
|
308
|
+
* attribute. Setting `'mono'` or `'stereo'` on an entered track is a
|
|
309
|
+
* request (an undo step); `'auto'` there changes nothing.
|
|
310
|
+
*/
|
|
311
|
+
get panLaw(): PanLaw;
|
|
312
|
+
set panLaw(value: PanLaw);
|
|
301
313
|
/** The stored mute (a take's mute is not shown here). */
|
|
302
314
|
get muted(): boolean;
|
|
303
315
|
set muted(value: boolean);
|
|
@@ -608,6 +620,8 @@ interface TrackDescriptor {
|
|
|
608
620
|
src: string;
|
|
609
621
|
volume: number;
|
|
610
622
|
pan: number;
|
|
623
|
+
/** The pan law: `'auto'` until the track's first decoded audio decides it (#684). */
|
|
624
|
+
panLaw: PanLaw;
|
|
611
625
|
muted: boolean;
|
|
612
626
|
soloed: boolean;
|
|
613
627
|
/** What the track holds: audio clips or MIDI clips, never both (#756). */
|
|
@@ -619,11 +633,11 @@ interface TrackDescriptor {
|
|
|
619
633
|
clips: ClipDescriptor[];
|
|
620
634
|
}
|
|
621
635
|
/** The mixer fields of a `TrackDescriptor`. */
|
|
622
|
-
type TrackMixFields = 'volume' | 'pan' | 'muted' | 'soloed';
|
|
636
|
+
type TrackMixFields = 'volume' | 'pan' | 'muted' | 'soloed' | 'panLaw';
|
|
623
637
|
/**
|
|
624
638
|
* What `<daw-editor>` stores per track (internal, not exported from the
|
|
625
639
|
* package): a `TrackDescriptor` without its mix. The mix is the arrangement's
|
|
626
|
-
* (#843); `editor.tracks` fills the
|
|
640
|
+
* (#843); `editor.tracks` fills the mix fields in from it.
|
|
627
641
|
*/
|
|
628
642
|
type StoredTrackDescriptor = Omit<TrackDescriptor, TrackMixFields>;
|
|
629
643
|
/**
|
|
@@ -716,6 +730,13 @@ interface TrackConfig {
|
|
|
716
730
|
name?: string;
|
|
717
731
|
volume?: number;
|
|
718
732
|
pan?: number;
|
|
733
|
+
/**
|
|
734
|
+
* The pan law (#684): `'mono'` or `'stereo'`. In `addTrack` it is the law
|
|
735
|
+
* the track enters with (default: decided by its first decoded audio); in
|
|
736
|
+
* `updateTrack` it sets the law of an entered track. `'auto'` there, or a
|
|
737
|
+
* value that is not a law, changes nothing.
|
|
738
|
+
*/
|
|
739
|
+
panLaw?: PanLaw;
|
|
719
740
|
muted?: boolean;
|
|
720
741
|
soloed?: boolean;
|
|
721
742
|
/**
|
|
@@ -1601,6 +1622,8 @@ interface TrackLinkValues {
|
|
|
1601
1622
|
pan: number;
|
|
1602
1623
|
muted: boolean;
|
|
1603
1624
|
soloed: boolean;
|
|
1625
|
+
/** `'auto'` until the track's first decoded audio decides it (#684). */
|
|
1626
|
+
panLaw: PanLaw;
|
|
1604
1627
|
name: string;
|
|
1605
1628
|
}
|
|
1606
1629
|
/** The `<daw-clip>` properties read from the arrangement while live. */
|
|
@@ -1637,6 +1660,8 @@ interface ExportTrack {
|
|
|
1637
1660
|
id: string;
|
|
1638
1661
|
volume: number;
|
|
1639
1662
|
pan: number;
|
|
1663
|
+
/** The track's pan law (the arrangement's mixer value). `'auto'` or none: from its clips. */
|
|
1664
|
+
panLaw?: PanLaw;
|
|
1640
1665
|
muted: boolean;
|
|
1641
1666
|
soloed: boolean;
|
|
1642
1667
|
clips: ExportClip[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, PropertyValues, ReactiveController, ReactiveControllerHost } from 'lit';
|
|
3
|
-
import { AnnotationData, AnnotationShortcutMap, MidiNoteData, TrackKind, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, AudioClip, SnapTo, ColorMapValue, ClipTrack, KeyBinding, KeyboardShortcut } from '@waveform-playlist/core';
|
|
3
|
+
import { AnnotationData, AnnotationShortcutMap, MidiNoteData, PanLaw, TrackKind, RenderMode, SpectrogramConfig, Peaks, Bits, FadeType, PeakData, MeterEntry, AudioClip, SnapTo, ColorMapValue, ClipTrack, KeyBinding, KeyboardShortcut } from '@waveform-playlist/core';
|
|
4
4
|
import WaveformData from 'waveform-data';
|
|
5
5
|
import { Arrangement, TrackMixerValues, PlayoutAdapter, PlaylistEngine } from '@waveform-playlist/engine';
|
|
6
6
|
import { MidiLoadOptions, MidiLoadResult } from '@dawcore/midi';
|
|
@@ -298,6 +298,18 @@ declare class DawTrackElement extends LitElement {
|
|
|
298
298
|
set volume(value: number);
|
|
299
299
|
get pan(): number;
|
|
300
300
|
set pan(value: number);
|
|
301
|
+
/**
|
|
302
|
+
* The track's pan law (#684): `'mono'` (equal power, −3 dB per side at
|
|
303
|
+
* centre) or `'stereo'` (unity at centre, panning folds one channel into
|
|
304
|
+
* the other). `pan-law` declares the law the track enters with; without
|
|
305
|
+
* it the track's first decoded audio decides, and the track then keeps
|
|
306
|
+
* that law whatever clips follow. Live: reads the arrangement's value
|
|
307
|
+
* (`'auto'` while the track has no audio), and the editor writes no
|
|
308
|
+
* attribute. Setting `'mono'` or `'stereo'` on an entered track is a
|
|
309
|
+
* request (an undo step); `'auto'` there changes nothing.
|
|
310
|
+
*/
|
|
311
|
+
get panLaw(): PanLaw;
|
|
312
|
+
set panLaw(value: PanLaw);
|
|
301
313
|
/** The stored mute (a take's mute is not shown here). */
|
|
302
314
|
get muted(): boolean;
|
|
303
315
|
set muted(value: boolean);
|
|
@@ -608,6 +620,8 @@ interface TrackDescriptor {
|
|
|
608
620
|
src: string;
|
|
609
621
|
volume: number;
|
|
610
622
|
pan: number;
|
|
623
|
+
/** The pan law: `'auto'` until the track's first decoded audio decides it (#684). */
|
|
624
|
+
panLaw: PanLaw;
|
|
611
625
|
muted: boolean;
|
|
612
626
|
soloed: boolean;
|
|
613
627
|
/** What the track holds: audio clips or MIDI clips, never both (#756). */
|
|
@@ -619,11 +633,11 @@ interface TrackDescriptor {
|
|
|
619
633
|
clips: ClipDescriptor[];
|
|
620
634
|
}
|
|
621
635
|
/** The mixer fields of a `TrackDescriptor`. */
|
|
622
|
-
type TrackMixFields = 'volume' | 'pan' | 'muted' | 'soloed';
|
|
636
|
+
type TrackMixFields = 'volume' | 'pan' | 'muted' | 'soloed' | 'panLaw';
|
|
623
637
|
/**
|
|
624
638
|
* What `<daw-editor>` stores per track (internal, not exported from the
|
|
625
639
|
* package): a `TrackDescriptor` without its mix. The mix is the arrangement's
|
|
626
|
-
* (#843); `editor.tracks` fills the
|
|
640
|
+
* (#843); `editor.tracks` fills the mix fields in from it.
|
|
627
641
|
*/
|
|
628
642
|
type StoredTrackDescriptor = Omit<TrackDescriptor, TrackMixFields>;
|
|
629
643
|
/**
|
|
@@ -716,6 +730,13 @@ interface TrackConfig {
|
|
|
716
730
|
name?: string;
|
|
717
731
|
volume?: number;
|
|
718
732
|
pan?: number;
|
|
733
|
+
/**
|
|
734
|
+
* The pan law (#684): `'mono'` or `'stereo'`. In `addTrack` it is the law
|
|
735
|
+
* the track enters with (default: decided by its first decoded audio); in
|
|
736
|
+
* `updateTrack` it sets the law of an entered track. `'auto'` there, or a
|
|
737
|
+
* value that is not a law, changes nothing.
|
|
738
|
+
*/
|
|
739
|
+
panLaw?: PanLaw;
|
|
719
740
|
muted?: boolean;
|
|
720
741
|
soloed?: boolean;
|
|
721
742
|
/**
|
|
@@ -1601,6 +1622,8 @@ interface TrackLinkValues {
|
|
|
1601
1622
|
pan: number;
|
|
1602
1623
|
muted: boolean;
|
|
1603
1624
|
soloed: boolean;
|
|
1625
|
+
/** `'auto'` until the track's first decoded audio decides it (#684). */
|
|
1626
|
+
panLaw: PanLaw;
|
|
1604
1627
|
name: string;
|
|
1605
1628
|
}
|
|
1606
1629
|
/** The `<daw-clip>` properties read from the arrangement while live. */
|
|
@@ -1637,6 +1660,8 @@ interface ExportTrack {
|
|
|
1637
1660
|
id: string;
|
|
1638
1661
|
volume: number;
|
|
1639
1662
|
pan: number;
|
|
1663
|
+
/** The track's pan law (the arrangement's mixer value). `'auto'` or none: from its clips. */
|
|
1664
|
+
panLaw?: PanLaw;
|
|
1640
1665
|
muted: boolean;
|
|
1641
1666
|
soloed: boolean;
|
|
1642
1667
|
clips: ExportClip[];
|