Skip to main content

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 arbitrary 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 pypi

run test library:

maturin develop

License

The xmodits python library is licensed under the LGPLv3

Release files for xmodits-py 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xmodits-py 0.3.5
File Size Uploaded
xmodits_py-0.3.5.tar.gz 25.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for xmodits-py 0.3.5
File
xmodits_py-0.3.5-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
xmodits_py-0.3.5-cp37-abi3-win32.whl CPython 3.7 abi3 Windows x86-32 Details
xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.7 abi3 Linux glibc 2.17+ ARMv7l Details
xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details
xmodits_py-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.7 abi3 Linux glibc 2.5+ x86-32 Details
xmodits_py-0.3.5-cp37-abi3-macosx_11_0_arm64.whl CPython 3.7 abi3 macOS 11.0+ ARM64 Details
xmodits_py-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl CPython 3.7 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.9 MB

Release files / xmodits_py-0.3.5.tar.gz

Download URL xmodits_py-0.3.5.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f9d5489af6c216ca9da55bb06c34837800e7bc43b011a347597c703ff9767b51
BLAKE2b-256 checksum
How to use checksums
8740424baab8a35359a468d34eb07ce6dff8758ec5ec488a098473b366e2fa09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-win_amd64.whl

Download URL xmodits_py-0.3.5-cp37-abi3-win_amd64.whl
Size 189.3 kB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bee3c483e29c660870e1ed439b980fdb285331fca6f44421b1ad01f68d385451
BLAKE2b-256 checksum
How to use checksums
bc2ce8b26d72ac1fce5a3a4b0f40825a61ffdbec55b408e8b89cd03ae7c60cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-win32.whl

Download URL xmodits_py-0.3.5-cp37-abi3-win32.whl
Size 177.9 kB
Tags CPython 3.7 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
f5c16b752338a0dbc8f7011da27ec705104c03bf68f5594d54ca5b9306f6e4c8
BLAKE2b-256 checksum
How to use checksums
04955918a946e922b8b4519daa93dff2b29d08b8f3953d758dbc3b8cfcb6e00c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 261.0 kB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
275bc025752cfc2093a716fc647e8a167658b89025e193428f08ec0cb328f211
BLAKE2b-256 checksum
How to use checksums
d7377cd625edacb2ca240dcacccd1a8677cad7fa5d6eca105dc8634b875c9302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 252.8 kB
Tags CPython 3.7 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
db6b0d796ab48a09175e67b1268b0e61d5e32c9fef9fd18ba38b5822fa9b01e8
BLAKE2b-256 checksum
How to use checksums
6d10b000a8667f5eb7d0216dff9f0a2543995c9b7ccc3d8f8eb5ca6b7e9a33e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL xmodits_py-0.3.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 246.2 kB
Tags CPython 3.7 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
dfb12cb9289587ad8e706aa69a7a73131e4ca2e2ee9b954166be315460648279
BLAKE2b-256 checksum
How to use checksums
1caab7c6a6c4ac80fa4ded014c91f27e421dd137fb7f6f468d5f14a558f8e33d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL xmodits_py-0.3.5-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 267.9 kB
Tags CPython 3.7 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
28b680bb420e9416b4537898978c2aadeba7671a586f3671250d1018eb7d5112
BLAKE2b-256 checksum
How to use checksums
93be1e4d693f85084013fe10a80b10c52aea49c7e393f278fc95efe15fc31a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-macosx_11_0_arm64.whl

Download URL xmodits_py-0.3.5-cp37-abi3-macosx_11_0_arm64.whl
Size 234.7 kB
Tags CPython 3.7 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3b14e9252aae311d0399f316d9bae5d3b64e3e70a2dd1a772b19fe882a553034
BLAKE2b-256 checksum
How to use checksums
70bc833e848f8aac09ca2b54caabc3334d99a09cebcea0e2994212907341e98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / xmodits_py-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl

Download URL xmodits_py-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl
Size 244.3 kB
Tags CPython 3.7 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
aa1ccde473a7eb3aaa2e3ce850275a4ed289556947d38cf8f6b0365894c91724
BLAKE2b-256 checksum
How to use checksums
1b858120ba01bada6750a593a6d974497c1f5077ca097c2aa302414115993fc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release history Release notifications | RSS feed

This release

0.3.5 This release

9 release files

0.3.4

9 release files

0.3.2

9 release files

0.3.1

9 release files

0.3.0

9 release files

0.2.4

9 release files

0.2.3

9 release files

0.2.2

9 release files

0.2.1

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page