feat: save MIDI tracks to generation area; playing tracks and audio preview are still under development

This commit is contained in:
josc146
2023-11-29 19:04:41 +08:00
parent 34112c79c7
commit a2062ae9cc
11 changed files with 172 additions and 44 deletions

View File

@@ -107,8 +107,9 @@ class CommonStore {
trackTotalTime: number = tracksMinimalTotalTime;
trackCurrentTime: number = 0;
trackPlayStartTime: number = 0;
playingTrackId: string = '';
recordingTrackId: string = '';
recordingContent: string = ''; // used to improve performance, and I'm too lazy to maintain an ID dictionary for this
recordingContent: string = ''; // used to improve performance of midiMessageHandler, and I'm too lazy to maintain an ID dictionary for this (although that would be better for realtime effects)
recordingRawContent: MidiMessage[] = [];
// configs
currentModelConfigIndex: number = 0;
@@ -444,6 +445,10 @@ class CommonStore {
setRecordingRawContent(value: MidiMessage[]) {
this.recordingRawContent = value;
}
setPlayingTrackId(value: string) {
this.playingTrackId = value;
}
}
export default new CommonStore();