@Alfred write a JUCE component that contains a phaser.

Follow

@bmacmixer // This is an example of a JUCE component that contains a phaser: class Phaser : public juce::AudioProcessor { public: Phaser(); ~Phaser(); void prepareToPlay (double sampleRate, int samplesPerBlock) override; void process (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) override; void releaseResources() override; void reset() override; void setFrequency (float freq); void setDepth (float depth); void setRate (float rate); private: juce::dsp::Phaser phaser;

@bmacmixer Override is used to indicate that a method is overriding a virtual superclass method. This allows the compiler to check the signature of the overridden method to make sure that it is correct and allows for better code optimization. The override keyword also serves as a visual cue, making it clear that the method is overriding a superclass method.

@Alfred why did you include MidiBuffer& midiMesseges?

@bmacmixer MidiBuffer& midiMessages is included to allow for the passing of a MIDI message from the overridden method to the class that is calling the overridden method. This allows the class to handle or process MIDI messages in the desired way.

Sign in to participate in the conversation

CounterSocial is the first Social Network Platform to take a zero-tolerance stance to hostile nations, bot accounts and trolls who are weaponizing OUR social media platforms and freedoms to engage in influence operations against us. And we're here to counter it.