Showing posts with label FM Synthesis. Show all posts
Showing posts with label FM Synthesis. Show all posts

Friday, January 5, 2018

OPL2/3 Frequency - The 1Hz-ish Difference

The nature of FM Synthesis sound is based on sine waves.  Sine waves create sound by oscillating at a certain frequency and amplitude.  So a sine wave oscillating at a frequency of 440Hz (the pitch) would sound like an A note (A4) hit above the middle C (C4) on the 4th octave of a full 88-key keyboard.  But a sine wave in and of itself is not very interesting musically, so FM synthesis modulates two or more sine waves to create a much more complex sound.  The sine wave's frequency is programmed into the FM Synthesis chip and the modulation of the two frequency, combined with other methods to shape the waveform such as ASDR envelopes, make a sound more complex and realistic than the Programmable Sound Generators that were used in computer and video game music before FM Synthesis became popular in computer music.


Wednesday, July 19, 2017

New Discoveries about the IBM Music Feature and Roland Sound Canvas

I have previously discussed both of these sound device families previous blog entries.  The Yamaha IMFC and FB-01 is discussed here : http://nerdlypleasures.blogspot.com/2015/02/the-ibm-music-feature-card-overpriced.html and the Roland Sound Canvas first generation modules here : http://nerdlypleasures.blogspot.com/2013/06/first-generation-roland-gs-devices.html  Rather than burying the information in those entries, I would like to add additional new information here.


Tuesday, July 7, 2015

The First Sound Card

The Ad Lib Music Synthesizer Card may not have been the first add-on expansion board for a PC compatible computer that could generate sound, but it was undoubtedly the most important sound card ever made.  In this blog entry, I will give an overview of the hardware and software that made Ad Lib synonymous with good PC sound.

Hardware

The Ad Lib came in two revisions, the 1987 version and the 1990 version.  The 1987 version has a 6.35mm or 1/4" phono jack connector and the 1990 version has a 3.5mm mini-jack.  The 1990 version also has two extra decoupling capacitors to reduce the effects of noise.  The audio out can drive passive speakers and lower-impedance headphones.



The card itself was made entirely from off the shelf parts and a pair of specialized sound integrated circuits. All of the 1987 cards and some of the 1990 cards have he part numbers scratched off the Yamaha chips, but some 1990 cards have the part numbers on them.  The larger chip is the Yamaha YM-3812 FM Operator Type-L II (OPL2).  It is responsible for all audio generation.  In FM Synthesis, sound is produced when one sine wave, the modulator wave, modulates another sine wave, the carrier wave.  Each sine wave is called an operator and there are eighteen operators in a YM-3812.  In the default mode, each pair of operators is assigned a channel, so you have 9 channels available.  Each operator can have various settings assigned like Vibrato, Tremolo, ASDR and output level.  The settings for each operator pair can be called an instrument.  In the alternative mode, twelve pairs of operators are assigned to 6 channels and the rest are used to produce 5 percussion instruments.  The smaller chip is the Yamaha YM-3014 Serial Input Floating D/A Converter (DAC-SS).  It turns the digital audio output from the YM-3812 into an analog signal suitable for amplification.

Ad Lib's attempt at secrecy was short-lived.  By the end of 1989, its competitor Creative Technologies was already advertising its "Killer Card" (which would become the Sound Blaster), which included full Ad Lib compatibility.  Ad Lib clones appeared fairly quickly because the card was easy to clone once you figured out what the mystery chips were.  Ad Lib released programming information giving the abilities and register specifications for the chips.  Because the chips were not custom components (otherwise why scratch the part numbers off?), and it used FM Synthesis, it had almost certainly to come from Yamaha.  The price point and chip packaging must have narrowed down Yamaha's IC line considerably.  It was only a matter of time before the secret was out, and Ad Lib, a small French-Canadian company at the time, was in no position to obtain exclusive rights to use the chips from Yamaha.

When you look at either genuine board, you instantly notice the Ad Lib company logo.  I do not recall seeing an earlier PC expansion card printed circuit board with so striking a design.  Most PC expansion boards just have the name of the product labeled in ordinary text somewhere on the card, and many do not even have that, leaving someone to have to deduce the card's identity and function.  It would be a long time until we saw something as equally stylish (even though you would only see it when you opened the computer.)

However, you will also notice two sets of solder pads.  The first, with the "3 5 2" numbers above it, was to assign an IRQ to the card.  The card would fire off an IRQ when after one of the timers had reached zero.  None of these three pads are connected and no software would ever expect them to be connected, so this functionality was in practice never used.  The timers were typically used polled to auto-detect the card.

The second set of pads, "A B C D", allowed the user to change the I/O address from 388/389H.  This allowed the user to put four cards in a single system.  The other addresses were 218/219H, 288/289H and 318/319H.  Very little software ever supported the Ad Lib at an address other than the default.  The days when hardware hackers would routinely modify their hardware with a soldering iron was rapidly coming to a close during Ad Lib's early days.

The Path to Success

When the Ad Lib was first released in 1987, it did not instantly set the PC world alight and inspire software developers with new visions of affordable music.  The Ad Lib was marketed first as a music creation device using a program called Visual Composer to put notes on sheet music.  It appears to have only come bundled with the Visual Composer software and cost $245.00.  Music creation software was nothing new to the PC industry, Electronic Arts Music Construction Set and Mindscape's Bank Street Music Writer were already on the market and had done well.  The former worked with a PC Speaker in 1-voice or 4-voice mode, the PCjr. or Tandy 3-voice chip and the latter came with a 6-voice sound board based off the Apple II Mockingboard design.  IBM also had a MIDI interface based music card called the IBM Music Feature, but it was very expensive, and other companies like Roland produced MIDI interfaces to control their expensive synthesizers with computer software.  Parents were far more likely to buy the cheapest Casio or Yamaha keyboard on sale at Radio Shack for their kids.

In 1988, the card and company's fortunes changed when Sierra Online was looking for good hardware to support in their latest adventure games, which were planned to support full musical scores.  The Ad Lib was seen as more capable than the PSG-based solutions then available like the C64's SID chip, which simply did not sound impressive to U.S. composers. Sierra selected the Ad Lib card as its entry-level music solution and other companies followed.  The first PC game to support the Ad Lib or any other external sound device (Roland MT-32 & IBM Music Feature) was Sierra's King's Quest IV: The Perils of Rosella.  In fact, if you compare the boxes for the 1987 and 1990 versions, you can see that gaming had taken preference over music creation.



Once the Ad Lib became useful for games, a version of the card was released for $195.00 without the Visual Composer software.  The price for the Ad Lib was now much more attractive and competitive.  Often games would come with a $20 coupon for the card.  The next nearest competitor was the Creative Music System/Game Blaster, which at $129.00 competed well in price but poorly in features.  The Game Blaster may have had more voices (12 vs. 9 or 6/5) and stereo support, but its PSG-style music generation was not deemed by the press or the public as anywhere near the quality of the Ad Lib's FM Synthesis.

While the PSGs in the Game Blaster and the Tandy could output the same notes on the scale as the Ad Lib, the Ad Lib had sufficient capabilities to advertise to users that they could create something approximating actual instruments.  It also sounded somewhat close to the music in most arcade games of the late 80s and early 90s, giving it an edge over devices that sounded like a C64 or a NES.  If the Ad Lib had not gained popularity, perhaps it would have been the Game Blaster that fulfilled the PC gaming music niche, but the Ad Lib was supported in thousands of games while the Game Blaster never pushed above 100 games.

The Ad Lib had quite the appeal for people looking for a no-hassles upgrade.  The Ad Lib did not require any setting up, there were no user-accessible jumpers or dipswitches on the card.  It fit inside any system with a free 8-bit expansion slot.  It rarely required you to load a driver before running an application or a game.  PGA Tour Golf is one of the few examples I could find of a popular game that requires loading SOUND.COM before beginning the game.  Even Ad Lib soon embedded its driver into its application programs.  The most interaction people usually had with the card physically was with the volume control.

The Ad Lib was not designed to handle digitized sounds, but some companies were able to get around that by some careful timing writes to set up a level waveform, then feeding 6-bit values to the volume control registers.  This in essence allowed the Ad Lib to function like a 6-bit DAC.  Activision used it in Battle Tech : The Crescent Hawks' Revenge, Gametek in Super Jeopardy and Interplay in Out of this World.  Because sending audio samples directly to the "DAC" required a lot of CPU time, it was seldom used.  The rise of the Ad Lib compatible Sound Blaster, with its 8-bit DMA-assisted DAC, soon made this effectively obsolete.

From a programmer's standpoint, the Ad Lib was relatively simple to program for.  Programs could automatically detect the card because it had a pair of readable timers on it.  For 8088 systems, they could simply just send data to it, but faster systems required software delay loops of increasing length in order to have the card respond appropriately to address and data writes.  Unfortunately, the basic Ad Lib and its clones tend to fail when older games are being run in fast 386 and 486 machines, requiring the use of slowdown utilities, cache disabling programs or turning off the turbo button.  Eventually, virtually all audio would be handled by middleware drivers from companies like Miles Sound Design which would provide solid if unremarkable Ad Lib support for any system.

An Ad Lib could work with just about any PC or XT with 256KB of RAM and a CGA or better card.  However, in late 1988 that combination just was not doing it anymore for the latest games.  While the Ad Lib can work with most early games on an 8088 or V20 machine, the results are often unplayably slow. The Ad Lib works much better with a 286 @ 8MHz or better, an EGA graphics card and 640KB of RAM.  There were exceptions like Origin's Windwalker, which was programmed before the need to add software delays for faster systems was generally known.  That game is best run on an 8088 or V20 machine.

The Ad Lib had something of a love-hate relationship with musicians.  Computer musicians in the U.S. in the late 80s were usually thoroughly steeped using MIDI instruments.  You could compose a song on a synthesizer keyboard a lot more naturally than in a computer program of the time.  The Roland MT-32 and later the Roland Sound Canvas lines of PC MIDI devices were the preeminent external audio devices for PC gaming until digitized audio took over entirely.  Most composers at big-box developers like Sierra and Electronic Arts composed with MIDI devices and then transported their music to the MT-32, SC-55 and Ad Lib, but the translation was far easier from MIDI to MIDI devices with built-in samples than MIDI to Ad Lib.  So too often Ad Lib music playback paled in comparison to MT-32 and SCC-1 playback.

The Ad Lib did find early advocates at the shareware development houses.  The guys at ID Software and Epic MegaGames were often technologically more innovative and more willing to explore the features of their hardware than the larger publishers.  Shareware titles supported Ad Lib exclusively at first, then migrated to the Ultrasound and the Sound Canvas.  The music in Commander Keen 4-6 and Jill of the Jungle 1-3 (which requires a Sound Blaster) is often very good and hard to imagine being as good on an MT-32.  European programmers also were able to coax good music from the Ad Lib. They already had years of experience hacking away at the SID on the C64 and Paula on the Amiga, so this came easy to them.  The music for Dune by Cyro Interactive does not loose its essential character on an OPL2 even though it was composed for an OPL3.  The songs in Lemmings are very impressive, even compared to the Amiga original.

From a gamer's perspective, purchasing an Ad Lib in the first years following its release was a wise purchase because virtually every game that supported an expansion sound device supported the card.  Companies like Sierra, Origin, LucasArts, Microprose, Spectrum Holobyte, Interplay, and Epyx soon followed suit and began supporting the card in more and more of their products.  (Airball was a very rare example of a game that supported Innovation SID and Game Blaster but not Ad Lib.)  If you look at an early story such as the one published in Computer Gaming World #63 (September, 1989) you can see that every company that was considering sound cards at the time of contact was considering the Ad Lib.  When the Sound Blaster came with digitized sound support in 1990, digitized sound was slower to be adopted because the samples took up so much space on floppy disks.  It had other features, such as the built-in game port, and a price that was very competitive with the less-featured Ad Lib card.  Ad Lib's response to the coming of the Sound Blaster was to reduce its headphone jack to use a mini-jack connector.


Even when the Ad Lib Gold released the OPL3 chip, which has support for stereo output and double the number of FM operators and 4-operator FM Synthesis, game companies rarely supported the advanced features of the newer chip.  Even though the OPL3 chip quickly replaced the OPL2 chip in 1992, most music was still designed for the basic OPL2 features.

The Ad Lib was the entry level music device for an astonishing seven years, from 1988 through 1994.  Until CD-ROM drives and sample-based MIDI hardware became affordable, Ad Lib FM Synthesis was still the king of PC game music.  Early CD-ROM music was far superior musically but extremely inflexible.  Ad Lib music occupied little space and could be adjusted instantly to suit the needs of the program.  CD-ROM music changing required sending track change or track repeat commands.  There would be a pause while the new song was found or the old song was being repeated.  CD-ROM also did not do well with short snippets of music.  The iMUSE system from LucasArts, which dynamically changed the music according to room and scenes, was feasible with the Ad Lib but impossible with CD-ROM audio.  Only with the arrival of Windows 95 was the hardware sufficiently powerful to manage multiple digital streams of voice and music that made the Ad Lib totally obsolete.

Tuesday, February 24, 2015

Digital OPL2 and OPL3 Recording

The Yamaha YM-3812 OPL2 chip, used on the Ad Lib Music Feature Card and the early Sound Blasters and their clones, is fairly unique among computer and video game music chips because the output of the chip is still digital.  That output is intended to be fed into a YM-3014 DAC, then sent to the pre-amplifier (for line output to powered speakers) and amplifier (for amplified output to passive speakers and headphones).  This makes it possible to capture digital audio from the card.  Its successors, the YMF-262 OPL3 and its Yamaha descendants (YMF-278 OPL4, YMF-289B OPL3-L, YMF-7xx DS-1, CT-1747) also output digital data which is fed through a Yamaha DAC.  There have been several devices which can output some form of the digitized sound generated by an OPL2 or OPL3 chip.

Adlib Digi-Snap

The original PC compatible implementation of the OPL2 chip, the Ad Lib MSC, was not designed to provide the user with digital output.  However, the OPL2 and the DAC were discrete components, so by removing the DAC the data from the OPL2 could be captured.  This is what the Digi-Snap device does.  It requires the DAC, an 8-pin chip, to be removed and a small ribbon cable soldered or socketed in its place.  The other end of that ribbon cable connects to a parallel port in a second computer.  The digital data from the OPL2 chip can be read off the parallel port using a special program.  You can piggyback the DAC chip on top of the cable going out of the computer to retain the ability to hear the sound you are trying to record.

The YM-3812 OPL2 chip outputs a 16-bit serial monaural digital signal at a sample rate of 49,716Hz.  This odd sample rate is based on the input clock, 3,579,545Hz (a.k.a. the NTSC color burst frequency).  Essentially this signal is divided by 72 to get the sample rate.

The Digi-Snap requires an Enhanced Parallel Port (EPP) set to I/O 278 and IRQ5, MS-DOS in the recording PC.  The software requires 32MB of RAM (which should indicate the speed of the PC you should be using, a Pentium) and will record nine minutes of sound before overwriting the oldest data.  The resulting data is in a raw, signed 16-bit data format.  You will need to tell any playback software like Audacity the bit depth (16-bit signed), sampling rate (49,716) and number of channels (one/mono) to be used.  Audacity can easily convert RAW files to WAV files without any loss in quality, since both are uncompressed formats.

While I cannot recall ever seeing a true Ad Lib card with a socketed DAC, many Sound Blaster 1.0, 1.5, 2.0 and Pro 1.0s have socketed OPL2 and DAC chips.  Whatever differences there may be in their analog outputs, for the Digi-Snap's purpose, they will sound exactly the same (unless a game detects a Sound Blaster and uses its digitized audio output capabilities).

The sole limitation to the Digi-Snap is that it only works on OPL2 chips.  In theory it could be adapted to the YMF-262 OPL3 chip and its DAC, the YAC-512.  However, the YAC-512 is surface mounted instead of a through-hole chip like the YM-3014.  This makes it much more difficult to solder wires to it.  Also, the YMF-262 in its OPL3 mode acts like two OPL2 chips, so the amount of data that would be stored would be cut in half.  Finally, there are enough differences between the two DAC chips that the design may have to be changed.

There is no reason why the Digi-Snap could not be used with a Sound Blaster Pro 1.0 or a Pro Audio Spectrum.  Both have two OPL2 chips and two DACs and function completely independently in stereo mode.  You would need a second Digi-Snap board and a third PC to use them.  Essentially, each PC would record one of the OPL2 chip's outputs and you could recombine them in your audio editing program.  Synchronization may be an issue, however.

The instructions for building the Digi-Snap and the software for it can be found here.

Sound Blaster AWE32

The AWE32 was the first device that provided official support for obtaining digital output from an OPL chip.  The early AWE32s have a CT-1747 bus interface chip.  This chip contains a YMF-262 core.  An YMF-262 or CT-1747 OPL3 has a 14,318,180Hz master clock and divides this by 288 to obtain the same sample rate, 49,716Hz, as the OPL2.

The Sound Blaster AWE32 and Sound Blaster 32 cards which have a YMF-262, YMF-289 or a CT-1978 do not support OPL through their SPDIF connectors.  Instead they have discrete DAC chips that only go to the analog outputs.

CT-1978 is Creative Lab's clone/improvement that uses Creative Quadrature Modulation Synthesis (CQM) instead of Yamaha Frequency Modulation (FM) Synthesis of the OPL line to approximate the OPL2 and OPL3.  CQM usually is pretty close to the original, but common opinion is that it can sound harsher compared to FM synthesis.  If a card is marked as an AWE32 or SB32 and either has a CT-1978 or does not have a CT-1747 or YMF chip, then it will have CQM.  CQM was integrated into larger chips on Creative's later cards.

Unlike the Sound Blaster 16s with the CT-1747 bus interface chip, the AWE32s, including the "value" cards without SIMM sockets, have a 2-pin Sony/Phillips Digital Interface Feature (SPDIF) header.  SPDIF signals come in three main varieties.  First is the signal that the AWE32 and CD-ROM drives with a 2-pin digital out header and Sound Blaster Live! cards with a digital output mini-jack have, a +5v TTL signal.  Second is an optical signal, which converts a +5v TTL signal into digitized optical signal through the use of a TOSLINK transmitter.  The TOSLINK transmitters are those black, boxy SPDIF ports.  The signal is turned back into a +5v TTL signal by a TOSLINK receiver.  Third are coaxial SPDIF connectors, they use RCA connectors but use a 1v Peak to Peak signal.

There are two ways to make the SPDIF connector on an AWE32 useful.  First, you can connect the 2-pin header from an AWE32 to a 2-pin header on a sound card with a CD/SPDIF digital in.  Most Sound Blaster Live! and Audigy cards have this header on their boards or have it on their feature connectors.  The second is to use an I/O bracket with an optical connector on it.  You may need to fiddle with the wiring a bit, just remember that the O pin on the AWE32 is the digital output signal and the I pin is the ground.

In the YMF-289B OPL3-L and YMF-278 OPL4, these chips are fed by a 33,868,800Hz clock.  In this case, instead of a single divider like the OPL2 and OPL3, two different dividers are used.  One divider, for the waveform/phase/envelope/timer, uses a 684 divider to get a very close approximation of the 49.716Hz signal.  This ensures that the same data can be used for an OPL3 or OPL3-L chip and the user can expect it to sound the same.  Any differences in frequencies between the two chips would produce negligible error. The output sample rate uses a 768 divider to obtain a 44,100Hz output rate.  In a sense, this may lead to a coarser output, but human ears cannot tell the difference between a sample played back at 44,1000Hz and 49,716Hz.  The benefit to Yamaha and the companies that produced sound cards meant that one less clock crystal was needed.

Sound Blaster AWE64 Gold

The AWE64 Gold uses the same 2-pin header as an AWE32 for its SPDIF output, but this connector will connect to a standard coaxial I/O bracket.  It uses 1v Peak to Peak signaling, making it slightly more convenient than the AWE32.  However, the AWE64 Gold also provides the digitized audio from the Sound Blaster, but this is limited to Windows and may only work when the Windows drivers are invoked, something no DOS program would do.

Non-Gold AWE64s often have solder pads for the header, but they would only provide a +5v TTL signal and would not include the digitized Sound Blaster audio.  All AWE64s use CQM.

Yamaha YMF-7x4 Cards

Yamaha supplied low cost YMF-71x chips for OEMs to use for cheap ISA sound cards.  These chips included everything an ISA sound card typically needed, including a true OPL3 core, Sound Blaster Pro 2.0 and Windows Sound System compatibility, a gameport and and a UART compatible MPU-401 interface. Later, the Yamaha WF-192 Waveforce was among the first PCI sound cards, and it used the Yamaha YMF-724 chip.  This chip replaced WSS compatibility with a cut-down XG MIDI synthesizer core.  The The YMF-744 was a similar PCI chip that supported 4-channel analog audio output for surround sound and DirectSound 3D.   As these cards are based off a YMF-289 core and use the same 33,868,800Hz clock and they would output to the same sample rate.

Some YMF-7x4 cards have a coaxial or optical digital output.  The digital output can be used for anything generated by the chip, including OPL2 and OPL3 music.  It can also be used for Dolby Digital AC-3 passthrough.  The digital SPDIF output has a fixed sample rate of 48,000Hz and the only clock crystal on these cards is 24,576,000Hz.  However, it appears from the YMF-724 datasheet that the OPL3 core is still using the 44,100Hz sampling frequency because there is a digital phase locked loop in the chip that converts the 24,576,000Hz master clock to 33,868,800Hz.  This would square with the claim that the OPL3 core in these chips is register compatible with the YMF-289B.  While it is beyond question that the OPL sample rate has been converted from 44,100 to 48,000 when output via the SPDIF connector, it is unknown whether the same is true for the analog output but it probably is when mixed with samples from other sources.

Samples

All other consumer PCI sound cards of the late 1990s, most of them adhering to the AC'97 specifications, also sample all input at 48,000Hz. Unfortunately, the Sound Blaster Live! and Audigy cards have a poor reputation when it comes to their resampling.  But is it deserved?  I have an Sound Blaster AWE32 CT2760 and a Sound Blaster Live! CT4760.  On one PC, I played Wolfenstein 3D and DOOM with the AWE32.  I ran a 2-pin cable from the AWE32's SPDIF out to the CD Digital Input on the Sound Blaster Live!, which was installed in a second PC.  The second PC recorded the digital input through an old version of Audacity (1.2.6) running on Windows 98SE.  Here are the results :

DOOM Episode 1, Mission 1 :



Wolfenstein 3D Episode 1, Mission 1 :



Conclusion

There is no such thing as a perfect digital recording from an OPL2 or OPL3 chip.  The 49,716Hz frequency is odd and except for the Digi-Snap device, is not something you are going to record digitally.  Even so, nothing but an OPL chip is likely to output at that frequency.  The typical ideal will be a 44,100 frequency, but most recording devices will resample this to 48,000Hz.  (DOSBox supports the 49,716 frequency to improve the OPL emulation, but your system will resample it).  Ultimately, all audio is analog, and the methods discussed in my previous post,  about capturing the data writes to the OPL chips should, if nothing else, make your file sizes smaller.

Monday, March 24, 2014

Raw Adlib Capturing with DOSBox & Playback with DOS

One of DOSBox's best features is its ability to capture raw OPL commands and data with timing data to preserve as perfectly as possible the music data for Adlib and Sound Blaster cards.  The capture feature supports OPL2, dual OPL2 and OPL3.  One of the biggest advantages to this format is that the resulting files are quite small, maybe 6-7K for a single track or song.  Another advantage is that you are not capturing a wav file of an emulated OPL2/3, you can take this .dro file and play it back on real hardware.

The resulting files have a .dro extension, which stands for DOSBox Raw OPL format.  Fortunately, the capturing does not begin until the first OPL reads and writes are detected, so there will not be a lot of silent dead time.  However, beginning with 0.73, released on May 27, 2009, DOSBox updated its DRO capture format to version 2, which is incompatible with any software written for version 0.1 (formerly known as 1.0).  For the differences between the two formats, they can be found here :

http://www.shikadi.net/moddingwiki/DRO_Format

If you use DOSBox 0.72 or below (feature has been present since 0.63), then DRO version 1 files will be created.  0.73 or higher will only create DRO version 2 files.  Since most people intend to use DOSBox 0.74 or SVN, I have put together this guide to software.  I recommend using a current SVN build with the following patch applied (use the patch as given in the latest post) :

http://www.vogons.org/viewtopic.php?f=41&t=38029

As you might guess, capturing OPL music from a game may not always give a clean track.  The track may loop and you will need to delete the repeated portion, or a second track may immediately segue from a first track, and you want the tracks separate.  Sound effects may be playing.  The program DRO Trimmer v4r4 will work with version 1 or 2 .dro files, and is quite easy to use.  It also functions as a player for either type of DRO version file.  Get it here  :

http://www.jestarjokin.net/apps/drotrimmer

As its name implies, DRO Trimmer is a bare-bones trimmer.  If you want to use fade-ins and fade-outs or other more sophisticated editing techniques, you will need to use a tracker.  I do not know of any that work with the .DRO format.  Nor do I know of any utilities that would convert DRO into a tracker-friendly format like S3M.

The mainstay of playing Adlib files in DOS on real hardware is a program called AdPlay, based on the AdPlug library.  It can play just about every OPL file format out there, including proprietary formats from Sierra, LucasArts, Origin, Apogee and Westwood.  It also supports various tracker formats and Roland ROL and Creative Labs' CMF formats.  However, the DOS port of AdPlay was last updated in 2007 and thus only supports DRO version 1 files.  However, do not write it off just yet.  Downloads are on this site :

http://adplug.sourceforge.net/index.php

More than just trimming DRO files, the DRO Trimmer program can also convert DRO version 2 files into DRO version 1 files.    Additionally, there is a program called DRO2IMF, which will convert DRO version 1 and 2 files into the IMF format that Apogee games use.  It is located here :

http://www.shikadi.net/utils/dro2imf

You will also need a DPMI extender to run AdPlay, and the one this program expects is called csdpmi.  For this reason, a 386 or better is required for playback.  A version that works with AdPlay can be found here :

ftp://ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi5b.zip

AdPlay will play IMF files and DRO version 1 without a problem, so either should work as a solution. However, I found that the converted IMF file plays correctly with AdPlay while the converted DRO file did not.  I assume a natural DRO version 1 file, as recorded from DOSBox 0.72 or below, would work correctly with AdPlay.  However, because DRO version 1 files are less accurate and would not have the benefit of the patch identified above, I would not advise using the older DOSBox for accurate OPL capture.

Another solution is a program called imfplay, which has the benefit of working with .DRO version 2 files without conversion.  This program I have personally tested in my 486DX2/66.  However, there are several caveats with using it on real hardware.  First, it only supports OPL2 writes, OPL3 writes in a DRO file are ignored.  The irony of this limitation will soon be apparent.  Second, the cache of the 486, internal and external, must be disabled or the music will come out garbled.  Whether it works on faster machines is unknown to me.  Third, a sound card with an OPL3 chip must be used.  OPL3 chips require fewer delays with port writes than OPL2 chips, and imfplay was intended to work with DOSBox, which does not care about delays to its emulated OPL chips.  AdPlay does not have the OPL2 limitation or the slowdown requirement.  You can find imfplay here :

http://software.kvee.cz/imfplay/

One thing I initially overlooked when I first wrote this post was that Harekiet, one of the authors of DOSBox, had written a small utility called DROPLAY that would allow DOSBox to play the v.2 DRO files made with DOSBox 0.73 and later versions.  You can get it in the last post from here :

http://www.vogons.org/viewtopic.php?f=32&t=16217

DROPLAY does work on real hardware, so you can use it with a 486 or even something lesser to play back DRO v.2 tunes.  I would prefer to use DRO files over a converted IMF file because the IMF file may require timing information that seems specific to Apogee games but may not be applicable generally to OPL game music.