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.3.tar.gz (213.1 kB view details)

Uploaded Source

Built Distributions

libxmplite-1.3-cp37-cp37m-win_amd64.whl (86.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

libxmplite-1.3-cp37-cp37m-win32.whl (74.9 kB view details)

Uploaded CPython 3.7m Windows x86

libxmplite-1.3-cp37-cp37m-linux_armv7l.whl (126.0 kB view details)

Uploaded CPython 3.7m

File details

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

File metadata

  • Download URL: libxmplite-1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 00c1b9ac0b979d4477faa1ba677b152a02a3fc871bfb7e2cce978c3e0f8be666
MD5 a401abbbcb7d16b384002840ba533bbd
BLAKE2b-256 a4b56af02b4bac219718a4d714fa09d513db1c7131d4728605a2dce451135ecb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libxmplite-1.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 86.5 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.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 222d4e54fd89789b09b28d33e2a7a9918aeaff8cd5912e498be2091d233c10ba
MD5 24991c79826aa25ee5cade751c3fc1b9
BLAKE2b-256 414227db40d8f2889fba87a4d25fb2b2a136e41f348e695cda630890775f7bc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libxmplite-1.3-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 74.9 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.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 3e8915cd6c077b95143d5616d4d123170445e2b47b5ed0fd91b2d9ea64f554e5
MD5 d8bdfc5b1cfb49452e31672b60c4b526
BLAKE2b-256 971afe37b5aa49bb8c65297f1881f1f5e7d1c99e048c1ee8e02eefdeadec3d5e

See more details on using hashes here.

File details

Details for the file libxmplite-1.3-cp37-cp37m-linux_armv7l.whl.

File metadata

  • Download URL: libxmplite-1.3-cp37-cp37m-linux_armv7l.whl
  • Upload date:
  • Size: 126.0 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16

File hashes

Hashes for libxmplite-1.3-cp37-cp37m-linux_armv7l.whl
Algorithm Hash digest
SHA256 210f7afaeaee496a7ef30301b83c052f4e00496c09145843df1e9a720b80d79f
MD5 1c079f563f01afa539360e28b5e04230
BLAKE2b-256 48815339725ab5da45f6b1d0fe26e30c1be24c74f5ba1d876ba22b82851f935d

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