Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: key schemes: proof of concept
From: Philipp Pertermann (philipp.pertermann_at_web.de)
Date: 2002-10-02


As I am to stupid for mailing here it comes again.
--------------------------------------------------------

Show you the code? You want me to show you code?! Here you
get some code!! Player users: you loose again for the moment
as I only own a recorder...

This is a first throw of the core engine for user assignable
keys. Note that it is only the engine. There's no text file
parsing yet. Neither there is a pearl script or something
equivalent that generates source files with the available
commands. That's the two things that have to be done. After
that we 'only' have to adapt the rest of the code where
button handling still is hard coded and make a working
factory preset for all that.

To demonstrate the functionality I chose a new little tool I
always wanted to have: a gui for splitting mp3 files.
No, we can't split files yet since we don't have file
writing and the split editor still has its problems. So just
see it as an example here.

How it works:
While a song is playing select the menu entry 'split editor'
from the main menu (It doesn't belong there and won't be
there in any official rockbox version).

play button: hit it to pause / resume playback
play button: hold it to reset pitch
left / right button: move around the split point cursor
up / down : zoom the osci
on + right: 150% pitch
on + left: 50% pitch
F2: toggle between three playback modes:
    - loop from the split point
    - loop to the split point
    - loop over the split point
off: quit the split editor

All these key bindings are done just as if the were read
from a file. I am convinced that this prooves that the
mechanism is flexible and once we have the real file format
and the real mechanism for generating the command lists you
will notice that they are fairly simple to use for both, the
programmers and the consumers.

With these key schemes two other things are gained: Now it's
incredibly simple to make user definable menus and we can
define macros that execute servaral commands with only one
button click. That could be used eg for one-touch equalizer
presets, etc

So don't you cry "Show me the code"!

Phil

P.S.: apply the patch, the split_editor.* belongs in
apps/recorder, all other files go to apps















  • application/octet-stream attachment: apps.diff



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa