DSP Blockset | ![]() ![]() |
Buffering Sample-Based and Frame-Based Signals
You can buffer a multichannel sample-based or frame-based signal into a multichannel frame-based signal by using the Buffer block in the Buffers library (in Signal Management). The Buffer block has the following key parameters:
Buffering an N-channel (1-by-N or N-by-1) sample-based signal produces a Mo-by-N frame-based signal. Buffering an Mi-by-N frame-based signal (N channels and Mi samples per frame) results in an Mo-by-N output frame-based signal.
For each output buffer, the block acquires the number of new input samples specified by the difference between the Buffer size (Mo) and Buffer overlap (L) parameters. Each new input sample enters at the bottom of the buffer, and is pushed upwards as later samples enter. The first row in the output therefore corresponds to the earliest input sample. Because the block can buffer a signal to a larger or smaller frame size, the number of samples acquired from the input can be greater or less than the number of samples in an individual input frame.
In general, the output frame period, Tfo, is related to the input sample period, Tsi, by
where Mo is the Output buffer size (per channel), and L is the Buffer overlap.
As a result, the new output sample period, Tso, is
Clearly, this is equal to the input sample period only when the Buffer overlap is zero. See Converting Sample Rates and Frame Rates for more information about rate conversions.
The following sections provide examples of buffering, and explore related buffering issues:
![]() | Concatenating Independent Frame-Based Signals into Multichannel Signals | Example: Buffering Sample-Based Signals without Overlap | ![]() |