1
0
mirror of synced 2024-11-24 05:30:11 +01:00
Commit Graph

277 Commits

Author SHA1 Message Date
Viv
5474ad0baa
README.md: Rewrite usage section for clarity 2024-02-07 12:42:02 -05:00
Viv
0383efea00
README.md: Mention SENOTE changes 2024-02-03 23:00:27 -05:00
Viv
073178601f
Add proper Don/Ka types to clusters of notes (#64)
This should match most fumens. Some exceptional cases I've seen:

- [x] ~In official fumens, even-numbered clusters of 4 notes will
sometimes be ドドドド or カカカカ. Right now, my converter will always use ドドドドン
or カカカカッ, since I don't really understand the rules behind it.~ Fixed:
Now, all 16th notes and above in groups of 4 will no longer use the
don/kat ending character.
- [X] ~In official fumens, sometimes isolated notes will be grouped
together, but sometimes they will be treated as single clusters of 1.
Right now, my converter will always try to cluster isolated notes.~
Fixed: Only 4th/8th/16th/etc. notes will be clustered. Whole/half notes
will not be clustered.
- [x] ~Right now, my logic always treats big notes as their own cluster.
But, sometimes you get a cluster like `ddddD`, and right now my
converter treats this as (ドドドドン) + big DON instead of do-ko-do-ko-DON.~
Fixed: Now big notes are included in clusters.
- [x] ~For high-level Oni songs with complex groups of dense notes (e.g.
(12th/16th/24th) notes mixed with (16th/34th/32nd) notes), official
fumens seem to group them together even though they technically have
different timings. Right now, my converter will group the 32nd notes,
but treat the 16th notes as their own separate group.~ Fixed: Now
anything above an 8th note will be clustered together.
- [X] Songs with BPM gimmicks. e.g. the TJA has low base BPM, but then
everything is doubled/tripled except for one section. I can't remember
which songs have this? Something like RNG Cinderella?
- Maybe solved by
1f640c1aa1?

Fixes #41.
2024-02-03 22:32:29 -05:00
Viv
47ef31fc5c
README.md: Make TakoTako 3.2.0 note more apparent 2024-01-13 12:01:08 -05:00
Viv
0fa2fda3d0
README.md: Update feature description 2023-10-17 22:03:31 -04:00
Viv
dcf74a45a2
README.md: Update "Features" section 2023-10-17 22:01:56 -04:00
Viv
dcbe269899
.vscode: Delete codespaces files (no longer used) 2023-10-17 21:57:14 -04:00
Viv
2042c8177e Update list/dict/tuple typing for 3.8 2023-08-05 11:10:48 -04:00
Viv
35090449a3 Revert from Python 3.10 to 3.8 2023-08-05 11:03:05 -04:00
Viv
7b5e09cb05 classes.py: Remove slots=True 2023-08-05 11:02:53 -04:00
Viv
018d09d34c
Fix error when metadata fields have numbers in them (e.g. NOTESDESIGNER0) (#61)
Simple fix -- regex for metadata didn't include numbers, but does now.

Fixes #60.
2023-08-05 11:00:28 -04:00
Viv
b4fb3ba739 Change function signature of parse_tja_course_data
Now we actually return the parsed branches, instead of operating on the course in-place.
2023-07-31 09:48:05 -04:00
Viv
c7cb2511ed parsers.py: Update outdated docstring 2023-07-31 09:34:55 -04:00
Viv
dd86df83aa Remove seek arguments from read/write struct funcs 2023-07-31 09:28:17 -04:00
Viv
15cbb9e62a Rename measure_tja.data to measure_tja.notes 2023-07-31 09:21:40 -04:00
Viv
73ad83d621 converters.py: Minor refactoring tweaks (e.g. comments) 2023-07-31 09:21:16 -04:00
Viv
78379d5143 classes.py: Inline comment 2023-07-31 09:08:30 -04:00
Viv
31821facf1 classes.py: Simplify unp method
Optional start/end was a relic from a previous iteration of the class.
2023-07-31 09:08:29 -04:00
Viv
2ad2e639e5 classes.py: Condense set_hp_bytes 2023-07-31 09:04:20 -04:00
Viv
f805416831 classes.py: Simplify timing window assignment
default_factory is no longer needed, since we use a tuple for this instead of a list
2023-07-31 08:58:41 -04:00
Viv
cbdadcdc33 classes.py: Fix indentation 2023-07-31 08:56:08 -04:00
Viv
5e52e5c71d classes.py: Refactor how raw_bytes is constructed 2023-07-31 08:55:12 -04:00
Viv
d7a817b9ea classes.py: Simplify getattr calls 2023-07-31 08:52:52 -04:00
Viv
cd519f5a26 classes.py: Remove outdated _raw_bytes
No longer used.
2023-07-31 08:51:40 -04:00
Viv
098fb51a04 converters.py: Change func sig of process_commands
Now, instead of passing an entire TJACourse object, we pass the branch dict. This makes the function signature _much_ clearer, since it's easier to compare the before and after.
2023-07-31 08:49:44 -04:00
Viv
1358fbbca1 Rename types.py to classes.py to avoid nuitka error
Context: https://stackoverflow.com/questions/43453414/cannot-import-name-mappingproxytype-error-after-importing-functools#comment82066966_46915574
2023-07-30 21:04:02 -04:00
Viv
b380ad7786 Fix additional type issues caught by mypyc 2023-07-30 20:09:04 -04:00
Viv
490c68b86c .gitignore: Use GitHub's template 2023-07-30 19:26:41 -04:00
Viv
ade127b026 Fix PyCharm code inspection warnings 2023-07-30 19:20:39 -04:00
Viv
300a58eb14
README.md: Add badges for code quality tools 2023-07-30 18:50:20 -04:00
Viv
387cbbcdfa
Make project pylint-compliant (and add pylint check to test suite) (#59) 2023-07-30 18:49:58 -04:00
Viv
5229db4aab
Make project mypy-compliant (and add mypy check to test suite) (#58)
This PR adopts static type hints as per `mypy` recommendations. This
will hopefully clean up the code a little and squash a few type-related
bugs.

Additionally, this will hopefully open up the door to compiling the
project using `mypyc`, which may score us some performance gains without
needing to rewrite the project in an entirely new language.
2023-07-30 16:50:41 -04:00
Viv
d99c7f5984
Convert TJA/Fumen classes into dataclasses (#57)
This branch was originally used to test out Pydantic. However, after
some profiling, I came to the conclusion that runtime type checking is
overkill for a project like this. So, instead, I'm sticking with static
typing via dataclasses.

Fixes #56.
2023-07-30 12:56:06 -04:00
Viv
03c8892243 README.md: Fix table row for A, B notes 2023-07-27 18:56:16 -04:00
Viv
4a8c6d8fb4 types.py: Sped up LUT parsing with iteration 2023-07-27 18:53:58 -04:00
Viv
e126494496 README.md: Restructure 'notes' part of table 2023-07-27 15:16:09 -04:00
Viv
c0442f3721
Fix behavior for the #LEVELHOLD command (#54)
Previously, I had translated the existing levelhold behavior in
WHMHammer's tja parsing code, assuming that it would produce the correct
behavior for fumen charts. However, that is not the case -- the behavior
is completely wrong.

So, this PR takes out all the old `flag_levelhold` behavior and instead
properly sets the `branch_info` bytes whenever #LEVELHOLD is present on
a branch.

This PR also prepares `shoto9.tja` for further testing, but I'm leaving
that for later...

Fixes #52.
2023-07-27 15:02:19 -04:00
Viv
59046c22ec Add remaining docstrings/comments 2023-07-27 13:16:44 -04:00
Viv
740ccbcd31 Fix linting issues 2023-07-26 10:17:28 -04:00
Viv
7aead6f8ef parsers.py: Simplify convoluted P1 copying logic 2023-07-25 23:30:16 -04:00
Viv
6ea74ae58b parsers.py: Simplify BPM/OFFSET logic 2023-07-25 23:21:20 -04:00
Viv
3cb25c23c7 parsers.py: Rename current_course_cached to _basename 2023-07-25 23:09:49 -04:00
Viv
24b5828833 parsers.py: Simplify if/elses in split_tja_lines_into_course()
Some highlights:

- Strip comments ahead of time
- _Only_ parse #START in split_tja_lines_into_course()
- Leave all other parsing to parse_tja_course_data()

This makes the function behavior line up with what the docstring suggests, and removes some convoluted parsing in split_tja_lines_into_course().
2023-07-25 23:08:18 -04:00
Viv
fc1b0d1bbc Start adding docstrings and fixing comments 2023-07-25 21:50:12 -04:00
Viv
09a293e59f types.py: Simplify __repr__ using inheritance 2023-07-25 19:20:10 -04:00
Viv
ec72398abe Simplify #SECTION/#BRANCHSTART logic
Previous code was unnecessarily convoluted.
2023-07-25 19:11:28 -04:00
Viv
f088e95e02 converters.py: Move computation into MeasureFumen class 2023-07-25 18:53:02 -04:00
Viv
79cca3d75e README.md: Try adding a Features section 2023-07-24 22:58:22 -04:00
Viv
7baa5ea859 README.md: Improve table spacing for mobile 2023-07-24 22:47:46 -04:00
Viv
d33562fef7 README.md: Update tja2bin crash commands 2023-07-24 17:33:24 -04:00