Class Test Flashcards
What is Procedural Programming?
Structured, in sequence, function focused, type of programming.
What is Object Oriented Programming?
Flexible, divided into objects, more abstraction, type of programming.
Classes can do what? (3)
- Encapsulate data structures
- Define custom data types
- Inherit from other classes
Most Classes contain what? (4)
- Data members (variables specific to class)
- Function members (functions of class that define behaviour)
- Constructor Function
- Destructor Function
When does a Constructor function run?
When a class instance is created.
When does a Destructor function run?
When object of a class is destroyed.
What is a Object?
An instance of a class, each instance needs a name.
Objects can access functions and variables within the class.
What are the 3 Access Modifiers?
- Private (only accessible within same class)
- Public (accessible anywhere)
- Protected (only accessible within same class, and any that inherit it)
What is the Default Access Modifier?
Private.
What is Data Encapsulation?
Hiding internal state (all interaction through functions)
What is the Inheritance Hierarchy?
Subclasses inherit functionality from Parent classes.
What are Audio Streams?
Flow of audio data, typically broken up into buffers.
What is a Callback, give an example?
Audio Devices have quartz crystals used for timed call backs, this is used to process audio.
Processing Block is an example of this.
What does a Low Buffer result in? (2)
- Low latency
- High processing
What does a High Buffer result in? (2)
- High latency
- Low processing
What is a Buffer Dropout?
When the buffer empties faster than it can be refilled.
What type of system do Buffers use to input/output data?
FIFO
First In, First Out
What does “Call by Value” do?
Changes a copy of a value.
What does “Call by Reference” do?
Changes original value.
What are Subjects also known as?
Broadcasters.
What are Observers also known as?
Listeners.
What is the difference between a “Virtual Function” and a “Pure Virtual Function”?
Virtual functions CAN be overridden.
Pure Virtual functions MUST be overridden.
How to calculate Max Delay Time?
BufferSize / SampleRate * 1,000
How to calculate Min Delay Time?
1 / SampleRate * 1,000,000
What type of Buffer do Delay Lines have?
Circular Buffer
What is Interpolation?
Interpolation is used to approximate values that lie between those in memory.
How to turn Samples into Milliseconds?
(Time in Samples / SamplingRate) * 1,000
How to turn Milliseconds into Samples?
Milliseconds * (SamplingRate / 1,000)
What happens when you Modulate the Read Index of a buffer?
The Modulation Source is summed with the Read Index, changing the distance from the Write.
This change cannot be Higher than the Min/Max Delay Time.
What happens in a Linear Audio Effect System?
Input is changed in Amplitude and Phase only.
Shape is not changed.
What happens in a Nonlinear Audio Effect System?
Shape of Input is changed, resulting in additional frequency content.
Benefits of WaveShaping? (3)
- Memoryless
- Low Computation
- Only relies on Input Signal
What is the WaveShaping Function?
y = f (x)
y = Output
x = Input
f = Nonlinear Function
What is Total Harmonic Distortion?
THD measures the harmonies added in distortion.
What are the types of symmetrical distortions? (3)
- Odd - only odd harmonics.
- Even - only even harmonics.
- Asymmetrical - both odd and even harmonics.
What are Multiband Effects?
The application of processing in parallel frequency bands
What are the types of Crossover Filters? (2)
- Infinite Impulse Response (IIR)
- Finite Impulse Response (FIR)
What criteria do Crossover Filters need to meet? (3)
- Flat pass band with no distortion.
- Maximum attenuation (steep) in stop band.
- Output should produce flat, unchanged signal.
What are common parameters in a Dynamic Range Processor? (4)
- Threshold
- Ratio
- Attack/Release Times
- Knee (Width)
What do Dynamic Range Processors do to the signal? (3)
- Gain = Boosted or Attenuated
- Threshold = Above or Below
- Dynamic Range = Increased or Decreased
How to code a “For Loop”?
for ( int x = 0; x < 10; x++ )
{
“Code Here”
}
What happens in the .h File?
Declaration
What happens in the .cpp File?
Definition
What must the Audio Buffer be large enough to accommodate for?
The maximum number of Input/Output Channels used by the Audio Processor.
How to calculate the WriteIndex?
writeIndex = (writeIndex + 1) % bufferLength;
How to calculate the ReadIndex?
readIndex = ((writeIndex - delayTime) + bufferLength) % bufferLength;
How to calculate the DelayTime using Read/Write?
delayTime = ((writeIndex – readIndex) + bufferLength) % bufferLength;
Benefits of a Fractional Delay Time? (2)
- Allow precise delay times.
- Avoid signal discontinuities when the delay time is modulated.
How to code a simple DelayLine? (4 Lines)
float dry = channelData[i]; // Write Index
float wet = mDelayLine.popSample(channel, DelayTime);
mDelayLine.pushSample(channel, dry + (wet * mFeedback));
channelData[i] = (in + temp) * Wet/DryValue;