Extract samples from tracker modules. Supports IT, XM, S3M, MOD, UMX, MPTM
Project description
XMODITS python library
Supported formats:
- Impulse Tracker .IT
- Extended Module .XM
- Scream Tracker .S3M
- Amiga Pro Tracker .MOD
- Open ModPlug Tracker .MPTM (Identical to Impulse Tracker sample-wise)
- Unreal Music Container .UMX (Containing the above formats)
How to use
import xmodits
file = "~/Downloads/music.xm"
folder = "~/Music/samples/"
# Rip samples to folder
xmodits.dump(file, folder)
Required Arguments
Argument | Meaning |
---|---|
Path |
Path to a tracker module |
Destination |
Destination folder for ripped samples |
Additional Arguments
Argument | Definition |
---|---|
with_folder |
Create a new folder for ripped samples. e.g. When set to True , "drums.it" will create "drums_it" in the destination folder and place those samples there. |
index_padding |
Set padding. e.g. "01 - kick.wav" --> "1 - kick.wav" |
index_only |
Only name samples with a number. e.g. "09 - HiHat.wav" --> "09.wav" |
index_raw |
Preserves the internal sample indexing |
upper |
Name samples in upper case |
lower |
Name samples in lower case |
strict |
Enabled by default. Will reject files that don't match the following file extensions: [it, xm, s3m, mod, umx, mptm] |
Exceptions
They are pretty much self explanitory.
Exception | Meaning |
---|---|
SampleExtraction |
A sample could not be extracted |
PartialExtraction |
Not all of the samples could be extracted |
TotalExtraction |
None of the samples could be extracted |
UnsupportedFormat |
A module format was recognized, but its type is not supported |
InvalidModule |
The file is not a valid tracker module |
EmptyModule |
The tracker module is valid but it has no samples |
UnrecognizedFileExtension |
The file extension was not recognized |
NoFormatFound |
Could not determine a valid format |
Additional Examples
Dump samples without names
import xmodits
tracker = "mods/music.xm"
folder = "samples/"
xmodits.dump(
tracker,
folder,
index_only=True
)
This produces the following output in folder "samples":
01.wav
02.wav
03.wav
04.wav
...
15 - vocal.wav
Dump samples without padding the index:
import xmodits
tracker = "mods/music.xm"
folder = "samples/"
xmodits.dump(
tracker,
folder,
index_padding=0 # or 1, both have the same effect
)
Output:
1 - hihat.wav
2 - kick.wav
3 - snare.wav
4 - toms.wav
...
15 - vocal.wav
Samples stored in tracker modules can have an arbitary index. If you prefer to use this index, include the parameter:
index_raw=True
If you're dumping from multiple modules to the same folder, you're guaranteed to have collisions.
You should include the parameter:
with_folder=True
development:
https://docs.python.org/3/library/venv.html
Create a python virtual environment in this directory:
python -m venv dev
activate virtual environment:
source ./dev/bin/activate
install maturin (crates.io) or from pipi
run test library:
maturin develop
License
The xmodits python library is licensed under the LGPLv3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file xmodits_py-0.3.2.tar.gz
.
File metadata
- Download URL: xmodits_py-0.3.2.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1020601fc9b182f136cee4be6ef4d4d80d86acfd1c117e994330ed80a75c9989 |
|
MD5 | bb12c39b911497f47311cd59e6622606 |
|
BLAKE2b-256 | 2d9cb65af5e82513a17bad0d3385c58261b74ed31c0f8d0c5ad055f9024c1134 |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 198.5 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40d82bcb7f0036fd35cfff445266673fcd1fedecb1e2c7849f4b9f2abd28762e |
|
MD5 | f02af7214a84741f8a9939568afed8c5 |
|
BLAKE2b-256 | 4a019dd601adacccf972acc4676a0a52b2c10f111d00e89122d7d6f0a3011fd9 |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-win32.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-win32.whl
- Upload date:
- Size: 188.8 kB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da67e6f5347998fa5e43a4cf230def83b335a5fe87ce4fc21a7406eeb900209 |
|
MD5 | 0b16f6b3836ee607b33d6f4fd47978d3 |
|
BLAKE2b-256 | ef296fcfaf83ac4972924150e255b5109834b94b13de093f2119482eacfd99b2 |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 270.0 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc24ad66361edbefa5184bc6d02e48645020a5788ba11a0066daffb69f8e8226 |
|
MD5 | 99232d9a5e9e83f20354d963fbdef4fd |
|
BLAKE2b-256 | 32b6294eaa3a68c609438b3ec840387fa92ae3cfacc7d1050007bb718000437f |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 263.2 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 427199baf4b72b5bdc470c813e67a38273b3c93d804318dc172a7ca4a164b4c5 |
|
MD5 | df4e052a5005fae9c2909bd7220ca763 |
|
BLAKE2b-256 | 33ad38a5b64e2d1642b765098196181ceb642c0b5da89269984c526013479e1c |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 254.5 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c49a7fa8d48a0044b3a47b76f794f8e1c6a75cc4c72830164eb4ca519dfeada9 |
|
MD5 | 04c597e025d234b422e773e777585837 |
|
BLAKE2b-256 | b5c55bbefd0fa9f13d0d881e2841e6bc6bd982b4125a32f149af8fee2b191e64 |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfc7a1d304475f25d9a9fd1f51a76e5f5ce0a9a90a802ba9e49223e1fa3a694b |
|
MD5 | 901a9be50a30d72003db16260ed0d221 |
|
BLAKE2b-256 | 41f815aaad0028d534c7a6c9fb91caab9d9cf00267e5c1608a9cf211d62b158e |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 242.4 kB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cb57fdfe7bfff40e34b0ba50cec5ba86afc1f73caad35f457d080046ced112b |
|
MD5 | 0a16225174bbbd369191a85d606d4482 |
|
BLAKE2b-256 | 28742aeee8e7f8fa0882d434fc3d2369a72529d574958a0e17307e84237e5b18 |
File details
Details for the file xmodits_py-0.3.2-cp37-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: xmodits_py-0.3.2-cp37-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 251.9 kB
- Tags: CPython 3.7+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adfe6fd37f8decc539f866dfb06cc3d3c157d68df97c46a105b6c4579c1c7b67 |
|
MD5 | 97d9b20c76dc2c96c41950db83947619 |
|
BLAKE2b-256 | daa51aa5170a7d04972cc68234489af997c825c80d240a3185cf3d9cbce62357 |