Rockbox

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Tony Huynh - 2009-03-14

FS#10022 - Beatbox fix

This should hopefully make beatbox compile and run on any target with enough buttons.

All it needed was some key mappings (and some typo fixes). I’m assuming the function declaration for synthSamaples() simply changed over time, as the original code was missing an ‘s’ on the end of function name and looked like this:

  synthSamples(&synthtemp[0], &synthtemp[1]);

The second param should be the sample size or something, but it was passed an address.

If it doesn’t work on a particular target due to lack of a key map, please add one, or tell me the target and i’ll stick a keymap in ^_^

Patch from within root rockbox source folder.

Hopefully this works for you all, its many hours of fun =D

Nils Wallménius commented on 2009-03-14 09:10

something is funny with this patch, it rewrites the entire beatbox.c a line ending thing perhaps?

Tony Huynh commented on 2009-03-14 09:15

I noticed that when I inspected the patch myself. I thought it was because I changed quite a few lines at the beginning of the file (key maps), but I think you’re right. I DID get a warning when compiling about no line end or something, but I don’t know why. When I look in the file, it ends with a new line. Might be because Im working on windows (cygwin).

Dominik Riebeling commented on 2009-03-14 11:24

A missing line ending is something different – gcc expects source files to end with a single empty line, and sounds like this is what you described. Are you editing the file using a windows text editor (i.e. not something from cygwin)? I suspect your editor silently changing all line endings. You should try to use the “-b” option when creating the diff (svn diff -x “-bu” when using svn).

Tony Huynh commented on 2009-03-15 00:36

Thanks, -x”-bu” seems to have done the trick.

Tony Huynh commented on 2009-03-15 04:13

oh no! that patch cleared all the newlines.
What happened was, i thought Unix newline was CR but its LF. I my editor to use LF and re-spaced the file so its easy to read.

I edited the macro for the drum name position, so it fits on screens with height less than 100.
Added a menu when you press exit, borrowed from chopper (thanks!) =]
The order of drawing functions has also been changed, such that drawDrumName() is called last, ensures its drawn on top properly
Some of the functions have been renamed because they used mixed case identifiers, which contradicts CONTRIBUTING (only changed some of them)
And rudimentary Saving and Loading has been added, which means it can be used as a viewer ^o^

Nils Wallménius commented on 2009-03-28 08:25

hi, it’s good to see someone working on this forgotten plugin! :)
Your patch mixes style and whitespace changes with functional changes.
Please separate the functional changes from the others so they are easier to review.

Tony Huynh commented on 2009-04-10 09:10

This patch is trimmed. No stylistic/white space changes, only functional changes.

Tony Huynh commented on 2009-04-10 09:52

whoops, sorry I left a few lines of code in the previous file.

I made the cursor wrap around edges in this file and changed the last instrument (virba slap) to Muted triangle =]

Gman commented on 2009-05-04 04:01

I have a 5th Gen iPod and the patch fails at compiling. Am I the only one with this problem?

Gman commented on 2009-05-04 04:02

And I have version 3.2 if that makes a diffrence

Shane Wilson commented on 2009-05-04 13:01

sorry is this the wrong place to ask what this plugin does? i was thinking about attempting to write a beat box plugin where you can hit buttons and drum samples come out (not a sequencer). can anyone elaborate a bit, or point me to a proper description

Tony Huynh commented on 2009-05-05 09:56

Its a drum kit sequencer. There’s a grid, each row corresponds to a drum/instrument, each column corresponds to a moment in time. =D

Marc Guay commented on 2009-05-05 16:41

There’s a typo in beatbox.c. When defining BUTTON_PLAY, “#ifdef BUTTON_SCROLL_FWD” defines BEATBOX_PLAY as BUTTON_SCROLL_BACK rather than forward. This causes a compilation failure because of a doubly-defined case. Testing the fix now….

Tony Huynh commented on 2009-05-06 07:28

I changed play to Scroll forward and stop to Scroll back, thanks for pointing that out Marc Guay =]

Ipods dont have up/down so no key mapping existed. I made a keymap for the ipods:
Scroll back = up
Scroll forward = down
Left = left
Right = Right
Center = seletc
Menu(top button) = stop/menu
Play(bottom) = play

Marc Guay commented on 2009-05-06 13:21

Changes:

- rockbox_style identifiers.
- /* rockbox style comments */
- e200 keymap (i’m not sure how effective your automatic keymap finder will end up being)

Problems:

- the tempo speeds up and slows down depending on how many samples are being played
- the drum name leaves a residue on the screen when the progress bar moves over it. there should be a way to clear it properly.

Mistakes in this patch:

- multiple declaration of num_samples and number_of_samples

Tony Huynh commented on 2009-05-07 07:06

The key mapper thing was an experiment. I think it would be more effective if it was put after the “manual overrides”. That way it would only guess a key map if one doesn’t exist.

Gman commented on 2009-06-22 04:10

I was wondering if you could clear up all the errors. Also I was wondering what is the possibility of making the grid extend. Like the default grid you view is just a part of the song you make.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing