Skip to content

Instantly share code, notes, and snippets.

View ffAudio's full-sized avatar

Daniel Walz ffAudio

View GitHub Profile
@ffAudio
ffAudio / ResamplerTest.cpp
Created January 21, 2024 21:37
Resample a folder of testsignals
/*
==============================================================================
Resample the test signals in the folder
==============================================================================
*/
#include <juce_core/juce_core.h>
#include <juce_audio_formats/juce_audio_formats.h>
@ffAudio
ffAudio / juceIPC.js
Created December 12, 2023 09:28
JUCE-IPC-JS
// Note: this is a fraction of a backup, it is not supposed to work out of the box!
import * as path from 'path';
import * as os from 'os';
import {createConnection} from 'net';
import {Socket} from 'net';
import {v1} from 'uuid';
import * as Promise from 'bluebird';
import * as retry from 'bluebird-retry';
import { EventEmitter } from 'events';
@ffAudio
ffAudio / AtomicValue.h
Created July 19, 2022 14:33
Wrap an atomic value that always reflects a juce::Value for use in the audio thread
#pragma once
#include <atomic>
#include <juce_data_structures/juce_data_structures.h>
template<typename ValueType>
class AtomicValue
{
public:
@ffAudio
ffAudio / ThreeValueSlider
Created December 5, 2021 18:53
Test for a ThreeValueSlider with TextBoxes
/*
==============================================================================
ThreeValueSlider.h
Created: 5 Dec 2021 6:50:04pm
Author: Daniel Walz
==============================================================================
*/
@ffAudio
ffAudio / MFSafePointer
Created April 18, 2021 14:02
A scoped pointer for MediaFoundation classes
template<typename T>
class MFSafePointer
{
public:
MFSafePointer() = default;
~MFSafePointer()
{
reset();
}
@ffAudio
ffAudio / LomseComponent.h
Created January 2, 2021 23:31
JUCE Component to display a score using lenmus/lomse
/**
\file LomseComponent.h
\author Daniel Walz - Foleys Finest Audio (ffAudio)
This uses JUCE www.juce.com
and lenmus https://github.com/lenmus/lomse
*/
#include "MainComponent.h"
//==============================================================================
MainComponent::MainComponent()
{
text.append ("Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n", juce::Font (14.0f), juce::Colours::white);
text.append ("sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n", juce::Font (20.0f), juce::Colours::white);
text.append ("Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi\n", juce::Font (8.0f), juce::Colours::white);
text.append ("ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit\n", juce::Font (18.0f), juce::Colours::red);
text.append ("in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n", juce::Colours::blue);
@ffAudio
ffAudio / AutoReleasePool.cpp
Last active July 15, 2020 11:43
A juce AutoReleasePool
#include <JuceHeader.h>
class AutoReleasePool : private juce::Timer
{
public:
using Ptr = juce::ReferenceCountedObjectPtr<juce::ReferenceCountedObject>;
AutoReleasePool()
{
startTimerHz (1);
}
#!/usr/bin/python
import sys, json
if len (sys.argv) < 4:
print "Usage: " + sys.argv[0] + " <font.otf> <font_metadata.json> fontname"
exit (-1)
fontname = sys.argv[3]
/*
==============================================================================
MouseOverChecker.h
Created: 13 Aug 2019 1:26:42pm
Author: Daniel Walz
==============================================================================
*/