Skip to content

A foobar2000 component to play Professional Music Driver (PMD) files.

License

Notifications You must be signed in to change notification settings

stuerp/foo_input_pmd

Repository files navigation

foo_input_pmd

foo_input_pmd is a foobar2000 component that adds playback of Professional Music Driver (PMD) files to foobar2000.

Professional Music Driver (PMD) is a music driver developed by Masahiro Kajihara (KAJA) which utilizes MML (Music Macro Language) to create music files for most Japanese computers of the 80s and early 90s.

PMD can be used to make music for the PC-98, PC-88, X68000, and FM Towns. It's the most used tool to make music for the PC-x801 series, notable examples are Touhou Project and Grounseed.

Screenshot

Features

  • Decodes Professional Music Driver (.m, .m2) files.
  • Supports dark mode.

Requirements

  • Tested on Microsoft Windows 10 and later.
  • foobar2000 v1.6.16 or later (32 or 64-bit). foobar2000

Getting started

Installation

  • Double-click foo_input_pmd.fbk2-component.

or

  • Import foo_input_pmd.fbk2-component into foobar2000 using the "File / Preferences / Components / Install..." menu item.

Configuration

Drum Samples

You can specify the directory that contains the YM2608 (OPNA) drum samples in the preferences.

The sample files should meet the following conditions:

  • RIFF WAVE PCM Format (1), 1 channel, Sample Rate 44100Hz, 16 bits per sample
  • Filenames: 2608_bd.wav, 2608_sd.wav, 2608_top.wav, 2608_hh.wav, 2608_tom.wav and 2608_rim.wav or 2608_rym.wav.

A "ym2608_adpcm_rom.bin" ROM file in the same directory takes precedence over the WAV sample files and will be used when found.

Tags

The following meta data tags are available:

Name Value
title Title of the track
artist Arranger specified by the track
composer Composer specified by the track
memo Memo specified by the track

The following info tags are available:

Name Value
loop_length Length of loop (in ms), if defined

The following info tags are available while playing a track:

Name Value
synthesis_rate Synthesis rate in Hz
loop_number Number of the current loop

Developing

To build the code you need:

To create the deployment package you need:

Setup

Create the following directory structure:

3rdParty
    WTL10_10320
bin
    x86
foo_input_pmd
out
sdk
  • 3rdParty/WTL10_10320 contains WTL 10.0.10320.
  • bin contains a portable version of foobar2000 64-bit for debugging purposes.
  • bin/x86 contains a portable version of foobar2000 32-bit for debugging purposes.
  • foo_input_pmd contains the Git repository.
  • out receives a deployable version of the component.
  • sdk contains the foobar2000 SDK.

Building

Open foo_input_pmd.sln with Visual Studio and build the solution.

Packaging

To create the component first build the x86 configuration and next the x64 configuration.

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

Change Log

v0.4.1, 2023-11-12, "Release name missing in action"

  • Fixed: Samples loaded from .WAV files played at the wrong frequency.
  • Fixed: Songs with two PPZ bank specifications did not load both banks.
  • Fixed: Renamed the setting "Use Rhythm" to "Use SSG".

v0.4.0, 2023-10-08, "Rough edges, be gone!"

  • Added: Checkbox to enable or disable the use of PPS samples (default: false).
  • Added: Checkbox to enable or disable the use of the Rhythm instead of the SSG (Software-controlled Sound Generator) sound source (default: false).
  • Improved: Doubled the startup speed of each song.
  • Improved: Tweaked the Shift JIS to UTF-8 conversion a little bit.
  • Improved: The driver outputs a couple of diagnostics messages to the console about the external files (sample banks or files) that are expected for a song to play correctly.
  • Fixed: Various path error conditions that prevented the correct sample banks from loading.
  • Fixed: Some settings weren't reset by the Reset button.
  • Builds with foobar2000 SDK 2023-09-06.

v0.3.0, 2023-07-22, "What's your preference?"

  • Improved: Added all configuration parameters to the Preferences page.
  • Improved: Several performance improvements.
  • Fixed: Wrong specification of source buffer size (again).

v0.2.0, 2023-07-16, "That's a wrap"

  • Added: pmd_loop_length info tag.
  • Added: Seeking to a position in the current song.
  • Added: Loop playing with or without fading.
  • Improved: Loading and scanning a file.
  • Improved: Removed dependency on PMDWin.dll.
  • Fixed: Files with Unicode filenames failed to load.
  • Fixed: Wrong specification of source buffer size.

v0.1.0, 2023-07-09, "Scratchin' the itch"

  • Initial release.

Acknowledgements / Credits

  • Peter Pawlowski for the foobar2000 audio player. foobar2000
  • C60 for PMDWin a library to render PMD files to PCM.
    • The PMD driver is a heavily modified version of PMDWin 0.52.
  • Aaron Giles for ymfm.

Reference Material

foobar2000

Windows User Interface

Professional Music Driver

Music Macro Language

Songs

Various

Links

License

License: MIT