@waveform-playlist/engine 14.0.0-next.7 → 14.0.0-next.8
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/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -44,6 +44,11 @@ function calculateSplitPoint(splitSample, samplesPerPixel) {
|
|
|
44
44
|
function splitClip(clip, splitSample) {
|
|
45
45
|
const leftDuration = splitSample - clip.startSample;
|
|
46
46
|
const rightDuration = clip.durationSamples - leftDuration;
|
|
47
|
+
const midi = {
|
|
48
|
+
midiNotes: clip.midiNotes,
|
|
49
|
+
midiChannel: clip.midiChannel,
|
|
50
|
+
midiProgram: clip.midiProgram
|
|
51
|
+
};
|
|
47
52
|
const leftName = clip.name ? `${clip.name} (1)` : void 0;
|
|
48
53
|
const rightName = clip.name ? `${clip.name} (2)` : void 0;
|
|
49
54
|
const left = {
|
|
@@ -59,7 +64,8 @@ function splitClip(clip, splitSample) {
|
|
|
59
64
|
fadeIn: clip.fadeIn,
|
|
60
65
|
audioBuffer: clip.audioBuffer,
|
|
61
66
|
waveformData: clip.waveformData,
|
|
62
|
-
src: clip.src
|
|
67
|
+
src: clip.src,
|
|
68
|
+
...midi
|
|
63
69
|
}),
|
|
64
70
|
id: clip.id
|
|
65
71
|
};
|
|
@@ -75,7 +81,8 @@ function splitClip(clip, splitSample) {
|
|
|
75
81
|
fadeOut: clip.fadeOut,
|
|
76
82
|
audioBuffer: clip.audioBuffer,
|
|
77
83
|
waveformData: clip.waveformData,
|
|
78
|
-
src: clip.src
|
|
84
|
+
src: clip.src,
|
|
85
|
+
...midi
|
|
79
86
|
});
|
|
80
87
|
return { left, right };
|
|
81
88
|
}
|