Manual: Tunings

From OpenMPT Wiki
Jump to: navigation, search

What are tunings and when do I need them?[edit]

Tunings in OpenMPT are variations of the 12-tone Equal Temperament (12-TET) that most Western music has used since the 19th century. Without getting into too much history, 12-TET was developed so that all notes at any octave would sound harmonious and “in tune”, so that any key could be used. “In tune” here is subjective, for being a temperament, the notes must be altered from their “pure”, or just values. The “Equal” in 12-tone Equal Temperament means that every step from one note to another will have the same ratio. Now 12-TET is the standard to which virtually all keyboard and electronic synthesizers adhere to, and it is the default in OpenMPT. However, in the MPTM format, you can apply tunings to samples so that the pitches of notes are different than the default format.

But there are two ways of using tunings — scales and temperaments. Scales are simply a variant of the labels that are used for the names of notes. Most trackers name their notes in what could be called the “B chromatic scale” — C C♯ D E F F♯ G G♯ A A♯ and B, in which all the black keys of the keyboard use sharp notation rather than flat. OpenMPT can also display the black keys as flats, so that you get C D♭ D E♭ E F G♭ G A♭ A B♭ and B — the D-Flat chromatic scale. But this is a global option that affects all instruments and all songs, so if you can use tunings to use a specific scale for just some instruments, and you can also have a scale with both sharps and flats among the note names. However, you can only apply one scale to an instrument. Also keep in mind that portamento commands will work slightly different even when just applying the default 12-TET tuning.

Temperaments, on the other hand, change the actual pitch of the played sample. This is useful for emulating acoustic, “non-temperable” instruments, such as flutes and saxophones, or for non-Western music, many of which use tunings that are neither 12-tone nor of equal temperament, such as Chinese or Arabic music. The pitch modifications for tempered notes are only very slight, but are quite noticeable when applied to certain scales or chords.

OpenMPT can apply a scale to any instrument, but temperaments can only work on samples (not instrument plugins). If you wish to apply a pitch-altering tuning to these, you must use a third-party plugin, such as Tobybear’s MicroTuner. However, this plugin does not use OpenMPT tuning files, so tunings are only interchangeable if they are in the Anamark tuning or Scala tuning format. Some instrument plugins also provide their own tuning settings.

The Tuning Properties dialog is used to create and edit advanced sample tunings.

Creating Tunings[edit]

Tunings can only be applied in the MPTM format, and they are only available in instrument mode — files in sample mode will have to be converted instrument mode first, which can be done by simply creating a new instrument on the instruments tab. On this tab, you will also find a dropdown list on the right from which you can select an existing tuning to be used with this instrument, or choose Control tunings from this list to open the Tuning Properties.

In the Tuning Properties dialog, you can start off with editing a new tuning by right-clicking the tuning collection it should belong to and choosing Add tuning. “Built-in Tunings” come with OpenMPT, “Local Tunings” are saved on your system, “Tune Specific Tunings” are saved with the module, and “Sandbox” is a safe place for you to experiment with tunings. After having done that, you can begin changing the note names or their pitches. When using “General” tuning type, you have to rename every note and input every pitch value for every note (those you wish to modify from the default). Pitch values are frequency ratios, not cents. Everything is completely manual but you can define everything independently; this is useful if your tuning does not have a repeating pattern or octave.

Or you can use “Geometric” to have the values automatically scaled for every note. You can still relabel the notes but you can only do them for one octave; the naming standard you use will be applied to all octaves.

Note: When tuning by Geometric ratios, the “5” will be automatically entered as the last digit in the note name, so for example if you wanted to name that note C.5, only enter “C.” — the 5 is added, and all other octaves are adjusted accordingly. So even though you can change the note name, you cannot change the octave designation.

To enter your tuning with Geometric ratios (whose ratios do not change for every octave), select the “Geometric” tuning type. Then enter the number of notes in your octave in the Group Size field; the “Group Size” is the number of notes in your “octave,” which does not have to be an octave in the traditional sense. For the classical Western temperament, there are twelve, and the whole tone scale has six in a “Group Size”. In the Group Ratio field, enter the pitch change for every Group's Size. Usually this would be 2, meaning the pitch (frequency) is doubled an octave higher, and halved an octave lower. Press Tab (to go to the next field and apply the changes) and the tuning for each note will be adjusted in the note list.

The last type, Group Geometric, is defined by its group size and group ratio fields. The group ratio will determine what is the value of the octave, 2 is a normal octave, and the group size will determine the notes per octave. However, with group geometric, you will only have to define the values for one octave, and that octave will be copied throughout the rest of the scale. Therefore, you will only have to edit as many notes as your group size. (If the tuning editor switches you into "General" mode when using group geometric, fill in the octave starting from the position (0) (default note name is C-5) all the way to the last note before the next octave, and then select position (0) again and switch it back to group geometric, clicking "ok" to change the values.) Group geometric is by far the fastest way to create a tuning for the 12-note scale, or any scale with a repeating "octave".

You can easily change the labels with a little understanding of how the interface works. To select a note, click on any note or its value in the note list on the right. The note is automatically centered in the window, highlighted, and its values placed in the fields below the window. To change the label for the currently selected note, click in the Note Name field. This is a text editing field but there are two important restrictions. First, you only have 3 spaces to work with. Second, while you can use any character your keyboard can type, the only ones that show up in the Pattern Editor (in the note column) are capitals A-Z, 0-9, and the symbols ? # b \ : - and space. It is best to use a standard, constant format for the note labels; the default for OpenMPT is TSO, where T is the tone (A-G), S is the symbol (such as - or # or b), and O is the octave (0-9).

The "Multiply" field can be used to quickly alter every note in a tuning, by multiplying each note by whatever value you enter here and click "Set" with. This is useful if you want use a tuning on a different base note or a different key without transposing samples.

Only one tuning can be assigned to an instrument at a time, so if you want the same sample to be played with various tunings, you will have to duplicate the instrument by Shift-clicking the New Instrument icon on the instrument page.

Example of applying a custom tuning

Applying Tunings[edit]

Unfortunately you cannot try your tunings in the Tuning Properties dialog, nor will a playing track use the new tunings while they are being edited. You will first have to close the dialog and assign the tuning to your instrument. When prompted with "Apply local tuning modifications to file?", click "OK" to save your changes. This will instantly change all the note labels everywhere that instrument plays a note (the note must have an instrument number in the same pattern cell for this to work!) if you have chosen to use custom note names. In the example on the right, you can see a custom tuning being applied to an instrument in the pattern editor.

Hint: For instrument plugins that apply different drum sounds to each note, such as a kick to C-5 and a snare to D-5, you could create a tuning that changes the note names to abbreviations of these percussive samples. So, for example, you can relabel “C-5” to “KIK” and “D-5” to “SNA” — While this will not change the pitch of those notes, it will still look different in the pattern.

When using portamento commands with glissando, the notes will adhere to the pitches assigned in the tuning. The pitches will bend according to the "Finetune Steps" property of the tuning, with the default being 15. The total steps per note is equal to this value + 1, therefore the default is 16 steps per note. With 12 notes per octave at 16 steps per note, the default portamento steps needed for an octave is 192.