summaryrefslogtreecommitdiff
path: root/apps/plugins/metronome.c (follow)
Commit message (Collapse)AuthorAge
* YH8xx,YH9xx: Keymap improvementSebastian Leonhardt2015-11-15
| | | | | | | | | | | | | | | The main "innovation" in this patch are two "virtual buttons" for the record switch on YH92x targets. When the switch state changes, a single BUTTON_REC_SW_ON or .._OFF button event will be generated. Thus keymap code can react on switching, but not on the actual state of the switch. Wherever sensible, the following user scheme is applied: - use PLAY as confirm button - use REW button or Long REW to exit - use REC (YH820) or FFWD (YH92X) as modifier key for button combos Change-Id: Ic8d1db9cc6869daed8dda98990dfdf7f6fd5d5a1
* Enhancement of the metronome plugin:Thomas Orgis2015-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - square sine tick and tock sounds (more annoying, more useful;-) - optical indication of tics on display - unification of mode of operation for SWCODEC and HWCODEC (tested on simulator) Both playback and display drawing happen in main loop, always. - operating in two modes now: -- 1. classic dumb metronome --- active when openened as application without file to open --- the usual functionality with tapping and bpm change --- controls indicated on display -- 2. track mode with programmable series of parts --- active when started as viewer for a .tempo file --- differing meters (4/4, 3/4, 6/8, etc.) --- patterns (tick/tock/silence on each beat) --- smooth tempo changes in those tracks This version had lots of testing regarding metronome accuracy, resulting in the realization that PLL A and PLL B differ on the Clip+, causing drift. There is still drift when the timer intervall is too small, so I settled on 2 ms as compromise. This is the final version, after adding documentation and extensive help from Sebastian Leonhardt testing it on slower hardware (YH820), where it works up to 650 actual bpm with display indication. Latest change: Documentation nitpicks. Change-Id: I764c8252526db188352385c5462f9453d882beb9
* Separate keymaps for YH-820 and YH-920/925Sebastian Leonhardt2014-05-24
| | | | | | | | | | | | | | | Although both players basically have the same keys, the differences in the layout is rather big, so I think both deserve their own keymaps. (On the yh820 the FFWD/PLAY/REW buttons are located above the direction keys, on the yh920 at the side of the player. Furthermore the yh920/925 has a REC switch, whereas yh820 has a push button.) Change-Id: I0e62a1b101c387646c0bdb07ea142d9d2430ca15 Reviewed-on: http://gerrit.rockbox.org/814 Reviewed-by: Szymon Dziok <b0hoon@o2.pl>
* Tweak paramters of mp3_play_data and callback.Michael Sevakis2012-03-04
| | | | | | | | | Use generic void * and size_t and make mp3_play_data and its callback agree on types. Use mp3_play_callback_t instead of prototyping right in the function call (so it's not so messy to look at). Change doesn't appear to require plugin API version increment. Change-Id: Idcab2740ee316a2beb6e0a87b8f4934d9d6b3dd8
* Revise the PCM callback system after adding multichannel audio.Michael Sevakis2012-03-03
| | | | | | | | | | | | | | | | | | Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* plugins: another round of making local things static and adding missing ↵Bertrik Sikken2011-12-28
| | | | | | #includes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31453 a1c6a512-1295-4272-9138-f99709370657
* Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg2011-10-15
| | | | | | own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
* plugins: make local functions static for metronome, rockblox1d, wavviewBertrik Sikken2011-10-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30711 a1c6a512-1295-4272-9138-f99709370657
* Correct the metronome keymap in the manual. Better describe buttons/actions ↵Andree Buschmann2011-02-03
| | | | | | in metronome help text. Closes FS#11773. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29204 a1c6a512-1295-4272-9138-f99709370657
* Second try: Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-24
| | | | | | | | | | | | | It handles exit() properly, calling the handler also when the plugin returns normally (also make exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
* Revert "Introduce plugin_crt0.c that every plugin links."Thomas Martitz2010-08-23
| | | | | | Too much errors and no time to fix them now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27863 a1c6a512-1295-4272-9138-f99709370657
* Introduce plugin_crt0.c that every plugin links.Thomas Martitz2010-08-23
| | | | | | | | | | | | | It handles exit() properly, calling the handler also when the plugin returns normally (also it makes exit() more standard compliant while at it). It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore. To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it. In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit(). In future plugin_crt0.c could also handle clearing bss, initializing iram and more. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
* metronome: fix issue that backlight doesn't turn off.Teruaki Kawashima2010-07-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27218 a1c6a512-1295-4272-9138-f99709370657
* S#10387 - Rework pluginlib actionsThomas Martitz2010-05-20
| | | | | | | | | | | | | It changes pluginlib actions to contain only a single and simple context (and other one for remote directional buttons), consisting of 7(9) buttons: up/down/left/right, select OR short select and long select, exit and cancel (plus 2 for scrollwheel targets). This ensures contexts don't clash with other contexts and simplifies them, at the expense of reduced versatility. However, the versatility made it largely unusable due to the great number of targets. This should allow for using pluginlib actions safely for the most simple plugins (e.g. almost all demos). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26202 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10546 - metronome doesn't work on h1xx/h3xx.Torne Wuff2009-11-17
| | | | | | | Button mapping table was wrong after some pluginlib_action changes a while ago. Same problem in the Ondio mappings, so I fixed that too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23658 a1c6a512-1295-4272-9138-f99709370657
* Remove int_prio argument from timer_register, and move the only use for it ↵Rafaël Carré2009-06-29
| | | | | | | | into alpine_cdc plugin, since this plugin is only built on SH7034 Also remove it from TIMER_START() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21558 a1c6a512-1295-4272-9138-f99709370657
* remove MEM_FUNCTION_WRAPPERS, and private mem* implementations from plugins, ↵Andrew Mahone2009-01-24
| | | | | | and replace with pluginlib implementations in plugins/lib/gcc-support.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19847 a1c6a512-1295-4272-9138-f99709370657
* loader-initialized global plugin API:Andrew Mahone2009-01-16
| | | | | | | | | | | | | | | | | struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
* Delete unused var and slight style policeNils Wallménius2008-11-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19212 a1c6a512-1295-4272-9138-f99709370657
* New makefile solution: A single invocation of 'make' to build the entire ↵Björn Stenberg2008-11-20
| | | | | | | | | tree. Fully controlled dependencies give faster and more correct recompiles. Many #include lines adjusted to conform to the new standards. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19146 a1c6a512-1295-4272-9138-f99709370657
* Data does not belong in .h files. Not even if it makes the .c file prettier.Björn Stenberg2008-10-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18934 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Plugin parameters should be const.Steve Bavin2008-05-13
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17492 a1c6a512-1295-4272-9138-f99709370657
* Optimise some more line drawing calls.Jens Arnold2008-04-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17083 a1c6a512-1295-4272-9138-f99709370657
* Allow to select the core for running the user timer on portalplayer targets. ↵Jens Arnold2008-04-04
| | | | | | * Incompatible plugin API change -> sorted API. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16965 a1c6a512-1295-4272-9138-f99709370657
* fix FS#8701 - metronome doesnt change back to ui font after drawingJonathan Gordon2008-03-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16585 a1c6a512-1295-4272-9138-f99709370657
* Fixed the problems on the new version of the fire plugin (so repush it), ↵Kevin Ferrare2008-01-23
| | | | | | added new actions to the pluginlib_actions to fix the keymaps on the Sansa e200 for the clock and fire plugins. Also slightly simplified the metronome plugin's key mapping with those new actions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16148 a1c6a512-1295-4272-9138-f99709370657
* Reenable metronome on Archos targets which got lost during the big change to ↵Marianne Arnold2008-01-13
| | | | | | it in last summer and fix a warning (wrong data type). The plugin button action system causes problems with the Ondio controls (tapping and playing conflict, even though there are exceptions defined) and it's only halfway usable, probably this applies to the Player as well but couldn't test. It is still better than nothing and e.g. metronome is not completely controllable on c200 too where it is also enabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16079 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#8341 - rename BUTTON_SCROLL_UP/DOWN to FWD/BACK on the e200 to ↵Jonathan Gordon2008-01-10
| | | | | | make it consistant with the ipods. apart from removing a bit of confusion, it fixes the wheel in pictureflow and possibly elsewhere. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16045 a1c6a512-1295-4272-9138-f99709370657
* Fixed the metronome plugin crashing on target. Fixes <a ↵Kevin Ferrare2007-07-29
| | | | | | href='http://www.rockbox.org/tracker/task/7421'>FS#7421</a> git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14051 a1c6a512-1295-4272-9138-f99709370657
* Least but not lastKevin Ferrare2007-07-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14048 a1c6a512-1295-4272-9138-f99709370657
* How should I say ... oops ?Kevin Ferrare2007-07-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14047 a1c6a512-1295-4272-9138-f99709370657
* Use multi-screen api for metronome plugin, and made it run in the simulator ↵Kevin Ferrare2007-07-29
| | | | | | by implementing the timer functions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14046 a1c6a512-1295-4272-9138-f99709370657
* Move the MEM_FUNCTION_WRAPPERS macro into plugin.h and get rid of the extra ↵Nils Wallménius2007-06-14
| | | | | | header file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13628 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#7264 'Build with -Os switch for coldfire targets'.Nils Wallménius2007-06-13
| | | | | | | | | Introduces MEM_FUNCTION_WRAPPERS(api) macro which adds wrappers functions to a plugin to make plugins link correctly when gcc calls mem* functions directly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13625 a1c6a512-1295-4272-9138-f99709370657
* Fix metronome errors for hw codec.Michael Sevakis2007-06-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13605 a1c6a512-1295-4272-9138-f99709370657
* Plugins that play sound must be sure to set inputs and outputs on audio ↵Michael Sevakis2007-06-10
| | | | | | muxed targets. Add strict adherence to the interface protocols. Make sure playback sets the playback output as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13604 a1c6a512-1295-4272-9138-f99709370657
* Fix metronome plugin crashing on SWCODEC targets and fixed a division by ↵Miika Pekkarinen2007-04-12
| | | | | | zero as well when tapping in the beat. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13129 a1c6a512-1295-4272-9138-f99709370657
* Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold2007-04-06
| | | | | | like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
* fix metronome sync buttonJonathan Gordon2006-12-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11657 a1c6a512-1295-4272-9138-f99709370657
* oops, its not as simple as that...Martin Scarratt2006-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11650 a1c6a512-1295-4272-9138-f99709370657
* Enable syncing button in the metronome for I-RiversMartin Scarratt2006-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11649 a1c6a512-1295-4272-9138-f99709370657
* #if != #ifdefJonathan Gordon2006-12-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11646 a1c6a512-1295-4272-9138-f99709370657
* fix metronome keysJonathan Gordon2006-11-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11597 a1c6a512-1295-4272-9138-f99709370657
* fix ondio keys, and tempo +/- on all targetsJonathan Gordon2006-11-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11541 a1c6a512-1295-4272-9138-f99709370657
* implement actions in the plugins, bubbles and metronome converted.Jonathan Gordon2006-11-16
| | | | | | | | | (hopefully buttons are correct, let me know in http://forums.rockbox.org/index.php?topic=5829.0 if there is a major stuff up) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11535 a1c6a512-1295-4272-9138-f99709370657
* Let SOURCES handle the sim exclusion for metronomeMartin Arver2006-10-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11360 a1c6a512-1295-4272-9138-f99709370657
* Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the ↵Barry Wardell2006-10-26
| | | | | | nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11351 a1c6a512-1295-4272-9138-f99709370657
* Fix errors when building H10 Normal build.Barry Wardell2006-08-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10668 a1c6a512-1295-4272-9138-f99709370657
* Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod.Jens Arnold2006-04-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9427 a1c6a512-1295-4272-9138-f99709370657