python bindings for the libxmp-lite modplayer library (protracker, screamtracker, ...)
Project description
Python libxmp-lite modplayer
This module (pun intented) provides a Python interface to the libxmp-lite (a cut-down version of libxmp library. The libxmp-lite library is linked into the extenson module, no additional fiddling and installation is required.
Requires Python 3.5 or newer. Also works on pypy3 (because it uses cffi).
The library is primarily distributed in source form so you need a C compiler to build and install this (note: the setup script takes care of the actual compilation process, no need to worry about compiling things yourself). For Linux and Mac this shouldn't be a problem. For Windows users, if the correct binary install is not available on pypi, you'll have to get it to compile as well which may be a bit of a hassle on this platform. You have to make sure that the required tools that allow you to compile Python extension modules are installed (Visual Studio or the VC++ build tools).
Software license for these Python bindings: MIT
Software license for the libxmp library: LGPL
Example
Most basic mod decoding
import libxmplite
print("Supported module formats: ", libxmplite.get_formats())
xmp = libxmplite.Xmp()
xmp.load("amiga.mod")
xmp.start(44100)
info = xmp.module_info() # grab name, comment, number of patterns, ....
frame_info = xmp.play_frame()
# ... process the frame buffer bytes ...
# ... repeat until satisfied
xmp.release()
There's also a xmp.play_buffer()
method that is more suited to be integrated
into an async pull API. It's used in the "modplay" example (which utilizes my
other library, miniaudio, for sound playback).
There's also extensive documentation for the underlying libxmp API.
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
Hashes for libxmplite-1.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 222d4e54fd89789b09b28d33e2a7a9918aeaff8cd5912e498be2091d233c10ba |
|
MD5 | 24991c79826aa25ee5cade751c3fc1b9 |
|
BLAKE2b-256 | 414227db40d8f2889fba87a4d25fb2b2a136e41f348e695cda630890775f7bc5 |
Hashes for libxmplite-1.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e8915cd6c077b95143d5616d4d123170445e2b47b5ed0fd91b2d9ea64f554e5 |
|
MD5 | d8bdfc5b1cfb49452e31672b60c4b526 |
|
BLAKE2b-256 | 971afe37b5aa49bb8c65297f1881f1f5e7d1c99e048c1ee8e02eefdeadec3d5e |
Hashes for libxmplite-1.3-cp37-cp37m-linux_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 210f7afaeaee496a7ef30301b83c052f4e00496c09145843df1e9a720b80d79f |
|
MD5 | 1c079f563f01afa539360e28b5e04230 |
|
BLAKE2b-256 | 48815339725ab5da45f6b1d0fe26e30c1be24c74f5ba1d876ba22b82851f935d |