Why this code give to me value "4" instead of "0"?
#define PLUGIN_PPQ 96
#define MIDIENGINE_SCORE_LENGTH PLUGIN_PPQ * 4
int main ()
{
int mCurrentPatternPulse = 97;
int patternBar = (int)floor(mCurrentPatternPulse / MIDIENGINE_SCORE_LENGTH);
cout << "value: " << patternBar << " (" << MIDIENGINE_SCORE_LENGTH << ")";
}
97/384 (with/without floor) should give to me 0.
But it seems it divides by 96 instead of 384? Even if I print MIDIENGINE_SCORE_LENGTH
is 384...