@onjmin/dtm 2.1.6 → 2.1.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.js +99 -26
- package/dist/index.mjs +99 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17840,6 +17840,28 @@ var isChordHeavyTrack = (notes, threshold = 0.6) => {
|
|
|
17840
17840
|
return chordNotes / notes.length >= threshold;
|
|
17841
17841
|
};
|
|
17842
17842
|
|
|
17843
|
+
// src/track1-state.ts
|
|
17844
|
+
var TRACK1_STORAGE_KEY = "dtm-track1:settings";
|
|
17845
|
+
var readTrack1Settings = () => {
|
|
17846
|
+
try {
|
|
17847
|
+
if (typeof localStorage === "undefined" || !localStorage) return null;
|
|
17848
|
+
const raw = localStorage.getItem(TRACK1_STORAGE_KEY);
|
|
17849
|
+
if (!raw) return null;
|
|
17850
|
+
const parsed = JSON.parse(raw);
|
|
17851
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
17852
|
+
return parsed;
|
|
17853
|
+
} catch (_) {
|
|
17854
|
+
return null;
|
|
17855
|
+
}
|
|
17856
|
+
};
|
|
17857
|
+
var writeTrack1Settings = (settings) => {
|
|
17858
|
+
try {
|
|
17859
|
+
if (typeof localStorage === "undefined" || !localStorage) return;
|
|
17860
|
+
localStorage.setItem(TRACK1_STORAGE_KEY, JSON.stringify(settings));
|
|
17861
|
+
} catch (_) {
|
|
17862
|
+
}
|
|
17863
|
+
};
|
|
17864
|
+
|
|
17843
17865
|
// src/renderer.ts
|
|
17844
17866
|
var KEYBOARD_WIDTH = 60;
|
|
17845
17867
|
var HEADER_HEIGHT = 20;
|
|
@@ -19293,7 +19315,38 @@ var mountDAW = (target, options = {}) => {
|
|
|
19293
19315
|
let trackStates = [];
|
|
19294
19316
|
let suppressPatch = false;
|
|
19295
19317
|
let lyricsDebounceTimer = null;
|
|
19318
|
+
const persistTrack1 = (t) => {
|
|
19319
|
+
if (trackStates.indexOf(t) !== 0) return;
|
|
19320
|
+
const settings = {
|
|
19321
|
+
volume: t.volume,
|
|
19322
|
+
trackInstrument: t.trackInstrument,
|
|
19323
|
+
trackOctave: t.trackOctave,
|
|
19324
|
+
trackOctaveUnison: t.trackOctaveUnison,
|
|
19325
|
+
trackCompression: t.trackCompression,
|
|
19326
|
+
trackWidth: t.trackWidth,
|
|
19327
|
+
trackReverbSend: t.trackReverbSend,
|
|
19328
|
+
trackEqLow: t.trackEqLow,
|
|
19329
|
+
trackEqMid: t.trackEqMid,
|
|
19330
|
+
trackEqHigh: t.trackEqHigh,
|
|
19331
|
+
trackPan: t.trackPan,
|
|
19332
|
+
trackDelaySend: t.trackDelaySend,
|
|
19333
|
+
lyricModel: t.lyricModel,
|
|
19334
|
+
vocalVolume: t.vocalVolume,
|
|
19335
|
+
vocalGate: t.vocalGate,
|
|
19336
|
+
vocalPan: t.vocalPan,
|
|
19337
|
+
vocalOctave: t.vocalOctave,
|
|
19338
|
+
vocalVibrato: t.vocalVibrato,
|
|
19339
|
+
vocalReverb: t.vocalReverb,
|
|
19340
|
+
vocalDelay: t.vocalDelay,
|
|
19341
|
+
vocalGender: t.vocalGender,
|
|
19342
|
+
vocalBreathiness: t.vocalBreathiness,
|
|
19343
|
+
vocalTension: t.vocalTension,
|
|
19344
|
+
vocalOctaveUnison: t.vocalOctaveUnison
|
|
19345
|
+
};
|
|
19346
|
+
writeTrack1Settings(settings);
|
|
19347
|
+
};
|
|
19296
19348
|
const fireLyricsChange = (t) => {
|
|
19349
|
+
persistTrack1(t);
|
|
19297
19350
|
if (!options.onLyricsChange) return;
|
|
19298
19351
|
const trackId = t.config.id;
|
|
19299
19352
|
const data = {
|
|
@@ -19319,9 +19372,11 @@ var mountDAW = (target, options = {}) => {
|
|
|
19319
19372
|
};
|
|
19320
19373
|
const hiddenTracks = /* @__PURE__ */ new Set();
|
|
19321
19374
|
const audioMutedTracks = /* @__PURE__ */ new Set();
|
|
19375
|
+
const savedTrack1 = readTrack1Settings();
|
|
19322
19376
|
const createTrackStates = () => {
|
|
19323
|
-
trackStates = trackConfigs.map((config) => {
|
|
19377
|
+
trackStates = trackConfigs.map((config, index) => {
|
|
19324
19378
|
let prevNotes = [];
|
|
19379
|
+
const t1 = index === 0 ? savedTrack1 : null;
|
|
19325
19380
|
return {
|
|
19326
19381
|
config,
|
|
19327
19382
|
core: new MMLCore(
|
|
@@ -19366,35 +19421,35 @@ var mountDAW = (target, options = {}) => {
|
|
|
19366
19421
|
config.volume,
|
|
19367
19422
|
() => renderConfig
|
|
19368
19423
|
),
|
|
19369
|
-
volume: config.volume,
|
|
19424
|
+
volume: t1?.volume ?? config.volume,
|
|
19370
19425
|
savedChordInput: "",
|
|
19371
19426
|
savedChordPattern: "block",
|
|
19372
19427
|
savedChordRoot: 0,
|
|
19373
19428
|
lyrics: "",
|
|
19374
|
-
lyricModel: "",
|
|
19429
|
+
lyricModel: t1?.lyricModel ?? "",
|
|
19375
19430
|
// 既定は「なし」(歌わない)
|
|
19376
|
-
vocalVolume: DEFAULT_VOCAL_VOLUME,
|
|
19377
|
-
vocalGate: 100,
|
|
19378
|
-
vocalPan: 64,
|
|
19379
|
-
trackOctave: 0,
|
|
19380
|
-
trackOctaveUnison: "none",
|
|
19381
|
-
vocalOctave: 0,
|
|
19382
|
-
vocalVibrato: false,
|
|
19383
|
-
vocalReverb: 0,
|
|
19384
|
-
vocalDelay: 0,
|
|
19385
|
-
vocalGender: 50,
|
|
19386
|
-
vocalBreathiness: 50,
|
|
19387
|
-
vocalTension: 50,
|
|
19388
|
-
vocalOctaveUnison: "none",
|
|
19389
|
-
trackInstrument: "",
|
|
19390
|
-
trackCompression: 0,
|
|
19391
|
-
trackWidth: 100,
|
|
19392
|
-
trackReverbSend: 0,
|
|
19393
|
-
trackEqLow: 0,
|
|
19394
|
-
trackEqMid: 0,
|
|
19395
|
-
trackEqHigh: 0,
|
|
19396
|
-
trackPan: 64,
|
|
19397
|
-
trackDelaySend: 0
|
|
19431
|
+
vocalVolume: t1?.vocalVolume ?? DEFAULT_VOCAL_VOLUME,
|
|
19432
|
+
vocalGate: t1?.vocalGate ?? 100,
|
|
19433
|
+
vocalPan: t1?.vocalPan ?? 64,
|
|
19434
|
+
trackOctave: t1?.trackOctave ?? 0,
|
|
19435
|
+
trackOctaveUnison: t1?.trackOctaveUnison ?? "none",
|
|
19436
|
+
vocalOctave: t1?.vocalOctave ?? 0,
|
|
19437
|
+
vocalVibrato: t1?.vocalVibrato ?? false,
|
|
19438
|
+
vocalReverb: t1?.vocalReverb ?? 0,
|
|
19439
|
+
vocalDelay: t1?.vocalDelay ?? 0,
|
|
19440
|
+
vocalGender: t1?.vocalGender ?? 50,
|
|
19441
|
+
vocalBreathiness: t1?.vocalBreathiness ?? 50,
|
|
19442
|
+
vocalTension: t1?.vocalTension ?? 50,
|
|
19443
|
+
vocalOctaveUnison: t1?.vocalOctaveUnison ?? "none",
|
|
19444
|
+
trackInstrument: t1?.trackInstrument ?? "",
|
|
19445
|
+
trackCompression: t1?.trackCompression ?? 0,
|
|
19446
|
+
trackWidth: t1?.trackWidth ?? 100,
|
|
19447
|
+
trackReverbSend: t1?.trackReverbSend ?? 0,
|
|
19448
|
+
trackEqLow: t1?.trackEqLow ?? 0,
|
|
19449
|
+
trackEqMid: t1?.trackEqMid ?? 0,
|
|
19450
|
+
trackEqHigh: t1?.trackEqHigh ?? 0,
|
|
19451
|
+
trackPan: t1?.trackPan ?? 64,
|
|
19452
|
+
trackDelaySend: t1?.trackDelaySend ?? 0
|
|
19398
19453
|
};
|
|
19399
19454
|
});
|
|
19400
19455
|
};
|
|
@@ -20562,6 +20617,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20562
20617
|
active.volume = Number.parseInt(volInput.value, 10);
|
|
20563
20618
|
active.core.setVolume(active.volume);
|
|
20564
20619
|
volLabel.textContent = String(active.volume);
|
|
20620
|
+
persistTrack1(active);
|
|
20565
20621
|
});
|
|
20566
20622
|
const syncVelocityDisabled = () => {
|
|
20567
20623
|
volInput.disabled = !!active.lyricModel;
|
|
@@ -20600,16 +20656,19 @@ var mountDAW = (target, options = {}) => {
|
|
|
20600
20656
|
active.trackEqLow = Number.parseInt(trackEqLowInput.value, 10);
|
|
20601
20657
|
trackEqLowLabel.textContent = fmtDb(active.trackEqLow);
|
|
20602
20658
|
options.onTrackEqLowChange?.(active.config.id, active.trackEqLow);
|
|
20659
|
+
persistTrack1(active);
|
|
20603
20660
|
});
|
|
20604
20661
|
trackEqMidInput.addEventListener("input", () => {
|
|
20605
20662
|
active.trackEqMid = Number.parseInt(trackEqMidInput.value, 10);
|
|
20606
20663
|
trackEqMidLabel.textContent = fmtDb(active.trackEqMid);
|
|
20607
20664
|
options.onTrackEqMidChange?.(active.config.id, active.trackEqMid);
|
|
20665
|
+
persistTrack1(active);
|
|
20608
20666
|
});
|
|
20609
20667
|
trackEqHighInput.addEventListener("input", () => {
|
|
20610
20668
|
active.trackEqHigh = Number.parseInt(trackEqHighInput.value, 10);
|
|
20611
20669
|
trackEqHighLabel.textContent = fmtDb(active.trackEqHigh);
|
|
20612
20670
|
options.onTrackEqHighChange?.(active.config.id, active.trackEqHigh);
|
|
20671
|
+
persistTrack1(active);
|
|
20613
20672
|
});
|
|
20614
20673
|
trackEqInfo.addEventListener("click", () => {
|
|
20615
20674
|
showModal("EQ\uFF08\u30A4\u30B3\u30E9\u30A4\u30B6\u30FC\uFF09\u306E\u89E3\u8AAC", TRACK_EQ_INFO_HTML);
|
|
@@ -20643,11 +20702,13 @@ var mountDAW = (target, options = {}) => {
|
|
|
20643
20702
|
active.config.id,
|
|
20644
20703
|
active.trackCompression
|
|
20645
20704
|
);
|
|
20705
|
+
persistTrack1(active);
|
|
20646
20706
|
});
|
|
20647
20707
|
trackWidthInput.addEventListener("input", () => {
|
|
20648
20708
|
active.trackWidth = Number.parseInt(trackWidthInput.value, 10);
|
|
20649
20709
|
trackWidthLabel.textContent = `${active.trackWidth}%`;
|
|
20650
20710
|
options.onTrackWidthChange?.(active.config.id, active.trackWidth);
|
|
20711
|
+
persistTrack1(active);
|
|
20651
20712
|
});
|
|
20652
20713
|
trackCompInfo.addEventListener("click", () => {
|
|
20653
20714
|
showModal("\u97F3\u5727\u5F37\u5316\u306E\u89E3\u8AAC", TRACK_COMPRESSION_INFO_HTML);
|
|
@@ -20671,6 +20732,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20671
20732
|
active.trackPan = Number.parseInt(trackPanInput.value, 10);
|
|
20672
20733
|
trackPanLabel.textContent = fmtTrackPan(active.trackPan);
|
|
20673
20734
|
options.onTrackPanChange?.(active.config.id, active.trackPan);
|
|
20735
|
+
persistTrack1(active);
|
|
20674
20736
|
});
|
|
20675
20737
|
trackPanInfo.addEventListener("click", () => {
|
|
20676
20738
|
showModal("\u5B9A\u4F4D\u306E\u89E3\u8AAC", TRACK_PAN_INFO_HTML);
|
|
@@ -20693,6 +20755,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20693
20755
|
active.config.id,
|
|
20694
20756
|
active.trackReverbSend
|
|
20695
20757
|
);
|
|
20758
|
+
persistTrack1(active);
|
|
20696
20759
|
});
|
|
20697
20760
|
trackReverbSendInfo.addEventListener("click", () => {
|
|
20698
20761
|
showModal("\u30EA\u30D0\u30FC\u30D6\u9001\u308A\u306E\u89E3\u8AAC", TRACK_REVERBSEND_INFO_HTML);
|
|
@@ -20712,6 +20775,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20712
20775
|
active.trackDelaySend = Number.parseInt(trackDelaySendInput.value, 10);
|
|
20713
20776
|
trackDelaySendLabel.textContent = `${active.trackDelaySend}%`;
|
|
20714
20777
|
options.onTrackDelaySendChange?.(active.config.id, active.trackDelaySend);
|
|
20778
|
+
persistTrack1(active);
|
|
20715
20779
|
});
|
|
20716
20780
|
trackDelaySendInfo.addEventListener("click", () => {
|
|
20717
20781
|
showModal("\u30C7\u30A3\u30EC\u30A4\u9001\u308A\u306E\u89E3\u8AAC", TRACK_DELAYSEND_INFO_HTML);
|
|
@@ -20766,6 +20830,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20766
20830
|
active.trackInstrument = instSel.value;
|
|
20767
20831
|
const trackIndex = trackStates.indexOf(active);
|
|
20768
20832
|
options.onTrackInstrumentChange?.(trackIndex, active.trackInstrument);
|
|
20833
|
+
persistTrack1(active);
|
|
20769
20834
|
});
|
|
20770
20835
|
refs.trackBody.querySelector('[data-dtm="track-vol-row"]').prepend(instLabel, instSel);
|
|
20771
20836
|
const octaveRow = refs.trackBody.querySelector(
|
|
@@ -20781,6 +20846,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20781
20846
|
syncOctaveVisibility();
|
|
20782
20847
|
octaveSel.addEventListener("change", () => {
|
|
20783
20848
|
active.trackOctave = Number.parseInt(octaveSel.value, 10) || 0;
|
|
20849
|
+
persistTrack1(active);
|
|
20784
20850
|
});
|
|
20785
20851
|
const unisonSel = refs.trackBody.querySelector(
|
|
20786
20852
|
'[data-dtm="track-octave-unison"]'
|
|
@@ -20788,6 +20854,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20788
20854
|
unisonSel.value = active.trackOctaveUnison;
|
|
20789
20855
|
unisonSel.addEventListener("change", () => {
|
|
20790
20856
|
active.trackOctaveUnison = unisonSel.value;
|
|
20857
|
+
persistTrack1(active);
|
|
20791
20858
|
});
|
|
20792
20859
|
if (isAdvanced || active.config.id !== "chord") {
|
|
20793
20860
|
const lyricDiv = document.createElement("div");
|
|
@@ -22633,6 +22700,9 @@ var mountDAW = (target, options = {}) => {
|
|
|
22633
22700
|
if (melodyTrack) {
|
|
22634
22701
|
const current = melodyTrack.lyricModel.trim();
|
|
22635
22702
|
if (!current || current === autoComposeVocal) {
|
|
22703
|
+
if (!current && melodyTrack.vocalOctave === 0) {
|
|
22704
|
+
melodyTrack.vocalOctave = -1;
|
|
22705
|
+
}
|
|
22636
22706
|
melodyTrack.lyricModel = pickComposeVocal(autoComposeVocal);
|
|
22637
22707
|
autoComposeVocal = melodyTrack.lyricModel;
|
|
22638
22708
|
}
|
|
@@ -23777,7 +23847,10 @@ var mountDAW = (target, options = {}) => {
|
|
|
23777
23847
|
t.vocalBreathiness = data.vocalBreathiness ?? 50;
|
|
23778
23848
|
t.vocalTension = data.vocalTension ?? 50;
|
|
23779
23849
|
t.vocalOctaveUnison = data.vocalOctaveUnison ?? "none";
|
|
23780
|
-
if (t.config.id === activeTrackId)
|
|
23850
|
+
if (t.config.id === activeTrackId) {
|
|
23851
|
+
updateTrackPanel();
|
|
23852
|
+
redrawAll();
|
|
23853
|
+
}
|
|
23781
23854
|
},
|
|
23782
23855
|
applyTrackInstrument: (trackIndex, instrumentName) => {
|
|
23783
23856
|
const t = trackStates[trackIndex];
|
package/dist/index.mjs
CHANGED
|
@@ -17648,6 +17648,28 @@ var isChordHeavyTrack = (notes, threshold = 0.6) => {
|
|
|
17648
17648
|
return chordNotes / notes.length >= threshold;
|
|
17649
17649
|
};
|
|
17650
17650
|
|
|
17651
|
+
// src/track1-state.ts
|
|
17652
|
+
var TRACK1_STORAGE_KEY = "dtm-track1:settings";
|
|
17653
|
+
var readTrack1Settings = () => {
|
|
17654
|
+
try {
|
|
17655
|
+
if (typeof localStorage === "undefined" || !localStorage) return null;
|
|
17656
|
+
const raw = localStorage.getItem(TRACK1_STORAGE_KEY);
|
|
17657
|
+
if (!raw) return null;
|
|
17658
|
+
const parsed = JSON.parse(raw);
|
|
17659
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
17660
|
+
return parsed;
|
|
17661
|
+
} catch (_) {
|
|
17662
|
+
return null;
|
|
17663
|
+
}
|
|
17664
|
+
};
|
|
17665
|
+
var writeTrack1Settings = (settings) => {
|
|
17666
|
+
try {
|
|
17667
|
+
if (typeof localStorage === "undefined" || !localStorage) return;
|
|
17668
|
+
localStorage.setItem(TRACK1_STORAGE_KEY, JSON.stringify(settings));
|
|
17669
|
+
} catch (_) {
|
|
17670
|
+
}
|
|
17671
|
+
};
|
|
17672
|
+
|
|
17651
17673
|
// src/renderer.ts
|
|
17652
17674
|
var KEYBOARD_WIDTH = 60;
|
|
17653
17675
|
var HEADER_HEIGHT = 20;
|
|
@@ -19101,7 +19123,38 @@ var mountDAW = (target, options = {}) => {
|
|
|
19101
19123
|
let trackStates = [];
|
|
19102
19124
|
let suppressPatch = false;
|
|
19103
19125
|
let lyricsDebounceTimer = null;
|
|
19126
|
+
const persistTrack1 = (t) => {
|
|
19127
|
+
if (trackStates.indexOf(t) !== 0) return;
|
|
19128
|
+
const settings = {
|
|
19129
|
+
volume: t.volume,
|
|
19130
|
+
trackInstrument: t.trackInstrument,
|
|
19131
|
+
trackOctave: t.trackOctave,
|
|
19132
|
+
trackOctaveUnison: t.trackOctaveUnison,
|
|
19133
|
+
trackCompression: t.trackCompression,
|
|
19134
|
+
trackWidth: t.trackWidth,
|
|
19135
|
+
trackReverbSend: t.trackReverbSend,
|
|
19136
|
+
trackEqLow: t.trackEqLow,
|
|
19137
|
+
trackEqMid: t.trackEqMid,
|
|
19138
|
+
trackEqHigh: t.trackEqHigh,
|
|
19139
|
+
trackPan: t.trackPan,
|
|
19140
|
+
trackDelaySend: t.trackDelaySend,
|
|
19141
|
+
lyricModel: t.lyricModel,
|
|
19142
|
+
vocalVolume: t.vocalVolume,
|
|
19143
|
+
vocalGate: t.vocalGate,
|
|
19144
|
+
vocalPan: t.vocalPan,
|
|
19145
|
+
vocalOctave: t.vocalOctave,
|
|
19146
|
+
vocalVibrato: t.vocalVibrato,
|
|
19147
|
+
vocalReverb: t.vocalReverb,
|
|
19148
|
+
vocalDelay: t.vocalDelay,
|
|
19149
|
+
vocalGender: t.vocalGender,
|
|
19150
|
+
vocalBreathiness: t.vocalBreathiness,
|
|
19151
|
+
vocalTension: t.vocalTension,
|
|
19152
|
+
vocalOctaveUnison: t.vocalOctaveUnison
|
|
19153
|
+
};
|
|
19154
|
+
writeTrack1Settings(settings);
|
|
19155
|
+
};
|
|
19104
19156
|
const fireLyricsChange = (t) => {
|
|
19157
|
+
persistTrack1(t);
|
|
19105
19158
|
if (!options.onLyricsChange) return;
|
|
19106
19159
|
const trackId = t.config.id;
|
|
19107
19160
|
const data = {
|
|
@@ -19127,9 +19180,11 @@ var mountDAW = (target, options = {}) => {
|
|
|
19127
19180
|
};
|
|
19128
19181
|
const hiddenTracks = /* @__PURE__ */ new Set();
|
|
19129
19182
|
const audioMutedTracks = /* @__PURE__ */ new Set();
|
|
19183
|
+
const savedTrack1 = readTrack1Settings();
|
|
19130
19184
|
const createTrackStates = () => {
|
|
19131
|
-
trackStates = trackConfigs.map((config) => {
|
|
19185
|
+
trackStates = trackConfigs.map((config, index) => {
|
|
19132
19186
|
let prevNotes = [];
|
|
19187
|
+
const t1 = index === 0 ? savedTrack1 : null;
|
|
19133
19188
|
return {
|
|
19134
19189
|
config,
|
|
19135
19190
|
core: new MMLCore(
|
|
@@ -19174,35 +19229,35 @@ var mountDAW = (target, options = {}) => {
|
|
|
19174
19229
|
config.volume,
|
|
19175
19230
|
() => renderConfig
|
|
19176
19231
|
),
|
|
19177
|
-
volume: config.volume,
|
|
19232
|
+
volume: t1?.volume ?? config.volume,
|
|
19178
19233
|
savedChordInput: "",
|
|
19179
19234
|
savedChordPattern: "block",
|
|
19180
19235
|
savedChordRoot: 0,
|
|
19181
19236
|
lyrics: "",
|
|
19182
|
-
lyricModel: "",
|
|
19237
|
+
lyricModel: t1?.lyricModel ?? "",
|
|
19183
19238
|
// 既定は「なし」(歌わない)
|
|
19184
|
-
vocalVolume: DEFAULT_VOCAL_VOLUME,
|
|
19185
|
-
vocalGate: 100,
|
|
19186
|
-
vocalPan: 64,
|
|
19187
|
-
trackOctave: 0,
|
|
19188
|
-
trackOctaveUnison: "none",
|
|
19189
|
-
vocalOctave: 0,
|
|
19190
|
-
vocalVibrato: false,
|
|
19191
|
-
vocalReverb: 0,
|
|
19192
|
-
vocalDelay: 0,
|
|
19193
|
-
vocalGender: 50,
|
|
19194
|
-
vocalBreathiness: 50,
|
|
19195
|
-
vocalTension: 50,
|
|
19196
|
-
vocalOctaveUnison: "none",
|
|
19197
|
-
trackInstrument: "",
|
|
19198
|
-
trackCompression: 0,
|
|
19199
|
-
trackWidth: 100,
|
|
19200
|
-
trackReverbSend: 0,
|
|
19201
|
-
trackEqLow: 0,
|
|
19202
|
-
trackEqMid: 0,
|
|
19203
|
-
trackEqHigh: 0,
|
|
19204
|
-
trackPan: 64,
|
|
19205
|
-
trackDelaySend: 0
|
|
19239
|
+
vocalVolume: t1?.vocalVolume ?? DEFAULT_VOCAL_VOLUME,
|
|
19240
|
+
vocalGate: t1?.vocalGate ?? 100,
|
|
19241
|
+
vocalPan: t1?.vocalPan ?? 64,
|
|
19242
|
+
trackOctave: t1?.trackOctave ?? 0,
|
|
19243
|
+
trackOctaveUnison: t1?.trackOctaveUnison ?? "none",
|
|
19244
|
+
vocalOctave: t1?.vocalOctave ?? 0,
|
|
19245
|
+
vocalVibrato: t1?.vocalVibrato ?? false,
|
|
19246
|
+
vocalReverb: t1?.vocalReverb ?? 0,
|
|
19247
|
+
vocalDelay: t1?.vocalDelay ?? 0,
|
|
19248
|
+
vocalGender: t1?.vocalGender ?? 50,
|
|
19249
|
+
vocalBreathiness: t1?.vocalBreathiness ?? 50,
|
|
19250
|
+
vocalTension: t1?.vocalTension ?? 50,
|
|
19251
|
+
vocalOctaveUnison: t1?.vocalOctaveUnison ?? "none",
|
|
19252
|
+
trackInstrument: t1?.trackInstrument ?? "",
|
|
19253
|
+
trackCompression: t1?.trackCompression ?? 0,
|
|
19254
|
+
trackWidth: t1?.trackWidth ?? 100,
|
|
19255
|
+
trackReverbSend: t1?.trackReverbSend ?? 0,
|
|
19256
|
+
trackEqLow: t1?.trackEqLow ?? 0,
|
|
19257
|
+
trackEqMid: t1?.trackEqMid ?? 0,
|
|
19258
|
+
trackEqHigh: t1?.trackEqHigh ?? 0,
|
|
19259
|
+
trackPan: t1?.trackPan ?? 64,
|
|
19260
|
+
trackDelaySend: t1?.trackDelaySend ?? 0
|
|
19206
19261
|
};
|
|
19207
19262
|
});
|
|
19208
19263
|
};
|
|
@@ -20370,6 +20425,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20370
20425
|
active.volume = Number.parseInt(volInput.value, 10);
|
|
20371
20426
|
active.core.setVolume(active.volume);
|
|
20372
20427
|
volLabel.textContent = String(active.volume);
|
|
20428
|
+
persistTrack1(active);
|
|
20373
20429
|
});
|
|
20374
20430
|
const syncVelocityDisabled = () => {
|
|
20375
20431
|
volInput.disabled = !!active.lyricModel;
|
|
@@ -20408,16 +20464,19 @@ var mountDAW = (target, options = {}) => {
|
|
|
20408
20464
|
active.trackEqLow = Number.parseInt(trackEqLowInput.value, 10);
|
|
20409
20465
|
trackEqLowLabel.textContent = fmtDb(active.trackEqLow);
|
|
20410
20466
|
options.onTrackEqLowChange?.(active.config.id, active.trackEqLow);
|
|
20467
|
+
persistTrack1(active);
|
|
20411
20468
|
});
|
|
20412
20469
|
trackEqMidInput.addEventListener("input", () => {
|
|
20413
20470
|
active.trackEqMid = Number.parseInt(trackEqMidInput.value, 10);
|
|
20414
20471
|
trackEqMidLabel.textContent = fmtDb(active.trackEqMid);
|
|
20415
20472
|
options.onTrackEqMidChange?.(active.config.id, active.trackEqMid);
|
|
20473
|
+
persistTrack1(active);
|
|
20416
20474
|
});
|
|
20417
20475
|
trackEqHighInput.addEventListener("input", () => {
|
|
20418
20476
|
active.trackEqHigh = Number.parseInt(trackEqHighInput.value, 10);
|
|
20419
20477
|
trackEqHighLabel.textContent = fmtDb(active.trackEqHigh);
|
|
20420
20478
|
options.onTrackEqHighChange?.(active.config.id, active.trackEqHigh);
|
|
20479
|
+
persistTrack1(active);
|
|
20421
20480
|
});
|
|
20422
20481
|
trackEqInfo.addEventListener("click", () => {
|
|
20423
20482
|
showModal("EQ\uFF08\u30A4\u30B3\u30E9\u30A4\u30B6\u30FC\uFF09\u306E\u89E3\u8AAC", TRACK_EQ_INFO_HTML);
|
|
@@ -20451,11 +20510,13 @@ var mountDAW = (target, options = {}) => {
|
|
|
20451
20510
|
active.config.id,
|
|
20452
20511
|
active.trackCompression
|
|
20453
20512
|
);
|
|
20513
|
+
persistTrack1(active);
|
|
20454
20514
|
});
|
|
20455
20515
|
trackWidthInput.addEventListener("input", () => {
|
|
20456
20516
|
active.trackWidth = Number.parseInt(trackWidthInput.value, 10);
|
|
20457
20517
|
trackWidthLabel.textContent = `${active.trackWidth}%`;
|
|
20458
20518
|
options.onTrackWidthChange?.(active.config.id, active.trackWidth);
|
|
20519
|
+
persistTrack1(active);
|
|
20459
20520
|
});
|
|
20460
20521
|
trackCompInfo.addEventListener("click", () => {
|
|
20461
20522
|
showModal("\u97F3\u5727\u5F37\u5316\u306E\u89E3\u8AAC", TRACK_COMPRESSION_INFO_HTML);
|
|
@@ -20479,6 +20540,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20479
20540
|
active.trackPan = Number.parseInt(trackPanInput.value, 10);
|
|
20480
20541
|
trackPanLabel.textContent = fmtTrackPan(active.trackPan);
|
|
20481
20542
|
options.onTrackPanChange?.(active.config.id, active.trackPan);
|
|
20543
|
+
persistTrack1(active);
|
|
20482
20544
|
});
|
|
20483
20545
|
trackPanInfo.addEventListener("click", () => {
|
|
20484
20546
|
showModal("\u5B9A\u4F4D\u306E\u89E3\u8AAC", TRACK_PAN_INFO_HTML);
|
|
@@ -20501,6 +20563,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20501
20563
|
active.config.id,
|
|
20502
20564
|
active.trackReverbSend
|
|
20503
20565
|
);
|
|
20566
|
+
persistTrack1(active);
|
|
20504
20567
|
});
|
|
20505
20568
|
trackReverbSendInfo.addEventListener("click", () => {
|
|
20506
20569
|
showModal("\u30EA\u30D0\u30FC\u30D6\u9001\u308A\u306E\u89E3\u8AAC", TRACK_REVERBSEND_INFO_HTML);
|
|
@@ -20520,6 +20583,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20520
20583
|
active.trackDelaySend = Number.parseInt(trackDelaySendInput.value, 10);
|
|
20521
20584
|
trackDelaySendLabel.textContent = `${active.trackDelaySend}%`;
|
|
20522
20585
|
options.onTrackDelaySendChange?.(active.config.id, active.trackDelaySend);
|
|
20586
|
+
persistTrack1(active);
|
|
20523
20587
|
});
|
|
20524
20588
|
trackDelaySendInfo.addEventListener("click", () => {
|
|
20525
20589
|
showModal("\u30C7\u30A3\u30EC\u30A4\u9001\u308A\u306E\u89E3\u8AAC", TRACK_DELAYSEND_INFO_HTML);
|
|
@@ -20574,6 +20638,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20574
20638
|
active.trackInstrument = instSel.value;
|
|
20575
20639
|
const trackIndex = trackStates.indexOf(active);
|
|
20576
20640
|
options.onTrackInstrumentChange?.(trackIndex, active.trackInstrument);
|
|
20641
|
+
persistTrack1(active);
|
|
20577
20642
|
});
|
|
20578
20643
|
refs.trackBody.querySelector('[data-dtm="track-vol-row"]').prepend(instLabel, instSel);
|
|
20579
20644
|
const octaveRow = refs.trackBody.querySelector(
|
|
@@ -20589,6 +20654,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20589
20654
|
syncOctaveVisibility();
|
|
20590
20655
|
octaveSel.addEventListener("change", () => {
|
|
20591
20656
|
active.trackOctave = Number.parseInt(octaveSel.value, 10) || 0;
|
|
20657
|
+
persistTrack1(active);
|
|
20592
20658
|
});
|
|
20593
20659
|
const unisonSel = refs.trackBody.querySelector(
|
|
20594
20660
|
'[data-dtm="track-octave-unison"]'
|
|
@@ -20596,6 +20662,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20596
20662
|
unisonSel.value = active.trackOctaveUnison;
|
|
20597
20663
|
unisonSel.addEventListener("change", () => {
|
|
20598
20664
|
active.trackOctaveUnison = unisonSel.value;
|
|
20665
|
+
persistTrack1(active);
|
|
20599
20666
|
});
|
|
20600
20667
|
if (isAdvanced || active.config.id !== "chord") {
|
|
20601
20668
|
const lyricDiv = document.createElement("div");
|
|
@@ -22441,6 +22508,9 @@ var mountDAW = (target, options = {}) => {
|
|
|
22441
22508
|
if (melodyTrack) {
|
|
22442
22509
|
const current = melodyTrack.lyricModel.trim();
|
|
22443
22510
|
if (!current || current === autoComposeVocal) {
|
|
22511
|
+
if (!current && melodyTrack.vocalOctave === 0) {
|
|
22512
|
+
melodyTrack.vocalOctave = -1;
|
|
22513
|
+
}
|
|
22444
22514
|
melodyTrack.lyricModel = pickComposeVocal(autoComposeVocal);
|
|
22445
22515
|
autoComposeVocal = melodyTrack.lyricModel;
|
|
22446
22516
|
}
|
|
@@ -23585,7 +23655,10 @@ var mountDAW = (target, options = {}) => {
|
|
|
23585
23655
|
t.vocalBreathiness = data.vocalBreathiness ?? 50;
|
|
23586
23656
|
t.vocalTension = data.vocalTension ?? 50;
|
|
23587
23657
|
t.vocalOctaveUnison = data.vocalOctaveUnison ?? "none";
|
|
23588
|
-
if (t.config.id === activeTrackId)
|
|
23658
|
+
if (t.config.id === activeTrackId) {
|
|
23659
|
+
updateTrackPanel();
|
|
23660
|
+
redrawAll();
|
|
23661
|
+
}
|
|
23589
23662
|
},
|
|
23590
23663
|
applyTrackInstrument: (trackIndex, instrumentName) => {
|
|
23591
23664
|
const t = trackStates[trackIndex];
|
package/package.json
CHANGED