Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

reading and writing audio buffers with minim

$
0
0
      When I read an audio buffer with a FOR loop (L, R, Mixed) I get a corrupt wave forms.  I looks like processing/minim gets part way through the buffer and it's overwritten by the audio card hardware.  I think processing/minim can't read 16 bit words fast enough.  The buffers are being overwritten about 4 times with a 1024 length buffer.  The 16 bit words in the buffer represent samples at a 44100 Hz rate so if i pick a waveform frequency that's a multiple of 2 the buffer will always have the same data and the waveform will look correct even while the buffer has been overwritten. When I use a 344.5313 Hz (44100/128) the waveform in the buffer is static and uncorrupted.  (Note 128 = 2^7)  

      My question is if processing/minim can read all 1024 16 bit words with a read array buffer command?  This may be faster than by reading each element with the FOR loop.   What do you think?  As I am very new to minim could you include some code with your comments.

      My next question is if minim can take raw 16 bit data from processing to generate periodic sounds?  Can you write to the audio buffers.  What do you think?  Please include some code with your comments.

Viewing all articles
Browse latest Browse all 1768

Trending Articles