Native Sequencer First Contact
As you can see from the video below, first contact has been made between the new native sequencer code written in C++ and the GUI code written in Java. There are now no crossings of the horrid JNI bridge which causes severe performance penalties in the audio process.
As you can also spot in the video the playhead is not moving. At this time there is still a lot missing, but the fact that it is compiling and actually running as intended is a substantial milestone.
Do keep in mind that there was a lot which had to be learned to get here:
- C++
- Test driven development
- How the Java Native Interface works
It can of course be debated how much of an impact the performance improvements will have on modern hardware. The effort is still worth it since I am now much more capable of comprehending and making use of existing open source C++ code and examples, which there are lots of in the audio realm. The code being cleaner and tested means that implementing future features will be easier.
The next step is to reimplement the movement of playhead. This is not quite trivial, as we have to take latency into account. The movement of the playhead has to be delayed in accordance to the delay set in preferences as well as reacting instantly to changes in the song (i.e deleting or adding patterns). It is a bit complicated, but we will get there.