No project description provided
Project description
XMODITS python library
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 <venv>/bin/activate
install maturin (crates.io) or from pipi
run test library:
maturin develop
API (In progress)
Dump samples to a folder
import xmodits
# dump samples to "samples/"
tracker = "mods/music.xm"
folder = "samples/"
xmodits.dump(tracker, folder)
This produces the following output in folder "samples":
01 - hihat.wav
02 - kick.wav
03 - snare.wav
04 - toms.wav
...
15 - vocal.wav
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 modulse to the same folder, you're guaranteed to have collisions.
You should include the parameter:
with_folder=True
It will produce a new folder within the destination folder
Required Arguments
Argument | Meaning |
---|---|
Path |
Path to a tracker module |
Destination |
Destination folder for dumped samples |
Additional Arguments
Argument | Meaning |
---|---|
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 |
Sample number will be identical |
Exceptions
They're pretty much self explanitory.
Exception | Meaning |
---|---|
SampleExtractionError |
xmodits could not rip a sample. |
UnsupportedFormatError |
|
InvalidModuleError |
|
EmptyModuleError |
The tracker module is valid but it has no samples! |
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
Built Distributions
Hashes for xmodits_py-0.1.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faadd1d9d31740ae3bb4d73ae756b63affd70a634a1567a1f42a80ee4cf461a6 |
|
MD5 | a2c9a126e42412ce9bb4c2f85aed29b3 |
|
BLAKE2b-256 | b6c52025de204d5711d15ca34e2e605655233e789c5bbb8b6ec2b2014a8f69cf |
Hashes for xmodits_py-0.1.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 929b59cd6fb7370c14d5df61312f49334ac62907ddda3ca9afd95996c1464601 |
|
MD5 | 286007f753fbc523411dbe9ec700d281 |
|
BLAKE2b-256 | fc58c6d17f114c3ed5a0efe6235a3fe10d4c26295f872e39c2d0734c798d57a2 |
Hashes for xmodits_py-0.1.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfc9afbd9dc80e4af62f234f0faaa93568f849f71e6df41d9ecca228eb1ce7e8 |
|
MD5 | 802f683b7c0d93a00761f7c64002375e |
|
BLAKE2b-256 | 27ca0e320b6b2e737dc9cb300d1c7a4ed3d2322da6d97723989590f47b80c004 |
Hashes for xmodits_py-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f136540790ea84485ea638e24e12c1a910ca71bdef6940c8b1a53f3b63762de5 |
|
MD5 | f13ceab70b497fe62443c4e6d60ce1c3 |
|
BLAKE2b-256 | 7baefb435fcba7c981298c705dc51bd3e11e7666593d5e736d25c7134a7781d9 |
Hashes for xmodits_py-0.1.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b8ce0dc9c4766e342effa6af26b27179ab0c7c96ae09202887df0a43ecc6ca |
|
MD5 | 1463b7852cbeb70db64031a55ae5eaf2 |
|
BLAKE2b-256 | c80f3d61a6b0a78f0b0cb514c3ca170fa74a705bdc25b22541fd7bfcb214dd7b |
Hashes for xmodits_py-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1f7279aedab17c10cba751045e1aa6490fef6dd49e2304c2973b313f23d4279 |
|
MD5 | 0ae253583daba45e1af5c127043199ba |
|
BLAKE2b-256 | 0565b15a3851ad10f3d83065beac855d0392c1361ef212d31d707e1f78384241 |
Hashes for xmodits_py-0.1.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e15dd7a92970478723baba65be6c3748255a42c6a162b872fe2cd36fee5a50 |
|
MD5 | 88005b54a6a1e1743e2e0c0841ed7da7 |
|
BLAKE2b-256 | ecec698e1877ee86094ac216c83a16dee82847299faadde3cdc1ad2c15300331 |
Hashes for xmodits_py-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 723beabcbbf200fc385ac146a0241841af522bffc5e1a5bd6b722b46c50a60bb |
|
MD5 | f9e2e4105cf80fa584625edc0d62136d |
|
BLAKE2b-256 | 757e1aababc5104efb4ab40f8586653dc92979039e7863c94e7eb4b759499dfd |
Hashes for xmodits_py-0.1.0-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a39a28143a2cc2bbbee81219e5b9ebb63d56ab78305bd2ede8a20ba1874b74a |
|
MD5 | e11551b5ddd98ce6954ca3069dd40bb8 |
|
BLAKE2b-256 | f1e3864b14d89afca5bec00ac9aba822703b4173d3fc61ba65893c3a5c5b78ac |
Hashes for xmodits_py-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48c7a465f9dd13fa8a8047d38ca1adc965f2adf1f68d5debeb8249bb40d39596 |
|
MD5 | 067d8f0a88acd82c87972b2495752202 |
|
BLAKE2b-256 | a59675400b865a9f91da3026f9581c57013fb2ee9689f2a94bfd327fb662fbb9 |