@dawcore/midi 0.0.6-next.11 → 0.0.6-next.13

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 (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -35,13 +35,13 @@ Note timings are in seconds, already tempo-adjusted by `@tonejs/midi`. Tracks wi
35
35
 
36
36
  ## Loading tracks for an arrangement
37
37
 
38
- `loadMidiTracks(src, options)` loads a URL, a `File` or a `Blob` as `ClipTrack[]` with `kind: 'midi'`, one track per MIDI track of the file (one in all with `flatten`). It is a function, not a hook: the app keeps its own loading and error state and adds the tracks to the arrangement that `WaveformPlaylistProvider` plays. Every call makes new track and clip ids.
38
+ `loadMidiTracks(src, options)` loads a URL, a `File` or a `Blob` as `ClipTrack[]` with `kind: 'midi'`, one track per MIDI track of the file (one in all with `flatten`). It is a function, not a hook: the app keeps its own loading and error state and adds the tracks to the arrangement that `WebAudioProvider` plays. Every call makes new track and clip ids.
39
39
 
40
40
  ```tsx
41
41
  import { useEffect, useState } from 'react';
42
42
  import { loadMidiTracks } from '@dawcore/midi';
43
43
  import { getGlobalAudioContext } from '@waveform-playlist/playout';
44
- import { WaveformPlaylistProvider, useCreateArrangement } from '@waveform-playlist/browser';
44
+ import { WebAudioProvider, useCreateArrangement } from '@waveform-playlist/browser';
45
45
 
46
46
  function MidiPlaylist() {
47
47
  // Starts empty; the MIDI tracks are added once the file has loaded
@@ -74,9 +74,9 @@ function MidiPlaylist() {
74
74
 
75
75
  // Rendered once the tracks are in: the playlist's ready happens once per mount
76
76
  return (
77
- <WaveformPlaylistProvider arrangement={arrangement}>
77
+ <WebAudioProvider arrangement={arrangement}>
78
78
  {/* your UI */}
79
- </WaveformPlaylistProvider>
79
+ </WebAudioProvider>
80
80
  );
81
81
  }
82
82
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dawcore/midi",
3
- "version": "0.0.6-next.11",
3
+ "version": "0.0.6-next.13",
4
4
  "description": "Framework-agnostic MIDI file parsing, and loading a MIDI file as waveform-playlist tracks",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -38,13 +38,13 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@tonejs/midi": "^2.0.28",
41
- "@waveform-playlist/core": "13.0.0-next.10"
41
+ "@waveform-playlist/core": "13.0.0-next.12"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsup": "^8.5.1",
45
45
  "typescript": "^5.9.3",
46
46
  "vitest": "^5.0.3",
47
- "@waveform-playlist/engine": "14.0.0-next.8"
47
+ "@waveform-playlist/engine": "14.0.0-next.9"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsup",