Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize decompilation #58

Closed
12 of 13 tasks
truj opened this issue Mar 21, 2020 · 2 comments
Closed
12 of 13 tasks

optimize decompilation #58

truj opened this issue Mar 21, 2020 · 2 comments

Comments

@truj
Copy link
Owner

truj commented Mar 21, 2020

The decompilation process needs some optimizations.

  • debugging: add quality score for each channel
  • organize decompilation configuration window with tabs
  • add decompilation options for using triplets and/or dotted notes / rests
  • check statistics calculations (I guess it's buggy.)
  • adjust decompile configuration defaults
  • avoid unnecessary instrument switches, if the according instrument is never used to play any notes
  • add more information to explain the decompile options
  • replace tab-separation by space-separation
  • fix problems with orphaned inline syllables (currently their placement is incorrect)

EDIT:

  • rename orphaned syllable modes (e.g. inline => inline_block, block => slice_begin_block)
  • new karaoke options: "Regard all syllables as orphaned", "Ignore Karaoke completely"
  • new tab for control change settings

EDIT:

  • fix problems after adjusting the decompile config defaults, that appear in some cases
truj added a commit that referenced this issue Apr 9, 2020
- added more info to the decompile config window
- added config options for dotted/tripletted notes and/or rests
- preventing exceptions if decompile options have been changed manually in the config file with corrupted numbers
- using a combobox for the max target ticks instead of a text field
- fixed a small bug in the decompiler's duration strategy
- #58
truj added a commit that referenced this issue May 17, 2020
- added strategy statistic
- added string formatting to the quality statistics
- added quality score to each channel
- using DURATION_RATIO_TOLERANCE for all strategies
- LENGTH_TICK_TOLERANCE now replaces NEXT_NOTE_ON_TOLERANCE and DURATION_TICK_TOLERANCE
- using LENGTH_TICK_TOLERANCE for ALL strategies
- #58
truj added a commit that referenced this issue May 20, 2020
- fixed formatting of debug output
- added sub score to the quality statistics to make the quality score calculation more understandable
- #58
truj added a commit that referenced this issue Jun 25, 2020
- allowing less note/rest lengths
- enabled warnings
- creating a warning for ignored messages
- creating a warning for skipped rests
- creating a warning for missing Note-OFF messages
- added filters to the warning table
- added key bindings to the export result view
- #58
truj added a commit that referenced this issue Jul 6, 2020
- avoiding unnecessary instrument switches
- removed multiple from the statistics in ALDA decompilation
- replaced tabs by spaces in MidicaPL decompilation
- #58
truj added a commit that referenced this issue Jul 24, 2020
- added decompile config options min_target_ticks_on and max_duration_to_keep
- removed 'multiple option' from the statistics in ALDA decompilation
- removed 'skipped rests' from quality score calculation (it's still in the statistics but without sub score)
- enhanced printing/ignoring of skipped rests in the output file, based on the configuration
- replaced tabs by spaces in MidicaPL decompilation
- treating text areas like text fields regarding printable key bindings
- renamed the decompile key bindings and made them configurable
- #58
truj added a commit that referenced this issue Aug 7, 2020
- changed handling of orphaned syllables from inline to inline-block
- renamed nestable block timelines and their methods
- prepared usage of nestable blocks for other purposes than orphaned syllables (control change, instrument change, etc)
- #58
truj added a commit that referenced this issue Aug 29, 2020
- renamed inline to inline block and block to slice begin block
- added options USE_KARAOKE, ALL_SYLLABLES_ORPHANED and CTRL_CHANGE_MODE
- clarified decompile option description
- #58
@truj
Copy link
Owner Author

truj commented Aug 29, 2020

After changing the config defaults I found problems in a song.
These can be boiled down to the following examples:

INSTRUMENTS
	0    PERCUSSIVE_ORGAN       PERCUSSIVE_ORGAN
END

0  c    /4 d=100%
0  d,b  /4
0  b    /4

* tempo   95
INSTRUMENTS
	0    PERCUSSIVE_ORGAN       PERCUSSIVE_ORGAN
END

0 -     /4
0  c    /4 d=100%
0  d,b  /4
0  b    /4

* tempo   95

They cause different errors. Maybe caused by the same problem, maybe not.
Find the problem and fix it.

truj added a commit that referenced this issue Mar 27, 2021
- fixed null pointer exception in decompilation when instrument change and note-on both begin in tick 0
- cleaned up comments
- added unittest for decompilation (only tests exceptions so far)
- #58
@truj
Copy link
Owner Author

truj commented Mar 28, 2021

Found the reason for #58 (comment).
The Note-OFF tick is moved in order to be able to integrate the note into a chord.
However, it has been moved to the tick of the next Note-ON of the same note.
This caused an exception later because the ON tick is still in the note history but not in the ON/OFF history.

Tried to auto-correct similar issues by moving all conflicting ONs and OFFs to the same direction, without losing any of them.
This avoided exceptions. However it makes the whole decompilation process much more complicated and less reliable.
And the MIDI output is still not correct.

So I'll stick with the following workaround:

  • Check if there are conflicts.
  • In this case: Create a warning and don't move the OFF tick at all
    So in this rare case, we have an output like this:
0  c    /4
0  d    /4 m
0  b    /4
0  b    /4

@truj truj closed this as completed in 04a8851 Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant