Contents

Welcome to the Mellosoftron II's Help system!

At a glance

•	What is this - and what's all the excitement about?

•	Why the name?

•	What's new compared to the Mellosoftron 2.1?

•	Will it run on a 486?

Operations

•	Playing the Mellosoftron live (with an external MIDI controller, the computer keyboard or the mouse)

•	Using the Mellosoftron as a virtual MIDI device (e.g. with a sequencer or with the Windows Media Player)

•	Editing an existing instrument patch (PRG)

•	Creating a new instrument patch (PRG)

•	MIDI Settings and MAPping (MIDI channels to instruments and more)

•	Controlling audio output (latency, sampling rate, number of voices...)

Additional resources

•	How to get more instruments (PRGs and WAVs)

•	How to create your own WAVs

For developers

•	Use the Mellosoftron engine in your own programs!

Biz

•	How to REGISTER - and why!

•	License information

Catch-all...

Contacting the author


What is this - and what's all the excitement about?

The Mellosoftron II is the world's first shareware...

...low-latency...

...programmable...

...hardware-independent...

... virtual sampler!

In short, it turns your Windows PC into a sampler which you can play live, with a sequencer or with any MIDI file player. At last, there is no perceptible delay between hitting a key on your MIDI keyboard and hearing the software-generated sound. Any sound card with a DirectSound 3 driver will do - you don't need a particular brand or model. You can edit all instruments and even create new ones from scratch, using your own WAVs as sound sources.

And this, ladies and gentlemen, means that PC-based, real time software synthesis has finally come of age!

Until now, software synths have been afflicted by a variety of problems.

Most have been black boxes. As a user, you couldn't edit the sounds or create your own patches - only use the sound library provided by the manufacturer. In 1996, the MIDInight Express became the first wavetable emulator for Windows 95 offering fully user-editable patches. But the MIDInight Express can't be played live. It's strictly for MIDI file playback.

The Mellosoftron 1.0 changed that - sort of. It could be played live, but suffered from another problem: latency. Just like the Virtual Roland Sound Canvas and Yamaha's MIDIplug, it used the old Windows 3.x waveOut device for sound output. No matter how fast the CPU is, a new sound chunk will take up to half a second to crawl out of Windows and reach the hardware through waveOut. Therefore, when you hit a key on your MIDI controller, up to half a second will pass until the Mellosoftron 1.x (or the Virtual Sound Canvas et al.) makes a beep. Forget playing piano pieces or drum patterns that way!

This latency problem can be solved by writing sound data straight to the hardware, bypassing the Windows waveOut device altogether. The Creative WaveSynth works this way. The tradeoff? It is hardware-specific and will only work with (some) sound cards from Creative Labs. That may not seem like a big deal, until you realize that you can't replace your sound card with a different model without losing your software synth!

Microsoft finally came to the rescue in October 1996, with the release of DirectSound 3. Any sound card with a DS3 driver can be accessed without perceptible delays from regular, hardware-independent Windows programs (that was also true with DirectSound 1 and 2, but they  had other problems of their own). Work on the Mellosoftron II started immediately.

Now you can enjoy the result.

If you are half as excited about it as I am, I know you will.


Why the name?

The Mellosoftron's name is a tribute to the grandfather of all samplers, the Mellotron.

This venerable ancestor was an electro-mechanical marvel. For each key on the console there was a magnetic tape player. When a key was pressed, the tape started rolling. Upon key release, a spring yanked the tape back (faster than a regular, motor-driven rewind, but still too slow for fast solo playing). Each tape contained a separate, 8-second recording - they had to be that long since no looping was possible with this approach.

The tapes came in racks which could be replaced to change "patches". Unfortunately, every time you did this, you were likely to also have to realign the tape player heads. For live performances, the Mellotron was therefore in practice a mono-timbral machine.

In spite of these limitations, the Mellotron's polyphony made it a succes. It was the first keyboard capable of producing complicated chords with realistic-sounding ensemble instruments, in an age when electronic synthesizers where essentially monophonic beasts and digital samplers were unheard of. It was eventually pushed out of the market with the advent of electronic machines such as the ARP String Ensamble.

If you want to hear a Mellotron in action, listen to the chords in Jean Michel Jarre's first LPs, Oxygene (1976) and Equinoxe (1977).

The Mellosoftron can do a whole lot more than the old Mellotron - in fact, it could easily emulate one, given enough RAM - but version 1.x shared the latency problem which made its electro-machanical ancestor unsuitable for fast solos. This echo of the past has faded away with the Mellosoftron II, but the name has stuck.


What's new compared to the Mellosoftron 2.1?

Version 2.2 features...

•	an Omni checkbox: when checked, it causes all incoming MIDI messages to be redirected to the selected pad, independently of the channel of origin;

•	support for WAV filenames containing spaces (previously not allowed since PRG columns are separated by spaces; now filenames are automatically surrounded by quotation marks when needed).

Also, the PRG.DLL engine has been recompiled with the latest DirectSound library (version 5.0).


Will it run on a 486?

In principle, yes. In practice, the average 486 system is too slow for the Mellosoftron II. If you find that increasing the latency doesn't help, try installing the Mellosoftron 1.1 instead. Unlike the Mellosoftron II, version 1.1 is meant and optimized for 486s (in particular, it tries to do as much as possible in fixed rather than floating point math - good on 486s, bad on Pentiums). You will find a copy of the last 1.1 build at the Mellosoftron's Home Page:

http://www.abc.se/~m9303/ml.html


Playing the Mellosoftron live

Before you can do any playing, you must load a PRG (instrument patch file).

Assuming that you have done so, there are three ways to actually play the Mellosoftron live:

•	With a MIDI keyboard (or other MIDI controller) hooked up to your PC's MIDI In port.

•	With the mouse.

•	With the computer's alphanumeric keyboard.

One method doesn't exclude the other - you can use all three at the same time.


Loading an instrument patch (PRG)

You load individual PRGs by assigning them to pads (you can also load entire instrument groups using MAPs).

To start with, locate a pad with no PRG assigned to it (grayed out). If all pads are taken, just pick one and click its Clear button. This causes the PRG on that pad to be unloaded. For instance, if pad 0 is active, it will look like this:

Clicking its Clear button will cause it to take on this look:

The Clear button has turned into a Load button. Click it! You will be presented with a standard Open File dialog giving you a view of the current PRG directory:

Select a PRG file and click Open! The instrument patch will be loaded and the pad will be activated. (If the pad is not activated, there was something wrong with the patch - start by checking that the current WAV directory contains the WAVs referenced in the PRG which you tried to load. PRGs are just formatted text files, so you can browse them with any text editor, like Notepad).

If you place the mouse cursor over an activated pad and leave it there for a moment, a hint will pop up, reporting the name of the loaded PRG (the .PRG extension is always implied). Click the pad to hear it play note c4!

Another way to find out which PRG you have assigned to a pad is to click the radio button in the pad's upper left corner. This selects the pad as the one being controlled by the computer keyboard and mouse (and by MIDI, if the Omni box is checked). Look at the caption of the box at the bottom of the main window! Here, we have assigned 48.PRG to the selected pad:

Clicking the radio button in the pad's upper left corner is not the only way to select it. You can also use the arrow buttons in the main window's bottom box to step between pads. The box caption will change accordingly.


About PRGs

The Mellosoftron needs two kinds of files to fully describe an instrument: PRGs and WAVs.

PRGs do not contain any sound data. The actual samples are kept in WAV files. PRGs assign WAV files to keys (notes) and impose performance parameters (base volume and pan position, controller sensitivities, envelope shape, loop points...). Each key on the 128-note virtual "keyboard" described by a PRG file can have its own individual sample file(s) and performance parameters.

While you can use any text editor to create and modify PRG files, I strongly recommend using WAVmaker's or the Mellosoftron's dedicated PRG editor for this task!

WAVmaker, the MIDInight Express and the Mellosoftron itself want all the PRGs needed to handle MIDI Program Change events to reside in a common directory, so it's a good idea to organize your PRGs in "banks", with each bank corresponding to a separate directory.

Click the button labeled PRGs (in the main window's Settings box) in order to change the current PRG directory (double-click the new directory, then click Select).

Note that the Mellosoftron will allow you to give a PRG any valid filename, not just one adhering to the MIDInight Express and WAVmaker convention based on MIDI program numbers. If you want to create a "Killer Bass 2.PRG", you can - but you won't be able to use it with WAVmaker and with the MIDInight Express.

As of version 2.1, the Mellosoftron also allows you to use full WAV paths in PRGs (normally, WAVs are supposed to reside in the current WAV directory). This feature has been added upon the request of some users, but I recommend that you avoid it like the plague! A PRG containing a full WAV path is totally dependent on your system's directory structure to function properly. It will most probably not work on other machines (so you can't exchange such patches with other users) and will "break" on your own system as soon as you start moving WAV files or directories around. Also,  WAVmaker 2.x doesn't support this extension of the PRG specification.


About WAVs

The Mellosoftron needs two kinds of files to fully describe an instrument: PRGs and WAVs.

WAV files contain the actual sound data (samples) referred to by PRG instrument definitions. Like WAVmaker and the MIDInight Express, the Mellosoftron will handle any combination of mono and stereo, 8 or 16 bits/sample. Unlike WAVmaker, it will also accept other sampling rates than 11025, 22050 and 44100 (but think twice before building PRGs with WAVs sampled at non-standard rates, in case you'll want to use them with other programs later).

Up to and including version 2.0, all WAVs referred to by a PRG had to reside in a common directory. This is still the recommended mode of operation. Click the button labeled WAVs (in the main window's Settings box) in order to change the current WAV directory (double-click the new directory, then click Select).

As of version 2.1, the Mellosoftron also allows you to use full WAV paths in PRGs. This feature has been added upon the request of some users, but I recommend that you avoid it like the plague! A PRG containing a full WAV path is totally dependent on your system's directory structure to function properly. It will most probably not work on other machines (so you can't exchange such patches with other users) and will "break" on your own system as soon as you start moving WAV files or directories around. Also,  WAVmaker 2.x doesn't support this extension of the PRG specification.


Playing with a MIDI keyboard
There is not much to say about using a MIDI keyboard. It's just like playing an ordinary sampler. Apart from Note On/Note Off events, the Mellosoftron will also read controller (Volume, Pitch Bend, Modulation, Pan Position, Pressure, Expression) and Program Change events.

Note that the MIDI Settings window allows you to map any MIDI channel to any instrument pad. If you have mapped a MIDI channel to an instrument pad with no PRG assigned to it, don't be surprised if you can't hear a thing when playing on that channel! Same goes if you have selected a different MIDI port than the one to which you have hooked up your keyboard.

A more serious, potential source of trouble is that some sound cards and/or drivers can't handle MIDI input and digital audio output at the same time. On such a system, the Mellosoftron will report that MIDI input and/or digital audio output aren't working already at startup, and give you the option to abort execution then and there.

As of version 2.2, the main window sports an Omni box. Checking it causes all incoming MIDI messages to be redirected to the selected pad, independently of the channel on which they originated. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window.


Playing with the mouse
The Mellosoftron allows you to enter notes from an emulated keyboard displayed on the computer screen.  Just click the Keyboard button in the main window to bring it up, and click the "key" you want to play using the Left mouse button. Sustained sounds will keep playing until you release the mouse button.

You can also bring up a window containing volume, pitch bend, modulation and pan position controls by clicking the Sliders button.

Clicking the Keyboard and Sliders buttons a second time closes the windows.

Both the Keyboard and the Sliders windows are modeless, so you can switch freely between them and the main window.

All events generated by the emulated keyboard and sliders are sent to the currently selected instrument pad. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window. The name of the PRG assigned to  the currently selected pad is reported in the caption of the enclosing bottom box.


Playing with the computer keyboard

When the main window, the keyboard window or the sliders window have input focus, you can enter notes from the computer's alphanumeric keyboard.

All events generated this way are sent to the currently selected instrument pad. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window. The name of the PRG assigned to  the currently selected pad is reported in the caption of the enclosing bottom box.

Attack and release velocities are always set to 64.

The following keyboard map is used:


MIDI Program Change events
MIDI Program Change events are interpreted according to the same rules used by the MIDInight Express and WAVmaker: a change to MIDI program number 0 causes 0.PRG to be loaded, unless it occurs on drum channel, in which case D0.PRG is loaded.


About MAPs

The Mellosoftron's 16 pads allow you to work with up to 16 different instrument patches (PRGs) at the same time. Since you probably don't want to reload a bunch of PRGs manually every time you start the Mellsoftron, it takes care of bookkeeping what's on each pad and lets you load and save MAP files containing this information at the click of a button.

MAPs also contain MIDI MAPping information.

The Mellosoftron looks for and stores MAPs in the default MAP directory. Click the button labeled MAPs (in the main window's Settings box) in order to change it (double-click the new directory, then click Select).

In order to load a MAP, click the button labeled (you guessed!) Load MAP. You will be presented with a standard Open File dialog. Select a MAP file and click Open. The Mellosoftron will read the new instrument assignments and update its pads accordingly. Pads without an instrument assignment in the MAP being read are unaffected.

Loading a MAP causes it to become the new default MAP, i.e. the MAP which is loaded automatically at the beginning of the next session.

The Merge MAP button allows you to read a MAP file without first clearing the current assignments, and without changing default MAP.

Use the Save MAP button to store MAPping information. The Mellosoftron will ask you if you want to save the current MAP before loading and merging, as well as at shutdown. Saving a MAP causes it to become the new default MAP, just like loading.


MIDI MAPping

Since the Mellosoftron has 16 instrument pads, and 16 also happens to be the number of MIDI channels, it's natural to expect MIDI channel 1 to control pad 0, MIDI channel 2 to control pad 1, and so on.

This is indeed the default situation - but far from the only possibility! The Mellosoftron allows you to map any combination of MIDI channels to any instrument pad, to select active MIDI channels and to treat any MIDI channel as a drum channel. These settings are stored in the same MAP files which also assign instrument patches (PRGs) to pads, allowing you to store and quickly retrieve complete performance setups.

The only piece of MIDI setup information which does not go into MAP files is the MIDI port selection, which is stored separately (in the Mellosoftron's global INI file, ml.ini), so as to avoid unnecessary opening and closing of MIDI ports (after all, you are unlikely to want to use different ports with different performance setups).

In order to change your MIDI setup, click the MIDI button in the Mellosoftron's main window. This brings up the MIDI Settings window.


Using the Mellosoftron as a virtual MIDI device

There are now several software synthesizers acting as virtual MIDI devices on the market. After installation, they look just like an ordinary MIDI output port connected to an external sound module (to other programs running on the same system, that is).

While this kind of setup makes sense for a "black box" soft synth with a small, proprietary sound library which can (and must!) be kept in memory at all times so as to emulate a low-end General MIDI module, it isn't really adequate for a full-blown, programmable sampler like the Mellosoftron, which you probably don't want to keep up and running at all times.

With that said, it is nevertheless quite easy to let the Mellosoftron act as a virtual MIDI device serving a sequencer or a MIDI player running on the same system.

The trick is to install one of several freely available virtual MIDI port drivers. Select the virtual port as the Mellosoftron's MIDI input port (in the MIDI Settings window) and as your sequencer's or MIDI player's output port, and you're all set. (In particular, selecting the virtual port in the Media Player's Device | Properties menu will make it the default MIDI device for your entire system).

Unlike the Mellosoftron, such a driver has a negligible memory footprint and will not use up any valuable CPU time while it's idle. You can therefore leave it permanently installed and fire up the Mellosoftron only as needed (needless to say, the Mellosoftron remembers its MIDI settings between sessions).

As for the choice of virtual MIDI port driver, there are several floating around on the Net, but an excellent one is Hubi's MIDI LoopBack Device 2.4 (or later - earlier versions did not work with 32 bit programs like the Mellosoftron) by Hubert Winkler. A painless 43 kB download available at all the large software archives (SimTel, WinSite etc.), it's not only free - it even comes with full source code! Look for the file mdlpbk24.zip in the Windows 3.x sound areas (it works under Windows 3.1 too, so it's archived there) or at the Mellosoftron's own Web site,

http://www.abc.se/~m9303/ml.html

Unzip into an empty directory, follow the installation instructions in midlpbk.txt and you will have it up and running in no time at all.

A last tip. For the reasons stated above, this is not recommended, but if you really love the Mellosoftron so much that you want to keep it up and running at all times (maybe serving as an emulated General MIDI module) here's how:

•	Right-click the taskbar's Start button. Click Open.

•	In the Start Menu folder, right-click the Programs folder. Click Open.

•	In the Programs folder, right-click the StartUp folder and (you guessed!) click Open again.  This is your destination - anything in the StartUp folder is executed automatically when Windows is started, and that's what you want to be done with the Mellosoftron.

•	Open a Windows Explorer view on the directory where you installed the Mellosoftron (if you can't remember where that is, run Find from the Start menu and let it look for the file ml.exe). Select the file ml.exe (the main Mellosoftron executable).

•	Drag ml.exe from the Windows Explorer window to the StartUp folder and drop it there.

•	Close all open folders and Windows Explorer.

•	Launch the Mellosoftron. Minimize it.

•	On the taskbar, right-click the Mellosoftron's button (don't restore the Mellosoftron by left-clicking its button - if you do so by mistake, minimize it again and repeat this step). Click Close. The next time it's run, the Mellosoftron will remember that you want it to be minimized.

•	Restart Windows. When the desktop is done repainting itself, you will see the Mellosoftron appear briefly and then minimize itself. This will happen every time you start up Windows, until you drill down to the StartUp folder again and delete the Mellosoftron's shortcut. (Actually, the Mellosoftron will always start up in its last window state, whatever that was - minimized, normal or maximized. If you restore it before shutting it down, the next time it will come up as a normal window. Just minimize and close it again to force it back to minimized operation.)


How to REGISTER - and why!

The Mellosoftron Evaluation Package is being distributed as shareware. This allows you to try it out for a reasonable amount of time before you decide to purchase a user license.

Why bother to register? Here are four good reasons:

•	The opening screen and keyboard lock will go away!

•	You will receive the latest version!

•	You will further the Mellosoftron's development!

•	You will feel good!

In order to give you full control over what you buy, I have kept Mellosoftron registration separate from the purchase of a sound library. You can order the Compact GM Library together with the Mellosoftron (and save on Shipping & Handling - you don't pay it twice), but I won't push it on you. After all, you may want to use the program with your own patch set, or you may already be using the Compact GM Library with the MIDInight Express.

For serious use, I recommend getting the (much) higher quality GMega Sound Library contained in the WAVmaker Registered Package.

The Mellosoftron is only $10 US + Shipping & Handling!

The details are the same as when ordering the Compact GM Library. In order to keep S&H as low as possible, I've arranged for electronic delivery (over the Web or by e-mail, though you can also have a disk sent to you by snail mail) and signed up with Kagi, the least expensive payment processing firm which I've been able to find.

Click here to order the Mellosoftron!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the ugly icon labeled "Kagi order").


Mellosoftron delivery

The following delivery methods are supported:

•	WWW: you will receive a URL, a personal username and a password, allowing you to download the licensed executable directly onto your hard drive. This is the preferred method. $5 US S&H, for a total of $15 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.

•	E-mail: you will be e-mailed the licensed executable as a UU- or MIME-encoded file (PLEASE STATE WHICH ONE YOU PREFER). S&H is $7 US, for a total of $17 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.

•	Snail mail: you will be air-mailed the licensed executable on a standard, 3.5" diskette (surface delivery is just too slow, especially outside of Europe). S&H is $10 US, for a total of $20 US. Add  a contribution between $10 and $20 (whatever you feel like) to also get the Compact GM Library.

Click here to order the Mellosoftron!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the ugly icon labeled "Kagi order").


Time limiting
As explained in the About box, the Mellosoftron Evaluation Package gives you five trial runs with full capabilities. Therafter, the available note range is narrowed down, first to what you can see in the Keyboard window, then further by two semitones each time you restart the program. This gives you 37 more runs before the entire keyboard is disabled. All other features remain available at all times, even after the keyboard has stopped working.


The shareware principle

Shareware is not "shared" or "free" software; it's a distribution concept. By allowing you to scrutinize the actual product (rather than a colorful ad and a fancy cardboard box claiming to contain the solution to all your problems) before you shell out your hard-earned cash, it forces the author to be at least as good as somebody using traditional sales channels. Who has not bought a commercial product only to be swearing at it or not using it at all just a few days later? As a shareware buyer you risk nothing but the time it will take you to reach an enlightened decision as to whether you really want to buy the software.

The author, on the other hand, enjoys substantial savings in distribution and marketing. Apart from the satisfaction of cutting out parasitic middlemen who add nothing but cost to the product, this gives the (good) shareware author a competitive edge in pricing. This is why shareware programs can be sold at a fraction of the cost of comparable products being distributed along traditional channels: they are not feeding salesmen, only who's doing the actual work! Distribution is being taken care of by the magic of the Internet and the efforts of FTP site and BBS maintainers committed to offering the best possible service.

An increasing number of major players in the software field are realizing the advantages of this approach and turning to shareware for their own distribution (a recent example is Borland, with high end development tools like Delphi, C++ Builder and IntraBuilder). With the ongoing growth and ever increasing proliferation of the Net into ordinary people's homes and the effort being put into the establishment of secure cybercash systems, shareware looks more and more like the wave of the future. For limited categories of software products, such as communication programs and archivers, it is already the distribution method of choice, and the successes of Doom, Quake and Nuke Duke'm 3D have proved that the principle also works well for games (which suffer from particularly short lifecycles, ill suited to the try-before-you-buy approach), especially if combined with retail-only sequels.


You will receive the latest version!

If you have downloaded or have been handed an obsolete version, you will receive up-to-date files. As long as the Mellosoftron keeps receiving user support, it will keep developing and getting better, so see to it that you have the latest and greatest version!


You will further the Mellosoftron's development!

All WAVmaker software is under continuous development, and will keep getting better as long as you, the user, keep supporting it. There is a huge list of "to-dos" and planned improvements, but it is only thanks to your contribution that I can spend long hours working on the Mellosoftron rather than on guaranteed (and immediate) income development contracts!


You will feel good!

Designing, implementing and documenting the Mellosoftron has been lots of hard work. By using it without contributing to its continued development, you would not only be acting against your own best interests (wouldn't you like an even better version, loaded with lots of exciting new features?); you would also be doing something which you really know to be wrong, deep down inside...

Do the right thing! Get that good, warm feeling! Register your copy of the Mellosoftron today!


About instrument pads
The Mellosoftron's main window is dominated by the Instruments box, containing 16 large buttons arranged in four rows and labeled 0 through F (you may recognize that as hexadecimal notation for the numbers 0 through 15). These buttons are referred to as pads:

Clicking a pad causes a note (c4) to be played with the instrument patch (PRG) assigned to it.

A pad with no PRG assigned to it is grayed out, and clicking it has no effect:


Creating a new instrument patch (PRG)

New instrument patches (PRGs) are created by clicking the New button displayed under instrument pads with no patch assigned to them:

If all pads are taken, just pick one and click its Clear button:

This causes the PRG on that pad to be unloaded.

Pick a free instrument pad and click its New button. You will be presented with a standard Open File dialog giving you a view of the current WAV directory:

Select a WAV file and click Open! The Mellosoftron will check the WAV header and, provided that no problem is found with it, display the current PRG directory in a Save File dialog prompting you for a name to use for the new PRG. The default name is "NewX", where X is the pad number. Here, we are creating a new PRG on instrument pad 0:

Click Save. The new PRG is created and - provided that the WAV loads OK - assigned to the pad, which is then activated.

There - you're done! You can now play and edit your new PRG as usual.


Editing an existing instrument patch (PRG)

The instrument patch (PRG) editor is invoked by clicking the Edit button displayed under any active instrument pad:

If all pads are grayed out, you can either load or create a new PRG to edit.

Since PRGs are just structured text files, they can actually be modified using any text editor. Their format is not free though, so you should use a dedicated editor with them unless you have very good reasons not to do so!

The Mellosoftron's PRG editor is modeless, just like the Keyboard and Sliders windows. You can therefore switch freely between it and the main window (and the Keyboard window, and the Sliders window...).

You don't have to content yourself with just one editor window either. All 16 pads can have their own PRG editor  window open at the same time, each one on a different PRG. If you like cluttered screens, here's your chance to party - but try not to go crazy just because you can!

Now for the nitty-gritty...

•	The PRG editor: an anatomy lesson

•	PRG editing step by step


The PRG editor: an anatomy lesson

[Click here for help on editing PRGs.]

The most important (and largest) part of the PRG editor window is the data display grid. If you have ever used a spreadsheet program, you shouldn't have a problem navigating it using the mouse and/or the keypad. To find out  the meaning of each column, click a cell in it and read the Description below the grid:

The three large buttons placed above the Description line, marked Sample, Controller and Envelope, are a further navigational aid: clicking them scrolls the grid sideways to the first column of their respective data sections.

When the editor is first opened, it reads the PRG file assigned to the pad and puts it into a private edit buffer. None of the changes made to the edit buffer are reflected in the file until you click the Save button. Doing so causes the edit buffer to be checked for correctness and, if no errors are found, to be saved to disk from a standard Save File dialog:

Note that you are free to use any filename, not just the original PRG's. There is therefore no need to overwrite anything when saving.

If there are errors in the edit buffer, the Mellosoftron won't open the Save File dialog. Instead, it will show you the grid location where it got confused and return you to the editor. When this happens, keep in mind that the cell pointed out by the Mellosoftron may or may not be the location of the actual error - especially envelope and loop positions are interrelated, and can be inconsistent for several reasons. If a loop start position trails the loop end position, which one is wrong?

Clicking Reload causes the PRG file to be re-read into the edit buffer. If you do this without saving first, all changes will be lost.

The Close button on the other hand does not discard the edit buffer, it just closes the editor window. As long as the pad isn't cleared (by loading a new PRG, for instance), you can resume editing at any time by clicking the pad's Edit button again.

Clicking Apply causes the edit buffer to be checked for correctness and, if no errors are found, to be copied to the pad, allowing you to play the modified PRG as usual. If there are errors, the pad isn't touched. As when saving to disk, you are shown the grid location where the Mellosoftron got confused and returned to the editor.

When the edit buffer is succesfully copied to the pad, you lose the Apply button (after all, you have already applied your changes, so what would you want it for?) and get a Revert button instead:

Clicking Revert switches the pad back to the original PRG (there is no delay for reloading the data, since it's actually never unloaded) and turns Revert back into an Apply button. This makes it easy to toggle back and forth between the original and the edited PRG until you are satisfied that the latter is actually an improvement over the former.

When doing this, you may notice a further advantage (apart from avoiding overwrites) to saving the edited PRG under a new name: the pad's hint field will now reflect whether you are playing the original or the edited patch. If you select the radio button in the pad's upper left corner, you will also see the name of the active PRG in the caption of the main window's bottom box:

Now that you understand the objects surrounding it, you probably want to know the purpose of the edit box under the PRG editor's Description field:

This is the comment box. In a PRG file, all lines starting with a # are comments. The PRG editor displays them separately from the actual data, in the comment box. Data lines preceded by comments are marked with a # in the grid's second non-scrolling column:

Editing comments is simply a matter of selecting a line in the grid and typing away in the comment box. Note that the selected line is marked by a pointed bracket (>) in the grid's first non-scrolling column.

Comments are removed by deleting them in their entirety (including any line feeds/carriage returns).

The controls at the top of the PRG editor window perform the following functions:

•	Insert creates (and selects) a new line in the grid, ABOVE the currently selected line, copying all its contents.

•	Add creates (and selects) a new line in the grid, BELOW the currently selected line, copying all its contents.

•	Delete removes the currently selected line from the grid, and selects the next line (unless you are deleting the grid's bottom line, in which case the line above it is selected). The editor does not allow you to delete all lines in the grid: there must always be at least one line left.

•	Copy to... copies the value in the currently selected data grid field to the rest of the column, according to the choice of radio button: Same base key, Same key or All.

•	Browse WAVs allows you to select a sample file from your current WAV directory. While the directory window is open, this button carries the label Import filename. Activate it by selecting a filename in the directory listing and a cell in the grid's WAV column. Clicking the button will now cause the filename to be copied into the selected cell.

•	View WAV opens a waveshape window on the sample file referred to by the currently selected grid line. This window is modeless too, so you can move freely between it and the PRG editor (and the main window, and the Keyboard and Sliders windows, and any other waveshape and PRG editor windows...).

While the WAV viewer is open, this button is labeled Import value. It is activated by selecting a cell in one of the following columns (all in the PRG's Envelope section): Attack duration, Decay duration, Start sample, End sample, Loop start sample, Loop end sample.

Selecting a cell in the Start sample or Loop start sample column and clicking Import value  causes the value in the Start edit box of the WAV viewer to be imported (if the WAV viewer is displaying millisecond times, the value is first converted to a sample position).

Selecting a cell in the End sample or Loop end sample column and clicking Import value causes the value in the End edit box of the WAV viewer to be imported (also here after a unit conversion from milliseconds to samples, if needed). Old WAVmaker and Mellosoftron users may note that this is a simpification of past behaviour (which was more sophisticated, but apparently also confusing to some)

Selecting a cell in the Attack duration or Decay duration columns and clicking Import value causes the difference between the End and Start values in the WAV viewer to be imported (here, a unit conversion to milliseconds will be performed if the WAV viewer is displaying sample positions). Negative values are nulled out. Note that the PRG editor uses integer duration values. All decimals will be rounded off.

•	The last button above the grid is enabled when a cell in the Start sample, End Sample, Loop start sample or Loop end sample column is selected. Clicking this button causes the end sample position of the WAV file reffered to by the selected line to be imported.


PRG editing step by step

The basic layout of PRG files is quite simple. Each line applies to a key range, which may be as wide as the whole keyboard (c0 to g10) or as narrow as a single key. The line assigns a WAV file to the key range and describes how it should be played - which envelope to use, whether (and if so how) to loop it, how to handle controller events and so on.

Keys are described in standard notation: a letter (followed by a "#" for black keys) and an octave number.

Key ranges can overlap. When this happens, pressing a key will cause all WAVs assigned to it to be played together, each one according to the envelope and performance parameters described by its own PRG line.

Synth-heads call this layering. It can be a very powerful technique. Layering slightly detuned WAVs will give you a richer, "fatter" sound. Layering instruments which react differently to MIDI controllers (e.g. attack and release velocity) can yield spectacular dynamic response.

WAVmaker and the MIDInight Express (and the Mellosoftron 1.x) have a six-layer limit (no more than six separate PRG lines on each key). The Mellosoftron II has no such hard-coded limitation (but can still run out of voices - each layer is played by a separate one).

So, how do you create a PRG? That's easy: you copy an existing one - preferably one using the same keyboard mapping - and edit it.

The choice of keyboard mapping should be made as soon as possible, and depends on several considerations. Which samples are available? How large is the patch (with samples) allowed to get? Which programs are you going to use with your new PRG?

Most PRGs in WAVmaker's GMega Sound Library use sample files recorded at f3, f4, f5, f#3, f#4, f#5, and often also at f6 and f#6. Upon MID to WAV rendering, all other notes are obtained from these by resampling. The reason for having two adjacent base notes for each sampled octave is essentially mathematical: with WAVmaker, resampling by harmonic ratios (such as f to g or f# to g#) is much faster (for the same resulting sound quality) than resampling by inharmonic ratios (such as f to g# or f# to g).

The Mellosoftron and the MIDInight Express use a simpler resampling algorithm. For them, moving up from the base note (e.g. from c4 to c5) is quite cheap (in terms of CPU time) but leads to quicker deterioration in sound quality. Moving down (as in c4 to c3) is expensive, since more and more data points have to be interpolated between existing ones - moving down by one octave requires an interpolated sample to be computed for each recorded one - but quality doesn't deteriorate as fast.

The simplest option is to work "MOD-style", i.e. sample just one note, like c4, and derive all other notes from it. This only takes one line, in which you declare the Key range to be c0-g10 (more generally, remember that contiguous ranges sharing the same base key and other parameters need not be described key by key). The problem with this approach is that most instruments (especially acoustic ones) do not only vary in pitch but also in timbre (i.e. in waveshape) when played at different notes (just think of an acoustic piano being played at opposite ends of the keyboard). In order to reproduce this kind of behaviour, you'll need to spread out your base keys over a suitable range.

With that said, in the example below we are nevertheless going to use the trivial mapping with just one base note, since it's sufficient for showing (almost) all the steps involved. Creating additional lines and/or layers is just more of the same.

Our starting point will be the default PRG created by the Mellosoftron's own New buttons.

•	Step 1:	Follow the standard procedure for creating a new PRG.

Use the sample file GM97D6.WAV (included in the Evaluation Package).

We could also have loaded an existing PRG to use as our template. As noted above, this can be a better option when dealing with more complicated keyboard mappings (if there is an adequate PRG to start from, that is!).

•	Step 2:	Click the pad's Edit button.

This causes a PRG editor window to be opened on your new PRG.

•	Step 3:	Edit the comment field.

When the PRG editor starts up, the first data line in the PRG file is automatically selected. The leading comment, i.e. the comment preceding the first data line, is therefore already displayed and ready to be edited in the comment box (below the field Description line). The Mellosoftron II creates all new PRGs alike, and it's a good idea to replace the default comment ("created by Mellosoftron II") with something more descriptive. This way, there will be no risk of confusion when you return to this file later ("What is this patch for? Do I need to keep it?").

The comment box is nothing but a simple text editor. Click it and enter a suitable blurb, such as

#---------------#

# My first PRG! #

#---------------#

#

The leading #s are mandatory. If you omit them, they will be inserted by the PRG editor when you save the file. The trailing #s are just for looks, and may be left out.

•	Step 4:	Change sample file(s) (if needed).

This step is not actually needed in our example. After all, we are using a single WAV as our sound source, and were therefore able to pick it already while creating the new PRG. But if we were using an old PRG based on different WAVs as a template (in order to inherit its keyboard mapping and/or other properties) this would be an important part of the process.

Depending on your goals and on the file at hand, you may prefer to use a text editor when replacing WAV file references. Remember, PRG files are just structured text files, so they can be edited that way too.

Suppose that you have a PRG referring to a large number of different WAV files. The 6.PRG (Harpsichord) contained in WAVmaker's GMega Sound Library, for instance, refers to WAV files called GM6F3, GM6F#3, and so on. If you want to change those references to (e.g.) the string sample files GM48F3, GM48F#3, ..., you can use a text editor to perform a global search-and-replace operation, from GM6 to GM48, with only a couple of keystrokes. This is also worth keeping in mind when doing other large-scale PRG editing.

On the other hand, the dedicated PRG editor can do some things which a text editor can't do, since it knows the meaning of the data. The Copy to... button can be used to perform selective copy operations to data lines sharing the Same base key or the Same key (useful with layered sounds). It can also do a global copy (click the All radio button).

The Browse WAVs / Import filename button can also come in handy. It allows you to select a sample file from the WAV directory. While the directory window is open, this button carries the label Import filename. Activate it by selecting a filename in the directory listing and a grid location in the PRG editor's WAV column. Clicking the button will then cause the filename to be copied into the selected cell.

Remember that the WAV file extension is always implied - whether you are editing your PRG with the Mellosoftron's dedicated PRG editor or with a text editor, don't type it in!

•	Step 5:	Kill the old loop point settings (if any).

When dealing with multiple-line PRGs, I find it useful to remove old loop point settings before I start looking for new ones - if I don't, I may easily forget to update all entries, leaving some of the old settings in place.

With a one-line PRG, this is not all that important, except as a way to start a good habit. With PRGs created by the Mellosoftron II's New button, the need doesn't arise until you start setting loop points yourself (autocreated PRGs are not looped).

Scroll the PRG editor's grid sideways until you can see the Loop start sample and Loop end sample entries: they should both be set to -1. When killing loop point settings in multiple-line PRGs, you can use the Copy to... button to propagate the changes to all related lines.

•	Step 6:	Find new loop points.

As anybody who has ever been involved with sampling will tell you, this can be a most frustrating task! You need to find two samples with similar (ideally, identical) values, separated in time by a multiple of the sound's wavelength. Since any reasonably interesting sample file will feature large envelope and timbre variations over time, you'll be tempted to use "tight" looping, i.e. to constrain the loop to a small region within which it's relatively easy to find corresponding samples - but if you do this, you'll suppress exactly those variations which make the sound interesting! You may get away with tight looping when the loop is used to extend a low-volume release section, but in most cases, you'll use looping for the sustain section, which is central to how the sound is perceived.

Your best tool in this game is the WAV viewer and its scaling/zooming controls. Here's what I do in a typical looping session:

•	Step 6.1: 	In the PRG editor's grid, select the Loop start sample entry for the base key (the only one in a one-line PRG).

•	Step 6.2: 	Click the View sample button to open a WAV viewer window.

•	Step 6.3: 	Change the Horizontal zoom value in the WAV viewer to 1.0. This is useful for getting a first impression of the envelope and for identifying promising loop sections.

•	Step 6.4: 	Try marking various Start positions and use the crosshair to find one yielding a good fit to the amplitude at the corresponding (candidate) End position.

•	Step 6.5: 	When there is a good candidate loop section, select it.

•	Step 6.6: 	Transfer the Start and End sample positions from WAView to the PRG editor window by selecting the Loop start sample entry, clicking the Import value button, selecting the Loop end sample entry, and clicking the Import value button again.

•	Step 6.7: 	Click the Start button in the WAV viewer, so as to center the graphic display on the start sample.

•	Step 6.8: 	Successively zoom in on the WAV while looking for a good loop start position. Some people will tell you that zero crossings are good loop points, but peaks and valleys are often better, since they are (near) zero-slope points, i.e. the waveshape is only changing slowly there. As a consequence, you're more likely to find at least one good fit at the opposite end of the loop section if you use peaks and valleys.

•	Step 6.9: 	Mark the final (hopefully!) start point, making sure to align the horizontal line of the cross-hair with the sample value (the vertical position in the graph).

•	Step 6.10: 	Click the End button in WAView, so as to center the graphic display on the end sample.

•	Step 6.11:	Try finding the best fit to the Start sample. Move the end of the selected range there. Remember that you can move both Start and End positions in sample or millisecond steps, without the mouse: type them in directly or use the spin buttons. This can be very useful for fine-tuning.

•	Step 6.12:	Repeat Step 6.6 (i.e. transfer the Start and End sample positions from WAView to the PRG editor window).

•	Step 6.13: 	In the PRG editor window, click the Apply button to make the changes take effect in the sound engine, and try playing the base note. Remember to wait long enough for the loop to be travesred a few times over.

•	Step 6.14:	Sounds bad? Revert and go back to Step 6.10, 6.7 or even 6.3, depending on how hopeless it sounds and on how many minor modifications you've already tried.

•	Step 6.15:	[Multi-line PRGs only] When it finally sounds OK, use the Copy to... button to update all Loop start sample and Loop end sample entries for the Same base key.

•	Step 6.16:	[Multi-line PRGs only] Make sure that the End sample values for the modified lines are equal to or larger than the corresponding Loop end sample values.

•	Step 6.17:	Check that the loop also sounds right for the resampled notes. If it doesn't, go to Step 6.14 (you didn't really think that you were done, now did you?). Alternatively, you may want to supply different loop points for some notes, possibly turning a one-line PRG into a multiple-line one (use the Add and Insert buttons to create new lines).

•	Step 6.18:	Click the Save button in the PRG editor window in order to save the new PRG (the file is not saved automatically).

If you think that this is a lot of work, imagine what it was like to create a couple of GM libraries! Anyway, try looping GM97D6. When you get too sick of it all, you can look at 97.PRG for my suggestion.

Cheer up, though. After all, not all sounds need to be looped!

Step 8:	Edit the other performance parameters.

There are quite a few of them, and I won't go through them all in detail. You can find out what they do by selecting them and reading the PRG editor's Description line. Experiment a bit and you will understand them in no time. A few highlights:

•	Raise the Base volume (the volume at which you want the Mellosoftron to believe that the sound was recorded) in order to have it play back at a lower volume.

•	Raise the Base pan (the stereo pan position at which you want the Mellosoftron to believe that the sound was recorded) in order to have it play back further to the left.

•	Set the Start sample to a value larger than zero if you want to skip a leading section of the WAV file.

•	The End sample can be used to limit the max duration of un-looped sounds. If the sound is looped, End sample must be equal to or larger than Loop end sample.

•	Use the Attack, Decay, Sustain slope, Release slope, Attack duration and Decay duration fields to modify the envelope shape. These should all be fairly intuitive.

•	Modify the Attack sens., Pressure sens., Expression sens., Release sens. and Mod. Sens. settings to get more or less dynamic response. Note that negative values are allowed for all but the modulation sensitivity, so you can have instruments that are played softer the harder you hit a key (for instance)! Together with layering, this feature allows you to create instruments with controller-dependent timbre (mix different layers in proportions determined by attack velocity etc.).


Faster resampling with WAVmaker
For even higher quality, one can use the mapping employed for WAVmaker's acoustic pianos: in this case, the full octave is obtained from d, d#, g# and a, by moving one note up or down from the appropriate base note. If speed is paramount, you may want to try a few other mappings. Within the octave, WAVmaker's resampler works the fastest with five semitone intervals (as in f to a#). Resampling by a full octave is even faster - and needless to say, if you sample all notes you're going to need, there will be no need for any resampling at all! This is the usual situation when dealing with percussion sounds.


The WAV viewer

The WAV viewer is opened from  PRG editor by clicking the View WAV button. It's a modeless window, so you can switch freely between it and the PRG editor.

The waveshape display is politically correct: the left channel is drawn in red and the right channel is drawn in blue. Mono WAVs are displayed in red.

There are several ways to scroll around the WAV file. One is to use the horizontal track bar below the graph. Another one is to use the scroll buttons:

 	Takes you to the end of the file.

 	Takes you to the start of the file.

 	Steps forward by 1/10 of the file size.

 	Steps back by 1/10 of the file size.

 	Steps one frame forward.

 	Steps one frame back.

You can also center the display on the position shown in the Start and End edit boxes by clicking the corresponding buttons.

The frame width can be changed using the horizontal Horizontal zoom edit box. A zoom value of 1.0 will cause the whole file to be displayed.

You can also edit the vertical zoom factor, and scroll vertically with the track bar next to  (horizonatl) scroll buttons. A vertical zoom factor 1.0 causes the full dynamic range (-128 to 127 for 8 bit files, -32768 to 32767 for 16 bit files) to be displayed.

The original zoom settings can be restored by clicking the Reset button. Note that this button becomes a Stop button during redraw, allowing you to abort it at any time.

In order to mark a position in the graph, simply click there. This will cause several things to happen:

•	A cross-hair will appear, originating at the selected position. The horizontal line is especially useful when looking for loop points of equal amplitude, to be used in the PRG editor:

•	The graph cursor changes from a cross to a horizontal, bidirectional arrow (a "resize" cursor).

•	The End button is activated, and the current (horizontal) cursor position is now reflected in the End edit box.

•	The contents of the Start edit box are frozen, reflecting the cross-hair's horizontal position. You can reposition the cross-hair by editing the value in this edit box, and force the display to be centered on it by clicking the Start button.

Now you can do one of two things:

•	In order to remove the cross-hair, click the mouse in a position preceding it, anywhere in the graph. Clicking the Reset button will also remove the cross-hair.

•	In order to select a range, click the mouse in a position subsequent to the cross-hair, anywhere in the graph.

When you select a range

•	The background color in the graphic display, from the cross-hair to the selected end position, is changed to Aqua:

•	The graph cursor changes from a bidirectional arrow to a standard Windows arrow.

•	The contents of the End edit box are frozen, reflecting the horizontal end position of the selected range. You can resize the range by editing the value in this edit box, and force the display to be centered on it by clicking the End button.

•	The Horizontal zoom button is activated. Clicking it will cause the graphic display to be fitted exactly to the selected range. Note that the Reset button becomes a Stop button during redraw, allowing you to abort it at any time.

In order to unselect a range, click anywhere in the graph (or click the Reset button).


Controlling audio output

In order to bring up the Audio Settings window, click the Audio button in the Mellosoftron's main window.

Moving up from the lower left corner, the controls in the Audio Settings window perform the following functions:

The Restart button stops and immediately restarts audio output. This is essentially a (very) mild "reset" which you can try using if the sound doesn't come out right after changing some setting.

The OK and ERROR radio buttons report the result of the latest operation. Clicking them has no effect - only the Mellosoftron can change their state.

The Max Latency setting determines how long the Mellosoftron is allowed to take (in milliseconds) before producing an audible result from an event (e.g. a key press). This is a worst-case setting. The actual latency is normally 1/4 of the value given here, so 80 ms corresponds to a normal latency of 20 ms. This is as low as DirectSound will go, and below the human perception limit. The Mellosoftron will take longer only under exceptional circumstance, e.g. CPU load peaks. If such a peak ever introduces a delay longer than the Max Latency setting, the audio stream will break up.

I recommend that you touch this value only if you are already hearing breakups and are convinced that the cause is the CPU not keeping up (a good way to find out is to run the Windows System Monitor, Programs | Accessories | System Tools | Sysmon, alongside the Mellosoftron). In this case, raising the Max Latency just might get rid of the breakups, at the cost of responsiveness (higher latency results in lower CPU load). Don't do this just in order to play complex MIDs - it's much better to use the MIDInight Express for that!

You must click the Apply button for a new setting to take effect.

The Voices setting determines how many "oscillators" (monophonic voices) are available. This is not the same as polyphony! The Mellosoftron might have 256 voices but only enough CPU power to play (say) 30 of them at the same time. So why all the "extra" voices? Because voices are not grabbed and released instantly when notes are turned on and off, but rather with a delay ranging up to the Max Latency setting. If this setting is 80 ms, a voice actually producing sound for only 40 ms can therefore remain unavailable to new events for as long as160 ms. This is a worst-case example (CPU just barely keeping up with the load and a VERY short note!) but it illustrates how a few extra voices can come in handy.

I don't recommend touching this value at all. Unused voices have a negligible effect on the CPU load and a very modest memory footprint, so there isn't much to be gained from getting rid of them. If you nevertheless want to do so, remember that you must click the Apply button for a new setting to take effect.

The Control Rate is the rate at which envelope factors are updated.

If you don't know what that means, don't worry - you will, once you have edited your first PRG. PRGs (instrument patches) allow you to specify classical ADSR (Attack - Decay - Sustain - Release) envelopes. These are linearly interpolated on the fly to yield actual amplitude factors (since the note duration and other controller values are not known before a note is actually played, envelope factors must be computed at runtime - there just is no alternative).

A higher Control Rate means that the envelope factors are updated more often (which in turn means a higher CPU load). In principle, the Control Rate can be as high as the Output Rate, meaning that envelope factors are recomputed for each sample in the output stream. In most cases, this would be a total waste of CPU time. The default setting of 50 Hz is quite adequate for normal use.

I recommend that you only change the Control Rate if you have good reasons to do so (e.g. very steep envelopes applied to very short notes, requiring a higher setting for smooth interpolation). As usual, you must click the Apply button for a new setting to take effect.

The Output Rate is the sampling rate of the audio produced by the Mellosoftron. The default rate of 22050 is the same used by the MIDInight Express, the Roland Virtual Sound Canvas and other soft synths, and adequate for most purposes. You can get a better high-frequency response by raising this value, provided that your instrument samples are sampled at the higher rate too - if not, you are just wasting CPU time. CD quality is 44100 Hz, and the Mellosoftron will go as high as DirectSound will let it, i.e. 100 000 Hz.

Remember that you must click the Apply button for a new setting to take effect.

Last but not least, there is an Audio Device box. Click the list entry for the device which you want to use, then click Select. That's all there is to it - the Mellosoftron starts using the new audio device immediately. If there is a problem, the Mellosoftron will tell you so and try to revert to the previous device, otherwise it will just keep going without saying a thing.

Like the MIDI port selection, the audio device selection is stored in the Mellosoftron's global INI file (ml.ini) rather than in the current MAP. Loading a new MAP will therefore not affect the selected audio device.


MIDI Settings

Conceptually, the main portion of the MIDI Settings window is organized as a grid with MIDI channels on the vertical axis and instrument pads on the horizontal axis. In other words, each row corrsponds to a MIDI channel, each column to an instrument pad.

The leftmost box (Receive) allows you to select active channels. Clearing a checkbox causes all incoming MIDI messages on the corresponding channel to be discarded. The All and None buttons allow you to quickly activate and deactivate all channels at once.

The Drums settings determine how MIDI Program Change events are to be handled. Marking a checkbox makes the corresponding MIDI channel a drum channel. The All and None buttons have the same effect as in the Receive box.

You may want to keep in mind that in General MIDI, there is only one drum channel, number 10. This is the default setting.

Changes in the Drums status of a channel are immediately reflected in the associated instrument pads, according to the following rules:

•	If a pad is associated with more than one channel, it is enough for one of of those channels to be a drum channel for the pad to treat all incoming program change messages as drum program changes.

•	When the Drums status of a pad is modified, by either adding the first or removing the last associated drum channel, the pad is cleared. If the name of the PRG being discarded conforms to the WAVmaker/MIDInight Express naming convention based on MIDI program numbers, an attempt is then made to load the corresponding PRG from the alternate set. For instance, 0.PRG would be replaced with D0.PRG (if present in the PRG directory) and vice versa.

The Instruments box in the MIDI Settings window gives you full control over MIDI channel to instrument pad mapping. To associate a channel with a pad, mark the checkbox where the channel row intersects the pad column. The + and - buttons allow you to set or clear whole rows and columns at a time. You also have a Clear button to unmark all checkboxes at once (careful!) and a Diag. button to set all checkboxes on the diagonal.

Note that adding or removing a MIDI channel from a pad can affect its Drums status, as described above. The situations to watch out for are the addition of the first drum channel or the removal of the last one.

The default mapping is the diagonal one: channel 1 maps to pad 0, channel 2 to pad 1 and so on.

Finally, there is a (MIDI input) Port box. Click the list entry for the port which you want to use, then click Select. That's all there is to it - the Mellosoftron starts using the new port immediately. If there is a problem, the Mellosoftron will tell you so and try to revert to the previous port, otherwise it will just keep going without saying a thing.

Unlike all other MIDI settings, the port selection is stored in the Mellosoftron's global INI file (ml.ini) rather than in the current MAP. Loading a new MAP will therefore not affect the selected MIDI port.

The Reset button will do just what it says - resets the MIDI port. This just might come in handy if you experience MIDI-related problems.


License information

Last updated: March 17, 1997.

This file contains important license information regarding the distribution and use of the Mellosoftron.

The Mellsoftron is NOT in the public domain. It is Copyright (C) Tommy Anderberg, 1996-1997. All rights reserved worldwide. This software and all the accompanying data and documentation files are protected by national and European laws and by International Treaty provisions. You must treat the Mellosoftron like any other copyrighted material, except that you may copy the Mellosoftron Evaluation Package and give to others (subject to the limitations outlined below). Any use or distribution of this software, data and documentation in violation of Copyright law or of the terms outlined in this document will be prosecuted to the best of our ability.

The conditions under which you may copy and distribute the Mellosoftron II are described below under Limited Distribution License Agreement.

The conditions under which you may use the Mellosoftron are described below under Limited User License Agreement.

All rights not expressly granted here are reserved to Tommy Anderberg.

Limited Distribution License Agreement

This Limited Distribution License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the distributor, and Tommy  Anderberg. By copying any part of the Mellosoftron, you are agreeing to be bound by  the terms of this Agreement.

As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals and organizations to copy the files contained in the Mellosoftron Evaluation Package for their own use or for giving to others, ONLY when the following conditions are met:

•	The Mellosoftron Evaluation Package - including all related program, data and documentation files - may not be modified in any way and must be distributed together, as a complete package, without exception. You may not distribute corrupted or otherwise damaged files.

•	No price or other compensation may be charged for the Mellosoftron Evaluation Package. A reasonable distribution cost may be charged for the distribution media, shipping and handling. BBS systems may not charge beyond their normal rates for downloads of the Mellosoftron Evaluation Package.

•	The Mellosoftron is designed to be easily extended by the addition of instrument patches and samples. You may not, however, distribute an extended version of the Mellosoftron Evaluation Package without prior written permission from Tommy Anderberg.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this agreement, and understand that by copying any part of the Mellosoftron, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of your distribution rights. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.

Limited User License Agreement

This Limited User License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the user, and Tommy Anderberg. By installing the Mellosoftron, by loading or running any part of it, or by placing or copying any part of it onto your computer hard drive, you are agreeing to be bound by the terms of this Agreement.

For the purposes of this section, "use" means loading the software into RAM, as well as installation on a hard disk or other storage device.

 As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals or organizations to use the Mellosoftron, ONLY when the following conditions are met:

•	You shall not: modify, translate, disassemble, decompile or reverse engineer the compiled executables contained in the Mellosoftron.

•	You may not exploit running copies of the Mellosoftron commercially, e.g. by renting, leasing or selling access to a computer running the Mellosoftron.

•	You may not distribute or otherwise exploit the output produced by the Mellosoftron if you have not purchased your own personal copy of the Mellosoftron.

•	You are free to distribute and exploit the output produced by the Mellosoftron, provided that you have purchased a personal copy of the Mellsoftron, and that the output in question is not part of a competing product (e.g. a sound data base for use with the Mellosoftron, the MIDInight Express or WAVmaker, and hence in direct competition with the WAVmaker Registered Package), in which case you must have prior written permission from Tommy Anderberg.

•	The user accepts sole and full responsibility for any damage or loss arising from the use or the inability to use the Mellosoftron. While this software has been extensively tested and is believed to be safe, Tommy Anderberg disclaims any warranties, either expressed or implied, including but not limited to warranties of fitness for ANY particular purpose and of uninterrupted, error free operation. Under no circumstances shall Tommy Anderberg be liable for loss of data, loss of profits, lost savings, special, incidental, consequential, indirect or other similar damages arising from the use or the inability to use the Mellosoftron.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this Agreement, and understand that by installing any part of the Mellosoftron, by loading or running any part of the Mellosoftron, or by placing or copying any part of the Mellosoftron onto your computer hard drive, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of the rights and liabilities of the parties involved in the use of the Mellosoftron. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.


How to get more instruments

At the time of writing (August 22, 1997), there are two General MIDI  sound libraries available for the WAVmaker software family.

•	The GMega Sound Library delivered with the WAVmaker Registered Package is shipped on a proprietary compressed format (DFT) and expands to 170 MB of 16 bit, 44100 Hz WAVs + all PRGs needed to render any GM file. It also contains several non-standard drum sets. This is a high quality library recommended for serious use of WAVmaker, the Mellosoftron and the MIDInight Express.

Click here to order the WAVmaker Registered Package!

•	The Compact GM Library is a much smaller (7 MB), lower quality sound library, primarily intended for real time operation of the MIDInight Express. Since only a handful of sounds is common to the two packages, the Compact GM Library can sometimes serve as a complement to the GMega Sound Library.

I will accept any contribution between $10 and $20 USD + Shipping & Handling in exchange for the Compact GM Library. If you're also ordering the Mellosoftron at the same time and using the same delivery method, Shipping & Handling is in common - you don't pay it twice. In case you're wondering, here's why I'm not asking for more.

In order to keep Shipping & Handling as low as possible, I've arranged for electronic delivery (over the Web or by e-mail, though you can also have disks sent to you by snail mail) and signed up with Kagi, the least expensive payment processing firm which I've been able to find.

Click here to order the Compact GM Library!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the ugly icon labeled "Kagi order").


Why so cheap?!?
Unlike the sounds in the WAVmaker Registered Package, many of those contained in the Compact GM Library can also be found in freely available, alternate sound sets for various  wavetable cards (AWE32, GUS etc.). Therefore, I am not asking you to pay for the sounds themselves. I am however asking you for a contribution in exchange for the substantial amount of time which went into finding, selecting, converting and editing those sounds, as well as into creating the necessary PRGs for them.


Compact GM Library delivery

The following delivery methods are supported:

•	WWW: you will receive a URL, a personal user name and a password, allowing you to download the Compact GM Library directly onto your hard drive. This is the preferred method. $5 US S&H (unless ordered with the Mellosoftron), for a total of $15-25 US, depending on your contribution.

•	E-mail: you will be e-mailed the Compact GM Library as a set of either UU- or MIME-encoded files. You need a fairly large mailbox for this to work - the larger the better, but handling even only one file at a time requires at least 2 MB of free storage space (encoding inflates the files quite a bit). Since coordinating such transfers usually takes some doing, S&H is $7 US (unless ordered with the Mellosoftron), for a total of $17-27 US, depending on your contribution.

•	Snail mail: you will be air-mailed the Compact GM Library on five standard, 3.5" diskettes (surface delivery is just too slow, especially outside of Europe). Pocket calculator in hand, I've determined that postage doesn't vary enough with the destination (relative to the total cost) to warrant the complication of charging recipients outside of Europe more than recipients within Europe. Therefore, no matter where you are, S&H is $10 US (unless ordered with the Mellosoftron), for a total of $20-30 US, depending on your contribution.

Click here to order the Compact GM Library!

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the ugly icon labeled "Kagi order").


About Kagi

Kagi is a small company specialising in payment processing. It can handle Visa/MC, American Express, First Virtual, US checks, money orders, cash (most major currencies, not just US dollars) and invoices.

The people at Kagi set themselves apart from their competitors (at least all those known to me) by the lowest transaction fees in the market, which they achieve by automating most of the process. This in turn is made possible by Register, a simple program which helps you fill out a standardized order form. After completing the form, you send it to Kagi by e-mail, fax or snail-mail. Sensitive information such as credit card numbers is encoded for better security.

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the ugly icon labeled "Kagi order").


Contacting the author

At the time of writing, the best way to reach me is by e-mail to

Tommy.Anderberg@abc.se

Alternatively, send snail mail to

Tommy Anderberg

Almvagen 4

195 44 Marsta

Sweden

Note that the latest information, patches and executables for

the Mellosoftron and related software can always be found at

the Mellosoftron's Home Page

http://www.abc.se/~m9303/ml.html


About WAVmaker

The best way to get up to date information about WAVmaker and related software is to visit WAVmaker's Home Page

http://www.abc.se/~m9303

where you can download the WAVmaker Evaluation Package, containing fully functional executables and online documentation.

At the time of writing (March 17, 1997) the latest version is 2.5 (February 27 build) available both for Windows 3.1 (16 bit executables) and Windows 95/NT (32 bit executables). Chances are that there will be a newer version by the time you read this.

WAVmaker features (yes, I know the screen shots below are taken under Windows 3.1 - I still think the old style windows and buttons look better!)...

•	Pro quality MID to WAV rendering. While the Mellosoftron and the MIDInight Express use fast but approximate linear interpolation to change the pitch of library samples, WAVmaker implements sophisticated resampling algorithms minimizing aliasing and distortion effects, for crystal clear sound. It can also produce output in any combination of mono and stereo; 11025,  22050 and 44100 Hz; 8 and 16 bits (Mellosoftron and MIDInight are always 22050 Hz, 16 bit stereo).

•	A 170 MB General MIDI library with all necessary patches and samples (16 bit, 44100 Hz mono WAVs) to render any GM file, plus several non-standard drum sets.

•	A rich selection of WAV editing functions, including filters, ring modulator, echo, flange, chorus, several reverb algorithms, a fully programmable, 32 band Vocoder, and many, many others.

•	WAV recording - forget all about the Windows Sound Recorder and its silly 60 second time limitation!

•	A proprietary sound compression/decompression system.

•	A textual song description language - edit songs using any text editor (or use the quick MIDI editing functions).

•	And much more!

Best of all, Standard Registration is only $30 + Shipping & Handling!

Click here to order the WAVmaker Registered Package!


Pro quality MID to WAV rendering.


A rich selection of WAV editing functions


Vocoder


About the MIDInight Express

The MIDInight Express is a real time, wavetable MIDI player and MID to WAV renderer.

"So what", you say? The point is that, just as with the Mellosoftron, you don't need a wavetable card to run it! Any cheap sound card capable of playing stereo, 16 bit digital audio at a rate of 22050 Hz (or higher) will do. Even the simple sound circuits found on most laptops will do.

As of version 2.0 (August 29, 1997) the MIDInight Express supports the extended instrument patch format introduced with the Mellosoftron II, but since it doesn't have to meet the same stringent timing requirements - it deals with MIDI files, not live MIDI input - it is much less taxing on the CPU. A 486 will do just fine.

Version 2.0 also sports a completely redesigned user interface. If you've ver used a CD player, you will feel right at home with it.

Last but not least, it's FREE!

You can use the MIDInight Express...

•	As a standalone General MIDI player

•	As a fast MID to WAV renderer

•	As a WAVmaker "pre-listener"

•	As a better WAV player

Come and visit the MIDInight Express Home Page at

http://www.abc.se/~m9303/mn.html

for the latest executables and news!


As a fast MID to WAV renderer
Sometimes you need to create a song on WAV format for a Web page, a program, or a multimedia application.

The MIDInight Express offers the fastest route - just click the record button and play your MIDs as usual! In most cases, the result will sound much better than recording off your sound card while playing.

This function is also useful for listening to MIDs which are just too complicated for real time rendering on your current hardware (too little free RAM to hold all samples, causing the disk swapper to kick in, or too slow a CPU). Note that the MIDInight Express can play WAVs, too.

For CD quality MID to WAV rendering, check out WAVmaker.


As a standalone General MIDI player
If you are tired of listening to your MIDs as rendered by the toy FM synth chips found on Sound Blaster compatibles and most laptops, then this program is for you!


As a WAVmaker "pre-listener"
Musicians and multimedia creators all over the world are using WAVmaker, its powerful MID and WAV editing functions, and its fully editable 170 MB library of General MIDI patches and 16 bit, 44.1 kHz samples to create top quality recordings of their music.

The MIDInight Express reads the same file formats, and can be used together with WAVmaker's library as a quick pre-listener to check levels and instrument choices. When you are satisfied with your arrangement, it's time to let WAVmaker take over and create a CD quality song.


As a better WAV player
An auxiliary function of the MIDInight Express is the ability to play WAV files using the standard Media Control Interface (MCI). On most systems, it will do a better job than the Windows 95 media player (which apparently tries to load the whole WAV before playing it, bringing the whole system to a virtual standstill when there isn't enough free RAM).


Use the Mellosoftron engine in your own programs!

The Mellosoftron II is a simple GUI built on top of the Virtual Sampler Library (TM). All the MIDI to digital audio functionality - from loading PRGs and WAVs to interpreting and acting on MIDI messages -  is provided by the Virtual Sampler Library.

As a developer using the Virtual Sampler Library, you deal with a simple API emulating a real sampler. You control it using standard MIDI messages, with one difference - there are 65536 channels to choose from, not 16! The difference between MIDI and digital audio ceases to exist, and you can use the same tool for everything from music  - with predicatble results, independent of the end user's MIDI hardware - to sound effects. The Virtual Sampler Library coexists happily with straight DirectSound code, too (but chances are that you will not see any reason to deal with the latter).

The full Virtual Sampler Library API counts only 26 functions, most of them used to (optionally) set parameters such as the latency and the current WAV directory. Only a third of them are required to build a full application. This simplicity, the use of the well-known MIDI standard, and the availability of powerful PRG and WAV tools like the Mellosoftron II and WAVmaker all make using the Virtual Sampler Library a breeze.

The Virtual Sampler SDK (TM) is now available for developers. You can download a fully functional demo at

http://www.abc.se/~m9303/vssdk.html

If you are unable to download the Virtual Sampler SDK for some reason, do not hesitate to contact me for further information.