Skip to content

Commit

Permalink
v0.92: support PMS. fix MP3 keysounds not working in the RPP. update …
Browse files Browse the repository at this point in the history
…README.
  • Loading branch information
shockdude committed Nov 15, 2020
1 parent 2718021 commit 16c2c64
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# BMS to REAPER project (RPP) converter
Written by shockdude in Python 3.7 \
REAPER is property of Cockos Incorporated: https://www.reaper.fm/ \
Uses pydub: https://github.com/jiaaro/pydub
Convert BMS charts (also BME, BML, PMS, DTX) into REAPER projects.

Usage: `python bms_to_rpp.py chart_file.bms [output_file.rpp]` \
Or just drag-and-drop the chart onto `bms_to_rpp.py`
Usage: Drag-and-drop the chart onto `bms_to_rpp.py` \
Or use the command line: `python bms_to_rpp.py chart_file.bms [output_project.rpp]`

Supports WAV (PCM) keysounds. \
If your BMS does not include WAV keysounds, recommend converting them to WAV first. \
WAV keysounds recommended. \
If your BMS does not include WAV keysounds, convert them to WAV first. \
OGG/MP3 keysounds supported only if ffmpeg is installed, and processing will be very slow.

Supports BPMs, extended BPMs, measure lengths/time signatures, and STOPs. \
Negative BPMs untested. Other BMS features may not be implemented.

Major props to the BMS command memo: http://hitkey.nekokan.dyndns.info/cmds.htm
Written by shockdude in Python 3.7 \
REAPER is property of Cockos Incorporated: https://www.reaper.fm/ \
Uses pydub: https://github.com/jiaaro/pydub \
Major props to the BMS command memo: http://hitkey.nekokan.dyndns.info/cmds.htm \
Major props to the DTX data format spec: https://ja.osdn.net/projects/dtxmania/wiki/DTX%2520data%2520format
15 changes: 9 additions & 6 deletions bms_to_rpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

VERSION = "v0.9"
VERSION = "v0.92"

import sys
import os
Expand All @@ -37,17 +37,18 @@ def usage():
MP3_EXT = ".mp3"
RPP_EXT = ".rpp"

BMS_EXTS = (".bms", ".bme", ".bml")
BMS_EXTS = (".bms", ".bme", ".bml", ".pms")
DTX_EXT = ".dtx"

# measures per second = 240.0 / BPM
MPS_FACTOR = 240.0

# channel info
BMS_PLAYABLE_CHANNELS = ("01", "11", "12", "13", "14", "15", "16", "18", "19",
"21", "22", "23", "24", "25", "26", "28", "29",
"51", "52", "53", "54", "55", "56", "58", "59",
"61", "62", "63", "64", "65", "66", "68", "69")
BMS_PLAYABLE_CHANNELS = ("01",
"11", "12", "13", "14", "15", "16", "17", "18", "19",
"21", "22", "23", "24", "25", "26", "27", "28", "29",
"51", "52", "53", "54", "55", "56", "57", "58", "59",
"61", "62", "63", "64", "65", "66", "67", "68", "69")
DTX_DRUM_CHANNELS = ("11", "12", "13", "14", "15", "16", "17", "18", "19", "1A")
DTX_GUITAR_CHANNELS = ("20", "21", "22", "23", "24", "25", "26", "27")
DTX_BASS_CHANNELS = ("A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7")
Expand Down Expand Up @@ -647,6 +648,8 @@ def parse_keysounds(chart_file, out_file):
rpp_out.write("<SOURCE WAVE\n")
elif keysound_ext.lower() == OGG_EXT:
rpp_out.write("<SOURCE VORBIS\n")
elif keysound_ext.lower() == MP3_EXT:
rpp_out.write("<SOURCE MP3\n")
else:
# unknown audio type
rpp_out.write("<SOURCE\n")
Expand Down

0 comments on commit 16c2c64

Please sign in to comment.