Chapter 12. Plugins
123
12.3.5. Lua scripting language
To quote from the Lua website (
), Lua is a “powerful, fast, lightweight,
embeddable scripting language”. Select a
.lua
file in the
File Browser
to run it. For
more information on programming in Lua, please see
http://www.lua.org/manual/5.1/
and
There are a few exceptions/additions to the Lua support in Rockbox:
No floating point support.
The number type in Lua is usually float, however in the
Rockbox implementation it is integer.
Non-supported libraries.
The coroutine, debug and math libraries are not supported.
Partially-supported libraries.
The os and package libraries are only partially supported.
Additional libraries.
The bitlib library is integrated to support bitwise operators. See
http://luaforge.net/projects/bitlib
and
http://lua-users.org/wiki/BitwiseOperators
Documentation of the API is still a work in progress, and the API itself is not finalised.
For the latest information, see
Note:
Please note that if a script does not provide a way to exit, then the only way to
b
exit will be to reset the player.
12.3.6. Midiplay
To get MIDI file playback, a patchset is required. This file contains the instruments
required to synthesize the music. A sample patchset is available through the wiki at
, and needs to be extracted to the
.rockbox
directory in the root of
your player. There should now be a
/.rockbox/patchset/
directory, with the patchset
directory containing several
.pat
files and two
.cfg
files. Just select a MIDI file with
either the
.mid
or
.midi
extension in the file browser to start playback.
Key
Action
Volume Up
/
Volume Down
Volume up/ Volume down
Right
/
Left
Skip 3 seconds forward/ backward
Play
Pause/Resume playback
Power
Stop playback and quit
The Rockbox manual
(version 3.14)
Sansa Clip v2