An open API service indexing awesome lists of open source software.

https://github.com/konsumer/lua-openmpt

Libopenmpt ffi wrapper for loading & playing mod-music file in luajit or love2d.
https://github.com/konsumer/lua-openmpt

Last synced: 5 months ago
JSON representation

Libopenmpt ffi wrapper for loading & playing mod-music file in luajit or love2d.

Awesome Lists containing this project

README

          

# lua-openmpt

This is a lua wrapper for [libopenmpt](https://lib.openmpt.org/libopenmpt/). It will allow you to parse and play various mod files in luajit or love2d.

## usage

Copy [openmpt.lua](openmpt.lua) into your project.

Examples:

* [main.lua](main.lua) is a love2d player example. You can test with `love .`
* [info.lua](info.lua) shows how to use it in luajit, with a real filepath. Run `luajit info.lua` to try it out.

### linux

On Ubuntu 20.04, I ran `sudo apt install luajit libopenmpt-dev`.

### mac

I ran `brew install luajit libopenmpt` and for love-demos, needed to unsign the love-runtime:

```
codesign --remove-signature /Applications/love.app/Contents/MacOS/love
```