Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

More calls per second for more accurate timing, sequencer, threads

$
0
0

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.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>