m0j0hn / editor-on-fire

Automatically exported from code.google.com/p/editor-on-fire
Other
0 stars 0 forks source link

Add pro drum support #187

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A video was posted with Phase Shift supporting pro drums as charted in Rock 
Band 3.  The developer indicated to me that in RB3, all green, yellow and blue 
drum notes are now cymbals by default.  To make them regular drum notes, they 
have to be marked with the following MIDI notes (similar to SP phrasing):
#define RB3_DRUM_YELLOW_FORCE (110)
#define RB3_DRUM_BLUE_FORCE (111)
#define RB3_DRUM_GREEN_FORCE (112)

I'm going to ask for more information, but my initial guess is that a yellow 
tom cannot be charted at the same time as a yellow cymbal due to this notation 
method.  If that's the case, then we can easily implement "forced cymbal" 
notation in EOF similar to how Expert+ notation has been implemented (apply the 
notation for selected notes).

Original issue reported on code.google.com by raynebc on 25 Oct 2010 at 6:56

GoogleCodeExporter commented 9 years ago
6 of the 8 available note flags are already being used:
#define EOF_NOTE_FLAG_HOPO     1
#define EOF_NOTE_FLAG_SP       2
#define EOF_NOTE_FLAG_CRAZY    4
#define EOF_NOTE_FLAG_F_HOPO   8
#define EOF_NOTE_FLAG_NO_HOPO 16
#define EOF_NOTE_FLAG_DBASS   32

The Expert+ notation could probably share one of the other note statuses, since 
crazy and HOPO status don't apply to drums anyway.  This would free up one flag 
status that would allow the forced cymbal/drum notations to be used without 
altering the EOF project format.

Original comment by raynebc on 25 Oct 2010 at 7:25

GoogleCodeExporter commented 9 years ago
For rendering, forced cymbal notes can be rendered without a center dot in the 
editor and 3D panel.  In the 3D panel, a forced green cymbal can be rendered as 
a green circular note instead of a line.  This may require adding a new 3D note 
graphic or making a duplicate of one of the other 3D drum graphics and 
recoloring it in memory.

Original comment by raynebc on 25 Oct 2010 at 7:42

GoogleCodeExporter commented 9 years ago
r502 redefines EOF_NOTE_FLAG_CRAZY to represent Expert+ double bass for PART 
DRUMS, leaving 3 available flag bits that can be used for forced cymbal 
notation.

Original comment by raynebc on 25 Oct 2010 at 2:48

GoogleCodeExporter commented 9 years ago
I've put a fair amount of logic in so far, but I realized that it could be 
unduly complicated to track these as note statuses, since they work like 
phrases that cover all the notes in all drum difficulties.  I'm going to 
proceed for now, but we may need to implement a phrase for each.  The hard part 
would be coming up with a way for displaying the 3 independent phrase markers 
in the editor window, on top of solo and star power phrases.

Original comment by raynebc on 25 Oct 2010 at 10:55

GoogleCodeExporter commented 9 years ago
r504 implements the majority of the needed logic.  The tracking of these note 
statuses in EOF appears to be working fine.

MIDI export will be complicated because these are actually track-wide phrases 
instead of difficulty-specific phrases.  This means that any notes marked as 
cymbals in Expert will cause notes at identical locations in other difficulties 
to be marked as cymbals, but this is not avoidable.  Until phrase markers are 
implemented and rendered in EOF, there should be a function created (and run 
whenever there's a change to a note status/position), to go through all the 
drum notes and whenever there is a note marked as a cymbal at a position, the 
relevant note color at that position in all other difficulties must also be 
marked as a cymbal.  This would emulate how EOF has a status bit that stores 
SP/solo status, but unfortunately there aren't enough flag bits left to 
implement this.  The eof_check_flags_at_note_pos() function should help with 
this, and a complementary function eof_set_flag_at_note_pos() could be designed 
to make this logic easy to code by ensuring all notes at the specified position 
have the specified flag bit set.

Applying pro drum support for MIDI import should be considerably easier to 
implement.

Original comment by raynebc on 26 Oct 2010 at 12:00

GoogleCodeExporter commented 9 years ago
r505 implements the MIDI import logic and refines the overall handling of pro 
drum notes, adding functionality that will track pro drum marker timings across 
all difficulties of the drum track and apply them throughout as necessary.

I loaded a test chart and it seemed to work as expected.  I also loaded a RB2 
chart and various notes were marked as expected, but I'm not sure if it's 
working as expected.  For example, in "That's What you Get", I see several bass 
drum notes marked as cymbals when they sound like they should be bass drum 
instead, as well as yellow notes that are marked as cymbals when they should be 
hi hat, as well as blue notes not marked as cymbals when they should be 
cymbals.  This is either a problem with the import logic or Harmonix actually 
charted the animation like that on purpose.

In any case, this feature is stable enough for testing.

Original comment by raynebc on 26 Oct 2010 at 8:37

GoogleCodeExporter commented 9 years ago
We might need to reconsider how pro drum notes are marked in the editor window, 
as it's difficult to tell if a yellow note is marked as a cymbal, since the 
color is so bright.  We can either darken the yellow color or render cymbal 
drum notes with a black dot (would probably provide the most easily visible 
identification).

Original comment by raynebc on 26 Oct 2010 at 8:44

GoogleCodeExporter commented 9 years ago
I misinterpreted the information I was given, RB3_DRUM_GREEN_FORCE applies to 
the green drum pad and not bass pedal.  EOF shows the fifth drum as purple, but 
this is the green drum in Rock Band, which led to my confusion.  r506 corrects 
this logic so that the 2nd, 3rd and 4th drum pads are the ones that can be 
marked as cymbal notes.  The bass drum can still be marked as double bass in 
the Expert difficulty.

A test chart is here:
http://www.sendspace.com/file/lzv4mk

Original comment by raynebc on 26 Oct 2010 at 7:45

GoogleCodeExporter commented 9 years ago
One of the last things to do would be to add a toggle-able menu option to 
change the default pro status of drum notes that are placed.  The rationale for 
this is that in theory, most of the yellow, blue and green drum notes that are 
charted are going to be hi-hat/cymbals, where the toms are usually only used 
for fills/solos.  This is also supported by the fact that Rock Band chose to 
make cymbals the default (requiring markers to override them as toms).

Original comment by raynebc on 28 Oct 2010 at 6:00

GoogleCodeExporter commented 9 years ago
The "Mark new notes as cymbals" feature was implemented in r511.

Without witnessing any problems with this feature, the logic is pretty much 
completed.  Now all there is to do is to improve the way these are displayed.  
The current EOF project file format doesn't have a way to store cymbal phrases, 
which is why I used note statuses as a workaround.  Once EOF can natively store 
these as phrases, the phrases can be rendered as solid stripes of color for 
each phrase (yellow, blue, green).

Even if the phrasing isn't implemented for a while, the notes can still be 
rendered in a more pleasing way.  For example, in the editor window, cymbals 
can be rendered as triangles instead of circles.  The 3D preview will be more 
complicated since those are pre-rendered images.  Perhaps we could created 
cymbal images that are the same except for no white dot in the center, to make 
them differentiate.  Even better would be if new images can be created that 
look more conical, they would look more like cymbals.

Original comment by raynebc on 28 Oct 2010 at 10:57

GoogleCodeExporter commented 9 years ago
r514 renders cymbals as triangles in the editor window.  The main issue with 
this is that the pen note does not know what the status of the moused-over note 
would be, so it draws a circle over any existing cymbal note that was rendered. 
 This isn't really a problem, but it looks odd.

The main thing to finish for this would be to update how cymbals render in the 
3D panel.

Original comment by raynebc on 31 Oct 2010 at 8:25

GoogleCodeExporter commented 9 years ago
r518 adds images and logic for displaying cymbal notes with their own graphics. 
 The cymbal images could probably be improved to appear more cone-like, but it 
would be easy to edit them further.

Original comment by raynebc on 2 Nov 2010 at 11:02

GoogleCodeExporter commented 9 years ago
r519 makes the cymbal images more cone-like (pointier), adds silver cymbal 
images for star power and improves the 3D note rendering by allowing drum notes 
to be drawn in silver if they have star power.

I'm going to consider this enhancement completed.

Original comment by raynebc on 2 Nov 2010 at 11:56