Manual: Tree View

From OpenMPT Wiki
Jump to navigation Jump to search
Upper half of the tree view

The tree view, or folder tree, is a single, simple view for all the resources of your song. Here you have access to your patterns, sequences, samples, instruments, plugins and comments, in addition to your default instrument library (also available when no songs are loaded). The tree view can be found on the left side of the main window. If it is not visible, you can enable it from the View menu, or with the default keyboard shortcut Ctrl+F2.

The tree view consists of two halves, separated by a horizontal splitter bar. The height of each half can be adjusted by dragging the horizontal splitter bar, and the width of both by dragging the vertical bar at the right edge of the tree view.

Song Folders[edit]

Whenever you load or create a song, a folder with the track’s name is added to the tree view. If you have multiple songs loaded, you can switch between them by clicking on the song’s root folder. When you click the + icon left of the root folder, you get access to its child folders:

  • Sequence: This folder contains one or more order lists (sequences). You can remove and rearrange sequence items by drag-and-dropping them. Double-clicking an item brings up the pattern editor, where you can edit the selected pattern. If you are working with the MPTM format, it is possible to switch to, add and remove sequences by right-clicking the appropriate folder items. This feature can be handy when you want to write several songs that share the same set of instruments, such as for composing game music.
  • Patterns: Gives you a list of all the patterns in your file. Double-clicking an item brings up the pattern editor, where you can edit the selected pattern. You can also right-click any item to delete the corresponding pattern.
  • Samples: Gives you the list of all the samples loaded in your file. A single click on a sample sets it (or its associated instrument) up as the current sample for editing in the pattern editor. Double-clicking an item brings up the sample editor, where you can edit the selected sample. Right-clicking an item also gives you the option to preview, delete, insert or duplicate samples. If you are not working in instrument mode, you can also (un)mute and solo a sample from the context menu. A little green icon can indicate playback (either because the sample is triggered in your song, or when previewing it from the tree view or sample editor) if the “Update sample status in tree” option is enabled in the General settings. Samples can be rearranged by drag-and-dropping them.
    Various other options for using external samples are described below.
  • Instruments: Similar to the sample folder, this folder gives you an overview of all instruments. The same options including muting and soloing instruments are available, and playback status of instruments can be indicated by a little green icon. Instruments can be rearranged just like samples by drag-and-dropping them. Single-clicking an instrument selects it as the active instrument in the pattern editor.
  • Comments: Double-clicking this item brings you to the comments editor.
  • Plugins: Loaded plugins are listed in this folder. A speaker icon indicates an effect plugin, and a keyboard icon indicates an instrument plugin. Plugins can be muted and edited and removed by using the “Bypass”, “Edit” and “Delete Plugin” options respectively from the context menu.

Various labels (such as the order list or sequence / pattern / sample / instrument names) can be edited directly from the tree view by slowly double-clicking a label.

Working with external samples[edit]

When working with external samples, the context menu of a module’s sample slots offers useful entries for loading, saving and moving samples:

  • You may specify an external sample’s path by using the Set Path menu entry. This will also reload the sample waveform immediately.
  • If the sample has been modified inside OpenMPT since it was loaded from disk, you can Save a modified sample to its original location.
  • Conversely, if a sample has been modified in an external application, Reload will refresh the external sample data from disk.
  • If some external samples have gone missing, use Find Missing Samples to point OpenMPT to the new directory and search for files with the same filename as in the old location.

The Save and Reload features may also be used when working with regular samples in formats other than MPTM if the sample’s path is known. This way, it is possible to save a sample to disk, edit it with an external application and reload it into OpenMPT without modifying attributes like sample frequency, loop points and pan and volume settings.

External samples are annotated with an “[external]” tag in the tree view. If an external sample is missing (e.g. because the file has been moved), “[missing]” will be shown instead. In this case, use Set Path or Find Missing Samples to reload the sample from its new location.

Common drag-and-drop operations[edit]

Instruments and samples from other songs, the MIDI library, sound banks and the instrument library can be drag-and-dropped into the sample or instrument editor. Holding Shift while dropping the item inserts it into a new slot instead of replacing the current slot’s contents.

The selected MIDI library, sound banks and the instrument library contents can also be imported into the last-focussed sample or instrument editor by pressing Ctrl+Enter (replace current sample / instrument) or Ctrl+Shift+Enter (insert new sample / instrument).

MIDI Library[edit]

The MIDI Library is used when loading MIDI files. As MIDI files only contain MIDI protocol data and no samples or other sound generators, it is necessary for a host application to connect MIDI program changes with some kind of sound generator. The MIDI Library contains a set of General MIDI instruments that are used when importing MIDI files.

By default, those sounds are extracted from DirectX’s default soundfont (GM.DLS), however you can exchange any of the MIDI programs in the MIDI library to make them suit your own taste. This way, you can influence how imported MIDI files sound, but you can also use the MIDI Library as some kind of custom sample library for your own sounds.

By double-clicking a library item, you can import a new sample or instrument for this slot. You can import any instrument or sample format supported by OpenMPT. When importing a soundfont file (DLS, SBK, SF2, SF3, SF4), the appropriate patch is selected automatically. You can use drag-and-drop to import MIDI Library items into the sample or instrument editor.

You can replace the whole library at once by right-clicking one of the folders and choosing Import MIDI Library. You then can load for example a DLS or SF2 file, which can replace the whole existing library or just fill in missing slots. Alternatively, text files conforming to the ULTRASND.INI format can be used to quickly load instruments from individual patch files. The Export MIDI Library context menu entry allows to export the current MIDI library configuration to a text file which can later be imported again, but this text file does not follow the ULTRASND.INI format.

Note: OpenMPT does not support multilayered instruments (more than one sample assignment per note) at the moment, so if you choose to load a complex soundfont or SFZ instrument, only one layer will be imported.

If you want to work with multiple MIDI Libraries, you can right-click any of the MIDI Library folders to import or export the MIDI library to / from a text file.

Sound Banks[edit]

Sound Banks are collections of samples, often sorted in categories defined by the General MIDI standard. Additionally to the default (but poor-sounding) sound bank GM.DLS that is shipped with DirectX and automatically detected by OpenMPT on Windows systems, you can add new sound banks by right-clicking an empty spot of the tree view and choosing Add Sound Bank.... The following formats are supported:

  • SoundFont with compressed samples (.sf3 / .sf4)
  • SoundFont 2.0 (.sf2)
  • SoundFont 1.0 (.sbk)
  • Downloadable Sounds (.dls)
  • Miles Sound System (.mss)

As with the MIDI Library, you can drag-and-drop individual instruments into the instrument editor or sample editor. In the latter case, only the sample mapped to middle-C is imported. Drum kits can be imported the same way, either by dragging individual keys or by dragging a single drum kit folder. The latter will import all drum keys into a single instrument, but at the cost of losing any instrument settings that are specific to individual drum keys (e.g. all drums will have to share the same volume envelope).

Instrument Library[edit]

The Instrument Library is made up of two parts — the “Instrument Library” folder in the upper half of the tree view, and the entire lower half. The upper half is used for navigating around your file system and the lower half is used to display folder or module contents. Use the Tab key to quickly switch between the upper and lower half of the tree view.

When expanding the “Instrument Library” folder, you get to see a list of all drives and all child folders of the current library folder. Double-click the “..” folder to navigate one folder up in the file system hierarchy, and double-click any other folder or drive to change to that folder or drive. Module files that OpenMPT can open are marked in green. You can imagine them as virtual folders in your instrument library; double-clicking a module will show all its samples and instruments in the lower half of the tree view, just like if it was a real folder. You may also right-click a module and choose Edit Song to open the entire module instead of just importing instruments from it.

The lower half of the tree view is dedicated to displaying folder contents. The first item of this list tells you which folder or module you are currently browsing and can be double-clicked to bring up a default folder browser dialog for selecting a new folder. By default, only sample and instrument files are shown in this view; if you want to list all folder contents, right-click the first item and choose Show All Files. From the same context menu, you can also choose Open in Explorer to show the folder contents in a regular file browser instead. If you do not like the split between folders and files, you can also choose Show Directories in Sample Browser from the same menu to show all folder contents in the lower pane. Go to Instrument directory quickly brings you back to the default instrument or sample directory.

From the context menu of any instrument library item, you can also change the sorting of the library by choosing an item from the Sort By sub menu: By default, library items are sorted by name, but they can also be sorted by file size and file modification date. To quickly locate a specific instrument, choose Find... from the context menu (default shortcut: Ctrl + F) and an edit field will pop up where you can specify a text filter. Any items that do not match this filter will be omitted from the instrument list. You can use the * wildcard to search for any number of characters, or the ? wildcard to search for a single character. The filter can be used to find both files and folders, but it is only applied to the panel from which it was invoked: Invoking it in the file list will not filter folders in the upper half of the tree view and vice versa.

You can preview any instrument by double-clicking it or pressing Enter. You may also press note keys just like in the sample editor to play it at a different pitch. If you want to load a sample or instrument from the instrument library into a module, simply drag-and-drop it onto the sample or instrument view or press Ctrl+Enter if a sample or instrument tab is focussed. Use Ctrl+Shift+Enter if the sample or instrument should be inserted into an unused slot instead.