Virtual Sampler Player, Filewriter


The Virtual sample player


If the sample player is visible, all MIDI channels are routed to the sampler (and no longer to your MIDI device). The samples which become audible have to be defined in an .igr file. See Instrument group manager, which is an editor for .igr files. So you will not hear any sound if no .igr file is loaded. Press the open .igr button and select an .igr file.



The sample player uses most system resources inside MIDI Locator. You need at least a pentium with 300 MHz for playing a few voices and a machine with 1 Giga Hertz for a full channel usage. The sampler player can only play 44.1 kHz mono and stereo samples, no lower frequencies, because it is the point when a sample player becomes interesting.

The sample player does not listen to all MIDI events and controllers, it only supports


The sample player can play oneshot and loop samples, editable in MIDI Locator's wave editor. See also "how to create an own multi sample instrument".

The sample player can play sounds in realtime, and also write a whole MIDI song or a part of it rendered into a wave file without quality loss (filewriter).

The sample player does not produce effects like reverb or chorus. It is a "dry" sample player.

 If you want to add an effect to a track of a song, you can realize it by the use of the filewriter :

File write your song in 2 sessions :

1. Enable all tracks but the track which should be processed by an effect . File write those tracks.
2. Mute all tracks but the effect track. File write this single track.

Than open the wave file of the separate written track (which should be processed by an effect) in MIDI Locator's wave editor and apply the desired Direct-X effect on it. Finally, (mix-)paste the effect wave over the wave file written for all other tracks in the first session.



One sample which is loaded into sampler because it is part of a program's sample assignment in the instrument group file consumes always one mother voice. You can see consumed mother voices when pressing the "current .igr"-button at the sampler.


How does the Virtual Sample Player manage samples physical ?

The Virtual Sample Player keeps all samples in RAM which could be started by appearing Note On events. If you only set MIDI channel 1 to program Brass it will only load the brass samples, piano samples (channel 2-9 and 11-16) and all drum samples (channel 10). It doesn't load all samples of the instrument group file.

That means the first thing the sampler does when it is turned on is to determine the current MIDI programs on each MIDI channel. Then it loads the samples. As soon as a new program change event appears old program's samples are released and new ones are loaded from your harddrive. Please note that the process of loading all samples of a MIDI program to memory can consume much system performance for a short time.

As explained, unlike pure RAM based sample players (like MIDI expanders) MIDI Locator's sample player will load needed samples from your harddisk in the moment when a program change event appears. So you should think about positions of too many program change events in your MIDI file which appear at the same MIDI time. Set them some MIDI ticks appart from each other to spread their performance consumption over a larger time period.

Also try to avoid a short drop out by program change events in the middle of your MIDI file. MIDI Locator's sequence player is usually not influenced by the resource consumption appearing by a single program change, but many program changes together can be too hard. Put them in the beginning of the sequence and give MIDI Locator some MIDI ticks time to load the samples before the first Note On event appears.

Samples are not unneseccarily reloaded if a program change event's program is the current active MIDI program.

Starting a fresh loaded MIDI file in the middle...

The determine and send function sends necessary program change events if you start a fresh loaded MIDI file in the middle (to update all MIDI channel's programs to the correct instruments).

This can lead to an overdose of program changes.


Program change events lead to loading new samples during playback

The result could be a stuttered beginning of the middle of the sequence, because MIDI Locator can't load all the needed samples to memory fast enough.

If you work with sampler you should always start your fresh loaded file one time at the first position. Then stop it after hearing some notes and restart it in the middle where you wanted to start playing, actually.

MIDI mode resets

A MIDI mode reset inside a MIDI sequence by a sysex message like GS mode reset sets MIDI channels 1-9 and 11-16 to piano and channel 10 to drum. That means that all current loaded samples are released and piano samples and drum samples are loaded, if available.

After such mode resets usual MIDI files go on with program change events to select their instruments.

In order to create a MIDI file which should reset a hardware based MIDI device in the first ticks such sysex event is a good idea. But a sample player which has to load the samples from harddisk as soon as an instrument changes is consuming unnecessary resources (old instrument release / piano load / piano release / new instrument load).

So you should think about placing the MIDI mode reset later in your MIDI file when you have finished your composition, to avoid the permanent load and release if you are again and again testing your MIDI file from it's start position.

Releasing samples

If you change a MIDI channel's current program to a program number which has no assigned samples, the old samples are released, but no new ones are loaded. At this moment you can see the text Releasing samples on sampler's display. The same text is shown if you are routing channels back to MIDI output by the 16 channel buttons.

The instrument group manager

You can open the instrument group manager by selecting "Instrument group manager" in MIDI Locator's main menu.

The instrument group manager lets you create or edit .igr-files, that define which wave files have to be used by the Virtual Sample Player.

The sampler knows 128 different instruments for non-drum MIDI channels and 128 different drums for drum MIDI channels.

Each non-drum instrument is related to the MIDI program number 1-128. And each drum instrument is related to the corresponding drum of any drum program. That means, that a sample of a kick drum is used as the kick drum in any drum program (standard, jazz, electro etc.). The Virtual Sample Player does not distinguish between different drum programs.

Each instrument of a non-drum MIDI channel is also called a "multi sample instrument". That means, you can assign more than one sample for a single instrument.



Just click "Add Sample" to add a new wave file to the current .igr file. Please take care that all wave files have to be selected in the same directory. And if you have finished assigning wave files, also save the .igr file into that directory. Otherwise MIDI Locator's Virtual Sample Player can't use your created .igr-file. Save the .igr file by using the file menu in the instrument group manager.



If you select a wave file for one of the 128 non-drum instruments, the wave file must have the "Original key" information. That means, MIDI Locator has to be able to know which note your wave file represents.

If your wave file doesn't have this information just open it in MIDI Locator's wave editor and press the button there.



Select the Original key in the upper left dialog area. Than close the dialog and the wave editor. The key is stored into the wave file, automatically.

If you only assign one sample to a single instrument, MIDI Locator would pitch (transpose) this sample to another key when a note is played, which is not the Original key. If MIDI Locator has to pitch more than several semitones, the quality of this sample will vanish, it will have the correct pitch but will sound strange (Mickey Mouse effect). So use more than one sample with different original pitches, so that MIDI Locator can select between different samples which get closer to the destination pitch.

The sampler uses automatic key zones, that means that if you have two samples of an instrument always the nearest of them is choosen and pitched to play a semitone between them. You can not directly set key zones. MIDI Locator tries to keep unexperienced users away from defining too many parameters when creating own instruments.

It is not necessary to fill all of the 128 instruments with samples. All instruments/programs you left out could only not be played by sampler when sending its program change event.

Like the Original key is nothing else than a criterium for selecting a sample, you can also set a velocity range in the wave editor's "Set Wave Info" dialog. Only if a Note On volume will have a value which lies inside a sample's velocity area, the sample will be taken.


Example : How to create an own multi sample instrument for the Virtual Sample Player

Task is to create a new instrument based on 4 multisamples :

  1. Create an empty directory inside MIDI Locator's igr directory that can hold all stuff belonging to this example. We call it "c:\programs\MIDI Locator\igr\myoldtrumpet".

  2. Record the four multi samples (multi samples = each sample is a recording of a different pitch of your instrument) in mono or stereo and 44.1 kHz, 16 bit in standard wave file format (.wav). Remember the key names you play. Save your wave files in "c:\programs\MIDI Locator\igr\myoldtrumpet" (or the directory name you have choosen). The keys/pitches you play should not be too far away from each other, maybe a maximum of 6 semitones. Use Windows®' audio recorder or a foreign audio software for recording. Or grab your samples with a foreign Audio CD ripper software from a sampling CD made for this purpose.

  3. Start MIDI Locator, open a wave editor instance. Open one of your sampled .wav files in "myoldtrumpet". Press the button. The set wave info dialog should open.


    Wave editor's Set Wave info dialog's Key parameter

    Select the Original key (you should remember). Close the info dialog. Repeat this step at open one of your sampled .wav files for the left three samples. Close the wave editor.

  4. Open the Instrument group manager. Select instrument Trumpet. Select Add samples beside the window belonging to normal instruments (in the lower part is also a section for drum instruments, don't choose this). An open file dialog opens. Go into your directory "myoldtrumpet" and select all four samples at once. Or select one by one by repeating the procedure of choosing Add samples.


    Map single wave files to a program number

  5. Choose save as in the instrument group manager.


    Save as function in Instrument group manager's file menu

    Save the igr file with any name into the "c:\programs\MIDI Locator\igr\myoldtrumpet" -path. Close the instrument group manager. The group of samples you have created is now saved with the file extension .igr.

  6. Open sampler. Choose Load .igr. An open file dialog appears. Select your new name created when saving the instrument group file.
  7. Open MIDI Locator's mixer. Never mind bank LSB and MSB and select the program Trumpet directly in channel 1 and press ok.
  8. Open MIDI Locator's Virtual keyboard and select as MIDI channel the channel 1. Now you should hear your samples when playing on the Virtual Keyboard.


Release Times

If you marked a sample as type Normal Instrument in the Wave Editor, MIDI Locator internally derives the natural release time from the program where you have assigned your multi samples in the instrument group mamager. E.g. if you assigned them to a bass instrument, your samples will have a very short release time. If you assigned them to slow strings, they will have a very long release time.

In cases of drums the release time is always eternal and ends at the wave file's end. Only Open Hi Hats are cutted by Note Ons of Closed Hi Hats or another Open Hi Hat.

So the envelope control of a sample is done by MIDI Locator and could not be influenced e.g. by ADSR definitions, directly.

Except the release time.

Use the MIDI event NRPN "TVF&TVA env.rel.time" to adjust the release time individually.

Sample player automatics by MIDI text events

Special commands realized by an interpretation of the MIDI event text can control general sample player functions at load time inside a MIDI file. Like switching the sampler on/off, automatically load an .igr file (and it samples) and displaying a message box.

Please use the normal text event inside the MIDI editor for inserting such commands. The MIDI position of such MIDI Locator internal sampler controll events is not important, it will always be executed directly after the MIDI file has been loaded.

The commands are :

The sampler has to be visible (LOC:ACTIVATESAMPLER) before a LOC:LOADIGR:xxx could have influence.


Filewriter

The filewriter is an additional feature of MIDI Locator full version and lets you write down the output of all MIDI channels into a stereo 16 bit, 44.1 kHz or 24 bit, 96 kHz wave file (switch between the two formats in settings/audio).