5

Total midi noob here. Say I export a score that I'm writing with music notation software as a midi file (or I suppose any midi file, but that's where my midi files will come from). How would I go into that midi file and adjust the pitch associated with specific note or notes up or down by a certain number of cents? Or does midi work in raw frequencies rather than cents? Either one would work.

I'm imagining a program that can go into a midi file, find some moment where, say, the notes C4, E4, and G4 (midi numbers 60,64,67) are sounding simultaneously, and change the midi file so that sound of the E4 for that moment is lowered by 13.686¢, and the sound of the G4 is raised by 1.955¢ (frequency of note number 64 lowered from 329.627557 Hz to 327.031957 Hz, frequency of note number 67 raised from 391.995436 Hz to 392.438348 Hz) in order to create a justly tuned major triad.

Are midi files formatted in such a way that you could open them as a plain text file, find a moment like the one I specified, and make the desired alteration to the file so that the sound is altered upon importing the midi file for playback?

2

This depends on which of the many standards your synthesizer supports.

Almost everybody supports pitch bend, which is a single setting for all notes on the same channel.

The GS, XG, and GM2 standards define scale/octave tuning, where you can adjust all twelve semitones, but the tuning adjustment is the same in each octave.

The MIDI Tuning Standard defines messages that allow adjusting all 128 possible notes separately.

All of these mechanisms require you to add MIDI messages to the file.

0

On MIDI files I would just go with the pitch bend. You can either move the pitch wheel of your MIDI Keyboard (...if it has one) or you can edit the pitch automation within your DAW. Almost any DAW should give you that option.

Sometimes if you want detune something by a specific amount of cents I often find it quite easier with audio files within Ableton for example, where you can just type in the amount of cents you want to detune it, but this only works for audio files - not MIDI, so if this is an option, you would have to render your MIDI to audio first within your DAW.

0

Yes and no.

There's plenty of different midi file formats. The typical ".mid" files contain 8-bit binary data streams. You actually can view that in a text editor. And even edit it, but I'm assuming that you won't find that comfortable due to a lack of a hex interpreter in your brain.

There's also the ".musicxml" or ".mxl" file which is basically a midi XML file. It's specifically designed to be human readable, and if you're familiar with XML you'll feel a tad more comfortable. (In as far as XML can ever be comfortable)

That was the "yes" part, now on to the "no" bit.

No, since that's not how midi was envisioned. I mean, technically you can definitely do what you want, and the other answers provide you with some solutions. However, midi originated as a simple command format. Midi files don't actually contain audio data, but only events, in the sense of "set note X to 'on' at time T0. set note X to 'off' at time T1" etc. This allows midi files to be incredible small. (Well, at least they used to be) Also, since no audio data is contained it makes it ideal for machine communication; they're simply instruction sets. And any device/computer/whatever that understands midi can do it's thing with it. Which is why midi is so popular.

Anyway, nowhere does midi (formally!) specify a note as a frequency. It simply stores the notes and some additional information (velocity, timing, control commands, etc.) So, to come back to your question, the "no" stands for "it's not really meant to be used that way" but of course everybody does as they want and if you feel like pitch bending the hell out of your midi notes go ahead and pitch bend them to hell.

Now, the above is a heisenberg answer: everything I wrote is at the same time correct and incorrect. Since you described yourself as a midi noob, I decided to keep it simple and sacrificed accuracy. However if you are interested in the real, accurate answers I'd recommend diving into the following specifications:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.