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

293 Commits

Author SHA1 Message Date
Viv
0a77dcef1d parsers.py: Fix typo in error message 2024-02-10 19:50:28 -05:00
Viv
334a70e2b1 parsers.py: Account for #SECTION far before first #BRANCHSTART 2024-02-10 19:50:28 -05:00
Viv
82754301c7 parsers.py: Allow lowercase command names 2024-02-10 19:50:28 -05:00
Viv
4e976eec28 parsers.py: Allow lowercase metadata
Fixes https://github.com/vivaria/tja2fumen/issues/62.
2024-02-10 19:50:27 -05:00
Viv
768f05d539 parsers.py: Allow lowercase COURSE names 2024-02-10 19:50:27 -05:00
Viv
7b7dd15a62 parsers.py: Improve error handling for BPM/OFFSET parsing 2024-02-10 19:50:27 -05:00
Viv
6b93305d8b parsers.py: Fix bug with 1P/2P start commands 2024-02-10 19:50:27 -05:00
Viv
4ad3c374f5 parsers.py: Change unsupported command print to warning 2024-02-10 19:50:27 -05:00
Viv
d95175754d parsers.py: Handle typos for data before first COURSE:
Fixes https://github.com/vivaria/tja2fumen/issues/70.
2024-02-10 19:50:27 -05:00
Viv
88ac7b7eac parsers.py: Allow songs with LEVEL: <1 and >10 2024-02-10 19:50:27 -05:00
Viv
3dbf82309e writers.py: Fix bug with large score_diff values 2024-02-10 19:50:27 -05:00
Viv
d4c3abb672 writers.py: Add clear error for struct.pack 2024-02-10 19:50:27 -05:00
Viv
7f3b38b92c __init__.py: Remove print messages 2024-02-10 19:50:27 -05:00
Viv
4f89688391 __init__.py: Fix typo 2024-02-10 19:50:27 -05:00
Viv
25e6d6f4d4 test_command_support.py: Catch warnings 2024-02-10 19:50:27 -05:00
Viv
1faaab9e9c Improve custom TJA testing 2024-02-10 19:50:27 -05:00
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