Information of pitch offset of a midinote or a set of midinotes, from the standard pitch within midi file.

Joined
Feb 5, 2022
Messages
4
Reaction score
0
Hello,

I am interested to know the following about midi file format and specification,

If there was a transposition or offset of the midi note by a few cents or let's say all the notes in a track were off by few cents from the standard note pitch-es, is there any object(s) or parameter(s) within midi file, which handle it or contain such information?
 

SeaGtGruff

I meant to play that note!
Moderator
Joined
Jun 6, 2014
Messages
4,108
Reaction score
1,734
There are MIDI events for transposing notes, which is usually referred to as "coarse tuning." These are often SysEx (or System Exclusive) messages, but there are also RPN (or Registered Parameter Number) messages for coarse tuning and fine tuning.

Fine tuning lets you adjust the tuning of notes in small fractions of a semitone, whereas coarse tuning lets you adjust the tuning of notes in whole semitones-- that is, transposing up or down a specified number of notes.

Some of these messages adjust the note tunings for the device as a whole-- that is, for all MIDI channels at once-- but others let you limit the tuning adjustments to a specified channel.
 
Last edited:
Joined
Feb 5, 2022
Messages
4
Reaction score
0
There are MIDI events for transposing notes, which is usually referred to as "coarse tuning." These are often SysEx (or System Exclusive) messages, but there are also RPN (or Registered Parameter Number) messages for coarse tuning and fine tuning.

Thank you for your prompt and precise response. Just one last question, are these messages (SysEx and RPN) which are containing fine or coarse tuning information, always a part of the standard midi files? If not, is there any way to activate that feature?
 

SeaGtGruff

I meant to play that note!
Moderator
Joined
Jun 6, 2014
Messages
4,108
Reaction score
1,734
They probably won't be in most MIDI files unless there's a reason for them to be there, but you should be able to add them with a MIDI editor if you want to transpose a MIDI song.

Note that most electronic keyboards include some sort of Transpose feature that lets you change the key of the notes being played, so you might not need to add such information to a MIDI file.

I should have started my original answer by asking you for more information about what you're trying to do, in case there's a better or simpler solution than adding messages to your MIDI files.
 
Joined
Feb 5, 2022
Messages
4
Reaction score
0
I should have started my original answer by asking you for more information about what you're trying to do, in case there's a better or simpler solution than adding messages to your MIDI files.
I apologize, as I should have included that in the first post.
I've been looking this information for a music-performance-audio analysis project, in which, first the recorded wav or mp3 audio file is converted to a midifile with help of an online tool Bear audio converter, further the .mid file is converted to a csv file with help of midicsv software (courtesy fourmilab.ch) making it readable to human.

Before our conversation, I was unable to figure out, in which of the above steps, am i loosing the much critical fine-tuning information of the notes..

However, from the information you've provided and from few other details I have, it looks it should be happening in the 2nd step ..

@SeaGtGruff thank you so much for sharing your inputs and I appreciate much your help.
 

SeaGtGruff

I meant to play that note!
Moderator
Joined
Jun 6, 2014
Messages
4,108
Reaction score
1,734
Well, the MIDI fine tuning messages adjust the overall tuning-- that is, all notes at once, either for a particular channel or for all channels. But if you're really interested in fine tuning the individual notes of the scale, that's something else. Many keyboards do have MIDI messages which can be used to alter the fine tuning of each note of the scale in order to have tunings other than 12-Tone Equal Temperament, but those messages tend to be specific to each keyboard manufacturer, so they're System Exclusive messages but are different messages than the Universal System Exclusive messages for fine tuning and coarse tuning.

So if that's what you're really after-- tuning the individual notes of the scale-- you'll need to look at the MIDI documentation for each brand of keyboard you're targetting. For example, for Yamaha keyboards the scale-tuning messages are part of the XG standard, and for Roland keyboards they're part of the GS standard. Note that any SysEx messages which a given keyboard doesn't recognize will simply be ignored, so it should be possible to include manufacturer-specific scale-tuning SysEx messages for multiple brands in the same MIDI file, such as adding the necessary XG messages for Yamaha keyboards, followed by the GS messages for Roland keyboards, followed by whatever messages Korg uses, followed by whatever messages Casio uses, etc. Each brand will just ignore the messages for the other brands, and each model that isn't capable of scale tuning in the first place will just ignore all of the messages it can't handle.
 
Joined
Feb 5, 2022
Messages
4
Reaction score
0
hey @SeaGtGruff I Apologize for late response, i am getting your point. Thank you sincerely for your guidance and help. Have a great weekend ahead.

Well, the MIDI fine tuning messages adjust the overall tuning-- that is, all notes at once, either for a particular channel or for all channels. But if you're really interested in fine tuning the individual notes of the scale, that's something else. Many keyboards do have MIDI messages which can be used to alter the fine tuning of each note of the scale in order to have tunings other than 12-Tone Equal Temperament, but those messages tend to be specific to each keyboard manufacturer, so they're System Exclusive messages but are different messages than the Universal System Exclusive messages for fine tuning and coarse tuning.

So if that's what you're really after-- tuning the individual notes of the scale-- you'll need to look at the MIDI documentation for each brand of keyboard you're targetting. For example, for Yamaha keyboards the scale-tuning messages are part of the XG standard, and for Roland keyboards they're part of the GS standard. Note that any SysEx messages which a given keyboard doesn't recognize will simply be ignored, so it should be possible to include manufacturer-specific scale-tuning SysEx messages for multiple brands in the same MIDI file, such as adding the necessary XG messages for Yamaha keyboards, followed by the GS messages for Roland keyboards, followed by whatever messages Korg uses, followed by whatever messages Casio uses, etc. Each brand will just ignore the messages for the other brands, and each model that isn't capable of scale tuning in the first place will just ignore all of the messages it can't handle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
13,996
Messages
86,237
Members
13,099
Latest member
Ionbel

Latest Threads

Top