Calculating number of notes in music piece

5 ビュー (過去 30 日間)
TANMAYEE PATHRE
TANMAYEE PATHRE 2019 年 7 月 3 日
回答済み: Shashwat Bajpai 2019 年 7 月 24 日
Hi! I have some piano (MIDI format) and drum clips (wav files) and want to find out number of notes in each music piece. How do I do that?
  1 件のコメント
Guillaume
Guillaume 2019 年 7 月 3 日
Counting the notes in the MIDI file should be fairly straightforward since a MIDI file is more or less just a sequence of instructions of which notes to play. However, I've no idea if there's a MIDI file decoder implemented in matlab. If not, there might be something on the FileExchange.
For the wav file, that's going to be significantly harder since it's just a sound recording. There's no note information embedded in the file. I guess for drums the start of a drum beat is a note, so you could probably detect sudden increases in sound amplitude. But what you're asking is akin to asking someone to listen to some drub and transcribe what they hear into notes. Not easy!

サインインしてコメントする。

採用された回答

Shashwat Bajpai
Shashwat Bajpai 2019 年 7 月 24 日
Hi,
I understand that you are trying to find the number of notes in the MIDI and .wav files.
Notes in a music piece are essentially set of frequencies varying with different octaves. I suggest you can convert the piece to frequency domain and note the different frequency variations.
You can analyze the MIDI file using the MIDI Toolbox and there is a file on the MATLAB central File Exchange available for the same purpose. You can find it on the following link:
For .wav file the process is similar. You can read the file using the audioread function.
For further information on the audioread function please refer the following link:
For information on converting data to frequency domain please refer the following link:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by