Filter löschen
Filter löschen

Unrecognized function or variable 'chromagram_IF'.

1 Ansicht (letzte 30 Tage)
Nima
Nima am 12 Mai 2024
Kommentiert: Star Strider am 13 Mai 2024
C = chromagram_IF(audio_data,sample_rate,cfftlen);
i want to plot chroma features for an audio file, to detect musical notes for it. Here, specifically, I'm getting the error:
Unrecognized function or variable 'chromagram_IF'.
Anybody know, what can i do that for that?
[audio_data, sample_rate] = audioread(file_path);
Unrecognized function or variable 'file_path'.
% Read an audio waveform
% Calculate the chroma matrix. Use a long FFT to discriminate
% spectral lines as well as possible (2048 is the default value)
cfftlen=2048;
C = chromagram_IF(audio_data,sample_rate,cfftlen);
% The frame advance is always one quarter of the FFT length. Thus,
% the columns of C are at timebase of fftlen/4/sr
tt = (1:size(C,2))*cfftlen/4/sample_rate;
% Plot spectrogram using a shorter window
subplot(311)
sfftlen = 512;
specgram(audio_data,sfftlen,sample_rate);
% Always use a 60 dB colormap range
clim(max(clim)+[-60 0])
% .. and look only at the bottom 4 kHz of spectrum
axis([0 length(d)/sample_rate 0 4000])
title('Original Sound')
% Now the chromagram, also on a dB magnitude scale
subplot(312)
imagesc(tt,1:12,20*log10(C+eps));
axis xy
clim(max(clim)+[-60 0])
title('Chromagram')

Antworten (0)

Kategorien

Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by