problem with a buffer size

    Aug 19 2013 | 4:27 pm
    Hello everybody,
    I try to build a simple looper (with the help of this forum) and i have some problems with my buffer.
    My problem is, when i record something (synchronize with metro or transport), the size of my buffer don't match with the time of my recording.
    For exemple, i record during 1000ms and the buffer record only 935ms. It's very problematic because i want to play on these loops...
    It's not a computer probleme because i tested this patch on several computers. Thank You !! Here is my patch

    • Aug 19 2013 | 4:29 pm
    • Aug 20 2013 | 12:04 am
      It appears that you're calculating the buffer length (which is determined by the second argument of the 'crop') message using the float output (right outlet) of the number~ object. However, in the number~ object's Inspector, you will note that its update interval is every 100 ms. Therefore, it's reasonable to expect that it will not report exactly in sync with your metro and will be off by, on average, about 50 ms. I suggest not using that method of determining the cropping length, or even better, not cropping at all. Why not just set the size of the buffer to be the same as the metro interval, and leave it so?
    • Aug 20 2013 | 9:21 am
      Thank you very much for your answer Christopher, I checked the number~ object and the minimum i can put is 20ms.It's better but not perfect. The reason i use this method rather than any other is that i want to be able to adjust the buffer size according to my needs. For example record one sound not synchronized, or 2000ms synchronized with metro~ etc...But if i understand what you said, it's not possible, i have to use two different way for the recording.Except if you have an other solution ! Thank you.
    • Aug 20 2013 | 3:56 pm
      As far as I can see, there's no reason to be using the sync output of record~ and the float output of number~ to set the buffer size. You're trying to use the sync output of record~ and some calculations to figure out information that you already know elsewhere in your patch. Instead, just set the buffer size you want, and then start recording. In this example, you can set the duration of the chunk of sound you want to record, then record it -- either using your metro scheme for recording alternate chunks, or just recording independently by sending 1 to the record~ object.
    • Aug 20 2013 | 9:39 pm
      Thanks for the patch, i didn't think to use the metro object to set the buffer size! So now i've two solution. If I want to record something synchronize I can use your method and if i want to set another buffer size (not synchronized) i can use the clocker object.
      Thanks again Christopher.
      Here is update