View previous topic :: View next topic |
Author |
Message |
crynryan
Joined: 31 May 2008 Posts: 63
|
Posted: Sat Jun 27, 2015 1:52 pm Post subject: I need help with understanding how the notecharts work |
|
|
I've been developing my own Guitar Hero clone (just for fun, really), and have come to the point that I can start adding songs. I've been downloading songs from db.customcreators.com, converting the notecharts from .mid to .txt (I have no idea how to read MIDIs, so I'd like to stick to .txt for now).
What I've found in doing this, is that every song I've tried will eventually just desync. But first, in order to even sync the beginnings of songs I need to multiply the time values each note is played at and find the offset the notes need to be at to start at the right time.
But after a certain length of time (I'm thinking it might be when the songs change tempo), it seems like I need to find another value to multiply the time values by. What I'd like to know, is why I need to do this and if there's a way around it.
If anyone can help, thanks. |
|
Back to top |
|
|
ExileLord
Joined: 11 Sep 2007 Posts: 440 Location: Wisconsin
|
Posted: Sat Jun 27, 2015 2:40 pm Post subject: |
|
|
Are you using fmod or something similar for your sound library? If you're just hoping they stay in sync from the beginning of the song you've already lost. You should probably precalculate time values for BPM changes. I think this is what I did for chartEdit but it's been a long time. _________________
|
|
Back to top |
|
|
crynryan
Joined: 31 May 2008 Posts: 63
|
Posted: Sat Jun 27, 2015 2:51 pm Post subject: |
|
|
I haven't actually done anything with BPM, all I do is just load the time values from the txt files I have and have the notes played at exactly those values I load in. I just kinda figured that it would be the easiest way to do it, as I had no idea that any extra work other than pulling the time values out and reading them in would need to be done.
As for what I've used to make it, I've made everything in Unity. I haven't used any outside libraries, just all the stuff that's either part of .NET (since I'm using C#) or part of Unity.
But I'm assuming the stuff under the [SyncTrack] header could be used to precalculate the time values, but if so I've no idea how to read it. If there's anything you could point me to so I can start reading up on it, thanks. |
|
Back to top |
|
|
crynryan
Joined: 31 May 2008 Posts: 63
|
Posted: Sun Jun 28, 2015 11:17 am Post subject: |
|
|
I got it working with one song, all the others it seems that they have tempo changes where it throws the timing off by 20 seconds. The only thing I could really think of that I did wrong was maybe if the resolution or ticks per quarter note changes with each tempo change as I couldn't find anything saying it does.
As is, that one song that does work only has 2 tempo changes from 102BPM to 103, then back to 102BPM. Because it's a pretty small change I'm sure that's why it doesn't seem to break. I believe I may be using the right algorithm, I just may be using it the wrong way with the wrong values. |
|
Back to top |
|
|
xbillax
Joined: 09 Jun 2007 Posts: 911 Location: Norway
|
Posted: Mon Jul 06, 2015 9:12 pm Post subject: |
|
|
Is the format you use for .txt the same as for .chart?
If so I could maybe help. _________________
My Accomplisments thread
GH1 46/47 - GH2 63/64 - GH80's 30/30 - GH3 67/70
GHA 02/41 - GHWT 00/86 - GHM 00/49 - GHSH 00/48
GH5 00/85 - GHVH 00/47 - GHWoR 00/93 - GHL 00/42 |
|
Back to top |
|
|
crynryan
Joined: 31 May 2008 Posts: 63
|
Posted: Wed Jul 08, 2015 4:30 pm Post subject: |
|
|
xbillax wrote: | Is the format you use for .txt the same as for .chart?
If so I could maybe help. |
Pretty much.
Time Value (in milliseconds) / Note value / Note Length
An example:
1566 3 1500
For the most part I found something that works, but there's still some songs that it desyncs with. The only thing I can really think of is that the algorithm I found isn't perfect or Time Signature changes factor into everything because my current code doesn't factor them in at all. |
|
Back to top |
|
|
xbillax
Joined: 09 Jun 2007 Posts: 911 Location: Norway
|
Posted: Thu Jul 09, 2015 7:13 pm Post subject: |
|
|
Ah so the time value is a little different.
.chart uses "number of beats x chart resolution (192 is standard)" for the time value. So the first beat of the chart would be 0 and then every beat after would be +192.
Anyway just ask questions about what you want to know I'll try to help. _________________
My Accomplisments thread
GH1 46/47 - GH2 63/64 - GH80's 30/30 - GH3 67/70
GHA 02/41 - GHWT 00/86 - GHM 00/49 - GHSH 00/48
GH5 00/85 - GHVH 00/47 - GHWoR 00/93 - GHL 00/42 |
|
Back to top |
|
|
|