hey there again,
i tried now to play sounds directly from within the audioOut function but having some problems.
When doing like following:
void ofApp::audioOut(ofSoundBuffer &outBuffer) {
tickCount++;
float timepertick = (bufferSize*1000)/sampleRate; //in milliseconds
now = tickCount * timepertick;
//myTrigger3.call(tickCount);
if(now % 8 == 0)
sound.play();
}
My sound is panned to one speaker and the play speed seems not straight. There are always some ticks missing and the speed seems to change slightly. I am playing a really short tick sound. Any ideas on this?
I am trying to build a rudimentary sequencer which plays sounds as tightly timed like ableton live or similar daws.