VOGONS


First post, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

Hi all I have been reading lots to understand the process of how Midi for Dos games work and I would like to get feedback on anything I may have wrong as written below:

System setup would be:

Any ISA sound card that uses FM Synthesis/OPL (2/3/4)/CQM Synthesis
Roland SC55 with cable going from SC55’s input midi port to the joystick port on sound card
A game setup in the install options to use Midi for music and a “sound card type” for effects
SC55’s audio output L/R goes to the sound cards Line In

[GAME]

So the first thing for the Midi music to start is the game sends the Midi file “Standard Midi File (*.SMF)” from the hard drive and through the sound cards joystick/Midi port to the SC55 Midi module

[SC55]

The SC55 gets the SMF file as raw Midi data, I know that a midi file has no “audio/sound” associated with it but it is more like a sheet of music (midi file) with instructions for the musician to play (SC55), the SC55 then uses its built in samples/sound font that the midi file points to and the SC55 uses its internal PCM and cut-down version of the LA synthesis engine to create the musical instrument sounds and then sends it to the audio output for the speakers to play but in my system setup as written above the audio output for the SC55 is sent to the line in of the sound card that then mixes the music and effects to the line out that go to the speakers.

[FM SYNTHESIS]

Early sound cards used FM synthesis, FM synthesis takes tones at varying frequencies and combines them to create an approximation of a particular sound, such as the blare of a trumpet, it is the process of generating sound through modulation of sine waves.

[WAVETABLE SYNTHESIS]

Wavetable synthesizers use actual "digital samples" of real musical instruments, to generate music. These are real, hi-fidelity recordings of the actual instruments. When a MIDI file is played through a high quality "Wavetable" sound card, the sound quality approaches that of an actual CD, but without the storage requirements. Wavetable daughter board cards connect to the Wavetable header on some sound cards.

[OPL 2/3/4]

Is a better version of FM synthesis with a dedicated chip for processing the synthesis made by Yamaha

[CQM]

A clone of the Yamaha OPL chip made outside Yamahas circle

[GENERAL MIDI]

General MIDI is the basis for "Wavetable" synthesis. GM is actually a set of 120 standard sounds, plus drum kit definitions. All "Wavetable" synthesizers and Sound cards use the GM soundset to assure compatibility between the manufacturers.

MIDI allows selection of an instrument's sounds through program change messages, but there is no guarantee that any two instruments have the same sound at a given program location. Program #0 may be a piano on one instrument, or a flute on another. The General MIDI (GM) standard was established in 1991, and provides a standardized sound bank that allows a Standard MIDI File created on one device to sound similar when played back on another. The GM standard eliminates variation in note mapping

[GS, XG, and GM2]

A general opinion quickly formed that the GM's 128-instrument sound set was not large enough. Roland's General Standard, or GS, system included additional sounds, drumkits and effects, provided a "bank select" command that could be used to access them, and used MIDI Non-Registered Parameter Numbers (NRPNs) to access its new features. Yamaha's Extended General MIDI, or XG, followed in 1994. XG similarly offered extra sounds, drumkits and effects, but used standard controllers instead of NRPNs for editing, and increased polyphony to 32 voices. Both standards feature backward compatibility with the GM specification, but are not compatible with each other. Neither standard has been adopted beyond its creator, but both are commonly supported by music software titles.
Member companies of Japan's AMEI developed the General MIDI Level 2 specification in 1999. GM2 maintains backward compatibility with GM, but increases polyphony to 32 voices, standardizes several controller numbers such as for sostenuto and soft pedal (una corda), RPNs and Universal System Exclusive Messages, and incorporates the MIDI Tuning Standard. GM2 is the basis of the instrument selection mechanism in Scalable Polyphony MIDI (SP-MIDI), a MIDI variant for low power devices that allows the device's polyphony to scale according to its processing power.

[SAMPLED BASED]

Well, it's just confusing to call midi/wavetable music "sample-based". Sample-based means that the music file for the game actually comes with all the needed samples (as opposed to using samples from a MIDI device's ROM such as the AWE32). Sample-based music is more or less device-independent. Wavetable/GM is not.

Say, Epic Pinball uses sample-based music, and you don't need AWE32 (or any other GM-compatible device) for that. Any SoundBlaster 16 (or any of its clones) can play that music. Gravis Ultrasound cards produce higher quality music in this game, but it's not using different samples. Also, you can't use soundfonts (i.e. sample sets) to get Epic Pinball to sound differently.

[SOUND FONTS]

Is a file you can use to load into a devices memory that changes the default samples to slightly different quality or sounding instrument samples. Example change the flute to an electric guitar.

The things im not sure about:

[1]
When you have a sound module like the SC55 do all games need the Autoexec.bat setting:
SET MIDI=SYNTH:2 MAP:G MODE:0 to enable the SC55 as the synthesizer to use or does the sound card take care of it when Midi is enabled in game

SYNTH:1 (Internal FM or AWE synth)
SYNTH:2 (External MIDI port / WaveBlaster header)

MAP:G (General MIDI, 1-16)
MAP:E (Extended MIDI, 1-10)
MAP:B (Basic MIDI, 13-16)

MODE:0 - GM (SYNTHGM.SBK)
MODE:1 - GS (SYNTHGS.SBK)
MODE:2 - MT-32 (SYNTHMT.SBK)

[2]
Since its possible to choose internal or external synthesis for a SC55 which is better the SC55 or the sound card, im using the soundcard as a “general” type of FM synthesis/OPL2/3 or CQM I guess this would matter on the soundcard.

[3]
When you install a daughter board card to the wavetable header on a sound card does the sound card stop using FM synthesis and instead use some other sort of synthesis on the daughter board?

[4]
When you plug the audio output from an SC55 to the line in of a sound card does the sound card only process the volume of the line in or is there some synthesis going on?

Midi is still new to me as I havnt really had much use from it but I like it so far and reading wiki pages and posts about all the good old sound card types and tech thats been around just amazes me like when I played my first adventure game I think it was monkey island but with just sound card music and no midi I am setting up a Pc with my first sound module and I hear monkey island is amazing with midi.

Reply 1 of 7, by Scali

User metadata
Rank l33t
Rank
l33t
GabrielKnight123 wrote:

Any ISA sound card that uses FM Synthesis/OPL (2/3/4)/CQM Synthesis
Roland SC55 with cable going from SC55’s input midi port to the joystick port on sound card

The 'any ISA sound card' doesn't quite cover it.
It needs to have a MIDI port, and the MIDI port needs to be Roland MPU401-compatible (there are cards such as the SB Pro which have a MIDI port and OPL3 chip, but are not MPU401-compatible for example).
Moreso, MPU401 has two different modes: 'dumb/UART' and 'intelligent' mode.
Most MPU401-compatible soundcards only support the 'dumb/UART' mode. Especially older games (mainly MT-32) require full 'intelligent' mode MPU401.
There is a software solution called SoftMPU however, which emulates intelligent mode on a dumb MPU401 card. This requires a 386 or better however.

GabrielKnight123 wrote:

So the first thing for the Midi music to start is the game sends the Midi file “Standard Midi File (*.SMF)” from the hard drive and through the sound cards joystick/Midi port to the SC55 Midi module

It doesn't necessarily have to be a .SMF file.
SMF is just a way to store timestamped MIDI commands in a file.
There are other formats.
The storage format is not relevant to the MIDI interface and SC55. The audio driver will just output MIDI commands in realtime to the MIDI interface.

[OPL 2/3/4]

Is a better version of FM synthesis with a dedicated chip for processing the synthesis made by Yamaha

I wouldn't say it's 'better'.
OPL2 is a very low-end FM synthesis chip. Yamaha offered much better FM chips at the time.
OPL3 and OPL4 are improved, yet backward compatible versions, but still not extremely high-end.

[GENERAL MIDI]

General MIDI is the basis for "Wavetable" synthesis. GM is actually a set of 120 standard sounds, plus drum kit definitions. All "Wavetable" synthesizers and Sound cards use the GM soundset to assure compatibility between the manufacturers.

I wouldn't say General MIDI is specifically aimed at wavetable synthesis.
It's more of a 'coincidence' that by the time GM was introduced, older technologies such as FM had been superceded by wavetable, so de facto GM synthesizers used a form of wavetable synthesis.
In theory you could use any kind of technology, as long as you meet the requirements for all the instruments and effects that GM standardized.

[SAMPLED BASED]

Well, it's just confusing to call midi/wavetable music "sample-based". Sample-based means that the music file for the game actually comes with all the needed samples (as opposed to using samples from a MIDI device's ROM such as the AWE32). Sample-based music is more or less device-independent. Wavetable/GM is not.

Say, Epic Pinball uses sample-based music, and you don't need AWE32 (or any other GM-compatible device) for that. Any SoundBlaster 16 (or any of its clones) can play that music. Gravis Ultrasound cards produce higher quality music in this game, but it's not using different samples. Also, you can't use soundfonts (i.e. sample sets) to get Epic Pinball to sound differently.

Yes, I think 'sample based' music mainly refers to tracker-based music as opposed to MIDI.

[2]
Since its possible to choose internal or external synthesis for a SC55 which is better the SC55 or the sound card, im using the soundcard as a “general” type of FM synthesis/OPL2/3 or CQM I guess this would matter on the soundcard.

I'm not sure if I understand this question, can you elaborate?

[3]
When you install a daughter board card to the wavetable header on a sound card does the sound card stop using FM synthesis and instead use some other sort of synthesis on the daughter board?

The wavetable header is basically an internal MIDI in/out connector and power supply, which acts the same as an external MPU401.
I'm not sure if you are aware, but OPL2/OPL3/OPL4 chips are not natively MIDI-compatible. Games write directly to these sound chips. Some games use MIDI as the input data and convert it to OPL commands on-the-fly. Other games have their own OPL-friendly sound format.
So using a MIDI sound module, either internal or external, goes via an entirely different code path altogether. So you can use both, even at the same time if you wish. It depends on the software you use and how you configure it.

[4]
When you plug the audio output from an SC55 to the line in of a sound card does the sound card only process the volume of the line in or is there some synthesis going on?

The line in is just an analog audio input to the onboard mixer of the sound card. Usually you can only adjust the volume, but some cards might be able to also apply bass/treble or even effects like reverb or chorus over the input signal. Not exactly 'synthesis' though.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 2 of 7, by jheronimus

User metadata
Rank Oldbie
Rank
Oldbie

[WAVETABLE SYNTHESIS]

Wavetable synthesizers use actual "digital samples" of real musical instruments, to generate music. These are real, hi-fidelity recordings of the actual instruments. When a MIDI file is played through a high quality "Wavetable" sound card, the sound quality approaches that of an actual CD, but without the storage requirements. Wavetable daughter board cards connect to the Wavetable header on some sound cards.

I think you're confusing wavetable and waveblaster.

Wavetable is a way of producing music using instrument samples that are built into a device's ROM and adhere to a certain standard (e.g. General MIDI, Yamaha XG, etc). Some cards have wavetable built-in (for example, AWE32, Gravis Ultrasound). Otherwise you can get wavetable through a daughterboard (e.g. Dreamblaster X2, Roland SCB55) or an external device like Roland SC55 or Yamaha MU80. In this regard there is not a lot of difference between SC55 and AWE32, they both can produce the same General MIDI music using samples. It's just that General MIDI describes what kind of instrument samples need to be present on a device, but not their actual sound.

Waveblaster is a name of a specific daughterboard connector (and an actual daughterboard) that was developed by Creative for the Soundblaster 16 cards and was later adopted by literally anyone who made Soundblaster clones. These daughterboards do produce wavetable music, but they are only a subset of wavetable devices.

[CQM]

A clone of the Yamaha OPL chip made outside Yamahas circle

It's a specific clone used on later Creative cards like AWE32 CT3990. Other manufacturers had their own implementations. For example, ESFM on ESS AudioDrive cards.

[GAME]

So the first thing for the Midi music to start is the game sends the Midi file “Standard Midi File (*.SMF)” from the hard drive and through the sound cards joystick/Midi port to the SC55 Midi module

There are lots of formats for game music. Here are some of them.

MR BIOS catalog
Unicore catalog

Reply 3 of 7, by Shponglefan

User metadata
Rank l33t
Rank
l33t
GabrielKnight123 wrote:

[SAMPLED BASED]

Well, it's just confusing to call midi/wavetable music "sample-based". Sample-based means that the music file for the game actually comes with all the needed samples (as opposed to using samples from a MIDI device's ROM such as the AWE32). Sample-based music is more or less device-independent. Wavetable/GM is not.

Say, Epic Pinball uses sample-based music, and you don't need AWE32 (or any other GM-compatible device) for that. Any SoundBlaster 16 (or any of its clones) can play that music. Gravis Ultrasound cards produce higher quality music in this game, but it's not using different samples. Also, you can't use soundfonts (i.e. sample sets) to get Epic Pinball to sound differently.

A better term for this would be tracker-based music since typically these are tracker formats like MOD, S3M, XM, IT, etc. The formats incorporate both music notation like a MIDI file but also the underlying instrument samples.

Pentium 4 Multi-OS Build
486 DX4-100 with 6 sound cards
486 DX-33 with 5 sound cards

Reply 4 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Any ISA sound card that uses FM Synthesis/OPL (2/3/4)/CQM Synthesis

Well, it's true that ISA sound cards often do come with an OPL chip installed, but OPL2/3/4 itself doesn't require ISA at all.
These chips work with any bus/slot that allows access to the old port addresses (in case of OPL2/AdLib that's mainly 388h).
In theory, even modern PCI Express or Thunderbolt allows for that. Only Sound Blaster really needs ISA, because it relies on ISA DMA.

(To make things a bit more confusing: Some later games with OPL2/3 support try to talk to the OPL via port 220h / via the SB DSP.
These games may do work neither on a real AdLib, AdLib Gold nor on a first gen. ProAudioSpectrum or Sound Master II.)

Notes on programming Creative Sound Blaster series ISA cards
http://home.icequake.net/~nemesis/blog/index. … hp/archives/369

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 5 of 7, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
GabrielKnight123 wrote:

[GAME]

So the first thing for the Midi music to start is the game sends the Midi file “Standard Midi File (*.SMF)” from the hard drive and through the sound cards joystick/Midi port to the SC55 Midi module

Not quite, the game would load a song (a Midi file or something completely different) into and play it in real time, emitting Midi commands/events over Midi interface to Midi module (external module or internal wavetable module). Like simulating a person playing live on a Midi keyboard.

GabrielKnight123 wrote:

[SC55]

The SC55 gets the SMF file as raw Midi data, I know that a midi file has no “audio/sound” associated with it but it is more like a sheet of music (midi file) with instructions for the musician to play (SC55), the SC55 then uses its built in samples/sound font that the midi file points to and the SC55 uses its internal PCM and cut-down version of the LA synthesis engine to create the musical instrument sounds and then sends it to the audio output for the speakers to play but in my system setup as written above the audio output for the SC55 is sent to the line in of the sound card that then mixes the music and effects to the line out that go to the speakers.

Yes, except it does not get the midi file, it gets the Midi events/commands real-time over the Midi interface, as if someone was actually playing the music live with a Midi keyboard.

GabrielKnight123 wrote:

[FM SYNTHESIS]

Early sound cards used FM synthesis, FM synthesis takes tones at varying frequencies and combines them to create an approximation of a particular sound, such as the blare of a trumpet, it is the process of generating sound through modulation of sine waves.

Pretty much so. The static tone is produced with FM, but additional changes in volume and timbre are done using ADSR volume envelopes. Even earlier sound cards just used square waves, triangle waves or pulse waves, maybe with or without volume envelopes.

GabrielKnight123 wrote:

[WAVETABLE SYNTHESIS]

Wavetable synthesizers use actual "digital samples" of real musical instruments, to generate music. These are real, hi-fidelity recordings of the actual instruments. When a MIDI file is played through a high quality "Wavetable" sound card, the sound quality approaches that of an actual CD, but without the storage requirements. Wavetable daughter board cards connect to the Wavetable header on some sound cards.

Yes, kind of. As mentioned, wavetable synthesizers use actual digital samples, so there is very little difference to sample based synthesis. Wavetable synthesis on Gravis Ultrasound is done with patches that are just collections of digital samples. And about the storage requirement, yes the MIDI data is very small, but a 3 minute song might use a soundfont that won't fit on a CD. Well, maybe not all of it, but for example, each key on a piano could be its own sample, and modern digital pianos can have three different samples per key recorded at different levels of force applied to key.

GabrielKnight123 wrote:

[OPL 2/3/4]

Is a better version of FM synthesis with a dedicated chip for processing the synthesis made by Yamaha

Better just because OPL2 was the first digital FM synthesis chips used on a PC (directly coming from their DX7 synth) and then the OPL clones did not have exactly identical algorithms so they sounded somewhat different with same register settings. I don't think other FM chips like OPL(1), OPN or OPLL were used on PCs, but certainly on other computers and arcade games.
OPL2 is 9-channel FM chip with 2 operators per channel, so 18 operators in total, and 4 waveforms selectable for operator. In rhythm mode 3 of the channels are used to get 5 percussive channels. OPL3 is compatible with OPL2 and almost a dual OPL2, with 18 channels and 36 operators in total. 8 waveforms selectable for operator, and can combine channels to get six 4-operator channels. OPL4 is actually just chip that has both OPL3 and wavetable synthesizers, no new FM features.

GabrielKnight123 wrote:

[SAMPLED BASED]

Well, it's just confusing to call midi/wavetable music "sample-based". Sample-based means that the music file for the game actually comes with all the needed samples (as opposed to using samples from a MIDI device's ROM such as the AWE32). Sample-based music is more or less device-independent. Wavetable/GM is not.

Say, Epic Pinball uses sample-based music, and you don't need AWE32 (or any other GM-compatible device) for that. Any SoundBlaster 16 (or any of its clones) can play that music. Gravis Ultrasound cards produce higher quality music in this game, but it's not using different samples. Also, you can't use soundfonts (i.e. sample sets) to get Epic Pinball to sound differently.

Good description differentiating wavetable vs sample-based synthesis. Tracker music (MOD, S3M, XM, etc files) sound rather same on all devices as they provide the samples. They sound the same whether software mixed on SB, hardware mixed on Gravis Ultrasound, or software mixed on Winamp. That said, there are MIDI players that can read GUS patches so the software mixed playback sounds just like hardware mixed GUS playing the MIDI. And you can always make your MIDI music with a certain soundfont so to make it sound equal you must distribute the soundfont with your MIDI file. Game music was sometimes composed on MT-32 and thus only on MT-32 it sounded like it was meant to be, even though same MIDI file could be played on FM or other synths.

GabrielKnight123 wrote:

[SOUND FONTS]

Is a file you can use to load into a devices memory that changes the default samples to slightly different quality or sounding instrument samples. Example change the flute to an electric guitar.

Or a device has no default samples at all, so it must be loaded before playing anything. Like Gravis Ultrasound. Actually a GUS or many other sound cards/chips like OPL2/OPL3 can't really play MIDI data at all, it's the "synthesizer" software part that eats in MIDI data (from MIDI port or when playing MIDI file) and based on MIDI events it tells the sound card to play something, either an FM sound or sample.

GabrielKnight123 wrote:

[3]
When you install a daughter board card to the wavetable header on a sound card does the sound card stop using FM synthesis and instead use some other sort of synthesis on the daughter board?

No. Installing something on the wavetable header on a FM sound card is equivalent to connecting sound card MIDI data output to SC-55 and SC-55 audio output to soundcard Line In. The wavetable module gets MIDI data and outputs sound but it's mixed with FM audio, so changing MIDI volume on a mixer program controls both FM and wavetable volume. It does not in any way prevent anything from writing and using the FM chips. And you have to specifically set games and programs to use the MIDI port instead of FM synth.

GabrielKnight123 wrote:

[4]
When you plug the audio output from an SC55 to the line in of a sound card does the sound card only process the volume of the line in or is there some synthesis going on?

No, no synthesis. That does not prevent other audio processing like tone control or effects, but usually there's none.

GabrielKnight123 wrote:

Midi is still new to me as I havnt really had much use from it but I like it so far and reading wiki pages and posts about all the good old sound card types and tech thats been around just amazes me like when I played my first adventure game I think it was monkey island but with just sound card music and no midi I am setting up a Pc with my first sound module and I hear monkey island is amazing with midi.

It is amazing indeed. I think I've played it many times:
-real OPL2 FM
-real GUS with MT-32 emulation
-external Korg AG-10 module
-Scummvm OPL2 emulation
-Scummvm gameblaster emulation
-Scummvm MT-32 emulation
-Real gameblaster
-Real MT-32

Reply 6 of 7, by Osprey

User metadata
Rank Member
Rank
Member
GabrielKnight123 wrote:

Midi is still new to me as I havnt really had much use from it but I like it so far and reading wiki pages and posts about all the good old sound card types and tech thats been around just amazes me like when I played my first adventure game I think it was monkey island but with just sound card music and no midi I am setting up a Pc with my first sound module and I hear monkey island is amazing with midi.

The Secret of Monkey Island has good MIDI, but Monkey Island 2 is what truly has the "amazing" MIDI. That was the introduction of LucasArts' iMUSE system, which allowed for music to transition from scene to scene, rather than abruptly ending and starting. It also simply had far more music. MI1 had many, many locations with no music at all. MI2 had almost non-stop music, and, on top of that, there was a unique theme for nearly every "room" in the game. Finally, someone might correct me, but I believe that MI2 was designed around the brand new General MIDI, whereas MI1 was designed around the older MT-32 (though I believe that the later CD-ROM edition added GM music).

Play through MI1 and you'll enjoy the MIDI music, but play through MI2 after that and you'll be blown away. There may not be a better example of MIDI music in a game than MI2's music. In fact, I was reading that LucasArts' sound engineers put so many man hours into just the music for MI2 that they felt that they overdid it and vowed not to do that again, even though the result was awesome.

BTW, I know that you spoke about a retro machine with actual hardware, but if you ever are interested in software synthesis, I just recently discovered an awesome soundfont for the SC-55 at Soundfonts that mimic old hardware (SC-55, DX50XG, AWE64 Gold). Loaded in VirtualMIDISynth, games (including the MI games) running in DOSBox or ScummVM sound superb with it.

Reply 7 of 7, by GabrielKnight123

User metadata
Rank Oldbie
Rank
Oldbie

A big thank you to everyone what you said clears many things up and it was easy to understand, thank you again. Im sorry for the long delay to reply but I have been playing around with a stereo audio mixer as I couldnt get output from my soundcards line in from the SC55. I must say that not everything I posted were in my own words as I copied more then half to save time one was from an answer from another post so thank you to who made the answer from another post.

[2]
Since its possible to choose internal or external synthesis for a SC55 which is better the SC55 or the sound card, im using the soundcard as a “general” type of FM synthesis/OPL2/3 or CQM I guess this would matter on the soundcard.

I'm not sure if I understand this question, can you elaborate?

Scali in reference to "Set Midi=Synth:1/2" I thought 1 is for internal (sound card FM/OPL/CQM) and two is external (SC55) I though that if you use "Set Midi=Synth:1" while using an SC55 the synthesis would be from a soundcard and not the SC55 and the opposite if you use "Set Midi=Synth:2"