3
0
mirror of synced 2024-11-23 23:00:58 +01:00

fix long notes being set as 4th highlight zone

This commit is contained in:
CrazyRedMachine 2023-07-26 21:55:33 +02:00
parent 97b3947f5f
commit 61d9cdb98c

View File

@ -398,9 +398,7 @@ def write_chart(events, output_filename, new_format):
elif event['name'] == "key":
outfile.write(int.to_bytes(event['key'], 1, 'little'))
note_flag = 4 if new_format and event['length'] != 0 else 0
outfile.write(int.to_bytes(note_flag, 1, 'little'))
outfile.write(int.to_bytes(0, 1, 'little')) # highlight zone
elif event['name'] in ["sample", "sample2"]:
outfile.write(int.to_bytes(event['value'] | (event['key'] << 12), 2, 'little'))