audio-mixer-ui 0.1.3 → 0.3.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 CHANGED
@@ -5,7 +5,7 @@ Originally developed for a choir practice application, these components provide
5
5
 
6
6
  ## Features
7
7
 
8
- - **Professional Audio Controls**: Custom sliders, buttons, and level meters with haptic feedback
8
+ - **Audio Controls**: Custom sliders, buttons, and level meters with haptic feedback
9
9
  - **Musical Navigation**: Bar/beat input, practice marks, tempo controls with bidirectional time mapping
10
10
  - **Responsive Design**: Optimized layouts for mobile, tablet, and desktop
11
11
  - **Event-Driven Architecture**: Clean separation between UI and audio engine
@@ -16,7 +16,7 @@ Originally developed for a choir practice application, these components provide
16
16
  ## Installation
17
17
 
18
18
  ```bash
19
- npm install audio-mixer-ui
19
+ npm install audio-mixer-ui pinia
20
20
  ```
21
21
 
22
22
  ## Quick Start
@@ -25,96 +25,116 @@ npm install audio-mixer-ui
25
25
  <template>
26
26
  <div class="app">
27
27
  <MixerLayout>
28
- <template #controls>
29
- <MixerControls />
30
- </template>
31
- <template #parts>
32
- <PartControl
33
- v-for="part in parts"
34
- :key="part.name"
35
- :name="part.name"
36
- v-model:volume="part.volume"
37
- v-model:mute="part.mute"
38
- v-model:solo="part.solo"
39
- />
28
+ <template #menu>
29
+ <button @click="selectScore" class="menu-item">Load Score</button>
40
30
  </template>
41
31
  </MixerLayout>
42
32
  </div>
43
33
  </template>
44
34
 
45
35
  <script setup>
46
- import {
47
- MixerLayout,
48
- MixerControls,
49
- PartControl
50
- } from 'audio-mixer-ui'
51
- import { ref } from 'vue'
52
-
53
- const parts = ref([
54
- { name: 'Soprano', volume: 0.8, mute: false, solo: false },
55
- { name: 'Alto', volume: 0.7, mute: false, solo: false },
56
- { name: 'Tenor', volume: 0.75, mute: false, solo: false },
57
- { name: 'Bass', volume: 0.8, mute: false, solo: false }
58
- ])
36
+ import { onMounted } from 'vue'
37
+ import { MixerLayout, useMasterAudioControl } from 'audio-mixer-ui'
38
+ import 'audio-mixer-ui/style.css'
39
+
40
+ const masterAudio = useMasterAudioControl()
41
+
42
+ const musicData = {
43
+ title: "Demo Song",
44
+ parts: [
45
+ { name: 'Soprano', volume: 0.75 },
46
+ { name: 'Alto', volume: 0.75 },
47
+ { name: 'Tenor', volume: 0.75 },
48
+ { name: 'Bass', volume: 0.75 }
49
+ ],
50
+ beats: [
51
+ { bar: 1, beat: 1, repeat: 0, tempo: 80, time: 0, timeSig: 4 },
52
+ { bar: 1, beat: 2, repeat: 0, tempo: 80, time: 0.75, timeSig: 4 },
53
+ // ... more beat data
54
+ ],
55
+ marks: { A: 1, B: 5, C: 9 }
56
+ }
57
+
58
+ onMounted(() => {
59
+ masterAudio.initialize(musicData)
60
+ })
61
+
62
+ function selectScore() {
63
+ console.log('Load different score')
64
+ }
59
65
  </script>
60
66
  ```
61
67
 
68
+ **Setup your app with Pinia:**
69
+
70
+ ```js
71
+ // main.js
72
+ import { createApp } from 'vue'
73
+ import { createPinia } from 'pinia'
74
+ import App from './App.vue'
75
+
76
+ const app = createApp(App)
77
+ app.use(createPinia())
78
+ app.mount('#app')
79
+ ```
80
+
62
81
  ## Core Components
63
82
 
83
+ The library exports components that automatically integrate with Pinia stores:
84
+
64
85
  ### Layout Components
65
- - **`MixerLayout`** - Main responsive container with flexible slot system
66
- - **`MixerControls`** - Transport controls, master volume, and feature toggles
86
+ - **`MixerLayout`** - Responsive container that auto-renders parts from store data
87
+ - **`MixerControls`** - Transport controls connected to audio state
67
88
 
68
89
  ### Audio Controls
69
- - **`AudioSlider`** - Professional audio fader with level indicators
70
- - **`AudioButton`** - Responsive button with visual feedback
71
- - **`PartControl`** - Complete part mixer (volume, mute, solo)
72
- - **`TriState`** - Mute/Solo toggle control
90
+ - **`AudioSlider`** - Professional fader with live level indicators
91
+ - **`AudioButton`** - Button with visual/haptic feedback
92
+ - **`PartControl`** - Complete part mixer (auto-generated from store)
93
+ - **`TriState`** - Mute/Solo toggle
73
94
 
74
95
  ### Musical Navigation
75
- - **`BarInput`** - Bar number input with practice mark navigation
76
- - **`TimeInput`** - Time position display and input
77
- - **`SpeedInput`** - Playback speed control with percentage display
96
+ - **`BarInput`** - Bar navigation with practice mark integration
97
+ - **`TimeInput`** - Time display synced to playback position
98
+ - **`SpeedInput`** - Playback speed control
78
99
 
79
100
  ### Utilities
80
- - **`BaseNumericInput`** - Foundation for all numeric inputs
81
- - **`TitleText`** - Responsive title display
101
+ - **`BaseNumericInput`** - Foundation for numeric inputs
102
+ - **`TitleText`** - Responsive text display
82
103
 
83
104
  ## State Management
84
105
 
85
- The library integrates with Pinia stores for reactive state management:
106
+ Components automatically connect to Pinia stores for reactive state management. The library exports three main stores:
86
107
 
87
108
  ```js
88
- // stores/audioState.js
89
- export const useAudioStateStore = defineStore('audioState', {
90
- state: () => ({
91
- isPlaying: false,
92
- currentTime: 0,
93
- currentBar: 1,
94
- currentBeat: 1,
95
- masterVolume: 0.8
96
- })
97
- })
98
- ```
109
+ import {
110
+ useAudioStateStore, // Current playback state (time, volume, playing)
111
+ useMusicDataStore, // Musical structure (beats, parts, marks)
112
+ usePlaybackStateStore, // Transport settings (loop, metronome)
113
+ useMasterAudioControl // Master composable for audio control
114
+ } from 'audio-mixer-ui'
99
115
 
100
- ## Event System
116
+ // Components automatically connect to stores - no manual wiring needed
117
+ const audioState = useAudioStateStore()
118
+ const musicData = useMusicDataStore()
119
+ const masterAudio = useMasterAudioControl()
101
120
 
102
- Components emit semantic events rather than directly manipulating audio:
121
+ // Initialize with your musical data
122
+ masterAudio.initialize(musicData)
123
+ ```
103
124
 
104
- ```vue
105
- <template>
106
- <MixerControls @play="handlePlay" @stop="handleStop" @set-bar="handleSetBar" />
107
- </template>
125
+ ## Integration Pattern
108
126
 
109
- <script setup>
110
- const handlePlay = () => {
111
- // Start audio playback
112
- }
127
+ Components handle user interactions via the master audio composable:
113
128
 
114
- const handleSetBar = (barNumber) => {
115
- // Navigate to specific bar
116
- }
117
- </script>
129
+ ```js
130
+ // Inside components, actions are coordinated through the master composable
131
+ const masterAudio = useMasterAudioControl()
132
+
133
+ // User interactions trigger master audio methods
134
+ masterAudio.play()
135
+ masterAudio.stop()
136
+ masterAudio.setBar(5, 1) // bar 5, repeat 1
137
+ masterAudio.setPartVolume('Soprano', 0.8)
118
138
  ```
119
139
 
120
140
  ## Musical Data Structure
@@ -185,7 +205,7 @@ The library follows an event-driven layered architecture:
185
205
  ## Browser Support
186
206
 
187
207
  - Modern browsers with ES2020+ support
188
- - Vue 3.4+
208
+ - Vue 3.4+ and Pinia for state management
189
209
  - Web Audio API for audio features
190
210
 
191
211
  ## Contributing
Binary file
@@ -0,0 +1,92 @@
1
+ MS_General.sf2
2
+ ---
3
+
4
+ Current version: 0.1 alpha 1st March 2018
5
+
6
+ This is a fork of FluidR3Mono_GM.sf2, with many samples (eventually) being replaced and/or reprogrammed. This version of the SoundFont is an alpha work-in-progress. Information on all sample sources will be provided upon release.
7
+
8
+ FluidR3 (original version) by Frank Wen Copyright � 2000-2002
9
+
10
+ Mono conversion (FluidR3Mono) by Michael Cowgill Copyright � 2014-17
11
+
12
+ Adaptation for MS_General.sf2 by S. Christian Collins Copyright � 2018
13
+
14
+ Temple Blocks instrument provided by Ethan Winer Copyright � 2002
15
+
16
+ Drumline Percussion provided by Michael Schorsch Copyright � 2016
17
+
18
+ MS_General.sf2 is shared under the MIT license as described in COPYING, as was FluidR3Mono and FluidR3 before it. The licensing for this new collection is currently under discussion and may be subject to change before release.
19
+
20
+ The COPYING and README files from the original FluidR3GM file are now displayed here for reference.
21
+
22
+ The acknowledgements and copyright notices above must be included in any derivative work.
23
+
24
+
25
+ README
26
+ ---
27
+
28
+ Fluid (R3) SoundFont
29
+
30
+ Copyright (c) 2000-2002, 2008 Frank Wen <getfrank@gmail.com>
31
+
32
+ I hereby release Fluid under the MIT license, as described in COPYING.
33
+
34
+
35
+ Thanks to Toby Smithe for helping to get Fluid included in Ubuntu.
36
+
37
+ This package, of course, is the original Release 3 of Fluid.
38
+
39
+
40
+ Fluid was constructed in part from samples found in the public domain that I
41
+ edited/cleaned/remixed/programmed and largely from recordings of my own and
42
+ in conjunction with the people below who helped along the way:
43
+
44
+ Suren M. Seron
45
+ Scott Hanan
46
+ Steve Aupperle
47
+ Chris Gillman
48
+ Alex Taubr
49
+ Chris Prola
50
+ Andrew Klenk
51
+ Winfried Hubbe
52
+ Dylan
53
+ Tim
54
+ Gort
55
+ Uros Katic
56
+ Ethan Winer (http://www.ethanwiner.com)
57
+
58
+
59
+ It's obviously been a few years since the project, but its nice to see that
60
+ people are still enjoying my work and getting good use out of it. As always,
61
+ I'd like to hear some work done with Fluid so email me, or just email me to
62
+ say hello and tell me what is going on in the computer musician world.
63
+ Who knows, maybe I'll kick start this project again? ;)
64
+
65
+
66
+ COPYING
67
+ ---
68
+
69
+ Mono version: Copyright (c) 2014-16 Michael Cowgill
70
+ Copyright (c) 2000-2002, 2008 Frank Wen <getfrank@gmail.com>
71
+
72
+ Permission is hereby granted, free of charge, to any person
73
+ obtaining a copy of this software and associated documentation
74
+ files (the "Software"), to deal in the Software without
75
+ restriction, including without limitation the rights to use,
76
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
77
+ copies of the Software, and to permit persons to whom the
78
+ Software is furnished to do so, subject to the following
79
+ conditions:
80
+
81
+ The above copyright notice and this permission notice shall be
82
+ included in all copies or substantial portions of the Software.
83
+
84
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
85
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
86
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
87
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
88
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
89
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
90
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
91
+ OTHER DEALINGS IN THE SOFTWARE.
92
+