Digital Audio Processing
Sampling Rate and Sampling Period
with:
- : Sampling rate in
- : Sampling period in
Samples and Frames
A frame is a list of a sample for each channel at a given time.
Block/Buffer
A block is a number of consecutive samples for each channel for the same time.
Sometimes this is called a buffer. But that term is used for different things, too.
Samples per Block
This term is ambiguous:
- frames in a block
- samples in a channel in a block
Buffer length calculations
Duration
umber of frames: number of samples in a single channel of the buffer
Audio Plugin Architecture
Editor: GUI Processor: DSP audio processing code
Processor
Initialization of the processor:
createPluginFilter()prepareToPlay()
- can be called multiple times
processBlock()
- called for each block providing the buffer to process
- MIDI messages are also provided
- called many times per second
- needs to finish on time
- can still be called when playback is stoppend
Closing the plugin:
releaseResources()- destructor called
Editor
- Can be opened and closed by user.
- Plugin needs to work even when there is no editor.
- No audio related code in editor!