Skip to content

Instantly share code, notes, and snippets.

#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include <complex>
class Example : public olc::PixelGameEngine
{
public:
Example() { sAppName = "Mandelbrot"; }
public:
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <complex>
#include <vector>
int main()
{
size_t w = 120;
size_t h = 40;
cmake_minimum_required(VERSION 3.16)
set(CMAKE_CXX_STANDARD 17)
set(CMAJ_CMAKE_PROJECT_NAME "Pro54")
set(CMAJ_TARGET_BUNDLE_ID "dev.cmajor.examples.pro54")
set(CMAJ_TARGET_PATCH_VERSION "1.0")
set(CMAJ_TARGET_NAME "Pro54")
set(CMAJ_TARGET_BUNDLE_NAME "${CMAJ_TARGET_NAME}")
diff --git a/src/dsp/matrix_node.h b/src/dsp/matrix_node.h
index a728ced..0c953cf 100644
--- a/src/dsp/matrix_node.h
+++ b/src/dsp/matrix_node.h
@@ -705,7 +705,7 @@ struct OutputNode : EnvelopeSupport<Patch::OutputNode>,
mech::scale_by<blockSize>(finalEnvLevel, output[0], output[1]);
- auto pn = panMod + pan + panModNode.level;
+ auto pn = panMod + pan + panModNode.level + voiceValues.panExpression;
namespace sst::osc_adapter
{
struct OSCAdapter
{
OSCAdapter(const clap_plugin *p); // bind to this plugin
const clap_input_events *getInputEventQueue() { return eventList.clapInputEvents(); }
clap_output_events *getOutputEventQueue(); // auto thread event queue
void startWith(uint32_t inputPort, uint32_t outputPort)
{
/*
The C++ standard library random stuff can be a bit bonkers(*) at times,
so we have this custom class which has a decent enough random base generator
and some simple methods for getting values out as floats etc...
(*) See for example the Microsoft implementation of std::uniform_int_distribution...
Or the Cauchy distribution, which won't allow a scale factor of 0 to be used, while
useful for our audio/music applications as a special case.
*/
inline juce::String renderFile(juce::File inputFile, juce::File outputFile)
{
if (!outputFile.hasFileExtension(("wav")))
return "output file must be .wav";
juce::AudioFormatManager fman;
fman.registerBasicFormats();
auto reader = std::unique_ptr<juce::AudioFormatReader>(fman.createReaderFor(inputFile));
if (reader == nullptr)
return "could not create input file reader";
juce::WavAudioFormat wavformat;
/*
If we were dealing with plain old MIDI, tracking active notes could be
done with something as simple as : bool activeNotes[16][128];
Clap however complicates this as we want to also take into account the
note ports and note ids.
Theoretically we could use std::unordered_set<PCKI> or something
for this but then we couldn't control the number of buckets,
memory allocations etc.
#pragma once
#include "libMTSClient.h"
#include <cmath>
namespace mtsesp_wrapper
{
class MIDIKeyTuner
{
public:
#define WIN32_LEAN_AND_MEAN
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <memory>
#include <iostream>
#include <format>
#include "offlineclaphost.h"
#include "oscpkt.hh"
#include "udp.hh"