made another example to test playing audio from actual raw audio files.

input format:

  • headerless
  • mono audio
  • IEEE 32bit single precision float
  • must already have the samplerate jackd will be using when playing

see jack_example_rawPCM.moon

was actually pretty easy after I found out where my pointer calculations were messed up and that I was accidentally dealing with stereo input data all the time. also, I like how LuaJIT lets you just cast a whole binary file into a float pointer…


next I'll try to get some code to resample on the fly, then I'll start with the actual modular program, so any new features can be just dropped in as moonscript modules.

More submissions by nonchip for Code @Home

today I implemented a JACK client moonscript class for my audio player, that allows for really easy usage of the jack api.

see the usage example there: jack_class_test.moon

this will make interfacing with the audio system really easy, so I can focus on doing playlist management and codecs next.

"Yet Another Better Audio PLAYER". trying to build a music player that does all the things I'm missing from the ones I've used so far (and the best of those they did).

Some key features it'll have:

  • Moonscript and LuaJIT based
  • makes annoying noise sound via JACK.
  • modular design (need some sound effect / audio codec / "intelligent" playlist provider that guesses the next track based on alcohol levels and annoyed shouts measured by an arduino? write a Moonscript class.)


What I've got so far:

  • libjack bindings for Moonscript
    • ported the "simple client example" to Moonscript
    • wrote a 440Hz sine wave example
  • github repo: nonchip/yabaplayer
  • this post

Code @Home

Work on a Home Project each day

daily from 2015-01-26 to 2015-12-31