Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xmodits_py-0.2.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distributions

xmodits_py-0.2.1-cp37-abi3-win_amd64.whl (158.4 kB view details)

Uploaded CPython 3.7+Windows x86-64

xmodits_py-0.2.1-cp37-abi3-win32.whl (155.0 kB view details)

Uploaded CPython 3.7+Windows x86

xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (216.6 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (211.7 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARMv7l

xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (204.7 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ ARM64

xmodits_py-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (231.6 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.5+ i686

xmodits_py-0.2.1-cp37-abi3-macosx_11_0_arm64.whl (199.8 kB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

xmodits_py-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl (212.9 kB view details)

Uploaded CPython 3.7+macOS 10.7+ x86-64

File details

Details for the file xmodits_py-0.2.1.tar.gz.

File metadata

  • Download URL: xmodits_py-0.2.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for xmodits_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5b603dc46d8aaa094ee731ac1e0ae84c6b5fba75c4a56bc99b1e1a3ec9fc63b4
MD5 8c013d19fee74a04bf357f8498680b58
BLAKE2b-256 99089b86b669c425af5a1958afe47a92b9a098eb5fd5472bfef3b81cf7cc2785

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: xmodits_py-0.2.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 158.4 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 18cb931908a3945e80917a2b380e5fee0b861af475cd35c0f8df07dcc0275395
MD5 384fb2f9d70af3eab3bc140229d4f058
BLAKE2b-256 b533e6d840b8cb8349c1099d9bbb2868f92965bbffd5baeea8e0662b42c6d8fb

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-win32.whl.

File metadata

  • Download URL: xmodits_py-0.2.1-cp37-abi3-win32.whl
  • Upload date:
  • Size: 155.0 kB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 2561092042156aece703b432db8569de981ec7e5e19fb0b02fbc62d31728c08d
MD5 4e08f63776abad71e7b561c352565f5a
BLAKE2b-256 e429f1dc9ba088ed02b1453b809d5cc99493d26478db2061e70ab06a0d703888

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9112ade28f07bd4d8e2c6e693613623bcce7539a0849ad814afd0616a0922c2
MD5 e5b6949d18dc96d38696b4ad95f87fc8
BLAKE2b-256 8ba513d171511b0612c034797fcdd4d6ec91fe50503edd1f2327452a2e74541c

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b0b10a7116dac9b2b2499e2f82c04424be23b97f411dae8786e8774f6e0dc9dc
MD5 7134ac0a7a5189c6b79fcc20e185e51a
BLAKE2b-256 513ec8e41acf114ad48e863ad1f3c0191177ccddc81beef810cf7d2333d99f1b

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 aa64330921497537cc6c62054488561de7fb010af9be650e868a0f7258e37c90
MD5 db1020fbc56373fb3a6421e0d536d6f6
BLAKE2b-256 92691e65527e8a3c7b9f2c271c4dadec3bf633884a064a83591b3d6c36d7cf7d

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 5380d5f605f7c32188bfe92d3d44ef6bedb1dbe79bccd37a22322c2c2b69f9ff
MD5 94bcaca484ffaacbf7892a3dbac53d60
BLAKE2b-256 8b6f8c4b97e1f2c235063e26a96cf1b3c40fec4fc3bd1a9f4f5315f8aeea4170

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa09f6bb82806fb34874b1034a097f37fedbc31f00e7f25b31e654d08cee8044
MD5 5ec7ba4c0f669c771d83453be33125f6
BLAKE2b-256 eaf956dfb01ab6a26393502d26b99a993c6ca10a9552b30d9c93c7034b57e199

See more details on using hashes here.

File details

Details for the file xmodits_py-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for xmodits_py-0.2.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 4e52b45f77cfed860aae50da8b17e7edeabcbc089a0bcc906028337f8f2d5d5d
MD5 cbb4872b50d9f375f9e264ef859fd465
BLAKE2b-256 1621842a874a8430210f789f8ad8fafb19e34e2c0950a4cc6934e4a1d5d3397a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page