laurence dougal myers


Description

A tool to modify DRO files, the raw OPL (i.e. Adlib) recordings output from DOSBox, supporting all versions of the DRO format. Pretty simple. It just loads up the data into a table, and you can delete instructions as you see fit.

It also has the ability to play DRO files within the editor, so you can listen to the song from any point, and see how your edits sound straight away. It also has a few command-line executables, including: "dro_player", for playing DRO songs and rendering them to a WAV file; "dro_split", for rendering each channel of a DRO song to a separate file; and "dro2to1", for converting a DRO v2 file to the DRO v1 format (useful if you want to use dro2midi).

There's a little bit of magic for DRO V1 files, as sometimes DOSBox likes to record long (bogus) delays before the register initialization, which screws up the sounds of instruments. DRO Trimmer can detect these bogus delays and remove them automatically when the file is loaded. This does not occur for V2 files, since I don't think they suffer the same issue.

This tool is licensed under the MIT license.

The DRO Trimmer source code repository, wiki, and issue tracker is available on BitBucket: https://bitbucket.org/jestar_jokin/dro-trimmer

Screenshots

License

Latest Version

v4 r5 (2017-11-04)
  • Fix: Issue #13: playing or rendering a DRO could sometimes throw the error "ValueError: buffer too small (min 2 samples)"

Downloads

These downloads are for version:
v4 r5
(2017-11-04)

(Older downloads can be found on the "History" tab)

Source Code

Extras

Example DRO files
v2 r1 (2008-12-26)

A selection of trimmed and untrimmed DRO v1 files, taken from the following games:

  • Dune
  • Hard Nova
  • Hyperspeed
  • Indiana Jones and the Fate of Atlantis
  • Lord of the Rings
  • Populous
  • Princess Maker 2

Documentation

Manual

Version: v4 r3

Last updated: 2013-12-06

An online copy of the DRO Trimmer manual. Please refer to the wiki on BitBucket for the latest information.


History

v4 r4 (2014-01-11)

Release Notes

  • Fix: Issue #11: rendering to WAV now works again in dro_player and dro_split.
  • Fix: Issue #12: dro_split: rendering to DRO now works, when the input DRO file is DRO v1 or contains unrecognised registers.

Source Code

v4 r3 (2013-12-06)

Release Notes

  • New: can specify a "chip write delay" in drotrim.ini, allowing emulation of tiny pauses between writing instructions to an OPL2/OPL3 chip.
  • New: dro_split: can now split songs to multiple DRO files, one per channel. (Previously, you could only split to WAV files.)
  • Fix: audio stream is now only opened when first audio output occurs. This means dro_split no longer tries to open an audio stream, which could fail on PCs with limited audio capabilities. Also try to close the audio stream when the app exits.
  • Fix: dro_player: the playback counter is now more accurate.

Source Code

v4 r2 (2013-06-13)

Release Notes

  • New: dro_player: can now render songs to WAV files.
  • New: dro_player: can solo channels during playback, using keys from 0-9.
  • New: dro_split: new command line tool, to render each channel to a separate WAV file.
  • Fix: Reduced memory consumption, at the cost of CPU performance. On my PC, the command line player uses 3mb of RAM, vs 10mb. The normal GUI will still take over 30mb due to the use of WxWidgets. (This also has resulted in a streamlined codebase)
  • Fix: some multithreading issues.
  • Fix: improved dialog message when incorrect song length.
  • Fix: better usage text for command line tools.
  • Fix: OPL emulation was not reset between plays, so for example, volume changes could persist between playing from the start of a song and immediately playing from the beginning again.

Source Code

v4 r1 (2012-09-02)

Release Notes

  • Documentation now available, online via BitBucket, and distributed with the binary package as a static HTML file.
  • Added "Undo" and "Redo" menu items and shortcuts. You can now undo/redo any changes to the DRO file.
  • Added "Goto" dialog, for instantly going to a specified position.
  • Added "Loop Analysis" feature, which uses multiple analysis methods to look for portions of data that could indicate a loop point. Refer to the documentation for details.
  • Added specific register usage information. (Takes a little while to process)
  • Added keyboard shortcuts for new menu items, and for going to the next and previous delay instruction. (Refer to the manual)
  • Added shortcuts and keyboard accelerators to menus. (Wraithverge)
  • DRO Info: No longer displays a warning popup. Edit functionality is disabled by default, and must be enabled via the configuration file ("drotrim.ini").
  • Find Register: Added ability search backwards.
  • Find Register: Layout adjustments. (Wraithverge)
  • Find Register: Changed "D-08" and "D-16" options for DRO v1 to "DLYS" and "DLYL" (matching DRO v2).
  • Main view: Added "Bank" column. The register column no longer displays a value like 0x100 to indicate the high bank.
  • Main view: "Description" column now displays specific register information. More general information is now contained in the "Description (all register options)" column.
  • Main view: Fixed issue where deleting a large amount of instructions would take a long time.
  • Main view: Changed "Reg" column to "Reg."
  • Main view: Added version number to the window title. (Wraithverge)
  • Main view: When deleting the last item in the list, select the new last item.
  • Main view: Fix some issues where items were not focused correctly after deleting an item, using "Find Register", and other functions.
  • dro_player: Fix "Ctrl-C" shortcut not killing the program (timer would stop updating but music would continue playing).
  • Added configuration item to load DRO Trimmer in a maxmimized window. (Wraithverge)
  • Updated the "About" and "Help" dialogs.
  • Rework the icon loading. Will now attempt to load an external icon file if run from the Python interpreter. win32api is no longer required for loading the icon in the executable.
  • Code restructure and refactoring.
  • License blurb added to dro2to1 source.
  • Updated to PyOPL 1.3

Source Code

v3 r7 (2012-06-02)

Release Notes

  • Add configuration option to specify the "playback tail" length.
  • Add configuration option to specify the audio buffer size.
  • Add dro2to1 tool, converts DRO V2 files to the V1 format.
  • Fix issue #1 - pressing backspace/delete key in "Song Info" dialog deletes instructions.
  • Fix issue #2 - misspelling of "occurrence".
  • Fix issue #3 - Find Register status bar text references "line" instead of "position".
  • Mitigate issue #4 - search for "drotrim.ini" in the same location as the executable.

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.2, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r6 (2012-05-14)

Release Notes

  • Add keyboard shortcuts:
    • CTRL-F for Find Register
    • CTRL-I for DRO Info
    • CTRL-SHIFT-S for Save As
    • CTRL-S for Save
    • CTRL-O for Open DRO
    • CTRL-H for Help
    • Spacebar to start & stop music playback (from selected pos.)
  • Prevent multiple "Find Register" dialogs from opening. (Would cause unexpected behaviour)
  • Fix issue where using "Find Register" function would not deselect found occurrances (introduced in v3 r4).

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.2, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r5 (2012-05-12)

Release Notes

  • Added a new 'DRO Info' menu option, to view and edit some DRO info (like the hardware type, or the song length).
  • Added a button to play just the last 3 seconds (approx.) of the song.
  • Fixed standalone DRO player which got broken in v3 r4.
  • Default width of the 'position' column decreased.

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.2, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r4 (2012-05-11)

Release Notes

  • Add the ability to select multiple instructions at a time. Hold the 'control' or 'shift' key while clicking.
  • V2 files will be analyzed for initial delay instructions or calculated delay mismatch, the same as V1 files.
  • Internal changes around how analysis is done.
  • Fix bug where deleting instructions at the end of the list would not refresh the list display correctly.

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.2, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r3 (2012-05-06)

Release Notes

  • More accurate rendering method, should remove any timing inaccuracies at low sampling rates.
  • When seeker/player threads error, tell the DRO player to stop playing. (Should avoid infinite loop in standalone player when an error occurs)
  • In DRO player standalone mode, check if file exists before trying to play it.
  • Update to PyOPL 1.2

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.2, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r2 (2012-05-05)

Release Notes

  • Add ability to play DRO songs within DRO Trimmer
  • Add command-line executable "dro_player" to play songs
  • Audio setup is read from an external "drotrim.ini" file
  • Change "Line" column to "Pos."
  • Different register search range - only up to 0xFF (will find usage in both low and high banks)
  • For V2 files, display high/low bank status in the register (e.g. "0x105" for register 5 in the high bank)
  • Validate V2 codemap does not exceed 128 entries

Source Code

With player: Requires Python 2.7, wxPython 2.6+, PyOPL 1.1, PyAudio 0.2.3

Without player: Requires Python 2.5, wxPython 2.6+

Optional: Python for Windows' win32api, for displaying the application icon in Windows

v3 r1 (2012-04-22)

Release Notes

  • Adds support for DRO v2 file format (used from DOSBox 0.73 onwards).
  • Unhandled exceptions are now displayed in the GUI
  • License changed from LGPL to the MIT license.

v2 r1 (2008-12-26)

Release Notes

  • File loading is approximately 1,000,000,000,000,000 times faster (give or take a few powers of ten).
  • Song length now correctly calculated (sorry about that)
  • Bogus delays that cause problems are now automatically removed when loading a file
  • Entirely GUI-based, no console output
  • New "Find Next" dialog
  • Removed analysis feature (for now)
  • Internal restructure
  • No longer requires PythonCard