diff --git a/public/resources/instruments/speaker.png b/public/resources/instruments/speaker.png new file mode 100644 index 0000000..6dafe66 Binary files /dev/null and b/public/resources/instruments/speaker.png differ diff --git a/src/components/InstrumentSelection.tsx b/src/components/InstrumentSelection.tsx index b923e5e..8602c53 100644 --- a/src/components/InstrumentSelection.tsx +++ b/src/components/InstrumentSelection.tsx @@ -3,6 +3,7 @@ import './InstrumentSelection.css'; import { useProjectStore } from '../stores/projectStore'; import { INSTRUMENT_GROUPS, FLUIDR3_INSTRUMENT_MAP } from '../constants/generalMidiConstants'; import { KGMidiTrack, type InstrumentType } from '../core/track/KGMidiTrack'; +import { KGAudioTrack } from '../core/track/KGAudioTrack'; const InstrumentSelection: React.FC = () => { const { @@ -53,14 +54,15 @@ const InstrumentSelection: React.FC = () => { } }; - const previewImage = FLUIDR3_INSTRUMENT_MAP[currentInstrumentKey]?.image || 'piano.png'; - const previewAlt = FLUIDR3_INSTRUMENT_MAP[currentInstrumentKey]?.displayName || currentInstrumentKey; + const isAudioTrack = targetTrack instanceof KGAudioTrack; + const previewImage = isAudioTrack ? 'speaker.png' : (FLUIDR3_INSTRUMENT_MAP[currentInstrumentKey]?.image || 'piano.png'); + const previewAlt = isAudioTrack ? 'Audio Track' : (FLUIDR3_INSTRUMENT_MAP[currentInstrumentKey]?.displayName || currentInstrumentKey); const hasTargetTrack = !!targetTrack; return (
) : (