CoderLine / alphaTab

alphaTab is a cross platform music notation and guitar tablature rendering library.
http://www.alphatab.net
Mozilla Public License 2.0
1.27k stars 202 forks source link

Octave issue #141

Closed yaras6 closed 7 years ago

yaras6 commented 7 years ago

Your environment

Expected Results

Render track in same as in previous versions.

Observed Results

Some tracks are rendered one octave higher. Instead 2nd thread is 14th, insted 4th is 16th etc.

Steps to Reproduce (for bugs)

Please download song and load it with newest alphaTab version

  1. http://tuneguitar.net/pl/Player/DownloadSong?songId=18480&type=1

Proper result of rendering with old version is available on

  1. http://tuneguitar.net/pl/Player?songId=18480&type=1

Currently same song looks like this image

Thanks in advance for your help. Did you changed any core functionality?

yaras6 commented 7 years ago

On your fiddle issue exists too. Please increase count to see the issue. Probably issue exists in all or most tabs https://jsfiddle.net/danielku15/jo64pgLp/

Danielku15 commented 7 years ago

Thanks for the report.

Looks like a side effect of #139 In general it is correct that the standard music notation is 1 octave lower on Guitar instruments. I corrected the behavior that for non-guitar instruments the standard notation is 1 octave higher. This behavior is then consistent with Guitar Pro.

As part of the last rework in #139 I added 2 separate transposition pitches. The first one is used for transposing the standard notation, the second one does a full transposition of the music notation (including tabs and audio playback). At 1-2 positions I used the wrong transposition value which caused the tabs to have the wrong values. This is fixed now.

Sadly the visual rendering is really hard to unit test. I need to find a good solution for this in future to prevent such bugs.

yaras6 commented 7 years ago

Now looks fine. Thanks a lot