Skip to content

Instantly share code, notes, and snippets.

void handleNextEvent(const clap_event_header_t *nextEvent, bool is_from_ui)
{
if (nextEvent->space_id != CLAP_CORE_EVENT_SPACE_ID)
return;
switch (nextEvent->type)
{
case CLAP_EVENT_NOTE_OFF:
case CLAP_EVENT_NOTE_CHOKE:
{
/*
==============================================================================
This file is part of the JUCE examples.
Copyright (c) 2020 - Raw Material Software Limited
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES,
FixedMatrix<Config> m;
FixedMatrix<Config>::RoutingTable rt;
auto source0 = Config::SourceIdentifier{Config::SourceIdentifier::SI::LFO1};
auto source1 = Config::SourceIdentifier{Config::SourceIdentifier::SI::LFO2};
auto source2 = Config::SourceIdentifier{Config::SourceIdentifier::SI::LFO3};
auto source3 = Config::SourceIdentifier{Config::SourceIdentifier::SI::LFO4};
auto source4 = Config::SourceIdentifier{Config::SourceIdentifier::SI::BKENV1};
auto target0 = Config::TargetIdentifier{0};
auto target1 = Config::TargetIdentifier{1};
// based on event list from free-audio clap-wrapper
class SortingEventList
{
public:
union clap_multi_event
{
clap_event_header_t header;
clap_event_note_t note;
clap_event_midi_t midi;
clap_event_midi2_t midi2;
@Xenakios
Xenakios / gist:21bae3f322c73e42e08ceb8a2bc29c37
Created October 22, 2023 19:43
conduit polymetric delay crash
Conduit.clap!sst::jucegui::data::Discrete::~Discrete() Line 33 (c:\develop\conduit\libs\sst\sst-jucegui\include\sst\jucegui\data\Discrete.h:33)
Conduit.clap!sst::conduit::shared::EditorCommunicationsHandler<sst::conduit::polymetric_delay::ConduitPolymetricDelay,sst::conduit::polymetric_delay::editor::ConduitPolymetricDelayEditor>::D2QDiscreteParam::~D2QDiscreteParam() (Unknown Source:0)
Conduit.clap!sst::conduit::shared::EditorCommunicationsHandler<sst::conduit::polymetric_delay::ConduitPolymetricDelay,sst::conduit::polymetric_delay::editor::ConduitPolymetricDelayEditor>::D2QDiscreteParam::`scalar deleting destructor'(unsigned int) (Unknown Source:0)
Conduit.clap!std::default_delete<sst::conduit::shared::EditorCommunicationsHandler<sst::conduit::polymetric_delay::ConduitPolymetricDelay,sst::conduit::polymetric_delay::editor::ConduitPolymetricDelayEditor>::D2QDiscreteParam>::operator()(sst::conduit::shared::EditorCommunicationsHandler<sst::conduit::polymetric_delay::ConduitPolymetricDelay,sst::conduit::polymet
/*
==============================================================================
This file is part of the JUCE tutorials.
Copyright (c) 2020 - Raw Material Software Limited
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
struct ClapManufacturingInfo
{
ClapManufacturingInfo() {}
ClapManufacturingInfo(int index, juce::String fn, const clap_plugin_descriptor_t* desc)
: filename(fn), subpluginindex(index)
{
manufacturer = desc->vendor;
name = desc->name;
auto ptr = desc->features;
while (ptr)
class SampleAccurateTimer
{
public:
SampleAccurateTimer() {}
void setIntervalSamples(int samples)
{
m_counter = 0;
m_period = samples;
}
std::function<void(int)> Callback;
void ClapNoteGenerator::process(double sr,
int samples_to_advance,clap::helpers::EventList& outlist)
{
// notesendfunc is a thing that deals with actually sending the output note events onwards
// my code is doing that in the Clap plugin event format, so the details are not
// super important
if (mustSendNoteOffs)
{
// we were asked to immediately stop producing notes, so just send note offs for everything and bail out
for (auto& e : sequence)
int bufsize = m_aman.getCurrentAudioDevice()->getCurrentBufferSizeSamples();
// need to stop the realtime playback so we don't get conflicts while offline rendering
m_aman.removeAudioCallback(&m_aeng);
m_aeng.seekToSeconds(0.0);
juce::WavAudioFormat wavformat;
juce::File f = juce::File::getSpecialLocation(juce::File::userDocumentsDirectory);
auto outfile = f.getNonexistentChildFile("upic_renders/upic_out",".wav");
auto ostream = outfile.createOutputStream();
auto writer = wavformat.createWriterFor(ostream.release(),m_aeng.m_sr,2,32,{},0);