https://github.com/b0ney/mmp-remap
Python script to remap resources in lmms project files (WIP)
https://github.com/b0ney/mmp-remap
Last synced: 4 months ago
JSON representation
Python script to remap resources in lmms project files (WIP)
- Host: GitHub
- URL: https://github.com/b0ney/mmp-remap
- Owner: B0ney
- License: mpl-2.0
- Created: 2023-11-03T20:48:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-13T12:44:52.000Z (about 2 years ago)
- Last Synced: 2025-02-23T17:30:02.895Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CLI tool to re-map paths in LMMS projects.
**Note**: You cannot edit resources of individual instruments.
# Requirements
* Python
# Recommended
* LMMS installed and configured.
# Resources that can be re-mapped:
* Audio - ``wav``, ``ogg``, ``mp3``, ``flac``, ``aiff``, ``ds``, ``spx``, ``voc``, ``aif``, ``au``
- AudioFileProcessor
- Sample Clip
- SlicerT
* Soundfonts - ``.sf2``, ``.sf3``
- SF2 Player
* VSTs - ``.dll``, ``.exe``, ``.so``
- Vestige
# How to Use
First list out the resources:
```shell
python mmpa.py ./project.mmpz list
```
Use the information provided from that output to determine what resource to remap.
There are 2 ways resources can be re-mapped:
* With string matching
* With fancy regular expressions
### Re-map with an Index
The simplest method if you don't want to re-map that many resources.
First we list out the instruments:
```shell
python ./mmpa.py ./test.mmpz list
```
```
INFO: Listing all resources and its references
[1] drums/snare01.ogg
1 - REFERENCE
[2] drums/bassdrum_acoustic01.ogg
1 - REFERENCE
[3] drums/hihat_foot_pedal01.ogg
1 - REFERENCE
[4] drums/kick_hard01.ogg
1 - REFERENCE
```
```shell
python mmpa.py ./test.mmpz idx 1 "drums/hihat_foot_pedal01.ogg" -o "test2.mmpz"
```
### Match based re-mapping
Might be all you need when re-mapping multiple resources.
```shell
python mmpa.py ./test.mmpz match "C:\Users\Bob\Documents\LMMS\samples\" "usersample:" -o "test2.mmpz"
```
### Regex based re-mapping
Very advanced
```shell
TODO
```
## CLI args
| Short | Long | Description |
|-|-|-|
|-c| --config | Override LMMS' default configuration path. |
## Subcommands
When you need to do something quick and dirty.
| Long | Description |
|-|-|
| match | Re-map project resources with simple string matching. |
| re | Re-map project resources with regular expresessions. |
| -o/--out | Specify the output file (when using the commands above).
(adding ``.mmpz`` will compress the project)|
|list| List all of the resources and its associated instruments.|
# Compatibility
Should work across nearly all LMMS versions
Tested with python 3.8