This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Requires the Juce audio_utils module for AudioProcessorPlayer | |
class MyAudioProcessor : public AudioProcessor | |
{ | |
public: | |
MyAudioProcessor() {} | |
const String getName() const override { return "MyAudioProcessor"; } | |
void prepareToPlay(double sampleRate, int maximumExpectedSamplesPerBlock) override {} | |
void releaseResources() override {} | |
void processBlock(AudioBuffer<float>& buffer, MidiBuffer & midiMessages) override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../JuceLibraryCode/JuceHeader.h" | |
#ifdef JUCE_WINDOWS | |
#include "windows.h" | |
#endif | |
void test_gain_speeds(int numsamples, int numchannels, int processingmode) | |
{ | |
AudioBuffer<float> buffer(numchannels, numsamples); | |
auto bufptrs = buffer.getArrayOfWritePointers(); | |
Random rng; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .h | |
class XYPadComponent : public Component, public Value::Listener | |
{ | |
public: | |
XYPadComponent(BinauralSpatAudioProcessor& p); | |
void valueChanged(Value& value) override; | |
void mouseDrag(const MouseEvent& ev) override; | |
void mouseWheelMove(const MouseEvent& ev, const MouseWheelDetails& det) override; | |
void paint(Graphics& g) override; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "aeffectx.h" | |
#include <dlfcn.h> | |
typedef AEffect* (*PluginEntryProc) (audioMasterCallback audioMaster); | |
VstIntPtr mycallback (AEffect* effect, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt) | |
{ | |
if (opcode == audioMasterVersion) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .h | |
/* | |
============================================================================== | |
This file was auto-generated! | |
============================================================================== | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
== SOUL example code == | |
"Minimum-Viable-Piano" | |
You probably won't want to use this patch to replace your Bosendorfer, | |
but it shows how to play some re-pitched external sample data, and | |
it'll do a pretty good job of recreating some early 1990s rave piano. | |
In memory of Philip Meehan, who recorded these piano samples for use in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void test_soul() | |
{ | |
SF_INFO outinfo; | |
memset(&outinfo,0,sizeof(SF_INFO)); | |
int outlen = 4*44100; | |
ClassicRingtone tone; | |
std::cout << "soul dsp num outputs : " << tone.getOutputEndpoints().size() << "\n"; | |
outinfo.channels = tone.getOutputEndpoints().size(); | |
outinfo.format = SF_FORMAT_FLOAT|SF_FORMAT_WAV; | |
outinfo.samplerate = 44100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int g_my_action_id1 = 0; | |
// the callback should handle all the actions handled by this single plugin | |
// so, don't add new callback functions separately for each action! | |
bool hookCommandProc(int command, int flag) | |
{ | |
if (command != 0 && command == g_my_action_id1) | |
{ | |
ShowConsoleMsg("Extension test action executed.\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "../JuceLibraryCode/JuceHeader.h" | |
class MyCallback : public AudioIODeviceCallback | |
{ | |
public: | |
MyCallback() {} | |
void audioDeviceIOCallback(const float ** inputChannelData, | |
int numInputChannels, float ** outputChannelData, int numOutputChannels, int numSamples) override | |
{ | |
for (int i = 0; i < numSamples; ++i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char* argv[]) | |
{ | |
ScopedJuceInitialiser_GUI gui_init; | |
AudioDeviceManager aman; | |
String err = aman.initialiseWithDefaultDevices(0, 2); | |
if (err.isEmpty()) | |
{ | |
std::cout << "device opened : " << aman.getCurrentAudioDevice()->getName() << "\n"; | |
ToneGeneratorAudioSource tonesource; // Juce provided AudioSource based sine generator | |
tonesource.setFrequency(440.0); |