audio-mixer-ui 0.5.2 → 0.7.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/README.md +45 -71
- package/dist/audio-mixer-ui.js +1917 -1520
- package/dist/audio-mixer-ui.umd.cjs +35 -14
- package/dist/style.css +1 -1
- package/dist/webaudio-tinysynth-CxKPPGl9-BZiOrIB_.js +1267 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
# Audio Mixer UI Components
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Originally developed for a choir practice application, these components provide audio controls with responsive design and accessibility features.
|
|
3
|
+
Vue 3 component library for building audio mixer interfaces with musical navigation and control features.
|
|
5
4
|
|
|
6
5
|
## Features
|
|
7
6
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- **Lightweight**: No heavy UI framework dependencies, just Vue 3
|
|
14
|
-
- **TypeScript Ready**: Full TypeScript definitions included
|
|
7
|
+
- Audio controls with level meters and haptic feedback
|
|
8
|
+
- Musical navigation (bar/beat input, practice marks, tempo controls)
|
|
9
|
+
- Responsive design for mobile, tablet, and desktop
|
|
10
|
+
- Event-driven architecture with separate UI and audio layers
|
|
11
|
+
- ARIA labels, keyboard navigation, and screen reader support
|
|
15
12
|
|
|
16
13
|
## Installation
|
|
17
14
|
|
|
@@ -80,63 +77,57 @@ app.mount('#app')
|
|
|
80
77
|
|
|
81
78
|
## Core Components
|
|
82
79
|
|
|
83
|
-
|
|
80
|
+
Components automatically integrate with Pinia stores:
|
|
84
81
|
|
|
85
|
-
|
|
86
|
-
- **`
|
|
87
|
-
- **`
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- **`
|
|
91
|
-
- **`AudioButton`** - Button with visual/haptic feedback
|
|
92
|
-
- **`PartControl`** - Complete part mixer (auto-generated from store)
|
|
93
|
-
- **`TriState`** - Mute/Solo toggle
|
|
94
|
-
|
|
95
|
-
### Musical Navigation
|
|
96
|
-
- **`BarInput`** - Bar navigation with practice mark integration
|
|
97
|
-
- **`TimeInput`** - Time display synced to playback position
|
|
82
|
+
- **`MixerLayout`** - Responsive container that renders parts from store data
|
|
83
|
+
- **`MixerControls`** - Transport controls (play, stop, pause)
|
|
84
|
+
- **`AudioSlider`** - Fader with live level indicators
|
|
85
|
+
- **`PartControl`** - Individual part mixer (volume, mute, solo)
|
|
86
|
+
- **`BarInput`** - Bar navigation with practice marks
|
|
87
|
+
- **`TimeInput`** - Time display synced to playback
|
|
98
88
|
- **`SpeedInput`** - Playback speed control
|
|
99
89
|
|
|
100
|
-
### Utilities
|
|
101
|
-
- **`BaseNumericInput`** - Foundation for numeric inputs
|
|
102
|
-
- **`TitleText`** - Responsive text display
|
|
103
|
-
|
|
104
90
|
## State Management
|
|
105
91
|
|
|
106
|
-
Components
|
|
92
|
+
Components connect to Pinia stores automatically:
|
|
107
93
|
|
|
108
94
|
```js
|
|
109
95
|
import {
|
|
110
|
-
useAudioStateStore, //
|
|
96
|
+
useAudioStateStore, // Playback state (time, volume, playing)
|
|
111
97
|
useMusicDataStore, // Musical structure (beats, parts, marks)
|
|
112
98
|
usePlaybackStateStore, // Transport settings (loop, metronome)
|
|
113
|
-
useMasterAudioControl // Master composable for
|
|
99
|
+
useMasterAudioControl // Master composable for control
|
|
114
100
|
} from 'audio-mixer-ui'
|
|
115
101
|
|
|
116
|
-
// Components automatically connect to stores - no manual wiring needed
|
|
117
|
-
const audioState = useAudioStateStore()
|
|
118
|
-
const musicData = useMusicDataStore()
|
|
119
102
|
const masterAudio = useMasterAudioControl()
|
|
120
103
|
|
|
121
|
-
// Initialize with
|
|
104
|
+
// Initialize with musical data
|
|
122
105
|
masterAudio.initialize(musicData)
|
|
106
|
+
|
|
107
|
+
// Control playback
|
|
108
|
+
masterAudio.play()
|
|
109
|
+
masterAudio.stop()
|
|
110
|
+
masterAudio.setBar(5, 1)
|
|
111
|
+
masterAudio.setPartVolume('Soprano', 0.8)
|
|
123
112
|
```
|
|
124
113
|
|
|
125
|
-
##
|
|
114
|
+
## Audio Engine Configuration
|
|
126
115
|
|
|
127
|
-
|
|
116
|
+
Choose between SpessaSynth (soundfont-based, 10-50MB) or Lightweight (sample-based, ~4MB):
|
|
128
117
|
|
|
129
118
|
```js
|
|
130
|
-
|
|
131
|
-
const masterAudio = useMasterAudioControl()
|
|
119
|
+
import { audioEngineConfig } from 'audio-mixer-ui'
|
|
132
120
|
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
masterAudio
|
|
121
|
+
// Use LightweightAudioEngine (default is SpessaSynth)
|
|
122
|
+
audioEngineConfig.setEngineType('lightweight')
|
|
123
|
+
|
|
124
|
+
// Then initialize as normal
|
|
125
|
+
const masterAudio = useMasterAudioControl()
|
|
126
|
+
await masterAudio.initialize(musicData)
|
|
138
127
|
```
|
|
139
128
|
|
|
129
|
+
**Note:** Engine type must be set before initialization. See [audio-mixer-engine](https://www.npmjs.com/package/audio-mixer-engine) for setup details.
|
|
130
|
+
|
|
140
131
|
## Musical Data Structure
|
|
141
132
|
|
|
142
133
|
The components expect musical timing data in this format:
|
|
@@ -188,38 +179,21 @@ npm run lint
|
|
|
188
179
|
|
|
189
180
|
## Architecture
|
|
190
181
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
1. **Components** - Vue 3 components with composition API
|
|
194
|
-
2. **Composables** - Reusable logic for audio control and state management
|
|
195
|
-
3. **Stores** - Pinia stores for reactive state
|
|
196
|
-
4. **Services** - Audio engine integration layer
|
|
182
|
+
Event-driven layered architecture:
|
|
197
183
|
|
|
198
|
-
|
|
184
|
+
1. **Components** - Vue 3 with Composition API
|
|
185
|
+
2. **Composables** - Shared logic for audio control and state
|
|
186
|
+
3. **Stores** - Pinia for reactive state management
|
|
187
|
+
4. **Services** - Audio engine integration
|
|
199
188
|
|
|
200
|
-
|
|
201
|
-
- **Event-Driven Coordination**: Real-time synchronization via event bus
|
|
202
|
-
- **Dynamic Configuration**: Runtime discovery of parts and musical structure
|
|
203
|
-
- **Responsive First**: Mobile-first design with progressive enhancement
|
|
189
|
+
Key principles: Audio thread isolation, event-driven coordination, runtime part discovery.
|
|
204
190
|
|
|
205
|
-
##
|
|
191
|
+
## Requirements
|
|
206
192
|
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
- Web Audio API
|
|
210
|
-
|
|
211
|
-
## Contributing
|
|
212
|
-
|
|
213
|
-
1. Fork the repository
|
|
214
|
-
2. Create a feature branch
|
|
215
|
-
3. Add tests for new functionality
|
|
216
|
-
4. Ensure all tests pass
|
|
217
|
-
5. Submit a pull request
|
|
193
|
+
- Vue 3.4+
|
|
194
|
+
- Pinia
|
|
195
|
+
- Modern browser with Web Audio API support
|
|
218
196
|
|
|
219
197
|
## License
|
|
220
198
|
|
|
221
|
-
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
222
|
-
|
|
223
|
-
## Related Projects
|
|
224
|
-
|
|
225
|
-
This component library was extracted from a larger choir practice application.
|
|
199
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|