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.

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7mWindows x86-64

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

Uploaded CPython 3.7mWindows x86

File details

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

File metadata

  • Download URL: libxmplite-1.0.tar.gz
  • Upload date:
  • Size: 8.2 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.0.tar.gz
Algorithm Hash digest
SHA256 1e5389069e3c8b209967e1b422c5d214564a6632892031855b80335789c0f9c7
MD5 bd481d9b2320498a713bf127d6e695ad
BLAKE2b-256 8915777fa02232be783084f0299544e173e6fc9220af47e2c8504aeac2a7d47d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libxmplite-1.0-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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 55a2e488e9b1d4bdf5e40465ad91f45106710bf7c779d4755194eb7becf3899c
MD5 8679a8825c48b9de5c247004620a032e
BLAKE2b-256 bc711241f6fdf9bc38a1636a26be200e474e92258088c813e2840aa97a4f1c25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libxmplite-1.0-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.0-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2ce577c7099dda0cfde8af8a16e749496b4908805a98b05f93f0f89ef4e7917a
MD5 fd3b225cc06867a7d9ac66da14602300
BLAKE2b-256 32b71782af3f771662954ecc66a8d150978fbfb7f1861dce89392d15352ee90c

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