Support and General Use > Plugins/Viewers

Sequencer functions in Lua?

(1/2) > >>

I'd like to build a small sequencer plugin in Lua but I'm having a hard time finding the functions needed. I've been digging through the source and documentation without any luck. I'm fairly new to developing for Rockbox so I may be overlooking something. I have a couple of questions and any help would be much appreciated:

1. Is there a way to playback 2 or more audio files at the same time? I noticed a few mixer functions but not sure if those could be used.

2. Is there any way to access the midi plugin functions in Lua (like synth - initSynth)? I noticed there is a "beep_play" function for generating a square wave but it seems pretty basic and doesn't look to support polyphony.

It would be great to do something in the spirit of the beatbox.c plugin that was abandoned several years ago. Also, if I'm missing documentation any help be great there too. I've just been using along with the source. The graphics API seem pretty well documented so I don't think I'll have issues there.


Most of the Mixer functions haven't been broken out

I'm not sure if lua is fast enough to keep the buffers fed.. maybe

Playback of audio files is pretty limited as well I just recently got that working, but there is definitely no way to get two to play as of right now

Feel free to add functions as you see fit just be aware the more ram used for functions the less ram to actually run programs with
--Also be aware after you hit the *limit* playback is stopped so lua can use its buffer as ram as well

RB functions aren't able to be called directly from lua they have to go through a translation layer first <--

*limit* differs between targets

Thanks for the reply @Bilgus!

Good info to know. Merging 2 audio files in Lua unlikely too?

Realtime mixing is only feasible from native code (i.e. C).

That makes sense @__builtin

I guess this type of app would best be developed in C instead of Lua. Might just be worthwhile picking up where the beatbox.c plugin left off.


[0] Message Index

[#] Next page

Go to full version