I have tried by :
It doesn't work.
It can't work when the song doesn't start of the first beat of the bar.
Any idea ?
SongBpm = SongBpm ? SongBpm : (SampleRate / 2);
int StartPos = int(SongPosBeats * SongBpm);
int intSongPosBeats = SongPosBeats;
int PosNextBar = StartPos + (SongBpm * (4 - (intSongPosBeats % 4))) + (SongBpm * (SongPosBeats - intSongPosBeats));
It doesn't work.
It can't work when the song doesn't start of the first beat of the bar.
Any idea ?
Posted Sun 27 Sep 20 @ 11:34 am
Something like this?
int PosNextBar = SongPos + (ceil(SongPosBeats/4)*4 - SongPosBeats) * SongBpm;
Posted Sun 27 Sep 20 @ 11:55 am
Thank you Adion.
It works !!!
It works !!!
Posted Sun 27 Sep 20 @ 4:11 pm