updated the naming convention for new tracks and regions. New tracks now default to 'Track {i}', and new regions default to '{track_name} Region {i}'.

This commit is contained in:
Xiaohan-Tian
2025-08-12 21:41:11 -07:00
parent 47872287ce
commit 2510014580
3 changed files with 58 additions and 2 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { KGCommand } from '../KGCommand';
import { KGCore } from '../../KGCore';
import { KGMidiTrack, type InstrumentType } from '../../track/KGMidiTrack';
import { KGAudioInterface } from '../../audio-interface/KGAudioInterface';
import { generateNewTrackName } from '../../../util/miscUtil';
/**
* Command to add a new track to the project
@@ -28,7 +29,7 @@ export class AddTrackCommand extends KGCommand {
this.trackId = trackId;
}
this.trackName = trackName || `Track ${this.trackId}`;
this.trackName = trackName || generateNewTrackName();
this.instrument = instrument;
// Track index will be set during execution