disable unused param check for building; updated version number; avoid relying on constructor.name to determine class type due to class name mangling.
This commit is contained in:
@@ -229,6 +229,8 @@ export class KGAudioInterface {
|
||||
public preparePlayback(project: KGProject, startPosition: number): void {
|
||||
// Clear any existing scheduled events
|
||||
this.clearScheduledEvents();
|
||||
|
||||
console.log("Preparing playback");
|
||||
|
||||
try {
|
||||
// Set project BPM and time signature FIRST (this affects timing calculations)
|
||||
@@ -245,10 +247,14 @@ export class KGAudioInterface {
|
||||
project.getTracks().forEach(track => {
|
||||
const trackId = track.getId().toString();
|
||||
const audioBus = this.trackAudioBuses.get(trackId);
|
||||
|
||||
console.log(`Track ${trackId} has audio bus: ${audioBus ? 'true' : 'false'}; type: ${track.getType()}`);
|
||||
|
||||
if (audioBus && track.getType() === 'MIDI') {
|
||||
track.getRegions().forEach(region => {
|
||||
if (region.constructor.name === 'KGMidiRegion') {
|
||||
console.log(`Region ${region.getId().toString()}: type: ${region.getCurrentType()}`);
|
||||
|
||||
if (region.getCurrentType() === 'KGMidiRegion') {
|
||||
const midiRegion = region as unknown as { getNotes: () => KGMidiNote[] };
|
||||
|
||||
// Get notes from region (assuming it has a getNotes method)
|
||||
|
||||
@@ -35,7 +35,7 @@ export class RemoveTrackCommand extends KGCommand {
|
||||
this.originalTrackIndex = trackToRemove.getTrackIndex();
|
||||
|
||||
// Store instrument if it's a MIDI track
|
||||
if (trackToRemove.constructor.name === 'KGMidiTrack' && 'getInstrument' in trackToRemove) {
|
||||
if (trackToRemove.getCurrentType() === 'KGMidiTrack' && 'getInstrument' in trackToRemove) {
|
||||
this.originalInstrument = (trackToRemove as KGMidiTrack).getInstrument();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user