fbpx
Skip to main content

MIDI Forum

How to find pitch t...
 
Notifications
Clear all

How to find pitch tuning information of any played note from midi file?

3 Posts
3 Users
0 Reactions
5,089 Views
Ruchir
Posts: 3
Active Member
Topic starter
 

For an Indian classical music performance's audio-analysis task I am working on, first a .wav or .mp3 file is converted to .mid or midifile, with help of Bear audio tool available online. To make it more human friendly to analyse, I'm converting the midi file to csv file with help of Fourmilab's midicsv program. The resulting csv file shows musical note's midi equivalent note number quite well.

However, somewhere in the process, I am loosing the pitch tuning information of the note that was played by an instrument or sung in vocal performance. As people who know Indian classical music may be aware of, this information is one of the vital part in this kind of muscal performance. I'd like to know how this can be corrected. ie How can one obtain the precise pitch tuning or frequency information of the note that was played/sung in audio, from the resulting midi file in this process?

 
Posted : 21/05/2022 4:04 am
Geoff
Posts: 1039
Noble Member
 

As I understand these things, Indian music may be using a slightly different scale, or tuning, to 'western' music. Some of the notes played may be the same, but others may be different.

The precise frequency of each note played would have been present in the digital sound file (.wav or .mp3). But as soon as you've converted this into midi, the precise tuning may well have been lost and the note may have been 'approximated' into a note on another scale/tuning UNLESS the version of the software you were using (BEAR or whatever) was specifically set up to handle Indian music. If you needed to retain the precise tuning data as you suggest, then this data would need to have been saved, in some form, at that time before it is lost totally. Maybe BEAR does not have any way to save this data.

If BEAR is configured to handle the tuning correctly, i.e. it knows it's dealing with Indian music/tuning, then it might be OK, but it MIGHT still be making some approximations, and the data you want might still be lost.

There is no way that this information can be stored within a midi file. You could change the tuning on a midi playback system to reflect Indian tuning, and this would help, but all devices receive a note number which simply plays a preset frequency, so you could re-tune a device for playing Indian (or any other type) of music. I believe that some tuning instructions can be included in a midi file to make sure that the correct tuning is sounded.

Geoff

 
Posted : 21/05/2022 7:55 am
Jason
Posts: 424
Honorable Member
 

I tested out Bear Audio on some mp3s.
https://www.bearaudiotool.com/mp3-to-midi
I'll have to say, sound-wise it does a pretty good job of duplicating what you put in to it. The more complex the sound is (more things happening at once, such as singing plus drums plus multiple instruments) the more muddled it gets. But I was able to actually make out some lyrics in a few songs I tried by selecting a certain sound for it to play back with.

I haven't actually opened one of the midi files in an editor, but I imagine visually it is quite a mess.

I tested out converting a 30 second pitch slide of -12 to +12 semitones around 440 Hz. The resulting MIDI file does not pitch slide or use pitch bend. I imagine this is why you are having issues, because the vocals I assume are essentially using constant pitch bending (based on what I've heard of Indian singing before). The converter is rounding all of the pitches to the nearest semitone, so you will lose any of the in-between pitches, which are probably the exact thing you are looking for.

I attached the pitch slide mp3 and resulting pitch slide MIDI file so you can see what the converter is losing.

 
Posted : 21/05/2022 8:28 pm
Share: