Skip to main content

python bindings for the libxmp-lite modplayer library (protracker, screamtracker, ...)

Project description

saythanks Latest Version

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


Download files

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

Source Distribution

libxmplite-1.1.tar.gz (213.1 kB view details)

Uploaded Source

Built Distributions

libxmplite-1.1-cp37-cp37m-win_amd64.whl (86.4 kB view details)

Uploaded CPython 3.7mWindows x86-64

libxmplite-1.1-cp37-cp37m-win32.whl (74.8 kB view details)

Uploaded CPython 3.7mWindows x86

File details

Details for the file libxmplite-1.1.tar.gz.

File metadata

  • Download URL: libxmplite-1.1.tar.gz
  • Upload date:
  • Size: 213.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for libxmplite-1.1.tar.gz
Algorithm Hash digest
SHA256 f857591450d0ae841dfb4fe74d5a01335f54e060a057546dc375fac5a9c13406
MD5 181b248dc88cd6d1d66f1a554853403a
BLAKE2b-256 c7db5b6579d79597725cf7baadf38026fdef21cf47fe9c4a49f497f2a6acf602

See more details on using hashes here.

File details

Details for the file libxmplite-1.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: libxmplite-1.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 86.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for libxmplite-1.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8f3b264691f061bd769c66921e36d2f6e25f9fe72f8c403b342ae34bb225d4a9
MD5 9a9a4d672481dc368a32cf2f02bf5ea4
BLAKE2b-256 2cc8763cdc2690935c6ef2a8e5b619f6f2b560d5c4bdb6b8eca2b7310c5a836c

See more details on using hashes here.

File details

Details for the file libxmplite-1.1-cp37-cp37m-win32.whl.

File metadata

  • Download URL: libxmplite-1.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 74.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for libxmplite-1.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 480f2185e7acf9c3c932b8a84ddf67dce1b3bb974664904eddcd5a5899f84faf
MD5 a327175762ccd0403254a46b7e087e9f
BLAKE2b-256 58f47e6dc59a6424f20e0e44d35027b1dfeac01f60e91c49c3efabeb281d7e19

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