carlito913 / editor-on-fire

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

Pre-defined grid snap values are inaccurate on a non 4/# time signature #190

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
eof_snap_logic() was designed when only 4 beats per measure were possible.  It 
may be a good idea to alter these pre-defined grid snap values to use the 
EOF_SNAP_CUSTOM logic.

Original issue reported on code.google.com by raynebc on 29 Oct 2010 at 9:02

GoogleCodeExporter commented 8 years ago
If this is as easy as dividing up a measure into the various note sizes it 
should be pretty easy to fix. Unfortunately I don't really understand music 
enough to know how a time signature affects what a 1/4 note is.

Original comment by xander4j...@yahoo.com on 11 Nov 2010 at 2:11

GoogleCodeExporter commented 8 years ago
I always interpreted the pre-defined grid snap values as per-measure intervals 
instead of literal note values (which would be affected by the time signature's 
denominator).  If that's the intention, the time signature's numerator defines 
how many beats are per measure.  The pre-defined grid snap values are per 
measure intervals.  So a grid snap of 1/4 when there are five beats per measure 
(such as a 5/4 time signature) would have each grid snap position be 5/4 = 1.25 
beats apart.  The custom grid snap logic currently handles it this way.

If it was to be interpreted as a note length in terms of musical notation (such 
as treating 1/4 as a quarter note), the length of a quarter note would depend 
on the tempo (defines the length of one beat) and the time signature's 
denominator (defines which note represents one beat, where #/1 is a whole note, 
#/2 is a half note, #/4 is a quarter note, etc).

Original comment by raynebc on 11 Nov 2010 at 4:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What makes more sense from a charting standpoint? Wouldn't interpreting the 
grid snap value as an interval make the predefined values useless? 1/4 grid 
snap wouldn't make sense when working on a 3/4 time signature chart. If this is 
true then it would probably be better to interpret the grid snap value as 
musical notation.

Original comment by xander4j...@yahoo.com on 13 Nov 2010 at 3:19

GoogleCodeExporter commented 8 years ago
I don't think it would make them useless, but it's hard to tell what most 
people would prefer.  Since the time signature was never taken into account in 
the past, the presets were used like per measure intervals, which are the same 
as musical notation in a 4/4 time signature.  The original default time 
signature in EOF is/was 1/4 though (one beat per measure, one quarter note is 
one beat long), so it gets complicated.

As EOF evolves into something resembling more and more of a MIDI editor, it 
will make sense to handle musical notation, but it should likely be presented 
as a separate option, so people can define a custom grid snap as "per beat", 
"per measure" or "note" to indicate they're defining which note to use (in case 
they want to use a nonstandard note like 1/10).

Original comment by raynebc on 13 Nov 2010 at 8:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Why does it need to be so complicated? My intention when naming the preset 
options was to use them as musical notation. In earlier versions of EOF, 4/4 
was assumed (and still is on a newly created chart) even though the measures 
weren't visibly displayed.

I haven't worked with anything in 3/4 time signature so I don't know if the 
interval interpretation of the presets would actually make sense. It seems to 
me like snapping to 1/4 of a measure (or any of the other presets) wouldn't be 
useful in a 3/4 time signature. That's why I think the musical notation 
interpretation makes more sense.

I think it might be better to change the way measures are counted. If the user 
doesn't set a time signature then we shouldn't count measures and we should 
assume 4/4 time signature. We can render non-measured beat markers as the 
darker gray color.

Original comment by xander4j...@yahoo.com on 13 Nov 2010 at 8:29

GoogleCodeExporter commented 8 years ago
Ultimately, you're right.  It does make sense to treat the presets as music 
notation.  Users that don't use time signatures or only use 4/4 won't notice 
any difference in how the presets work.  As long as the custom grid snap allows 
the music notation to be overridden with per beat or per measure intervals, 
there will be nothing for people to complain about.

Regarding the default time signature, I feel it makes the most sense for it to 
default to 4/4, as this is the norm for MIDI and contemporary music as a whole.

Original comment by raynebc on 13 Nov 2010 at 8:35

GoogleCodeExporter commented 8 years ago

Original comment by xander4j...@yahoo.com on 16 Nov 2010 at 12:20

GoogleCodeExporter commented 8 years ago
Most of the work is done on this. I still need to make it work for note sizes 
that are larger than the time signature denominator. It sounds fairly easy but 
I don't have time to work out the math to see if I can do it without having to 
have too many special cases.

Original comment by xander4j...@yahoo.com on 16 Nov 2010 at 1:51

GoogleCodeExporter commented 8 years ago
I think the only problem is going to be with odd time signature numerators. 
When the note size is larger than the denominator you can't fit an whole number 
of notes in the measure. This makes the grid snap value invalid so the current 
behavior should stay in this case. When the numerator is even we can divide the 
measure up evenly and get proper grid snap values.

Original comment by xander4j...@yahoo.com on 16 Nov 2010 at 7:35

GoogleCodeExporter commented 8 years ago

Original comment by xander4j...@yahoo.com on 16 Nov 2010 at 10:54

GoogleCodeExporter commented 8 years ago
For now the user will have to be limited to using a grid snap that's not larger 
than the current time signature denominator. I couldn't get the snapping to 
work right for that case.

Original comment by xander4j...@yahoo.com on 17 Nov 2010 at 1:23

GoogleCodeExporter commented 8 years ago
The grid snap logic was being really glitchy in time signatures like 6/8 so 
r1155 cleans it up and gets it to the point that 1/4 is treated as 1/4 the 
length of the current measure.  We can decide if we want to make it musically 
accurate, ie. in 6/8 meter, it would take 3 quarter notes to fill the measure.

Original comment by raynebc on 9 Jun 2013 at 4:57

GoogleCodeExporter commented 8 years ago
Regarding post 14, it should be as easy as taking the grid snap value, dividing 
that by the time signature, and then multiplying that by the measure length to 
get the real time length of the grid snaps.  For example, in 1/4 grid snap in 
6/8 meter:

1/4 / (6/8) * measure
---
8 / 24 * measure
---
Grid snap length is 1/3 measure.

This math works for 1/8 as well, since 1/4 results in being the length of 2 
measures, which is correct.

Original comment by raynebc on 9 Jun 2013 at 5:05

GoogleCodeExporter commented 8 years ago
An easy fix would probably be to call the custom grid snap logic to set all 
relevant variables when a pre-set grid snap is selected.

Original comment by raynebc on 14 Jun 2015 at 2:20