Skip to content

Rework state handling of one-time-midi#787

Merged
Danielku15 merged 6 commits into
developfrom
feature/new-playbeat
Mar 12, 2022
Merged

Rework state handling of one-time-midi#787
Danielku15 merged 6 commits into
developfrom
feature/new-playbeat

Conversation

@Danielku15
Copy link
Copy Markdown
Member

@Danielku15 Danielku15 commented Mar 12, 2022

Issues

Fixes #758

Proposed changes

Reworks quite some internals of the synthesizer to ensure that the one time midi playback behind playBeat and playBeat are working correctly. it suffered from following issues:

  • Seeking during playback interfered with the playback position of the one time midi while it should seek on the main song midi. When playing notes/beats on mouse click, there happened a playback and seeking which messed up a lot of internals.

  • Multiple subsequent requests of playing one time midis before they actually finished also messed up some internal states.

  • The synth outputs reported also played samples if there weren't enough samples in the buffer. This wrongly advanced the internal player time axis.

  • The bounds lookup had a wrong assumption that there is only one bounds for a beat, but there can be multiple, due to this findNoteAt did not work correctly.

  • There was a wrong time value passed to the midi note generation of playNote leading the note to never being played.

  • New: Events when a note is clicked. These events are available if the note bounds are included.

Checklist

  • I consent that this change becomes part of alphaTab under it's current or any future open source license
  • Changes are implemented
  • Existing builds tests pass
  • New tests were added

Further details

  • This is a breaking change
  • This change will require update of the documentation/website

@Danielku15 Danielku15 self-assigned this Mar 12, 2022
@Danielku15 Danielku15 marked this pull request as ready for review March 12, 2022 21:17
@Danielku15 Danielku15 merged commit 478679f into develop Mar 12, 2022
@Danielku15 Danielku15 deleted the feature/new-playbeat branch March 12, 2022 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playNote() and playBeat() issues

1 participant