High there~
Made a Lua binding for SunVox library, mainly for fun with love2d game engine, but it can be used with INSTEAD and other engines with realtime audio generation support as well, I guess.
API is a little bit Lua-ified (prefix "sv_" was removed because functions are namespaced, flags were replaced with parameter tables).
Tested on Linux, also cross-compiled Windows version and tested it in Wine.
Not everything may work as expected right now, though demo I made for love2d seem to work.
Source code (MIT-licensed): https://github.com/Penguinum/luavox
love2d demo (plays SunVox file)
Lua binding for SunVox library
- NightRadio
- Site Admin
- Posts: 3955
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: Lua binding for SunVox library
Cool! Thank you!
- AutumnCheney
- Posts: 507
- Joined: Sun Dec 29, 2019 8:16 am
- Location: tahlequah, ok, usa
- Contact:
Re: Lua binding for SunVox library
really cool! i can see this coming in handy for a minetest mod i'm planning that provides generative music
-
- Posts: 5
- Joined: Mon Jan 04, 2021 7:40 pm
Re: Lua binding for SunVox library
I doubt Minetest has ability to play generated audio from Lua. It didn't have it before and I couldn't find any mentions of it now.
Re: Lua binding for SunVox library
hey really cool library! (love2d newb here)
i'm struggling with lv.get_pattern_data(), i would like to read note data from patterns but the function seems to return a raw C byte array and i don't know how to parse this in love2d. tried adapting the library java/JS example but this does not work. do you think this is possible with lua/love2d? thanks
edit: also lv.play() doesn't react on the second argument, ie. line to start from. i tried to adapt luavox.c but cannot get luavox to build using msys2 (bunch of undefined reference errors while linking)
i'm struggling with lv.get_pattern_data(), i would like to read note data from patterns but the function seems to return a raw C byte array and i don't know how to parse this in love2d. tried adapting the library java/JS example but this does not work. do you think this is possible with lua/love2d? thanks
edit: also lv.play() doesn't react on the second argument, ie. line to start from. i tried to adapt luavox.c but cannot get luavox to build using msys2 (bunch of undefined reference errors while linking)