audio-mixer-engine 1.3.2 → 1.3.4
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
CHANGED
|
@@ -17,21 +17,27 @@ A part-centric JavaScript audio library for mixer applications. Provides individ
|
|
|
17
17
|
npm install audio-mixer-engine
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
### Audio Engine
|
|
20
|
+
### Choosing an Audio Engine
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
| Engine | Bundle | Instruments | Best for |
|
|
23
|
+
|--------|--------|-------------|----------|
|
|
24
|
+
| **`LightweightAudioEngine`** | ~574KB | Piano, choir | Mobile, general web use |
|
|
25
|
+
| **`SpessaSynthAudioEngine`** | +10-50MB soundfont | Full General MIDI | Desktop, full instrument range |
|
|
26
|
+
|
|
27
|
+
For most deployments — especially mobile — use `LightweightAudioEngine`. See [LIGHTWEIGHT_ENGINE.md](./LIGHTWEIGHT_ENGINE.md) for setup details.
|
|
28
|
+
|
|
29
|
+
`SpessaSynthAudioEngine` requires a separate soundfont download and has known audio performance issues on mobile (see [LATENCY_CALIBRATION.md](./LATENCY_CALIBRATION.md)).
|
|
24
30
|
|
|
25
31
|
## Quick Start
|
|
26
32
|
|
|
27
33
|
```javascript
|
|
28
|
-
import {
|
|
34
|
+
import { LightweightAudioEngine, PlaybackManager } from 'audio-mixer-engine';
|
|
29
35
|
|
|
30
36
|
const ac = new AudioContext();
|
|
31
37
|
|
|
32
|
-
// Initialize audio engine
|
|
33
|
-
const audioEngine = new
|
|
34
|
-
await audioEngine.initialize(
|
|
38
|
+
// Initialize audio engine (no soundfont needed)
|
|
39
|
+
const audioEngine = new LightweightAudioEngine(ac);
|
|
40
|
+
await audioEngine.initialize();
|
|
35
41
|
|
|
36
42
|
// Create PlaybackManager
|
|
37
43
|
const manager = new PlaybackManager(audioEngine, {
|
|
@@ -267,7 +273,7 @@ resolveInstrument('piano'); // 0
|
|
|
267
273
|
resolveInstrument('choir_aahs'); // 52
|
|
268
274
|
resolveInstrument(40); // 40
|
|
269
275
|
|
|
270
|
-
// Normalize
|
|
276
|
+
// Normalize metadata with scores[] wrapper to flat format
|
|
271
277
|
const normalized = normalizeLegacyMetadata(legacyMetadata);
|
|
272
278
|
```
|
|
273
279
|
|
|
@@ -326,11 +332,12 @@ class AudioMixer {
|
|
|
326
332
|
|
|
327
333
|
- **[MUSICXML.md](./MUSICXML.md)** - MusicXML/MXL file loading, supported elements, and API reference
|
|
328
334
|
- **[LIGHTWEIGHT_ENGINE.md](./LIGHTWEIGHT_ENGINE.md)** - Lightweight engine setup and sample file configuration
|
|
329
|
-
- **[METADATA.md](./METADATA.md)** - Score metadata, part
|
|
330
|
-
- **[
|
|
335
|
+
- **[METADATA.md](./METADATA.md)** - Score metadata, part/instrument overrides, and playback modifiers
|
|
336
|
+
- **[MIDI_METADATA.md](./MIDI_METADATA.md)** - MIDI bar structure format (repeats, jumps, pickup bars)
|
|
331
337
|
- **[INTERFACE.md](./INTERFACE.md)** - Complete interface contract for UI integration
|
|
332
|
-
- **[INIT_PROGRESS.md](./INIT_PROGRESS.md)** - Initialization progress tracking
|
|
338
|
+
- **[INIT_PROGRESS.md](./INIT_PROGRESS.md)** - Initialization progress tracking (SpessaSynth only)
|
|
333
339
|
- **[IOS_AUDIO_RESUMPTION.md](./IOS_AUDIO_RESUMPTION.md)** - Handling iOS screen lock/background audio suspension
|
|
340
|
+
- **[LATENCY_CALIBRATION.md](./LATENCY_CALIBRATION.md)** - Audio latency measurement and drift detection (SpessaSynth)
|
|
334
341
|
|
|
335
342
|
## Development
|
|
336
343
|
|