0.7.5 Preview r1065

Archived development update discussion from past versions
Archived development updates.
Locked
Nicholas
Posts: 13135

Post by Nicholas »

PREVIEW r1065
Download from the pink box above.

Changes in r1065 since r1046:
  • Mac configuration tool. Let me know if it works! (This changed the way the graphics work a little. See below.)
  • Every included MIDI file has been updated. TieDyeGuy quantized them and I spent way too much time stripping extraneous junk out of them (random controller re-initializations, extraneous tempo events from too-sensitive recording software, unifying all songs to use channels 1 & 2, etc.) Thanks TieDyeGuy!
  • Complete scoreboard wipe! Switching between this version and older versions of Synthesia will repeatedly wipe your scores! This is the case because:
  • Scoreboards have been decoupled from MIDI files. So long as the notes are identical (same onset, pitch, and length), you can modify the other events in a MIDI file and your scores will still appear on the same scoreboard!
  • Small scoring change related to the decoupling. See below.
  • Added missed-notes statistic to bottom-of-the-screen stats in rhythm mode.
  • Pedal events are now sent out to all channels involved in You Play tracks instead of just the most-recently-used You Play track channel.
  • The "Bank Select Fix" option is now always enabled (instead of just in Vista and OS X). The same problem applied to certain devices, so it's basically platform independent now. The fix should also be handled a little more efficiently now.
  • Folder names in the song library will now show the entire name... even after any periods. ("0.0 - First Pieces" and "0.1 - Primer Level" were both showing as just "0".)
Mac Configuration Tool
This includes the default video mode, custom full screen, and manual settings. Windowed mode has been left out for now. I plan to get back to it after the 2010 development push. Also, in order to get the custom full screen stuff to work, I changed Apple OpenGL APIs (from AGL to CGL). This had the side-effect of making full-screen mode a little, uh... stronger than it used to be. If it's on your primary screen, you can't really get out to the dock or application menu anymore. After windowed mode is added, the "windowed mode + maximized" solution (that is already very cool on the Windows side) will bring things back to the way they were most recently.

Practice Overage Scoring Change
Decoupling scores from their MIDI files had an interesting side-effect: the same set of You Play notes can technically belong to two different length songs. If you make the non-You Play tracks longer, or bump the You Play section forward (or backward) and add background stuff in the new areas, you'll end up with a matching You Play note set but a different song length.

One component of practice mode's scoring was based on song length. In particular, about 38% of your score (75% / 2) was based on your timing. Extra time hurts your score. It used to be calculated:

TimingPercentage = SongLength / (SongLength + ExtraTime)

Where eventually, FinalScore = (38% * TimingPercentage) + (the rest)

It could even be argued it wasn't a very good way to do it in the first place. If you took literally DOUBLE the amount of time to play something than you were supposed to, you'd still get a 50% TimingPercentage... or basically a free 19% of the available practice mode points.

Because of that and because the song length can now vary, I'm taking a different approach based on the total duration of all You Play notes summed. The new calculation is:

TimingPercentage = (TotalYouPlayTime - Overage) / TotalYouPlayTime
(... with a minimum of 0%. It's not allowed to go negative.)

Now in the "double" case, you get zero points for timing. Anything up until the double case and you'll get something. It's linear now.

(Though, while I was reading the code to compose this post, I just found a bug. The way I wrote it is the intent. The way it works is that the "total duration of all You Play notes summed" really is every note -- even in a chord. If your song is one note that lasts 4 seconds, the total you play time is 4 seconds. If your song is 4 seconds but it's a three note chord, the sum will be 12 seconds. That's not the desired behavior. I'll have to figure out how to calculate what I really mean: the total length of time any one (or more) You Play note is active.)

EDIT: I've started a scoring page on the Wiki so I can start maintaining a centralized location to keep this type of info.
TonE
Synthesia Donor
Posts: 1180

Post by TonE »

Nicholas wrote:That's not the desired behavior. I'll have to figure out how to calculate what I really mean: the total length of time any one (or more) You Play note is active.
You can write/find a function which creates from any notes set, a monophonic version which keeps the notes with the longest duration in the case of onset overlappings.

Code: Select all

if (onset of n+1 == onset of n)
{
    if (duration of n+1 > duration of n)
    {
        delete note n
    }
    else
    {
        delete note n+1
    }
}
Nicholas
Posts: 13135

Post by Nicholas »

It's basically a 1D "union" operation on number ranges.

Merging separate ranges gets tricky.

Say you have the following You Play notes:

NoteA = time 10 through time 20
NoteB = time 15 through time 25
NoteC = time 20 through time 30

The result is one range from 10 to 30, even though none of the onsets were the same.

The You Play time is 20. That's what I want. The "active time the user is engaged in playing". The sum of all you play notes is 30. That's too much.

I think I have a pretty good idea for how to calculate it now. It's similar to what you proposed and relies on having the notes sorted by onset time (which they already are).
TonE
Synthesia Donor
Posts: 1180

Post by TonE »

Then, do a monophonic version and do not sum up the entire durations but only the durations up to the next onset. The last notes duration usually you have to consider separately.
maccer
Posts: 222

Post by maccer »

Nicholas wrote:
  • Mac configuration tool. Let me know if it works!
Also, in order to get the custom full screen stuff to work, I changed Apple OpenGL APIs (from AGL to CGL). This had the side-effect of making full-screen mode a little, uh... stronger than it used to be. If it's on your primary screen, you can't really get out to the dock or application menu anymore. After windowed mode is added, the "windowed mode + maximized" solution (that is already very cool on the Windows side) will bring things back to the way they were most recently.
The tool works fine for me! I've only tried one manual setting (particle effects) and it worked. I also tried to change the resolution, seems to work wel, but if you have a flatscreen you should really choose 60 Hz update rate, if I choose 75 the movement of the falling notes gets jerky.
Just a small annoyance: you might consider enabling the CMD-W shortcut that's used to close a window, in this case it should also be set to quit the app just like System Preferences. Always when I have a window selected I expect to be able to close it with CMD-W.

About the new full-screen thing: does it mean that it will be impossible to CMD-tab out of Synthesia unless you run windowed mode? Because I like the way it is now, with no disturbing dock / menu bar, but I still want to be able to pause the game, CMD-tab out of it to do whatever I need to do and then CMD-tab back in again and continue playing.
Songs learned using Synthesia:
CT: Wind Scene, The Trial | FF7: Prelude | SMB: Overworld, Underwater | Tetris: Theme A | Zelda: Lost Woods | Other: Für Elise
Nicholas
Posts: 13135

Post by Nicholas »

maccer wrote:... you might consider enabling the CMD-W shortcut that's used to close a window...
I didn't realize that was taken away in the switch. I'll add that. I'll make Cmd-W and Cmd-Q do the same thing like you suggested.
maccer wrote:... does it mean that it will be impossible to CMD-tab out of Synthesia unless you run windowed mode?
For now, yes. The Windowed + Maximized thing I mentioned before is the solution you're looking for (that isn't complete yet). That will let you do things like Cmd-Tab out. It should be similar to the way it used to work.

Thanks for testing it! I know you're one of only a handful of the Mac users that actually hang out on the forums.
User avatar
cairnz
Posts: 182

Post by cairnz »

cmd-w should not quit any application, just close the window. (though there need to be a way to get it back sometime later).

cmd-w != cmd-q
Nicholas
Posts: 13135

Post by Nicholas »

cairnz wrote:(though there need to be a way to get it back sometime later).
That's the crux of the matter. There isn't a way to get back sometime later.

There is even something built in to Cocoa (applicationShouldTerminateAfterLastWindowClosed) to handle those cases where single-window applications really shouldn't stay open once closed.

While Cmd-W != Cmd-Q most of the time, there is some precedent. I've even seen a couple Apple apps do it before (I think).

This is how the config tool works itself. When you close it, the app closes... whether you use the X button or you use Cmd-W.
Locked