@nice2dev/ui-audio 1.3.13 → 1.3.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/index.cjs +31 -31
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.mjs +5635 -5524
  5. package/dist/karaoke/PitchMeter.d.ts +45 -0
  6. package/dist/ui-audio.css +1 -1
  7. package/dist/utils/pitchMath.d.ts +9 -0
  8. package/package.json +3 -3
  9. package/dist/__benchmarks__/audio-latency.bench.d.ts +0 -1
  10. package/dist/assets/scoringWorker-B1PkYu_m.js +0 -1
  11. package/dist/constants/index.d.ts +0 -5
  12. package/dist/constants/ui.d.ts +0 -2
  13. package/dist/editor/AudioClipBox.d.ts +0 -8
  14. package/dist/editor/AudioClipInfo.d.ts +0 -6
  15. package/dist/editor/AudioEditorPianoRoll.d.ts +0 -19
  16. package/dist/editor/AudioEditorPianoRollContainer.d.ts +0 -19
  17. package/dist/editor/AudioLayerDetails.d.ts +0 -9
  18. package/dist/editor/AudioLayerDetailsContainer.d.ts +0 -9
  19. package/dist/editor/AudioLayersNavContainer.d.ts +0 -8
  20. package/dist/editor/AudioMiniMap.d.ts +0 -10
  21. package/dist/editor/AudioMiniMapContainer.d.ts +0 -9
  22. package/dist/editor/AudioSourceDetails.d.ts +0 -11
  23. package/dist/editor/AudioTimelineContainer.d.ts +0 -17
  24. package/dist/editor/AudioTimelineNavContainer.d.ts +0 -13
  25. package/dist/editor/CCLaneSelector.d.ts +0 -13
  26. package/dist/editor/editorDisplayModes.d.ts +0 -36
  27. package/dist/editor/editorIO.d.ts +0 -10
  28. package/dist/editor/nav/AudioLayersNav.d.ts +0 -8
  29. package/dist/editor/nav/AudioProjectSectionNav.d.ts +0 -11
  30. package/dist/editor/nav/AudioTimelineNav.d.ts +0 -13
  31. package/dist/editor/nav/SaveLoadControls.d.ts +0 -8
  32. package/dist/editor/panels/AdvancedEditingPanel.d.ts +0 -29
  33. package/dist/editor/panels/DisplayModeSelector.d.ts +0 -8
  34. package/dist/editor/panels/LayerTrack.d.ts +0 -16
  35. package/dist/editor/panels/ProjectPanel.d.ts +0 -22
  36. package/dist/editor/panels/SectionPanel.d.ts +0 -10
  37. package/dist/editor/useEditorRecording.d.ts +0 -44
  38. package/dist/engine/NiceAudioWorklet.d.ts +0 -183
  39. package/dist/engine/NiceMultitrackExport.d.ts +0 -164
  40. package/dist/engine/audioKeyboard.d.ts +0 -27
  41. package/dist/engine/audioLayerDetails.d.ts +0 -12
  42. package/dist/engine/audioProject.d.ts +0 -9
  43. package/dist/engine/audioUtils.d.ts +0 -2
  44. package/dist/engine/generate-pitch-points.d.ts +0 -1
  45. package/dist/engine/pitch-worklet-processor.d.ts +0 -10
  46. package/dist/engine/pitch_client.d.ts +0 -15
  47. package/dist/models/game/modelsGame.d.ts +0 -11
  48. package/dist/models/index.d.ts +0 -15
  49. package/dist/models/modelsAiAudio.d.ts +0 -120
  50. package/dist/models/modelsAiVideo.d.ts +0 -74
  51. package/dist/models/modelsPlatforms.d.ts +0 -51
  52. package/dist/player/GenericPlayerStageVisualizer.d.ts +0 -31
  53. package/dist/player/GenericPlayerTrackList.d.ts +0 -9
  54. package/dist/player/nowPlayingAdapter.d.ts +0 -18
  55. package/dist/utils/articulationEngine.d.ts +0 -68
  56. package/dist/utils/chordScale.d.ts +0 -46
  57. package/dist/utils/clipLauncher.d.ts +0 -96
  58. package/dist/utils/envelopeFollower.d.ts +0 -45
  59. package/dist/utils/gameAudio.d.ts +0 -236
  60. package/dist/utils/index.d.ts +0 -39
  61. package/dist/utils/macroSystem.d.ts +0 -96
  62. package/dist/utils/padKaraokeSession.d.ts +0 -49
  63. package/dist/utils/songDataHelpers.d.ts +0 -58
@@ -1,120 +0,0 @@
1
- export declare const AUDIO_WAV = "audio/wav";
2
- export declare const APP_ZIP = "application/zip";
3
- export interface TranscribeRequest {
4
- /** optional language hint, e.g., "pl", "en" */
5
- language?: string | null;
6
- }
7
- export interface TranscribeResponse {
8
- text: string;
9
- language?: string | null;
10
- }
11
- export interface SynthesizeRequest {
12
- text: string;
13
- voice: string;
14
- rate?: number | null;
15
- }
16
- export interface TtsEngineRequest {
17
- text: string;
18
- voice: string;
19
- rate?: number | null;
20
- }
21
- export interface AudioAnalysisResponse {
22
- durationSeconds: number;
23
- rms: number;
24
- tempoBpm?: number | null;
25
- pitchMedianHz?: number | null;
26
- }
27
- export interface RhythmResponse {
28
- tempoBpm: number;
29
- beatsSeconds: number[];
30
- onsetsSeconds: number[];
31
- durationSeconds: number;
32
- }
33
- export interface PitchPoint {
34
- t: number;
35
- hz: number;
36
- }
37
- export interface PitchResponse {
38
- medianHz?: number | null;
39
- track: PitchPoint[];
40
- voicedMask: number[];
41
- }
42
- export interface VadSegment {
43
- start: number;
44
- end: number;
45
- }
46
- export interface MusicTag {
47
- tag: string;
48
- score: number;
49
- }
50
- export type SeparateZip = ArrayBuffer;
51
- export interface SingingOfflineScoreResponse {
52
- score: number;
53
- pitchTrackHz?: number[] | null;
54
- }
55
- export interface SingingLiveUpdate {
56
- instantScore?: number | null;
57
- partialText?: string | null;
58
- }
59
- export type ScoreFormat = 'midi' | 'musicxml' | 'ust' | string;
60
- export interface DiffSingerRequest {
61
- score: File;
62
- scoreFormat: ScoreFormat;
63
- lyrics?: string;
64
- voice: string;
65
- transpose?: number | null;
66
- bpm?: number | null;
67
- language?: string | null;
68
- }
69
- export interface ViSingerRequest {
70
- score: File;
71
- scoreFormat: ScoreFormat;
72
- lyrics?: string;
73
- voice: string;
74
- transpose?: number | null;
75
- bpm?: number | null;
76
- }
77
- export interface SoVitsConvertRequest {
78
- audio: File;
79
- targetSinger: string;
80
- key?: number | null;
81
- indexRate?: number | null;
82
- filterRadius?: number | null;
83
- rmsMixRate?: number | null;
84
- protect?: number | null;
85
- }
86
- export interface RvcConvertRequest {
87
- audio: File;
88
- targetSinger: string;
89
- key?: number | null;
90
- indexRate?: number | null;
91
- filterRadius?: number | null;
92
- rmsMixRate?: number | null;
93
- protect?: number | null;
94
- }
95
- export interface MusicGenRequest {
96
- prompt: string;
97
- durationSec?: number | null;
98
- model?: string | null;
99
- }
100
- export interface RiffusionRequest {
101
- prompt: string;
102
- durationSec?: number | null;
103
- }
104
- export interface AudioCraftRequest {
105
- prompt: string;
106
- durationSec?: number | null;
107
- model?: 'musicgen' | 'audiogen' | string | null;
108
- }
109
- export interface WaveGanRequest {
110
- category: string;
111
- durationSec?: number | null;
112
- }
113
- export declare function toFormDataTranscribe(file: File, req?: TranscribeRequest): FormData;
114
- export declare function toFormDataAnalyze(file: File): FormData;
115
- export declare function toFormDataVad(file: File, _aggressiveness?: number): FormData;
116
- export declare function toFormDataSeparate(file: File): FormData;
117
- export declare function toFormDataDiffSinger(req: DiffSingerRequest): FormData;
118
- export declare function toFormDataViSinger(req: ViSingerRequest): FormData;
119
- export declare function toFormDataSoVits(req: SoVitsConvertRequest): FormData;
120
- export declare function toFormDataRvc(req: RvcConvertRequest): FormData;
@@ -1,74 +0,0 @@
1
- export interface PoseKeypoint2D {
2
- name: string;
3
- x: number;
4
- y: number;
5
- confidence: number;
6
- }
7
- export interface PosePerson2D {
8
- id: number;
9
- keypoints: PoseKeypoint2D[];
10
- }
11
- export interface PoseDetectionResult {
12
- model: string;
13
- image_width: number;
14
- image_height: number;
15
- persons: PosePerson2D[];
16
- }
17
- export interface Pose2DFrame {
18
- frame_index: number;
19
- timestamp_sec: number;
20
- persons: PosePerson2D[];
21
- }
22
- export interface Pose2DSequenceResult {
23
- model: string;
24
- fps: number;
25
- frame_count: number;
26
- frames: Pose2DFrame[];
27
- }
28
- export interface PoseKeypoint3D {
29
- name: string;
30
- x: number;
31
- y: number;
32
- z: number;
33
- confidence: number;
34
- }
35
- export interface PosePerson3D {
36
- id: number;
37
- keypoints: PoseKeypoint3D[];
38
- }
39
- export interface Pose3DFrame {
40
- frame_index: number;
41
- timestamp_sec: number;
42
- persons: PosePerson3D[];
43
- }
44
- export interface Pose3DSequenceResult {
45
- model: string;
46
- fps: number;
47
- frame_count: number;
48
- frames: Pose3DFrame[];
49
- }
50
- export type PoseEngine = 'mediapipe' | 'openpose' | 'alphapose' | 'vitpose';
51
- export interface Pose2DSequencePayload {
52
- fps: number;
53
- frames: Array<{
54
- frame_index: number;
55
- timestamp_sec: number;
56
- persons: Array<{
57
- id: number;
58
- keypoints: Array<{
59
- name: string;
60
- x: number;
61
- y: number;
62
- confidence: number;
63
- }>;
64
- }>;
65
- }>;
66
- }
67
- export declare const MIME: {
68
- imageJpeg: string;
69
- imagePng: string;
70
- videoMp4: string;
71
- json: string;
72
- };
73
- export declare const toFormDataImage: (file: File) => FormData;
74
- export declare const toFormDataVideo: (file: File) => FormData;
@@ -1,51 +0,0 @@
1
- /** Platforms supported for account linking */
2
- export type PlatformName = 'spotify' | 'tidal' | 'youtube' | 'twitch' | 'google' | 'microsoft' | 'discord';
3
- /** GET /api/platforms/accounts → ExternalAccountDto[] */
4
- export interface ExternalAccountDto {
5
- platform: PlatformName;
6
- externalId: string | null;
7
- displayName: string | null;
8
- email: string | null;
9
- avatarUrl: string | null;
10
- linkedAt: string | null;
11
- scopes: string[] | null;
12
- }
13
- /** GET /api/platforms/{platform}/auth-url → AuthUrlResponse */
14
- export interface AuthUrlResponse {
15
- url: string;
16
- state: string;
17
- }
18
- /** POST /api/platforms/{platform}/link — request body */
19
- export interface PlatformLinkRequest {
20
- code: string;
21
- redirectUri: string;
22
- }
23
- /** POST /api/platforms/spotify/play — request body */
24
- export interface SpotifyPlayRequest {
25
- trackUri: string;
26
- deviceId?: string | null;
27
- positionMs?: number | null;
28
- }
29
- /** GET /api/platforms/tidal/play?trackId=... → TidalPlayResponse */
30
- export interface TidalPlayResponse {
31
- url: string;
32
- expiresAt: string;
33
- }
34
- /** NowPlayingDto — unified DTO for current playback */
35
- export interface NowPlayingDto {
36
- songId?: number | null;
37
- title: string;
38
- artist: string;
39
- albumArt?: string | null;
40
- /** Internal HLS/audio stream URL */
41
- streamUrl?: string | null;
42
- /** Pre-signed CDN URL */
43
- presignedUrl?: string | null;
44
- /** Generic external URL */
45
- externalUrl?: string | null;
46
- /** Spotify-specific */
47
- spotifyUri?: string | null;
48
- spotifyStartMs?: number | null;
49
- /** External provider hint: "spotify" | "tidal" | "youtube" | null */
50
- externalProvider?: string | null;
51
- }
@@ -1,31 +0,0 @@
1
- import { default as HlsJs } from 'hls.js';
2
- import { default as React } from 'react';
3
- export type VisualizerMode = 'video' | 'cover' | 'spectrum' | 'bars' | 'waveform' | 'palette';
4
- type Props = {
5
- kind: 'youtube' | 'audio' | 'hls';
6
- audioRef: React.MutableRefObject<HTMLAudioElement | null>;
7
- hlsRef?: React.MutableRefObject<HlsJs | null>;
8
- width?: number | string;
9
- height?: number;
10
- coverUrl?: string;
11
- title?: string;
12
- subtitle?: string;
13
- label?: string;
14
- defaultMode?: VisualizerMode;
15
- storageKey?: string;
16
- allowedModes?: VisualizerMode[];
17
- overlayOnly?: boolean;
18
- };
19
- /** Wizualizator sceny:
20
- * - pamieta wybrany tryb w localStorage
21
- * - tryby: video | cover | spectrum | bars | waveform | palette
22
- * - VU meter zawsze dostepny jako overlay (dla audio/hls)
23
- */
24
- /**
25
- * Wizualizator sceny:
26
- * - pamieta wybrany tryb w localStorage
27
- * - tryby: video | cover | spectrum | bars | waveform | palette
28
- * - VU meter zawsze dostepny jako overlay (dla audio/hls)
29
- */
30
- declare const GenericPlayerStageVisualizer: React.FC<Props>;
31
- export default GenericPlayerStageVisualizer;
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { PlayerTrack } from '../models/modelsAudio';
3
- type Props = {
4
- tracks: PlayerTrack[];
5
- activeIndex: number;
6
- onSelect: (i: number) => void;
7
- };
8
- declare const _default: React.NamedExoticComponent<Props>;
9
- export default _default;
@@ -1,18 +0,0 @@
1
- import { NowPlayingDto } from '../models/modelsPlatforms';
2
- import { PlayerTrack } from './GenericPlayer';
3
- /**
4
- * Resolve a NowPlayingDto from the backend into a PlayerTrack
5
- * that GenericPlayer can play.
6
- *
7
- * Priority:
8
- * 1. Internal HLS stream (streamUrl ending in .m3u8)
9
- * 2. Pre-signed CDN URL (presignedUrl — direct audio)
10
- * 3. External URL (externalUrl — generic audio)
11
- * 4. Spotify URI (spotifyUri — played via Web Playback SDK, not GenericPlayer)
12
- *
13
- * The Spotify case returns a track with an empty sources array so the caller
14
- * knows to delegate to the Spotify SDK instead.
15
- */
16
- export declare function nowPlayingToTrack(np: NowPlayingDto): PlayerTrack;
17
- /** Check if a NowPlayingDto should be played via Spotify SDK */
18
- export declare function isSpotifyPlayback(np: NowPlayingDto): boolean;
@@ -1,68 +0,0 @@
1
- /**
2
- * Articulation Engine — per-note performance articulations.
3
- * Supports legato, staccato, accent, glide/portamento, vibrato, and more.
4
- */
5
- export type ArticulationType = 'normal' | 'legato' | 'staccato' | 'staccatissimo' | 'accent' | 'marcato' | 'tenuto' | 'glide' | 'portamento' | 'vibrato' | 'tremolo' | 'trill' | 'bend' | 'slide-up' | 'slide-down' | 'palm-mute' | 'harmonic';
6
- export interface ArticulationConfig {
7
- type: ArticulationType;
8
- /** Intensity/depth 0-1 */
9
- intensity: number;
10
- /** Rate in Hz (for vibrato, tremolo, trill) */
11
- rate?: number;
12
- /** Duration modifier (fraction of original, 0.1-2.0) */
13
- durationScale?: number;
14
- /** Velocity modifier (added, -64 to 64) */
15
- velocityOffset?: number;
16
- /** Glide/portamento time in ms */
17
- glideTimeMs?: number;
18
- /** Pitch bend range in semitones (for bends) */
19
- bendSemitones?: number;
20
- /** Trill interval in semitones */
21
- trillInterval?: number;
22
- }
23
- export interface ArticulatedNote {
24
- pitch: number;
25
- velocity: number;
26
- /** Start time in seconds */
27
- startTime: number;
28
- /** Duration in seconds */
29
- duration: number;
30
- /** Applied articulation */
31
- articulation: ArticulationType;
32
- /** Pitch envelope events (time, pitch pairs relative to start) */
33
- pitchEnvelope?: Array<{
34
- time: number;
35
- pitch: number;
36
- }>;
37
- /** Velocity envelope (time, velocity pairs for dynamics) */
38
- velocityEnvelope?: Array<{
39
- time: number;
40
- velocity: number;
41
- }>;
42
- /** CC automation generated by articulation */
43
- ccAutomation?: Array<{
44
- time: number;
45
- cc: number;
46
- value: number;
47
- }>;
48
- }
49
- export interface NoteInput {
50
- pitch: number;
51
- velocity: number;
52
- startTime: number;
53
- duration: number;
54
- }
55
- /** Default articulation presets */
56
- export declare const ARTICULATION_PRESETS: Record<ArticulationType, ArticulationConfig>;
57
- /** Apply articulation to a single note */
58
- export declare function applyArticulation(note: NoteInput, config: ArticulationConfig): ArticulatedNote;
59
- /** Apply legato between consecutive notes (overlap + glide) */
60
- export declare function applyLegatoChain(notes: NoteInput[], config: ArticulationConfig): ArticulatedNote[];
61
- /** Apply articulation to array of notes */
62
- export declare function applyArticulationToAll(notes: NoteInput[], config: ArticulationConfig): ArticulatedNote[];
63
- /** Get all available articulation types with labels */
64
- export declare function getArticulationTypes(): Array<{
65
- type: ArticulationType;
66
- label: string;
67
- description: string;
68
- }>;
@@ -1,46 +0,0 @@
1
- /**
2
- * Chord & Scale recognition engine.
3
- * Identifies chords from sets of notes and quantizes notes to scale.
4
- */
5
- /** All pitch classes (chromatic) */
6
- export declare const PITCH_CLASSES: readonly ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"];
7
- export type PitchClass = (typeof PITCH_CLASSES)[number];
8
- /** Scale interval patterns (semitones from root) */
9
- interface ScaleDefinition {
10
- name: string;
11
- intervals: number[];
12
- }
13
- export declare const SCALES: ScaleDefinition[];
14
- export interface ChordResult {
15
- root: PitchClass;
16
- quality: string;
17
- symbol: string;
18
- confidence: number;
19
- inversion: number;
20
- }
21
- export interface ScaleMatch {
22
- root: PitchClass;
23
- name: string;
24
- matchScore: number;
25
- missingNotes: number[];
26
- extraNotes: number[];
27
- }
28
- /** Convert MIDI note to pitch class index (0-11) */
29
- export declare function midiToPitchClass(midi: number): number;
30
- /** Get pitch class name from MIDI note */
31
- export declare function midiToPitchClassName(midi: number): PitchClass;
32
- /** Recognize chord from a set of MIDI notes */
33
- export declare function recognizeChord(midiNotes: number[]): ChordResult[];
34
- /** Get scale notes for a given root and scale */
35
- export declare function getScaleNotes(root: PitchClass, scaleName: string): number[];
36
- /** Quantize a MIDI note to the nearest note in the given scale */
37
- export declare function quantizeToScale(midi: number, root: PitchClass, scaleName: string): number;
38
- /** Quantize an array of MIDI notes to scale */
39
- export declare function quantizeNotesToScale(midiNotes: number[], root: PitchClass, scaleName: string): number[];
40
- /** Detect which scales best match a set of played notes */
41
- export declare function detectScale(midiNotes: number[]): ScaleMatch[];
42
- /** Get all available scale names */
43
- export declare function getScaleNames(): string[];
44
- /** Get interval name between two MIDI notes */
45
- export declare function getIntervalName(semitones: number): string;
46
- export {};
@@ -1,96 +0,0 @@
1
- /**
2
- * Clip / Scene Launcher — Ableton-style clip grid with follow actions.
3
- * Manages scenes (rows) of clips (cells) with transport control.
4
- */
5
- export type ClipState = 'stopped' | 'playing' | 'queued' | 'recording';
6
- export type FollowAction = 'none' | 'stop' | 'play-again' | 'play-next' | 'play-prev' | 'play-first' | 'play-last' | 'play-random' | 'play-random-other';
7
- export interface LauncherClip {
8
- id: string;
9
- trackId: string;
10
- sceneIndex: number;
11
- name: string;
12
- /** Length in bars */
13
- lengthBars: number;
14
- /** Color for UI */
15
- color: string;
16
- state: ClipState;
17
- /** Source audio/MIDI clip reference */
18
- sourceClipId?: string;
19
- /** Follow action after clip finishes */
20
- followAction: FollowAction;
21
- /** Follow action probability (0-1, for random follow) */
22
- followActionChance: number;
23
- /** Alternative follow action */
24
- followActionB?: FollowAction;
25
- /** Chance for action B (remainder goes to action A) */
26
- followActionBChance: number;
27
- /** Loops enabled */
28
- loop: boolean;
29
- /** Quantize launch to this many bars (0 = immediate) */
30
- launchQuantize: number;
31
- /** Playback count before follow action fires (0 = infinite) */
32
- playCount: number;
33
- /** Current play count */
34
- currentPlayCount: number;
35
- }
36
- export interface LauncherTrack {
37
- id: string;
38
- name: string;
39
- /** Whether track is armed for recording */
40
- armed: boolean;
41
- /** Volume 0-1 */
42
- volume: number;
43
- /** Muted */
44
- muted: boolean;
45
- /** Soloed */
46
- soloed: boolean;
47
- }
48
- export interface LauncherScene {
49
- index: number;
50
- name: string;
51
- /** Tempo override (null = use global) */
52
- tempo?: number;
53
- /** Time signature override */
54
- timeSignature?: string;
55
- }
56
- export interface ClipLauncherState {
57
- tracks: LauncherTrack[];
58
- scenes: LauncherScene[];
59
- clips: LauncherClip[];
60
- /** Current global position in bars */
61
- currentBar: number;
62
- /** Global BPM */
63
- bpm: number;
64
- /** Is global transport playing */
65
- isPlaying: boolean;
66
- /** Global launch quantize (bars) */
67
- globalLaunchQuantize: number;
68
- }
69
- /** Create empty launcher state */
70
- export declare function createClipLauncher(trackCount?: number, sceneCount?: number): ClipLauncherState;
71
- /** Create a new clip in the grid */
72
- export declare function createClip(trackId: string, sceneIndex: number, name?: string, lengthBars?: number): LauncherClip;
73
- /** Add clip to launcher state */
74
- export declare function addClipToLauncher(state: ClipLauncherState, clip: LauncherClip): ClipLauncherState;
75
- /** Remove clip from launcher */
76
- export declare function removeClipFromLauncher(state: ClipLauncherState, clipId: string): ClipLauncherState;
77
- /** Get clip at grid position */
78
- export declare function getClipAt(state: ClipLauncherState, trackId: string, sceneIndex: number): LauncherClip | undefined;
79
- /** Launch (play) a single clip, stopping others on the same track */
80
- export declare function launchClip(state: ClipLauncherState, clipId: string): ClipLauncherState;
81
- /** Stop a clip */
82
- export declare function stopClip(state: ClipLauncherState, clipId: string): ClipLauncherState;
83
- /** Launch an entire scene (all clips in that row) */
84
- export declare function launchScene(state: ClipLauncherState, sceneIndex: number): ClipLauncherState;
85
- /** Stop all clips */
86
- export declare function stopAll(state: ClipLauncherState): ClipLauncherState;
87
- /** Resolve follow action and return next clip to launch (if any) */
88
- export declare function resolveFollowAction(state: ClipLauncherState, clipId: string): string | null;
89
- /** Add a new scene */
90
- export declare function addScene(state: ClipLauncherState, name?: string): ClipLauncherState;
91
- /** Add a new track */
92
- export declare function addTrack(state: ClipLauncherState, name?: string): ClipLauncherState;
93
- /** Get all currently playing clips */
94
- export declare function getPlayingClips(state: ClipLauncherState): LauncherClip[];
95
- /** Duplicate a clip to a new position */
96
- export declare function duplicateClip(state: ClipLauncherState, clipId: string, targetTrackId: string, targetScene: number): ClipLauncherState;
@@ -1,45 +0,0 @@
1
- /**
2
- * Envelope Follower — tracks amplitude of audio signal and maps to CC values.
3
- * Useful for dynamic control of effects based on audio level.
4
- */
5
- export interface EnvelopeFollowerConfig {
6
- /** Attack time in seconds (how fast the envelope rises) */
7
- attackTime: number;
8
- /** Release time in seconds (how fast the envelope falls) */
9
- releaseTime: number;
10
- /** Sensitivity multiplier (1 = normal) */
11
- sensitivity: number;
12
- /** Floor — minimum input level to trigger (0-1) */
13
- floor: number;
14
- /** Ceiling — maximum output value (0-127) */
15
- ceiling: number;
16
- /** Target CC number */
17
- cc: number;
18
- /** Invert the output */
19
- invert: boolean;
20
- /** Smoothing factor (0-1) */
21
- smoothing: number;
22
- }
23
- export declare const DEFAULT_ENVELOPE_CONFIG: EnvelopeFollowerConfig;
24
- /**
25
- * Process a block of audio samples and return the envelope value (0-1).
26
- * Uses a simple peak follower with attack/release.
27
- */
28
- export declare function processEnvelopeBlock(samples: Float32Array, previousEnvelope: number, config: EnvelopeFollowerConfig, sampleRate?: number): number;
29
- /**
30
- * Convert an envelope value (0-1) to a CC value (0-127).
31
- */
32
- export declare function envelopeToCC(envelope: number, config: EnvelopeFollowerConfig): number;
33
- /**
34
- * Analyze a full audio buffer and generate CC events at specified intervals.
35
- */
36
- export declare function analyzeBufferToCC(audioBuffer: AudioBuffer, config: EnvelopeFollowerConfig, intervalMs?: number, channel?: number): Array<{
37
- time: number;
38
- value: number;
39
- cc: number;
40
- }>;
41
- /**
42
- * Create an AudioWorklet-compatible envelope follower processor code.
43
- * Returns the processor source as a string for use with AudioWorkletNode.
44
- */
45
- export declare function getEnvelopeFollowerWorkletCode(): string;