Skip to content

Instantly share code, notes, and snippets.

#define USE_AVX2_AMBIS
#ifdef USE_AVX2_AMBIS
// Process 8 channels at a time using AVX
int chan = 0;
for (; chan <= num_outputchans - 8; chan += 8)
{
// Load 8 ambisonics coefficients for each source
__m256 coeffs0 = _mm256_load_ps(&ambcoeffs[chan]); // coeffs for outsample0
__m256 coeffs1 = _mm256_load_ps(&ambcoeffs[chan + 64]); // coeffs for outsample1
// Public domain. No guarantees.
// Noise that tends to produce values as far as possible from the current value
// especially with higher depths
class BlueNoise
{
public:
BlueNoise(unsigned int seed = 0) : m_rng{seed, 1} { m_previous = m_rng.nextFloat(); }
float operator()() noexcept
{
float maxdist = 0.0f;
// This effect Copyright (C) 2004 and later Cockos Incorporated
// License: LGPL - http://www.gnu.org/licenses/lgpl.html
// fade fix/improvements thanks to dan mcmullen
desc: Delay w/Reverseness
//tags: processing sampler mangler delay
//author: Cockos
slider1:500<0,4000,10>Length (ms)
slider2:-6<-120,6,1>Wet Mix (dB)
diff --git a/choc/javascript/choc_javascript.h b/choc/javascript/choc_javascript.h
index 95f1678..3abefcf 100644
--- a/choc/javascript/choc_javascript.h
+++ b/choc/javascript/choc_javascript.h
@@ -97,6 +97,7 @@ namespace choc::javascript
operator bool() const { return pimpl != nullptr; }
//==============================================================================
+
/// This callback is used by the run() method.
inline void test_clipsource()
{
juce::AudioFormatManager mana;
mana.registerBasicFormats();
auto reader =
mana.createReaderFor(juce::File(R"(C:\MusicAudio\sourcesamples\ukulele\uku01.wav)"));
double outsr = 96000.0;
auto readersrc = std::make_unique<juce::AudioFormatReaderSource>(reader, true);
auto src = std::make_unique<ClipAudioSourceModel>(std::move(readersrc), juce::String("foo"),
0.0, 0.0, 1.0, mana);
struct Gendyn2026
{
struct Node
{
float x0 = 0.0f;
float y0 = 0.0f;
};
alignas(16) std::array<Node, 256> nodes;
alignas(16) double phase = 0.0;
alignas(16) double phaseincrement = 0.0;
inline void test_choc_scandinavian()
{
choc::audio::WAVAudioFileFormat<true> wavformat;
std::vector<std::string> filenamestotest{
R"(C:\MusicAudio\sourcesamples\test_signals\tones\😮_count_🧨.wav)",
R"(C:\MusicAudio\sourcesamples\test_signals\tones\count.wav)",
R"(C:\MusicAudio\sourcesamples\test_signals\tones\ÄÖÅ_count_äöå.wav)"};
std::print("testing with std::string paths directly\n");
for (auto &path : filenamestotest)
{
#include <pybind11/pybind11.h>
#include <pybind11/buffer_info.h>
#include <pybind11/stl.h>
#include <pybind11/numpy.h>
#include "../Common/xap_breakpoint_envelope.h"
#include "sst/basic-blocks/dsp/EllipticBlepOscillators.h"
#include "sst/basic-blocks/dsp/DPWSawPulseOscillator.h"
#include <print>
namespace py = pybind11;
#include <iostream>
#include <print>
#include "sst/basic-blocks/simd/setup.h"
#include "include/sst/waveshapers.h"
#include <cmath>
#include <vector>
#include <random>
#include <algorithm>
int main()
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include <complex>
class Example : public olc::PixelGameEngine
{
public:
Example() { sAppName = "Mandelbrot"; }
public: