@onjmin/dtm 2.1.5 → 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.d.mts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +160 -56
- package/dist/index.mjs +155 -56
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2274,6 +2274,48 @@ declare const TRACKS_ADVANCED: TrackConfig[];
|
|
|
2274
2274
|
*/
|
|
2275
2275
|
declare const mountDAW: (target: HTMLElement, options?: DawOptions) => DawInstance;
|
|
2276
2276
|
|
|
2277
|
+
/**
|
|
2278
|
+
* 全体トラック設定アコーディオン内で選択された設定値の localStorage 永続化
|
|
2279
|
+
*
|
|
2280
|
+
* 音律、ループ再生、全体音量、グルーコンプ、マスタリバーブ(量・Decay・PreDelay)、
|
|
2281
|
+
* マスタディレイ(量・音価)、フェードイン、フェードアウトの各設定を保持し、
|
|
2282
|
+
* 次回ロード時に復元できるようにする。
|
|
2283
|
+
*/
|
|
2284
|
+
declare const GLOBAL_STORAGE_KEYS: {
|
|
2285
|
+
readonly edo: "dtm-global:edo";
|
|
2286
|
+
readonly loop: "dtm-global:loop";
|
|
2287
|
+
readonly masterVolume: "dtm-global:master-volume";
|
|
2288
|
+
readonly masterComp: "dtm-global:master-comp";
|
|
2289
|
+
readonly reverbAmount: "dtm-global:reverb-amount";
|
|
2290
|
+
readonly reverbDecay: "dtm-global:reverb-decay";
|
|
2291
|
+
readonly reverbPreDelay: "dtm-global:reverb-predelay";
|
|
2292
|
+
readonly delayAmount: "dtm-global:delay-amount";
|
|
2293
|
+
readonly delayDivision: "dtm-global:delay-division";
|
|
2294
|
+
readonly fadeIn: "dtm-global:fade-in";
|
|
2295
|
+
readonly fadeOut: "dtm-global:fade-out";
|
|
2296
|
+
};
|
|
2297
|
+
type GlobalStorageKey = keyof typeof GLOBAL_STORAGE_KEYS;
|
|
2298
|
+
/**
|
|
2299
|
+
* 全体トラック設定の単一項目を localStorage から取得する。
|
|
2300
|
+
* 未設定または localStorage にアクセスできない場合は null を返す。
|
|
2301
|
+
*/
|
|
2302
|
+
declare const readGlobalSetting: (key: GlobalStorageKey) => string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
* 全体トラック設定の単一項目を localStorage に保存する。
|
|
2305
|
+
* localStorage にアクセスできない環境や容量制限等は無視する。
|
|
2306
|
+
*/
|
|
2307
|
+
declare const writeGlobalSetting: (key: GlobalStorageKey, value: string) => void;
|
|
2308
|
+
/**
|
|
2309
|
+
* 全体トラック設定の数値項目を localStorage から取得し、クランプして返す。
|
|
2310
|
+
* 未設定・パース失敗の場合は null を返す。
|
|
2311
|
+
*/
|
|
2312
|
+
declare const readGlobalNumber: (key: GlobalStorageKey, min: number, max: number) => number | null;
|
|
2313
|
+
/**
|
|
2314
|
+
* 全体トラック設定の真偽値項目を localStorage から取得して返す。
|
|
2315
|
+
* 未設定・不正値の場合は null を返す。
|
|
2316
|
+
*/
|
|
2317
|
+
declare const readGlobalBool: (key: GlobalStorageKey) => boolean | null;
|
|
2318
|
+
|
|
2277
2319
|
/**
|
|
2278
2320
|
* playMML — DOM非依存(ヘッドレス)の MML 再生関数。
|
|
2279
2321
|
*
|
|
@@ -3570,4 +3612,4 @@ declare const encodeWavPCM16: (channels: Float32Array[], sampleRate: number) =>
|
|
|
3570
3612
|
/** Float32Array のチャンクを1本へ連結する。 */
|
|
3571
3613
|
declare const concatFloat32: (chunks: Float32Array[]) => Float32Array;
|
|
3572
3614
|
|
|
3573
|
-
export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, BREATH_MARK, type Band, CENTS_PER_UNIT, COMPOSE_KEYS, COMPOSE_MOOD_GROUPS, CORPUS_BANDS, CORPUS_SIZE, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ComposeKeyTarget, type ComposeMoodGroup, type ComposeMoodId, type ComposeOptions, type ComposeResult, type ComposeStats, type ComposedNote, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_SECTIONS, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, FADE_IN_MARK, FADE_OUT_MARK, type FadeScheduleParams, GM_INSTRUMENT_NAMES, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KeyMode, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyllableKind, type LyricSyncData, type LyricTrack, type LyricsConductor, MACRO_STORAGE_KEYS, MAJOR_KEY_IDS, MAX_VOCAL_VOLUME, MICRO_STEP, MINOR_KEY_IDS, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MacroStorageKey, type MetricNote, type MetricOptions, type MidiExtraction, type MidiNote, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PORTAMENTO_MARK, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchSegment, type PitchToken, type PlacedSection, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, REST_MARK, type RenderConfig, type Renderer, type ResolvedComposeKey, SECTION_LABELS, SECTION_ORDER, SECTION_SPECS, STOP_MARK, type SectionKind, type SectionSpec, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceNoteOptions, type StreamVoiceTrack, type StructureFeatures, type Synth, TIE_MARK, TIE_MERGE_MAX_SEC, TRACKS_ADVANCED, TRACKS_SIMPLE, type TensionFeatures, type TieSourceNote, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, type Units, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, addUnits, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, band, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, buildSectionPlan, buildStreamVoiceNotes, chromaticStep, collectPitchTokens, complementarity, composeSong, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, displayKana, durationEntropy, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, featureDistance, featureVector, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getComposeKeyDescription, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiNote, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, readMacroSections, readMacroSetting, resolveComposeKey, resolveDrumPattern, resolveLoopPoint, semitonesToUnits, shiftNotes, showLoadingOverlay, spelledToUnits, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, structureFeatures, syllablesToText, tensionFeatures, transposeNotes, units, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain, writeMacroSections, writeMacroSetting };
|
|
3615
|
+
export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, BREATH_MARK, type Band, CENTS_PER_UNIT, COMPOSE_KEYS, COMPOSE_MOOD_GROUPS, CORPUS_BANDS, CORPUS_SIZE, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ComposeKeyTarget, type ComposeMoodGroup, type ComposeMoodId, type ComposeOptions, type ComposeResult, type ComposeStats, type ComposedNote, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_SECTIONS, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, FADE_IN_MARK, FADE_OUT_MARK, type FadeScheduleParams, GLOBAL_STORAGE_KEYS, GM_INSTRUMENT_NAMES, type GlobalStorageKey, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KeyMode, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyllableKind, type LyricSyncData, type LyricTrack, type LyricsConductor, MACRO_STORAGE_KEYS, MAJOR_KEY_IDS, MAX_VOCAL_VOLUME, MICRO_STEP, MINOR_KEY_IDS, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MacroStorageKey, type MetricNote, type MetricOptions, type MidiExtraction, type MidiNote, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PORTAMENTO_MARK, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchSegment, type PitchToken, type PlacedSection, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, REST_MARK, type RenderConfig, type Renderer, type ResolvedComposeKey, SECTION_LABELS, SECTION_ORDER, SECTION_SPECS, STOP_MARK, type SectionKind, type SectionSpec, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceNoteOptions, type StreamVoiceTrack, type StructureFeatures, type Synth, TIE_MARK, TIE_MERGE_MAX_SEC, TRACKS_ADVANCED, TRACKS_SIMPLE, type TensionFeatures, type TieSourceNote, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, type Units, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, addUnits, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, band, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, buildSectionPlan, buildStreamVoiceNotes, chromaticStep, collectPitchTokens, complementarity, composeSong, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, displayKana, durationEntropy, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, featureDistance, featureVector, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getComposeKeyDescription, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiNote, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, readGlobalBool, readGlobalNumber, readGlobalSetting, readMacroSections, readMacroSetting, resolveComposeKey, resolveDrumPattern, resolveLoopPoint, semitonesToUnits, shiftNotes, showLoadingOverlay, spelledToUnits, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, structureFeatures, syllablesToText, tensionFeatures, transposeNotes, units, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain, writeGlobalSetting, writeMacroSections, writeMacroSetting };
|
package/dist/index.d.ts
CHANGED
|
@@ -2274,6 +2274,48 @@ declare const TRACKS_ADVANCED: TrackConfig[];
|
|
|
2274
2274
|
*/
|
|
2275
2275
|
declare const mountDAW: (target: HTMLElement, options?: DawOptions) => DawInstance;
|
|
2276
2276
|
|
|
2277
|
+
/**
|
|
2278
|
+
* 全体トラック設定アコーディオン内で選択された設定値の localStorage 永続化
|
|
2279
|
+
*
|
|
2280
|
+
* 音律、ループ再生、全体音量、グルーコンプ、マスタリバーブ(量・Decay・PreDelay)、
|
|
2281
|
+
* マスタディレイ(量・音価)、フェードイン、フェードアウトの各設定を保持し、
|
|
2282
|
+
* 次回ロード時に復元できるようにする。
|
|
2283
|
+
*/
|
|
2284
|
+
declare const GLOBAL_STORAGE_KEYS: {
|
|
2285
|
+
readonly edo: "dtm-global:edo";
|
|
2286
|
+
readonly loop: "dtm-global:loop";
|
|
2287
|
+
readonly masterVolume: "dtm-global:master-volume";
|
|
2288
|
+
readonly masterComp: "dtm-global:master-comp";
|
|
2289
|
+
readonly reverbAmount: "dtm-global:reverb-amount";
|
|
2290
|
+
readonly reverbDecay: "dtm-global:reverb-decay";
|
|
2291
|
+
readonly reverbPreDelay: "dtm-global:reverb-predelay";
|
|
2292
|
+
readonly delayAmount: "dtm-global:delay-amount";
|
|
2293
|
+
readonly delayDivision: "dtm-global:delay-division";
|
|
2294
|
+
readonly fadeIn: "dtm-global:fade-in";
|
|
2295
|
+
readonly fadeOut: "dtm-global:fade-out";
|
|
2296
|
+
};
|
|
2297
|
+
type GlobalStorageKey = keyof typeof GLOBAL_STORAGE_KEYS;
|
|
2298
|
+
/**
|
|
2299
|
+
* 全体トラック設定の単一項目を localStorage から取得する。
|
|
2300
|
+
* 未設定または localStorage にアクセスできない場合は null を返す。
|
|
2301
|
+
*/
|
|
2302
|
+
declare const readGlobalSetting: (key: GlobalStorageKey) => string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
* 全体トラック設定の単一項目を localStorage に保存する。
|
|
2305
|
+
* localStorage にアクセスできない環境や容量制限等は無視する。
|
|
2306
|
+
*/
|
|
2307
|
+
declare const writeGlobalSetting: (key: GlobalStorageKey, value: string) => void;
|
|
2308
|
+
/**
|
|
2309
|
+
* 全体トラック設定の数値項目を localStorage から取得し、クランプして返す。
|
|
2310
|
+
* 未設定・パース失敗の場合は null を返す。
|
|
2311
|
+
*/
|
|
2312
|
+
declare const readGlobalNumber: (key: GlobalStorageKey, min: number, max: number) => number | null;
|
|
2313
|
+
/**
|
|
2314
|
+
* 全体トラック設定の真偽値項目を localStorage から取得して返す。
|
|
2315
|
+
* 未設定・不正値の場合は null を返す。
|
|
2316
|
+
*/
|
|
2317
|
+
declare const readGlobalBool: (key: GlobalStorageKey) => boolean | null;
|
|
2318
|
+
|
|
2277
2319
|
/**
|
|
2278
2320
|
* playMML — DOM非依存(ヘッドレス)の MML 再生関数。
|
|
2279
2321
|
*
|
|
@@ -3570,4 +3612,4 @@ declare const encodeWavPCM16: (channels: Float32Array[], sampleRate: number) =>
|
|
|
3570
3612
|
/** Float32Array のチャンクを1本へ連結する。 */
|
|
3571
3613
|
declare const concatFloat32: (chunks: Float32Array[]) => Float32Array;
|
|
3572
3614
|
|
|
3573
|
-
export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, BREATH_MARK, type Band, CENTS_PER_UNIT, COMPOSE_KEYS, COMPOSE_MOOD_GROUPS, CORPUS_BANDS, CORPUS_SIZE, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ComposeKeyTarget, type ComposeMoodGroup, type ComposeMoodId, type ComposeOptions, type ComposeResult, type ComposeStats, type ComposedNote, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_SECTIONS, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, FADE_IN_MARK, FADE_OUT_MARK, type FadeScheduleParams, GM_INSTRUMENT_NAMES, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KeyMode, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyllableKind, type LyricSyncData, type LyricTrack, type LyricsConductor, MACRO_STORAGE_KEYS, MAJOR_KEY_IDS, MAX_VOCAL_VOLUME, MICRO_STEP, MINOR_KEY_IDS, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MacroStorageKey, type MetricNote, type MetricOptions, type MidiExtraction, type MidiNote, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PORTAMENTO_MARK, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchSegment, type PitchToken, type PlacedSection, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, REST_MARK, type RenderConfig, type Renderer, type ResolvedComposeKey, SECTION_LABELS, SECTION_ORDER, SECTION_SPECS, STOP_MARK, type SectionKind, type SectionSpec, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceNoteOptions, type StreamVoiceTrack, type StructureFeatures, type Synth, TIE_MARK, TIE_MERGE_MAX_SEC, TRACKS_ADVANCED, TRACKS_SIMPLE, type TensionFeatures, type TieSourceNote, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, type Units, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, addUnits, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, band, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, buildSectionPlan, buildStreamVoiceNotes, chromaticStep, collectPitchTokens, complementarity, composeSong, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, displayKana, durationEntropy, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, featureDistance, featureVector, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getComposeKeyDescription, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiNote, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, readMacroSections, readMacroSetting, resolveComposeKey, resolveDrumPattern, resolveLoopPoint, semitonesToUnits, shiftNotes, showLoadingOverlay, spelledToUnits, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, structureFeatures, syllablesToText, tensionFeatures, transposeNotes, units, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain, writeMacroSections, writeMacroSetting };
|
|
3615
|
+
export { A4_HZ, A4_UNITS, type AddNoteOptions, type AnyDrumPattern, type ApplyChordOptions, BREATH_MARK, type Band, CENTS_PER_UNIT, COMPOSE_KEYS, COMPOSE_MOOD_GROUPS, CORPUS_BANDS, CORPUS_SIZE, type ChordPatternType, type ChordPlacement, type ChordPlayerInstance, type ComposeKeyTarget, type ComposeMoodGroup, type ComposeMoodId, type ComposeOptions, type ComposeResult, type ComposeStats, type ComposedNote, type ConsumedSyllable, type CoreEventHandlers, type CustomVocalDef, DAW_CSS, DEFAULT_BPM, DEFAULT_EDO, DEFAULT_GATE, DEFAULT_PAN, DEFAULT_PLAYBACK_VELOCITY, DEFAULT_SECTIONS, DEFAULT_STEPS_PER_BAR, DEFAULT_VELOCITY, DEFAULT_VOCAL_VOLUME, DRUM_FONT, DRUM_KEYS, DRUM_PATTERNS, type DawInstance, type DawMode, type DawOptions, type DawViewState, type DrumPattern, type DrumPatternDef, type DtmStudio, type DtmStudioEngines, type DtmStudioOptions, EDO31_NAMES, type Edo, type ExportMidiOptions, FADE_IN_MARK, FADE_OUT_MARK, type FadeScheduleParams, GLOBAL_STORAGE_KEYS, GM_INSTRUMENT_NAMES, type GlobalStorageKey, INSTRUMENT_PRESETS, type InstrumentPreset, KEY_COUNT, KOE_BASE_URL, KOE_VOICEBANKS, KOE_VOICEBANK_LABELS, KOE_VOICEBANK_TERMS, type KeyMode, type KoeVoiceOptions, LinkedList, type LoopConfig, type LoopPoint, type LyricSyllable, type LyricSyllableKind, type LyricSyncData, type LyricTrack, type LyricsConductor, MACRO_STORAGE_KEYS, MAJOR_KEY_IDS, MAX_VOCAL_VOLUME, MICRO_STEP, MINOR_KEY_IDS, MMLCore, type MMLDisplayToken, type MMLNotePlacement, MML_END_MARKER, type MacroStorageKey, type MetricNote, type MetricOptions, type MidiExtraction, type MidiNote, type MidiNotePlacement, MidiSearchClient, type MidiSearchConfig, type MidiTrackAnalysis, type MmlMeta, type MmlPlayback, type MmlPlayerInstance, type MmlPlayerOptions, type ModeSwitchInstance, type ModeSwitchOptions, type MountChordPlayerOptions, type MountEditorOptions, type MountPlayerOptions, type Note, type NoteData, type NoteRemove, type OctaveUnisonMode, PITCH_ENCODING_VERSION, PITCH_MAP, PITCH_RANGE_END, PITCH_RANGE_START, PORTAMENTO_MARK, PREWARM_NOTES, type ParseMMLOptions, type ParseMidiFn, type ParsedMML, type PianoRollInstance, type PianoRollOptions, type PicotuneSearchParams, type PicotuneSong, type PitchSegment, type PitchToken, type PlacedSection, type PlayChordsOptions, type PlayDrumEvent, type PlayMmlOptions, type PlayNoteEvent, type PlayNoteOptions, type PlayPlacementsOptions, type PlaySingingMmlOptions, type PlaybackCue, type PlaybackState, type PresetSelectInstance, type PresetSelectOptions, type PreviewSoundCallback, REST_MARK, type RenderConfig, type Renderer, type ResolvedComposeKey, SECTION_LABELS, SECTION_ORDER, SECTION_SPECS, STOP_MARK, type SectionKind, type SectionSpec, type Sequencer, type SequencerOptions, type SequencerTrack, type SingingVoices, type SingingVoicesOptions, type StreamPlaybackOptions, type StreamVoiceNote, type StreamVoiceNoteOptions, type StreamVoiceTrack, type StructureFeatures, type Synth, TIE_MARK, TIE_MERGE_MAX_SEC, TRACKS_ADVANCED, TRACKS_SIMPLE, type TensionFeatures, type TieSourceNote, type ToolMode, type TrackConfig, UNITS_PER_EDO31_DEGREE, UNITS_PER_OCTAVE, UNITS_PER_SEMITONE, type Units, VIBRATO_MIN_SEC, VOICE_IMAGES, VOICE_IMAGE_KEY, type VoiceExpression, type VoiceModel, type VoiceRegistry, addUnits, analyzeMidiTracks, applyHarmonicFilter, applyMonophonic, band, buildChordPlacements, buildDrumPatternJson, buildNameToKeyMapping, buildSectionPlan, buildStreamVoiceNotes, chromaticStep, collectPitchTokens, complementarity, composeSong, concatFloat32, createAudioContext, createDtmStudio, createKlattVoice, createKoeVoice, createLyricsConductor, createPianoRoll, createRenderer, createSequencer, createSingingVoices, createSynth, createVoiceRegistry, decodeMml, decomposeToMonophonic, displayKana, durationEntropy, encodeMml, encodeWavPCM16, exportMIDI, extractDrumPatternFromNotes, extractMidiDrumPattern, extractMidiPlacements, extractMidiPlacementsByTrack, featureDistance, featureVector, fifthToStep, fifthToUnits, formatMmlMeta, freqFromPitch, generateRandomPattern, getComposeKeyDescription, getDrumPatternKeys, getMidiBPM, icon, injectStyles, isChordHeavyTrack, isNaturalLetter, isPlausibleMidiTranscription, isValidHttpUrl, keyCountFor, koeUrl, midiNote, midiToUnits, mountChordPlayer, mountDAW, mountMmlPlayer, naturalStep, normalizeDrumPatterns, normalizeLyrics, panToStereo, parseCustomVocals, parseLyrics, parseMML, parseMmlMeta, pitchV1ToUnits, playChords, playMML, playNote, playPlacements, playSingingMML, readGlobalBool, readGlobalNumber, readGlobalSetting, readMacroSections, readMacroSetting, resolveComposeKey, resolveDrumPattern, resolveLoopPoint, semitonesToUnits, shiftNotes, showLoadingOverlay, spelledToUnits, spellingToUnits, stripCustomVocals, stripLyrics, stripMmlMeta, structureFeatures, syllablesToText, tensionFeatures, transposeNotes, units, unitsPerRow, unitsPerStep, unitsToHz, unitsToMidi, unitsToMidiDetune, unitsToPitchV1, vocalVolumeToGain, writeGlobalSetting, writeMacroSections, writeMacroSetting };
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
EDO31_NAMES: () => EDO31_NAMES,
|
|
45
45
|
FADE_IN_MARK: () => FADE_IN_MARK,
|
|
46
46
|
FADE_OUT_MARK: () => FADE_OUT_MARK,
|
|
47
|
+
GLOBAL_STORAGE_KEYS: () => GLOBAL_STORAGE_KEYS,
|
|
47
48
|
GM_INSTRUMENT_NAMES: () => GM_INSTRUMENT_NAMES,
|
|
48
49
|
INSTRUMENT_PRESETS: () => INSTRUMENT_PRESETS,
|
|
49
50
|
KEY_COUNT: () => KEY_COUNT,
|
|
@@ -155,6 +156,9 @@ __export(index_exports, {
|
|
|
155
156
|
playNote: () => playNote,
|
|
156
157
|
playPlacements: () => playPlacements,
|
|
157
158
|
playSingingMML: () => playSingingMML,
|
|
159
|
+
readGlobalBool: () => readGlobalBool,
|
|
160
|
+
readGlobalNumber: () => readGlobalNumber,
|
|
161
|
+
readGlobalSetting: () => readGlobalSetting,
|
|
158
162
|
readMacroSections: () => readMacroSections,
|
|
159
163
|
readMacroSetting: () => readMacroSetting,
|
|
160
164
|
resolveComposeKey: () => resolveComposeKey,
|
|
@@ -180,6 +184,7 @@ __export(index_exports, {
|
|
|
180
184
|
unitsToMidiDetune: () => unitsToMidiDetune,
|
|
181
185
|
unitsToPitchV1: () => unitsToPitchV1,
|
|
182
186
|
vocalVolumeToGain: () => vocalVolumeToGain,
|
|
187
|
+
writeGlobalSetting: () => writeGlobalSetting,
|
|
183
188
|
writeMacroSections: () => writeMacroSections,
|
|
184
189
|
writeMacroSetting: () => writeMacroSetting
|
|
185
190
|
});
|
|
@@ -17835,6 +17840,28 @@ var isChordHeavyTrack = (notes, threshold = 0.6) => {
|
|
|
17835
17840
|
return chordNotes / notes.length >= threshold;
|
|
17836
17841
|
};
|
|
17837
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
|
+
|
|
17838
17865
|
// src/renderer.ts
|
|
17839
17866
|
var KEYBOARD_WIDTH = 60;
|
|
17840
17867
|
var HEADER_HEIGHT = 20;
|
|
@@ -18616,7 +18643,7 @@ var COMPOSE_INFO_HTML = `
|
|
|
18616
18643
|
<tr><td>\u30A2\u30A6\u30C8\u30ED</td><td>\u6709\u308A</td><td>\u4F4E\u3081</td><td>\u8584\u3044</td><td>\u4E3B\u97F3\u3078\u7740\u5730</td></tr>
|
|
18617
18644
|
</table>
|
|
18618
18645
|
<p>\u30A4\u30F3\u30C8\u30ED\u3068\u9593\u594F\u306F\u30E1\u30ED\u30C7\u30A3\u3092\u66F8\u304D\u307E\u305B\u3093\uFF08\u4F34\u594F\u30FB\u30D9\u30FC\u30B9\u30FB\u30C9\u30E9\u30E0\u30FB\u30B5\u30D6\u30E1\u30ED\u3060\u3051\u304C\u9CF4\u308A\u307E\u3059\uFF09\u3002\u3053\u3053\u306B\u6B4C\u30E1\u30ED\u3092\u7F6E\u304F\u3068\u3001\u3069\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3082\u540C\u3058\u9854\u306B\u306A\u3063\u3066\u300C\u305A\u3063\u3068\u6B4C\u3063\u3066\u3044\u308B\u66F2\u300D\u306B\u306A\u3063\u3066\u3057\u307E\u3046\u305F\u3081\u3067\u3059\u3002\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u982D\u3067\u306F\u30C9\u30E9\u30E0\u304C\u30AF\u30E9\u30C3\u30B7\u30E5\u3092\u53E9\u304D\u3001\u7D42\u308F\u308A\u306E1\u3064\u624B\u524D\u3067\u30D5\u30A3\u30EB\u304C\u5165\u308A\u307E\u3059\u3002</p>
|
|
18619
|
-
<p>\u30CE\u30FC\u30C8\
|
|
18646
|
+
<p>\u30CE\u30FC\u30C8\u306E\u914D\u7F6E\u306B\u52A0\u3048\u3066\u3001\u30C6\u30F3\u30DD\u30FB\u30C9\u30E9\u30E0\u30FB\u697D\u5668\u30FB<strong>\u304A\u307E\u304B\u305B\u30DE\u30B9\u30BF\u30EA\u30F3\u30B0</strong>\uFF08\u5404\u30C8\u30E9\u30C3\u30AF\u306E\u97F3\u91CF\u30D0\u30E9\u30F3\u30B9\u30FB\u5B9A\u4F4D\u30FBEQ\u30FB\u30B3\u30F3\u30D7\u30EC\u30C3\u30B5\u30FC\u30FB\u30EA\u30D0\u30FC\u30D6\u30FB\u30DE\u30B9\u30BF\u8A2D\u5B9A\uFF09\u3082\u81EA\u52D5\u3067\u4E00\u62EC\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u3067\u304D\u305F\u5F8C\u306B\u5FAE\u8ABF\u6574\u3057\u305F\u3044\u3068\u304D\u306F\u3001\u5404\u30C8\u30E9\u30C3\u30AF\u306E\u8A2D\u5B9A\u3084\u300C\u5168\u4F53\u30C8\u30E9\u30C3\u30AF\u8A2D\u5B9A\u300D\u304B\u3089\u81EA\u7531\u306B\u5909\u66F4\u3067\u304D\u307E\u3059\u3002</p>
|
|
18620
18647
|
<h4>\u66F2\u306E\u7D44\u307F\u7ACB\u3066\u65B9</h4>
|
|
18621
18648
|
<p>\u5358\u7D14\u306B\u30E9\u30F3\u30C0\u30E0\u306A\u97F3\u3092\u4E26\u3079\u3066\u3044\u308B\u308F\u3051\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u9806\u756A\u3067\u7D44\u307F\u7ACB\u3066\u3066\u3044\u307E\u3059\u3002</p>
|
|
18622
18649
|
<ol>
|
|
@@ -19288,7 +19315,38 @@ var mountDAW = (target, options = {}) => {
|
|
|
19288
19315
|
let trackStates = [];
|
|
19289
19316
|
let suppressPatch = false;
|
|
19290
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
|
+
};
|
|
19291
19348
|
const fireLyricsChange = (t) => {
|
|
19349
|
+
persistTrack1(t);
|
|
19292
19350
|
if (!options.onLyricsChange) return;
|
|
19293
19351
|
const trackId = t.config.id;
|
|
19294
19352
|
const data = {
|
|
@@ -19314,9 +19372,11 @@ var mountDAW = (target, options = {}) => {
|
|
|
19314
19372
|
};
|
|
19315
19373
|
const hiddenTracks = /* @__PURE__ */ new Set();
|
|
19316
19374
|
const audioMutedTracks = /* @__PURE__ */ new Set();
|
|
19375
|
+
const savedTrack1 = readTrack1Settings();
|
|
19317
19376
|
const createTrackStates = () => {
|
|
19318
|
-
trackStates = trackConfigs.map((config) => {
|
|
19377
|
+
trackStates = trackConfigs.map((config, index) => {
|
|
19319
19378
|
let prevNotes = [];
|
|
19379
|
+
const t1 = index === 0 ? savedTrack1 : null;
|
|
19320
19380
|
return {
|
|
19321
19381
|
config,
|
|
19322
19382
|
core: new MMLCore(
|
|
@@ -19361,35 +19421,35 @@ var mountDAW = (target, options = {}) => {
|
|
|
19361
19421
|
config.volume,
|
|
19362
19422
|
() => renderConfig
|
|
19363
19423
|
),
|
|
19364
|
-
volume: config.volume,
|
|
19424
|
+
volume: t1?.volume ?? config.volume,
|
|
19365
19425
|
savedChordInput: "",
|
|
19366
19426
|
savedChordPattern: "block",
|
|
19367
19427
|
savedChordRoot: 0,
|
|
19368
19428
|
lyrics: "",
|
|
19369
|
-
lyricModel: "",
|
|
19429
|
+
lyricModel: t1?.lyricModel ?? "",
|
|
19370
19430
|
// 既定は「なし」(歌わない)
|
|
19371
|
-
vocalVolume: DEFAULT_VOCAL_VOLUME,
|
|
19372
|
-
vocalGate: 100,
|
|
19373
|
-
vocalPan: 64,
|
|
19374
|
-
trackOctave: 0,
|
|
19375
|
-
trackOctaveUnison: "none",
|
|
19376
|
-
vocalOctave: 0,
|
|
19377
|
-
vocalVibrato: false,
|
|
19378
|
-
vocalReverb: 0,
|
|
19379
|
-
vocalDelay: 0,
|
|
19380
|
-
vocalGender: 50,
|
|
19381
|
-
vocalBreathiness: 50,
|
|
19382
|
-
vocalTension: 50,
|
|
19383
|
-
vocalOctaveUnison: "none",
|
|
19384
|
-
trackInstrument: "",
|
|
19385
|
-
trackCompression: 0,
|
|
19386
|
-
trackWidth: 100,
|
|
19387
|
-
trackReverbSend: 0,
|
|
19388
|
-
trackEqLow: 0,
|
|
19389
|
-
trackEqMid: 0,
|
|
19390
|
-
trackEqHigh: 0,
|
|
19391
|
-
trackPan: 64,
|
|
19392
|
-
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
|
|
19393
19453
|
};
|
|
19394
19454
|
});
|
|
19395
19455
|
};
|
|
@@ -20557,6 +20617,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20557
20617
|
active.volume = Number.parseInt(volInput.value, 10);
|
|
20558
20618
|
active.core.setVolume(active.volume);
|
|
20559
20619
|
volLabel.textContent = String(active.volume);
|
|
20620
|
+
persistTrack1(active);
|
|
20560
20621
|
});
|
|
20561
20622
|
const syncVelocityDisabled = () => {
|
|
20562
20623
|
volInput.disabled = !!active.lyricModel;
|
|
@@ -20595,16 +20656,19 @@ var mountDAW = (target, options = {}) => {
|
|
|
20595
20656
|
active.trackEqLow = Number.parseInt(trackEqLowInput.value, 10);
|
|
20596
20657
|
trackEqLowLabel.textContent = fmtDb(active.trackEqLow);
|
|
20597
20658
|
options.onTrackEqLowChange?.(active.config.id, active.trackEqLow);
|
|
20659
|
+
persistTrack1(active);
|
|
20598
20660
|
});
|
|
20599
20661
|
trackEqMidInput.addEventListener("input", () => {
|
|
20600
20662
|
active.trackEqMid = Number.parseInt(trackEqMidInput.value, 10);
|
|
20601
20663
|
trackEqMidLabel.textContent = fmtDb(active.trackEqMid);
|
|
20602
20664
|
options.onTrackEqMidChange?.(active.config.id, active.trackEqMid);
|
|
20665
|
+
persistTrack1(active);
|
|
20603
20666
|
});
|
|
20604
20667
|
trackEqHighInput.addEventListener("input", () => {
|
|
20605
20668
|
active.trackEqHigh = Number.parseInt(trackEqHighInput.value, 10);
|
|
20606
20669
|
trackEqHighLabel.textContent = fmtDb(active.trackEqHigh);
|
|
20607
20670
|
options.onTrackEqHighChange?.(active.config.id, active.trackEqHigh);
|
|
20671
|
+
persistTrack1(active);
|
|
20608
20672
|
});
|
|
20609
20673
|
trackEqInfo.addEventListener("click", () => {
|
|
20610
20674
|
showModal("EQ\uFF08\u30A4\u30B3\u30E9\u30A4\u30B6\u30FC\uFF09\u306E\u89E3\u8AAC", TRACK_EQ_INFO_HTML);
|
|
@@ -20638,11 +20702,13 @@ var mountDAW = (target, options = {}) => {
|
|
|
20638
20702
|
active.config.id,
|
|
20639
20703
|
active.trackCompression
|
|
20640
20704
|
);
|
|
20705
|
+
persistTrack1(active);
|
|
20641
20706
|
});
|
|
20642
20707
|
trackWidthInput.addEventListener("input", () => {
|
|
20643
20708
|
active.trackWidth = Number.parseInt(trackWidthInput.value, 10);
|
|
20644
20709
|
trackWidthLabel.textContent = `${active.trackWidth}%`;
|
|
20645
20710
|
options.onTrackWidthChange?.(active.config.id, active.trackWidth);
|
|
20711
|
+
persistTrack1(active);
|
|
20646
20712
|
});
|
|
20647
20713
|
trackCompInfo.addEventListener("click", () => {
|
|
20648
20714
|
showModal("\u97F3\u5727\u5F37\u5316\u306E\u89E3\u8AAC", TRACK_COMPRESSION_INFO_HTML);
|
|
@@ -20666,6 +20732,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20666
20732
|
active.trackPan = Number.parseInt(trackPanInput.value, 10);
|
|
20667
20733
|
trackPanLabel.textContent = fmtTrackPan(active.trackPan);
|
|
20668
20734
|
options.onTrackPanChange?.(active.config.id, active.trackPan);
|
|
20735
|
+
persistTrack1(active);
|
|
20669
20736
|
});
|
|
20670
20737
|
trackPanInfo.addEventListener("click", () => {
|
|
20671
20738
|
showModal("\u5B9A\u4F4D\u306E\u89E3\u8AAC", TRACK_PAN_INFO_HTML);
|
|
@@ -20688,6 +20755,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20688
20755
|
active.config.id,
|
|
20689
20756
|
active.trackReverbSend
|
|
20690
20757
|
);
|
|
20758
|
+
persistTrack1(active);
|
|
20691
20759
|
});
|
|
20692
20760
|
trackReverbSendInfo.addEventListener("click", () => {
|
|
20693
20761
|
showModal("\u30EA\u30D0\u30FC\u30D6\u9001\u308A\u306E\u89E3\u8AAC", TRACK_REVERBSEND_INFO_HTML);
|
|
@@ -20707,6 +20775,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20707
20775
|
active.trackDelaySend = Number.parseInt(trackDelaySendInput.value, 10);
|
|
20708
20776
|
trackDelaySendLabel.textContent = `${active.trackDelaySend}%`;
|
|
20709
20777
|
options.onTrackDelaySendChange?.(active.config.id, active.trackDelaySend);
|
|
20778
|
+
persistTrack1(active);
|
|
20710
20779
|
});
|
|
20711
20780
|
trackDelaySendInfo.addEventListener("click", () => {
|
|
20712
20781
|
showModal("\u30C7\u30A3\u30EC\u30A4\u9001\u308A\u306E\u89E3\u8AAC", TRACK_DELAYSEND_INFO_HTML);
|
|
@@ -20761,6 +20830,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20761
20830
|
active.trackInstrument = instSel.value;
|
|
20762
20831
|
const trackIndex = trackStates.indexOf(active);
|
|
20763
20832
|
options.onTrackInstrumentChange?.(trackIndex, active.trackInstrument);
|
|
20833
|
+
persistTrack1(active);
|
|
20764
20834
|
});
|
|
20765
20835
|
refs.trackBody.querySelector('[data-dtm="track-vol-row"]').prepend(instLabel, instSel);
|
|
20766
20836
|
const octaveRow = refs.trackBody.querySelector(
|
|
@@ -20776,6 +20846,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20776
20846
|
syncOctaveVisibility();
|
|
20777
20847
|
octaveSel.addEventListener("change", () => {
|
|
20778
20848
|
active.trackOctave = Number.parseInt(octaveSel.value, 10) || 0;
|
|
20849
|
+
persistTrack1(active);
|
|
20779
20850
|
});
|
|
20780
20851
|
const unisonSel = refs.trackBody.querySelector(
|
|
20781
20852
|
'[data-dtm="track-octave-unison"]'
|
|
@@ -20783,6 +20854,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
20783
20854
|
unisonSel.value = active.trackOctaveUnison;
|
|
20784
20855
|
unisonSel.addEventListener("change", () => {
|
|
20785
20856
|
active.trackOctaveUnison = unisonSel.value;
|
|
20857
|
+
persistTrack1(active);
|
|
20786
20858
|
});
|
|
20787
20859
|
if (isAdvanced || active.config.id !== "chord") {
|
|
20788
20860
|
const lyricDiv = document.createElement("div");
|
|
@@ -22216,7 +22288,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
22216
22288
|
refs.autoMasterInfoBtn.addEventListener("click", () => {
|
|
22217
22289
|
showModal("\u304A\u307E\u304B\u305B\u30DE\u30B9\u30BF\u30EA\u30F3\u30B0\u89E3\u8AAC", AUTO_MASTER_INFO_HTML);
|
|
22218
22290
|
});
|
|
22219
|
-
|
|
22291
|
+
const applyAutoMastering = () => {
|
|
22220
22292
|
if (observedPlayMs >= PEAK_SAMPLE_MIN_PLAY_MS && observedPeakMax > 0) {
|
|
22221
22293
|
const targetPeak = 0.5;
|
|
22222
22294
|
const scale = targetPeak / observedPeakMax;
|
|
@@ -22369,6 +22441,9 @@ var mountDAW = (target, options = {}) => {
|
|
|
22369
22441
|
}
|
|
22370
22442
|
}
|
|
22371
22443
|
updateTrackPanel();
|
|
22444
|
+
};
|
|
22445
|
+
refs.autoMasterBtn.addEventListener("click", () => {
|
|
22446
|
+
applyAutoMastering();
|
|
22372
22447
|
});
|
|
22373
22448
|
refs.drumSelect.addEventListener("change", () => {
|
|
22374
22449
|
currentDrumPattern = refs.drumSelect.value;
|
|
@@ -22386,13 +22461,6 @@ var mountDAW = (target, options = {}) => {
|
|
|
22386
22461
|
refs.macroComposeInfo.addEventListener("click", () => {
|
|
22387
22462
|
showModal("\u4F5C\u66F2\u306E\u89E3\u8AAC", COMPOSE_INFO_HTML);
|
|
22388
22463
|
});
|
|
22389
|
-
const bassTracksForCompose = () => {
|
|
22390
|
-
if (!isAdvanced) {
|
|
22391
|
-
const t = trackStates.find((x2) => x2.config.id === "bass");
|
|
22392
|
-
return t ? [t] : [];
|
|
22393
|
-
}
|
|
22394
|
-
return ADVANCED_COMPOSE_LAYOUT.filter((l) => l.part === "bass").map((l) => trackStates[l.index]).filter((t) => !!t);
|
|
22395
|
-
};
|
|
22396
22464
|
const selectedComposeTemplate = () => {
|
|
22397
22465
|
const val = refs.composeTemplate?.value;
|
|
22398
22466
|
return val && val !== "custom" ? val : void 0;
|
|
@@ -22627,15 +22695,14 @@ var mountDAW = (target, options = {}) => {
|
|
|
22627
22695
|
autoComposeInstrument = song.instrument;
|
|
22628
22696
|
options.onInstrumentChange?.(song.instrument);
|
|
22629
22697
|
}
|
|
22630
|
-
for (const t of bassTracksForCompose()) {
|
|
22631
|
-
t.trackCompression = AUTO_ROLE_MIX.bass.compression;
|
|
22632
|
-
options.onTrackCompressionChange?.(t.config.id, t.trackCompression);
|
|
22633
|
-
}
|
|
22634
22698
|
if (withVocal) {
|
|
22635
22699
|
const melodyTrack = isAdvanced ? trackStates[0] : trackStates.find((t) => t.config.id === "melody");
|
|
22636
22700
|
if (melodyTrack) {
|
|
22637
22701
|
const current = melodyTrack.lyricModel.trim();
|
|
22638
22702
|
if (!current || current === autoComposeVocal) {
|
|
22703
|
+
if (!current && melodyTrack.vocalOctave === 0) {
|
|
22704
|
+
melodyTrack.vocalOctave = -1;
|
|
22705
|
+
}
|
|
22639
22706
|
melodyTrack.lyricModel = pickComposeVocal(autoComposeVocal);
|
|
22640
22707
|
autoComposeVocal = melodyTrack.lyricModel;
|
|
22641
22708
|
}
|
|
@@ -22645,6 +22712,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
22645
22712
|
fireLyricsChange(melodyTrack);
|
|
22646
22713
|
}
|
|
22647
22714
|
}
|
|
22715
|
+
applyAutoMastering();
|
|
22648
22716
|
if (refs.composeKeyHint) {
|
|
22649
22717
|
refs.composeKeyHint.textContent = `${song.keyLabel} \u3067\u4F5C\u6210`;
|
|
22650
22718
|
refs.composeKeyHint.title = `${song.keyLabel}${song.moodLabel ? `\uFF08${song.moodLabel}\uFF09` : ""}`;
|
|
@@ -23779,7 +23847,10 @@ var mountDAW = (target, options = {}) => {
|
|
|
23779
23847
|
t.vocalBreathiness = data.vocalBreathiness ?? 50;
|
|
23780
23848
|
t.vocalTension = data.vocalTension ?? 50;
|
|
23781
23849
|
t.vocalOctaveUnison = data.vocalOctaveUnison ?? "none";
|
|
23782
|
-
if (t.config.id === activeTrackId)
|
|
23850
|
+
if (t.config.id === activeTrackId) {
|
|
23851
|
+
updateTrackPanel();
|
|
23852
|
+
redrawAll();
|
|
23853
|
+
}
|
|
23783
23854
|
},
|
|
23784
23855
|
applyTrackInstrument: (trackIndex, instrumentName) => {
|
|
23785
23856
|
const t = trackStates[trackIndex];
|
|
@@ -23816,6 +23887,49 @@ var mountDAW = (target, options = {}) => {
|
|
|
23816
23887
|
};
|
|
23817
23888
|
};
|
|
23818
23889
|
|
|
23890
|
+
// src/global-state.ts
|
|
23891
|
+
var GLOBAL_STORAGE_KEYS = {
|
|
23892
|
+
edo: "dtm-global:edo",
|
|
23893
|
+
loop: "dtm-global:loop",
|
|
23894
|
+
masterVolume: "dtm-global:master-volume",
|
|
23895
|
+
masterComp: "dtm-global:master-comp",
|
|
23896
|
+
reverbAmount: "dtm-global:reverb-amount",
|
|
23897
|
+
reverbDecay: "dtm-global:reverb-decay",
|
|
23898
|
+
reverbPreDelay: "dtm-global:reverb-predelay",
|
|
23899
|
+
delayAmount: "dtm-global:delay-amount",
|
|
23900
|
+
delayDivision: "dtm-global:delay-division",
|
|
23901
|
+
fadeIn: "dtm-global:fade-in",
|
|
23902
|
+
fadeOut: "dtm-global:fade-out"
|
|
23903
|
+
};
|
|
23904
|
+
var readGlobalSetting = (key) => {
|
|
23905
|
+
try {
|
|
23906
|
+
if (typeof localStorage === "undefined" || !localStorage) return null;
|
|
23907
|
+
return localStorage.getItem(GLOBAL_STORAGE_KEYS[key]);
|
|
23908
|
+
} catch (_) {
|
|
23909
|
+
return null;
|
|
23910
|
+
}
|
|
23911
|
+
};
|
|
23912
|
+
var writeGlobalSetting = (key, value) => {
|
|
23913
|
+
try {
|
|
23914
|
+
if (typeof localStorage === "undefined" || !localStorage) return;
|
|
23915
|
+
localStorage.setItem(GLOBAL_STORAGE_KEYS[key], value);
|
|
23916
|
+
} catch (_) {
|
|
23917
|
+
}
|
|
23918
|
+
};
|
|
23919
|
+
var readGlobalNumber = (key, min, max) => {
|
|
23920
|
+
const raw = readGlobalSetting(key);
|
|
23921
|
+
if (raw === null) return null;
|
|
23922
|
+
const n = Number.parseFloat(raw);
|
|
23923
|
+
if (Number.isNaN(n)) return null;
|
|
23924
|
+
return Math.max(min, Math.min(max, n));
|
|
23925
|
+
};
|
|
23926
|
+
var readGlobalBool = (key) => {
|
|
23927
|
+
const raw = readGlobalSetting(key);
|
|
23928
|
+
if (raw === "1" || raw === "true") return true;
|
|
23929
|
+
if (raw === "0" || raw === "false") return false;
|
|
23930
|
+
return null;
|
|
23931
|
+
};
|
|
23932
|
+
|
|
23819
23933
|
// src/headless-singing-player.ts
|
|
23820
23934
|
var STEPS_PER_BEAT4 = 48;
|
|
23821
23935
|
var STEPS_PER_BAR3 = 192;
|
|
@@ -25129,17 +25243,13 @@ var createDtmStudio = async (options = {}) => {
|
|
|
25129
25243
|
}
|
|
25130
25244
|
const select = doc.createElement("select");
|
|
25131
25245
|
select.className = "dtm-select dtm-grow";
|
|
25132
|
-
const autoOpt = doc.createElement("option");
|
|
25133
|
-
autoOpt.value = "auto";
|
|
25134
|
-
autoOpt.textContent = "\u2728 \u81EA\u52D5\uFF08\u66F2\u8ABF\u9023\u52D5\uFF09";
|
|
25135
|
-
select.appendChild(autoOpt);
|
|
25136
25246
|
for (const [key, p] of Object.entries(INSTRUMENT_PRESETS)) {
|
|
25137
25247
|
const o = doc.createElement("option");
|
|
25138
25248
|
o.value = key;
|
|
25139
25249
|
o.textContent = p.displayName;
|
|
25140
25250
|
select.appendChild(o);
|
|
25141
25251
|
}
|
|
25142
|
-
select.value = opts.value
|
|
25252
|
+
select.value = opts.value && INSTRUMENT_PRESETS[opts.value] ? opts.value : defaultPreset;
|
|
25143
25253
|
wrapper.appendChild(select);
|
|
25144
25254
|
let busy = false;
|
|
25145
25255
|
const onChange = async () => {
|
|
@@ -25148,10 +25258,6 @@ var createDtmStudio = async (options = {}) => {
|
|
|
25148
25258
|
busy = true;
|
|
25149
25259
|
const key = select.value;
|
|
25150
25260
|
opts.onChange?.(key);
|
|
25151
|
-
if (key === "auto") {
|
|
25152
|
-
busy = false;
|
|
25153
|
-
return;
|
|
25154
|
-
}
|
|
25155
25261
|
const trackIds = opts.getTrackIds?.() ?? [...TRACK_ROLES];
|
|
25156
25262
|
const isAdvanced = trackIds.includes("t0");
|
|
25157
25263
|
const mode = isAdvanced ? "advanced" : "simple";
|
|
@@ -25169,7 +25275,7 @@ var createDtmStudio = async (options = {}) => {
|
|
|
25169
25275
|
element: wrapper,
|
|
25170
25276
|
select,
|
|
25171
25277
|
setValue: (k) => {
|
|
25172
|
-
if (
|
|
25278
|
+
if (INSTRUMENT_PRESETS[k]) select.value = k;
|
|
25173
25279
|
},
|
|
25174
25280
|
getValue: () => select.value,
|
|
25175
25281
|
destroy: () => {
|
|
@@ -25262,13 +25368,6 @@ var createDtmStudio = async (options = {}) => {
|
|
|
25262
25368
|
let daw;
|
|
25263
25369
|
let presetSelect = null;
|
|
25264
25370
|
const handleInstrumentChange = (key) => {
|
|
25265
|
-
if (key === "auto") {
|
|
25266
|
-
if (presetSelect) {
|
|
25267
|
-
presetSelect.setValue("auto");
|
|
25268
|
-
}
|
|
25269
|
-
onInstrumentChange?.("auto");
|
|
25270
|
-
return;
|
|
25271
|
-
}
|
|
25272
25371
|
editorPreset = key;
|
|
25273
25372
|
if (presetSelect) {
|
|
25274
25373
|
presetSelect.setValue(key);
|
|
@@ -26049,6 +26148,7 @@ var createDtmStudio = async (options = {}) => {
|
|
|
26049
26148
|
EDO31_NAMES,
|
|
26050
26149
|
FADE_IN_MARK,
|
|
26051
26150
|
FADE_OUT_MARK,
|
|
26151
|
+
GLOBAL_STORAGE_KEYS,
|
|
26052
26152
|
GM_INSTRUMENT_NAMES,
|
|
26053
26153
|
INSTRUMENT_PRESETS,
|
|
26054
26154
|
KEY_COUNT,
|
|
@@ -26160,6 +26260,9 @@ var createDtmStudio = async (options = {}) => {
|
|
|
26160
26260
|
playNote,
|
|
26161
26261
|
playPlacements,
|
|
26162
26262
|
playSingingMML,
|
|
26263
|
+
readGlobalBool,
|
|
26264
|
+
readGlobalNumber,
|
|
26265
|
+
readGlobalSetting,
|
|
26163
26266
|
readMacroSections,
|
|
26164
26267
|
readMacroSetting,
|
|
26165
26268
|
resolveComposeKey,
|
|
@@ -26185,6 +26288,7 @@ var createDtmStudio = async (options = {}) => {
|
|
|
26185
26288
|
unitsToMidiDetune,
|
|
26186
26289
|
unitsToPitchV1,
|
|
26187
26290
|
vocalVolumeToGain,
|
|
26291
|
+
writeGlobalSetting,
|
|
26188
26292
|
writeMacroSections,
|
|
26189
26293
|
writeMacroSetting
|
|
26190
26294
|
});
|
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;
|
|
@@ -18429,7 +18451,7 @@ var COMPOSE_INFO_HTML = `
|
|
|
18429
18451
|
<tr><td>\u30A2\u30A6\u30C8\u30ED</td><td>\u6709\u308A</td><td>\u4F4E\u3081</td><td>\u8584\u3044</td><td>\u4E3B\u97F3\u3078\u7740\u5730</td></tr>
|
|
18430
18452
|
</table>
|
|
18431
18453
|
<p>\u30A4\u30F3\u30C8\u30ED\u3068\u9593\u594F\u306F\u30E1\u30ED\u30C7\u30A3\u3092\u66F8\u304D\u307E\u305B\u3093\uFF08\u4F34\u594F\u30FB\u30D9\u30FC\u30B9\u30FB\u30C9\u30E9\u30E0\u30FB\u30B5\u30D6\u30E1\u30ED\u3060\u3051\u304C\u9CF4\u308A\u307E\u3059\uFF09\u3002\u3053\u3053\u306B\u6B4C\u30E1\u30ED\u3092\u7F6E\u304F\u3068\u3001\u3069\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u3082\u540C\u3058\u9854\u306B\u306A\u3063\u3066\u300C\u305A\u3063\u3068\u6B4C\u3063\u3066\u3044\u308B\u66F2\u300D\u306B\u306A\u3063\u3066\u3057\u307E\u3046\u305F\u3081\u3067\u3059\u3002\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u982D\u3067\u306F\u30C9\u30E9\u30E0\u304C\u30AF\u30E9\u30C3\u30B7\u30E5\u3092\u53E9\u304D\u3001\u7D42\u308F\u308A\u306E1\u3064\u624B\u524D\u3067\u30D5\u30A3\u30EB\u304C\u5165\u308A\u307E\u3059\u3002</p>
|
|
18432
|
-
<p>\u30CE\u30FC\u30C8\
|
|
18454
|
+
<p>\u30CE\u30FC\u30C8\u306E\u914D\u7F6E\u306B\u52A0\u3048\u3066\u3001\u30C6\u30F3\u30DD\u30FB\u30C9\u30E9\u30E0\u30FB\u697D\u5668\u30FB<strong>\u304A\u307E\u304B\u305B\u30DE\u30B9\u30BF\u30EA\u30F3\u30B0</strong>\uFF08\u5404\u30C8\u30E9\u30C3\u30AF\u306E\u97F3\u91CF\u30D0\u30E9\u30F3\u30B9\u30FB\u5B9A\u4F4D\u30FBEQ\u30FB\u30B3\u30F3\u30D7\u30EC\u30C3\u30B5\u30FC\u30FB\u30EA\u30D0\u30FC\u30D6\u30FB\u30DE\u30B9\u30BF\u8A2D\u5B9A\uFF09\u3082\u81EA\u52D5\u3067\u4E00\u62EC\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u3067\u304D\u305F\u5F8C\u306B\u5FAE\u8ABF\u6574\u3057\u305F\u3044\u3068\u304D\u306F\u3001\u5404\u30C8\u30E9\u30C3\u30AF\u306E\u8A2D\u5B9A\u3084\u300C\u5168\u4F53\u30C8\u30E9\u30C3\u30AF\u8A2D\u5B9A\u300D\u304B\u3089\u81EA\u7531\u306B\u5909\u66F4\u3067\u304D\u307E\u3059\u3002</p>
|
|
18433
18455
|
<h4>\u66F2\u306E\u7D44\u307F\u7ACB\u3066\u65B9</h4>
|
|
18434
18456
|
<p>\u5358\u7D14\u306B\u30E9\u30F3\u30C0\u30E0\u306A\u97F3\u3092\u4E26\u3079\u3066\u3044\u308B\u308F\u3051\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6B21\u306E\u9806\u756A\u3067\u7D44\u307F\u7ACB\u3066\u3066\u3044\u307E\u3059\u3002</p>
|
|
18435
18457
|
<ol>
|
|
@@ -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");
|
|
@@ -22029,7 +22096,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
22029
22096
|
refs.autoMasterInfoBtn.addEventListener("click", () => {
|
|
22030
22097
|
showModal("\u304A\u307E\u304B\u305B\u30DE\u30B9\u30BF\u30EA\u30F3\u30B0\u89E3\u8AAC", AUTO_MASTER_INFO_HTML);
|
|
22031
22098
|
});
|
|
22032
|
-
|
|
22099
|
+
const applyAutoMastering = () => {
|
|
22033
22100
|
if (observedPlayMs >= PEAK_SAMPLE_MIN_PLAY_MS && observedPeakMax > 0) {
|
|
22034
22101
|
const targetPeak = 0.5;
|
|
22035
22102
|
const scale = targetPeak / observedPeakMax;
|
|
@@ -22182,6 +22249,9 @@ var mountDAW = (target, options = {}) => {
|
|
|
22182
22249
|
}
|
|
22183
22250
|
}
|
|
22184
22251
|
updateTrackPanel();
|
|
22252
|
+
};
|
|
22253
|
+
refs.autoMasterBtn.addEventListener("click", () => {
|
|
22254
|
+
applyAutoMastering();
|
|
22185
22255
|
});
|
|
22186
22256
|
refs.drumSelect.addEventListener("change", () => {
|
|
22187
22257
|
currentDrumPattern = refs.drumSelect.value;
|
|
@@ -22199,13 +22269,6 @@ var mountDAW = (target, options = {}) => {
|
|
|
22199
22269
|
refs.macroComposeInfo.addEventListener("click", () => {
|
|
22200
22270
|
showModal("\u4F5C\u66F2\u306E\u89E3\u8AAC", COMPOSE_INFO_HTML);
|
|
22201
22271
|
});
|
|
22202
|
-
const bassTracksForCompose = () => {
|
|
22203
|
-
if (!isAdvanced) {
|
|
22204
|
-
const t = trackStates.find((x2) => x2.config.id === "bass");
|
|
22205
|
-
return t ? [t] : [];
|
|
22206
|
-
}
|
|
22207
|
-
return ADVANCED_COMPOSE_LAYOUT.filter((l) => l.part === "bass").map((l) => trackStates[l.index]).filter((t) => !!t);
|
|
22208
|
-
};
|
|
22209
22272
|
const selectedComposeTemplate = () => {
|
|
22210
22273
|
const val = refs.composeTemplate?.value;
|
|
22211
22274
|
return val && val !== "custom" ? val : void 0;
|
|
@@ -22440,15 +22503,14 @@ var mountDAW = (target, options = {}) => {
|
|
|
22440
22503
|
autoComposeInstrument = song.instrument;
|
|
22441
22504
|
options.onInstrumentChange?.(song.instrument);
|
|
22442
22505
|
}
|
|
22443
|
-
for (const t of bassTracksForCompose()) {
|
|
22444
|
-
t.trackCompression = AUTO_ROLE_MIX.bass.compression;
|
|
22445
|
-
options.onTrackCompressionChange?.(t.config.id, t.trackCompression);
|
|
22446
|
-
}
|
|
22447
22506
|
if (withVocal) {
|
|
22448
22507
|
const melodyTrack = isAdvanced ? trackStates[0] : trackStates.find((t) => t.config.id === "melody");
|
|
22449
22508
|
if (melodyTrack) {
|
|
22450
22509
|
const current = melodyTrack.lyricModel.trim();
|
|
22451
22510
|
if (!current || current === autoComposeVocal) {
|
|
22511
|
+
if (!current && melodyTrack.vocalOctave === 0) {
|
|
22512
|
+
melodyTrack.vocalOctave = -1;
|
|
22513
|
+
}
|
|
22452
22514
|
melodyTrack.lyricModel = pickComposeVocal(autoComposeVocal);
|
|
22453
22515
|
autoComposeVocal = melodyTrack.lyricModel;
|
|
22454
22516
|
}
|
|
@@ -22458,6 +22520,7 @@ var mountDAW = (target, options = {}) => {
|
|
|
22458
22520
|
fireLyricsChange(melodyTrack);
|
|
22459
22521
|
}
|
|
22460
22522
|
}
|
|
22523
|
+
applyAutoMastering();
|
|
22461
22524
|
if (refs.composeKeyHint) {
|
|
22462
22525
|
refs.composeKeyHint.textContent = `${song.keyLabel} \u3067\u4F5C\u6210`;
|
|
22463
22526
|
refs.composeKeyHint.title = `${song.keyLabel}${song.moodLabel ? `\uFF08${song.moodLabel}\uFF09` : ""}`;
|
|
@@ -23592,7 +23655,10 @@ var mountDAW = (target, options = {}) => {
|
|
|
23592
23655
|
t.vocalBreathiness = data.vocalBreathiness ?? 50;
|
|
23593
23656
|
t.vocalTension = data.vocalTension ?? 50;
|
|
23594
23657
|
t.vocalOctaveUnison = data.vocalOctaveUnison ?? "none";
|
|
23595
|
-
if (t.config.id === activeTrackId)
|
|
23658
|
+
if (t.config.id === activeTrackId) {
|
|
23659
|
+
updateTrackPanel();
|
|
23660
|
+
redrawAll();
|
|
23661
|
+
}
|
|
23596
23662
|
},
|
|
23597
23663
|
applyTrackInstrument: (trackIndex, instrumentName) => {
|
|
23598
23664
|
const t = trackStates[trackIndex];
|
|
@@ -23629,6 +23695,49 @@ var mountDAW = (target, options = {}) => {
|
|
|
23629
23695
|
};
|
|
23630
23696
|
};
|
|
23631
23697
|
|
|
23698
|
+
// src/global-state.ts
|
|
23699
|
+
var GLOBAL_STORAGE_KEYS = {
|
|
23700
|
+
edo: "dtm-global:edo",
|
|
23701
|
+
loop: "dtm-global:loop",
|
|
23702
|
+
masterVolume: "dtm-global:master-volume",
|
|
23703
|
+
masterComp: "dtm-global:master-comp",
|
|
23704
|
+
reverbAmount: "dtm-global:reverb-amount",
|
|
23705
|
+
reverbDecay: "dtm-global:reverb-decay",
|
|
23706
|
+
reverbPreDelay: "dtm-global:reverb-predelay",
|
|
23707
|
+
delayAmount: "dtm-global:delay-amount",
|
|
23708
|
+
delayDivision: "dtm-global:delay-division",
|
|
23709
|
+
fadeIn: "dtm-global:fade-in",
|
|
23710
|
+
fadeOut: "dtm-global:fade-out"
|
|
23711
|
+
};
|
|
23712
|
+
var readGlobalSetting = (key) => {
|
|
23713
|
+
try {
|
|
23714
|
+
if (typeof localStorage === "undefined" || !localStorage) return null;
|
|
23715
|
+
return localStorage.getItem(GLOBAL_STORAGE_KEYS[key]);
|
|
23716
|
+
} catch (_) {
|
|
23717
|
+
return null;
|
|
23718
|
+
}
|
|
23719
|
+
};
|
|
23720
|
+
var writeGlobalSetting = (key, value) => {
|
|
23721
|
+
try {
|
|
23722
|
+
if (typeof localStorage === "undefined" || !localStorage) return;
|
|
23723
|
+
localStorage.setItem(GLOBAL_STORAGE_KEYS[key], value);
|
|
23724
|
+
} catch (_) {
|
|
23725
|
+
}
|
|
23726
|
+
};
|
|
23727
|
+
var readGlobalNumber = (key, min, max) => {
|
|
23728
|
+
const raw = readGlobalSetting(key);
|
|
23729
|
+
if (raw === null) return null;
|
|
23730
|
+
const n = Number.parseFloat(raw);
|
|
23731
|
+
if (Number.isNaN(n)) return null;
|
|
23732
|
+
return Math.max(min, Math.min(max, n));
|
|
23733
|
+
};
|
|
23734
|
+
var readGlobalBool = (key) => {
|
|
23735
|
+
const raw = readGlobalSetting(key);
|
|
23736
|
+
if (raw === "1" || raw === "true") return true;
|
|
23737
|
+
if (raw === "0" || raw === "false") return false;
|
|
23738
|
+
return null;
|
|
23739
|
+
};
|
|
23740
|
+
|
|
23632
23741
|
// src/headless-singing-player.ts
|
|
23633
23742
|
var STEPS_PER_BEAT4 = 48;
|
|
23634
23743
|
var STEPS_PER_BAR3 = 192;
|
|
@@ -24941,17 +25050,13 @@ var createDtmStudio = async (options = {}) => {
|
|
|
24941
25050
|
}
|
|
24942
25051
|
const select = doc.createElement("select");
|
|
24943
25052
|
select.className = "dtm-select dtm-grow";
|
|
24944
|
-
const autoOpt = doc.createElement("option");
|
|
24945
|
-
autoOpt.value = "auto";
|
|
24946
|
-
autoOpt.textContent = "\u2728 \u81EA\u52D5\uFF08\u66F2\u8ABF\u9023\u52D5\uFF09";
|
|
24947
|
-
select.appendChild(autoOpt);
|
|
24948
25053
|
for (const [key, p] of Object.entries(INSTRUMENT_PRESETS)) {
|
|
24949
25054
|
const o = doc.createElement("option");
|
|
24950
25055
|
o.value = key;
|
|
24951
25056
|
o.textContent = p.displayName;
|
|
24952
25057
|
select.appendChild(o);
|
|
24953
25058
|
}
|
|
24954
|
-
select.value = opts.value
|
|
25059
|
+
select.value = opts.value && INSTRUMENT_PRESETS[opts.value] ? opts.value : defaultPreset;
|
|
24955
25060
|
wrapper.appendChild(select);
|
|
24956
25061
|
let busy = false;
|
|
24957
25062
|
const onChange = async () => {
|
|
@@ -24960,10 +25065,6 @@ var createDtmStudio = async (options = {}) => {
|
|
|
24960
25065
|
busy = true;
|
|
24961
25066
|
const key = select.value;
|
|
24962
25067
|
opts.onChange?.(key);
|
|
24963
|
-
if (key === "auto") {
|
|
24964
|
-
busy = false;
|
|
24965
|
-
return;
|
|
24966
|
-
}
|
|
24967
25068
|
const trackIds = opts.getTrackIds?.() ?? [...TRACK_ROLES];
|
|
24968
25069
|
const isAdvanced = trackIds.includes("t0");
|
|
24969
25070
|
const mode = isAdvanced ? "advanced" : "simple";
|
|
@@ -24981,7 +25082,7 @@ var createDtmStudio = async (options = {}) => {
|
|
|
24981
25082
|
element: wrapper,
|
|
24982
25083
|
select,
|
|
24983
25084
|
setValue: (k) => {
|
|
24984
|
-
if (
|
|
25085
|
+
if (INSTRUMENT_PRESETS[k]) select.value = k;
|
|
24985
25086
|
},
|
|
24986
25087
|
getValue: () => select.value,
|
|
24987
25088
|
destroy: () => {
|
|
@@ -25074,13 +25175,6 @@ var createDtmStudio = async (options = {}) => {
|
|
|
25074
25175
|
let daw;
|
|
25075
25176
|
let presetSelect = null;
|
|
25076
25177
|
const handleInstrumentChange = (key) => {
|
|
25077
|
-
if (key === "auto") {
|
|
25078
|
-
if (presetSelect) {
|
|
25079
|
-
presetSelect.setValue("auto");
|
|
25080
|
-
}
|
|
25081
|
-
onInstrumentChange?.("auto");
|
|
25082
|
-
return;
|
|
25083
|
-
}
|
|
25084
25178
|
editorPreset = key;
|
|
25085
25179
|
if (presetSelect) {
|
|
25086
25180
|
presetSelect.setValue(key);
|
|
@@ -25860,6 +25954,7 @@ export {
|
|
|
25860
25954
|
EDO31_NAMES,
|
|
25861
25955
|
FADE_IN_MARK,
|
|
25862
25956
|
FADE_OUT_MARK,
|
|
25957
|
+
GLOBAL_STORAGE_KEYS,
|
|
25863
25958
|
GM_INSTRUMENT_NAMES,
|
|
25864
25959
|
INSTRUMENT_PRESETS,
|
|
25865
25960
|
KEY_COUNT,
|
|
@@ -25971,6 +26066,9 @@ export {
|
|
|
25971
26066
|
playNote,
|
|
25972
26067
|
playPlacements,
|
|
25973
26068
|
playSingingMML,
|
|
26069
|
+
readGlobalBool,
|
|
26070
|
+
readGlobalNumber,
|
|
26071
|
+
readGlobalSetting,
|
|
25974
26072
|
readMacroSections,
|
|
25975
26073
|
readMacroSetting,
|
|
25976
26074
|
resolveComposeKey,
|
|
@@ -25996,6 +26094,7 @@ export {
|
|
|
25996
26094
|
unitsToMidiDetune,
|
|
25997
26095
|
unitsToPitchV1,
|
|
25998
26096
|
vocalVolumeToGain,
|
|
26097
|
+
writeGlobalSetting,
|
|
25999
26098
|
writeMacroSections,
|
|
26000
26099
|
writeMacroSetting
|
|
26001
26100
|
};
|
package/package.json
CHANGED