Closed AuzFox closed 3 years ago
Hello @AuzFox
You did everything correct.
The issue was, that the clock uses two different version on 32-bit and 64-bit systems. Compiling the library via make
did work correctly. But when the header was included directly (#include <BlipKit/BlipKit.h>
) it always recognised the system as 32-bit, which interprets the BKTime
struct differently.
The latest commit fixes this issue.
Great to see that someone uses my library :) Feel free to ask any question.
Hello! I've been using this library to write my own chiptune tracker, and things have been going pretty well, but I've noticed an issue that occurs when using
BKSetPtr()
to set the tick rate of the master clock. My thought process was that I could set the tick rate of the master clock to a value calculated from the desired BPM of the song, and use divider callbacks to trigger notes/fx/etc after a given number of ticks. Simply using different divider values at the default clock rate would lead to rounding errors and inaccurate BPM rates, as mentioned in the documentation/examples.The issue is that changing the period of the master clock seems to cause the divider callbacks to only be executed once and are not called again. I've written a simplified C++ program that illustrates this here:
When I compile and run the above code as is, everything works as intended and a series of 4 notes are played repeatedly. But when a call to
setClockRate()
is made any time after initialization, only the first note is played and held indefinitely.I've even tried calling
setClockRate(240.0)
to set the rate to the default value, and the same problem still occurred.Apologies if this is just a case of user error, and I understand this project hasn't seen much activity lately, but any help would be appreciated. :)