Can someone explain what samples per buffer is?

Author
SeveredVesper
Max Output Level: -68 dBFS
  • Total Posts : 1120
  • Joined: 2009/06/28 23:53:38
  • Location: Philippines
  • Status: offline
2010/02/01 04:56:26 (permalink)

Can someone explain what samples per buffer is?

Can someone explain what samples per buffer is and how it can affect my playback, recording  and exportation?

Check out my band's song on YouTube!

#1

9 Replies Related Threads

    Wookiee
    Rrrrugh arah-ah-woof?
    • Total Posts : 13306
    • Joined: 2007/01/16 06:19:43
    • Location: Akahaocwora - Village Yoh Kay
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/01 13:38:54 (permalink)
    Samples per buffer is the number of meaningful bytes of data held in the respective processing pool.

    To big and each pool takes longer to process too small and they can overflow, loose data before processing.

    Generally they should not affect an export unless you are doing some processing on export then the only real effect would be to increase the time to export by a few seconds.

    When recording too big and it will affect the latency especially if you are monitoring the input via DAW processing.  i.e. Playing you guitar through GR3/4 and hearing the effects as you play. Or using soft-synths played from a controller.

    Playing back to small will reduce the amount of processing that can occur before dropouts happen.

    Does that make it any clearer?

    Life is not about waiting for the storm to pass, it's about learning to dance in the rain.
    Karma has a way of finding its own way home.
    Primary, i7 8700K 16Gigs Ram, 3x500gb SSD's 2TB Backup HHD Saffire Pro 40. Win 10 64Bit
    Secondary  i7 4790K, 32GB Ram, 500Gb SSD OS/Prog's, 1TB Audio, 1TB Samples HHD AudioBox USB, Win 10 64Bit
    CbB, Adam's A7x's - Event 20/20's, Arturia V6, Korg Digital Legacy, Softube Modular, Arturia Keylab-88, USB-MidiSport 8x8 
    #2
    SeveredVesper
    Max Output Level: -68 dBFS
    • Total Posts : 1120
    • Joined: 2009/06/28 23:53:38
    • Location: Philippines
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/02 09:06:22 (permalink)
    Is there sound quality lost if too less of it is used? And if so, which parts does it affect? Playback, recording, or even the final product? And what kind of "processing" are we talking about here? Thanks!

    Check out my band's song on YouTube!

    #3
    mgh
    Max Output Level: 0 dBFS
    • Total Posts : 8594
    • Joined: 2007/05/10 05:15:56
    • Location: betwixt and between
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/02 10:04:46 (permalink)
    i guess you mean sample rate in exporting, does it lose quality at 44.1 compared to 48/88.2/96 etc? yes. it'd dithered down using some kind of algorithm, and very well done, but yes ultimately you lose 'samples' ie frequencies. you'd have to have a good ear, mind, with todays better resamplers such as the POW-R ones included with SOnar... note that dvd-a is at a higher sample rate than cd audio, for example...
    ps this is different to the number of samples kept in a buffer, which is designed to keep audio playback constant...
    post edited by mgh - 2010/02/02 10:06:14

    Memorare debut album 'Philistine' available now http://blackwoodproductio...philistine-digipack-cd
    #4
    Wookiee
    Rrrrugh arah-ah-woof?
    • Total Posts : 13306
    • Joined: 2007/01/16 06:19:43
    • Location: Akahaocwora - Village Yoh Kay
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/02 11:23:58 (permalink)
    SeveredVesper


    Is there sound quality lost if too less of it is used? And if so, which parts does it affect? Playback, recording, or even the final product? And what kind of "processing" are we talking about here? Thanks!

    Within the confines of the application I doubt it would actually affect the sound.
     
    By processing I mean anything done to change the sound from as simple as volume changes through EQ, FX such as delay or modulation to such more intensive changes such as pitch or reverberation. 
     
    As MGH noted when exporting to 16Bit files for CD production there may be some subtle loss but with appropriate dithering, unless you have truly Golden ears, a perfect audio reproduction space and you are not comparing 16Bit A to D converts with 64Bit A to D converters, then you would struggle to really hear any difference.
     
    One should also be careful regards DVD audio not all DVD players actually use 16bit for audio some use less.

    Life is not about waiting for the storm to pass, it's about learning to dance in the rain.
    Karma has a way of finding its own way home.
    Primary, i7 8700K 16Gigs Ram, 3x500gb SSD's 2TB Backup HHD Saffire Pro 40. Win 10 64Bit
    Secondary  i7 4790K, 32GB Ram, 500Gb SSD OS/Prog's, 1TB Audio, 1TB Samples HHD AudioBox USB, Win 10 64Bit
    CbB, Adam's A7x's - Event 20/20's, Arturia V6, Korg Digital Legacy, Softube Modular, Arturia Keylab-88, USB-MidiSport 8x8 
    #5
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/02 11:59:56 (permalink)

    Can someone explain what samples per buffer is and how it can affect my playback, recording and exportation?

     
    Let's try another explanation;
     
    Audio is streamed in chunks. Those chunks are held by buffers. A typical chunk contains from 32 to 256 samples (instantaneous measurements of the signal amplitude) or more. In a hypothetical 48kHz system (48000 samples per second), a buffer of 64 samples delivers 1.5ms (milliseconds) of music. Small buffers give a faster response to control changes in your DAW and a shorter delay when echoing input back to the output for monitoring with effects added by the DAW, but small buffers have to be re-filled at a very high rate, putting a high load on the CPU (imagine a bucket brigade trying to put out a fire by passing teaspoons of water).
     
    If the CPU can't keep up with the demand, and one of those "teaspoons" comes up empty because it had to be passed before it could be filled, you get a dropout. A single empty buffer will give you one pop or click. A series of them will sound like static.
     
    All of this only matters for real-time streaming of audio (which could include effects processing and multi-track summing, adding to the work the CPU has to do before it can pass  a chunk of audio samples to the buffer).
     
    Exporting is not a real-time process, it's just "offline" number-crunching and file-writing. The audio interface, sample clock and sample bufffers are not involved. The audio can be processed in much larger chunks and in ways that are more CPU-efficient, so export is actually faster than real-time streaming. So long as all of the plug-ins in the project are compatible with the higher non-realtime processing rate (mosts are, but many disk-streaming synths and some effects plug-ins are not) There is no effect on audio quality of the finished export.
     
    Hope that helps clear some things up.
    post edited by brundlefly - 2010/02/02 12:07:01
    #6
    Guitarhacker
    Max Output Level: 0 dBFS
    • Total Posts : 24398
    • Joined: 2007/12/07 12:51:18
    • Location: NC
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/02 16:28:05 (permalink)
    Brundlefly has a very good illustration.  You want to find a happy medium where the computer can handle all the data without dropping any buffers. The more processing that has to be done, the more likely it is to drop one that doesn't "get filled" properly.

    Another way to lessen the load is to bounce the tracks with synths and FX to audio. I like to keep an eye on my disk usage and CPU meter...when either start climbing, it's time to bounce something to audio and eliminate a synth.  Some synths and FX are very heavy CPU users and will cause drops and pops, and clicks in real time.....

    Exporting is not real time so no need to worry about buffers for exporting..... just recording and playback.

    My website & music: www.herbhartley.com

    MC4/5/6/X1e.c, on a Custom DAW   
    Focusrite Firewire Saffire Interface


    BMI/NSAI

    "Just as the blade chooses the warrior, so too, the song chooses the writer 
    #7
    SeveredVesper
    Max Output Level: -68 dBFS
    • Total Posts : 1120
    • Joined: 2009/06/28 23:53:38
    • Location: Philippines
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/03 10:09:04 (permalink)
    Thanks for the intial thought Wookie, thanks for the further clarification brundlefly and thanks for even more info Guitarhacker. Know i understand. I was just afraid to change it before because i though it would affect my recording quality, and exporting too. Thanks a hellload!

    Check out my band's song on YouTube!

    #8
    bitflipper
    01100010 01101001 01110100 01100110 01101100 01101
    • Total Posts : 26036
    • Joined: 2006/09/17 11:23:23
    • Location: Everett, WA USA
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/04 11:31:54 (permalink)
    ...imagine a bucket brigade trying to put out a fire by passing teaspoons of water...

    That's an imaginative analogy, brundlefly! A bucket brigade of teaspoons - how Lewis Carrol. The next question, though, will probably be "what's a 'bucket brigade'?".

    SeveredVesper: the short answer is no, buffer size does not effect audio quality. As long as they're not so small that you start getting dropouts.


    All else is in doubt, so this is the truth I cling to. 

    My Stuff
    #9
    brundlefly
    Max Output Level: 0 dBFS
    • Total Posts : 14250
    • Joined: 2007/09/14 14:57:59
    • Location: Manitou Spgs, Colorado
    • Status: offline
    Re:Can someone explain what samples per buffer is? 2010/02/05 18:05:53 (permalink)
    That's an imaginative analogy, brundlefly! A bucket brigade of teaspoons - how Lewis Carrol.

    Thanks, Bit. It just came to me suddenly. I thought that might elicit a smile or two. 



    The next question, though, will probably be "what's a 'bucket brigade'?".

    That occured to me also. Pretty soon no one is going to remember why we call it "dialing" the telephone, either. 

    #10
    Jump to:
    © 2025 APG vNext Commercial Version 5.1