1
0
mirror of synced 2024-11-27 22:40:49 +01:00
Commit Graph

298 Commits

Author SHA1 Message Date
Viv
aadbb3f8ba Add a sample "unknownHeader" to use in TJA conversions
This contains all of the dummy/padding text found through investigation, but none of the actual song-specific header metadata, so this will need to be updated further.

But, it's better than all 0s, and I want to test to see how TDMX responds to this.
2023-06-02 17:43:59 -04:00
Viv
ce99164583 utils.py: Add function to validate unknown header bytes 2023-06-02 17:43:59 -04:00
Viv
35159ea793 tja2fumen.py: Refactor main steps into main() function 2023-06-02 17:43:59 -04:00
Viv
7239a00e76 converters.py: Fixup handling of scoreInit/scoreDiff 2023-06-02 17:43:59 -04:00
Viv
c7170d6f23 converters.py: Account for HIDDEN status 2023-06-02 17:43:59 -04:00
Viv
ec6bf1db68 converters.py: Account for GOGOTIME events
Also add in cases for barline and other events
2023-06-02 17:43:59 -04:00
Viv
dcc37ff0dd converters.py: Make 'note' its own case 2023-06-02 17:43:59 -04:00
Viv
1f76b19e69 converters.py: Remove redundant submeasures object 2023-06-02 17:43:59 -04:00
Viv
fdeefc2499 converters.py: Handle #SCROLL events 2023-06-02 17:43:59 -04:00
Viv
ae84137478 converters.py: Fix typo (PM -> BPM) 2023-06-02 17:43:59 -04:00
Viv
abd0af5f57 converters.py: Migrate event code to other function 2023-06-02 17:43:59 -04:00
Viv
96ca4ab2c0 converters.py: Move currentBranch line to top of function 2023-06-02 17:43:58 -04:00
Viv
a6d9feab4c converters.py: Group fumenOffset-related code 2023-06-02 17:43:58 -04:00
Viv
c17218d362 converters.py: Add tana's fix for mid-measure BPM changes 2023-06-02 17:43:58 -04:00
Viv
c0288bb0b2 Commit in-progress work just to demo
This should be cleaned up into proper commits
2023-06-02 17:43:58 -04:00
Viv
89011c79db readFumen(): Comment out useless offset value
This isn't actually used anywhere, and the calculation is often wrong.
2023-06-02 17:43:58 -04:00
Viv
cc885a0270 Refactor functions into individual modules 2023-06-02 17:43:58 -04:00
Viv
1b600fc26d tja2fumen.py: Fixup FumenStructure function 2023-06-02 17:43:58 -04:00
Viv
185ed46361 tja2fumen.py: Add convertTJAToFumen function
Thie is a first draft with many TODOs.
2023-06-02 17:43:58 -04:00
Viv
8b07fb77d0 parsetja.py: Add applyFumenStructureToParsedTJA function
This function basically just takes the output of the `getCourse`
function, and restructures it so that it more closely matches the
structure of the fumen `song` format.
2023-06-02 17:43:58 -04:00
Viv
06900237f6 parsetja.py: Account for default balloon metadata 2023-06-02 17:43:58 -04:00
Viv
fdc3b6e1af tja2fumen.py: Switch to a measures sub-dictionary
This makes the `song` object a lot easier to navigate when
inspecting variables through a debugger.
2023-06-02 17:43:58 -04:00
Viv
b7670b54a3 parsetja.py: Slightly refactor the getCourse function
The big if/elses were a little hard to parse, so I broke things
into subfunctions.
2023-06-02 17:43:58 -04:00
Viv
35ba7bfeba parsetja.py: Move parseLine function down
My main focus will be rewriting the `getCourse` function, so I want it to be at the top.
2023-06-02 17:43:58 -04:00
Viv
355d3a10f9 parsetja.py: Condense parseLine function 2023-06-02 17:43:58 -04:00
Viv
f77f31dcd0 parsetja.py: Condense global lists to save space 2023-06-02 17:43:58 -04:00
Viv
0cd8c93922 parsetja.py: Simplify the parseTJA function
No real functionality changes, just making the function simpler and easier to understand.
2023-06-02 17:43:58 -04:00
Viv
93dd1355f8 Add TJA parser (translated from JavaScript)
Source: https://github.com/WHMHammer/tja-tools/blob/master/src/js/parseTJA.js
2023-06-02 17:43:58 -04:00
Viv
8fa6295efa tja2fumen.py: Add TODOs for reverse engineering fumens 2023-06-02 17:43:58 -04:00
Viv
3b2111ae31 tja2fumen.py: Fix assumption about drumroll padding bytes
The 8 bytes after a drumroll are NOT just padding, as
`fumen2osu.py` assumed. There is some kind of metadata here;
I just need to determine what it stands for.
2023-06-02 17:43:58 -04:00
Viv
0c95ff11f3 tja2fumen.py: Account for additional unknown metadata
I'm not sure what these 4 bytes represent yet.
2023-06-02 17:43:58 -04:00
Viv
0995de89ae tja2fumen.py: Add function to validate rewritten fumens 2023-06-02 17:43:58 -04:00
Viv
9879cd9b7c tja2fumen.py: Rewrite song information to fumen files
On at least one song I've tested, this creates a perfect match,
meaning that we now have the ability to create a fumen file
from a "song" object.

The next challenge is reading TJA files into "song" objects.
2023-06-02 17:43:58 -04:00
Viv
adbc81a9c2 tja2fumen.py: Store additional metadata in song objects
The original `readFumen()` function ignored storing information
that was irrelevant for writing osu files.

Now, however, we store this information for the purposes of
*writing* valid fumen files.

Although much of this information is probably irrelevant, doing so
ensures that we can get a 1:1 match between input and output,
which builds a solid foundation for converting TJAs to fumens.
2023-06-02 17:43:58 -04:00
Viv
9fe28513d5 tja2fumen.py: Read the "unknown" part of the header
This seems to contain metadata that was ignored by the
original `readFumen()` function. I'm curious to explore
what these values represent, and how they vary from
fumen to fumen.
2023-06-02 17:43:58 -04:00
Viv
4995a4bee1 tja2fumen.py: Differentiate between note types
Having multiple note values map to identical strings
(e.g. "Don", "Ka", "DON", "KA") caused issues when
writing these strings back to .fumen files.

So, we make sure that each note type has a unique
string associated with it.
2023-06-02 17:43:58 -04:00
Viv
42f302eff0 tja2fumen.py: Add workaround for deo_n.bin song
I think this file has inaccurate metadata, so I've added a workaround
so that it will still parse.
2023-06-02 17:43:58 -04:00
Viv
f586372343 tja2fumen.py: Add new note types for Wii1/Wii4/PS4
I still don't know what these note types represent in the song,
but I'll figure it out later on!
2023-06-02 17:43:58 -04:00
Viv
48b9ae488f tja2fumen.py: Add new checkValidHeader function
This runs successfully against all 1800+ UM4 fumens.
2023-06-02 17:43:58 -04:00
Viv
ddce1b53de tja2fumen.py: Add extensive comments to readFumen()
Some lines of code were rearranged for clarity purposes.
2023-06-02 17:43:58 -04:00
Viv
9fe0fceced tja2fumen.py: Refactor readStruct and provide documentation 2023-06-02 17:43:58 -04:00
Viv
8c707a50d2 tja2fumen.py: Make noteTypes a global constant 2023-06-02 17:43:58 -04:00
Viv
a1f1f8407a tja2fumen.py: Replace debugPrint with exception for debugging 2023-06-02 17:43:58 -04:00
Viv
a8b50c554c tja2fumen.py: Replace writeOsu with a debug breakpoint 2023-06-02 17:43:58 -04:00
Viv
d08cde8061 tja2fumen.py: Rename fumen2osu_version 2023-06-02 17:43:57 -04:00
Viv
55875aa1ff tja2fumen.py: Fix linting issues 2023-06-02 17:43:57 -04:00
Viv
9b1ee88510 tja2fumen.py: Convert tabs to spaces 2023-06-02 17:43:57 -04:00
Viv
7e7591e688 Use fumen2osu as a baseline for tja2fumen 2023-06-02 17:43:57 -04:00