Skip to content

Instantly share code, notes, and snippets.

@matkatmusic
matkatmusic / ScopedValueSaver.h
Last active September 4, 2018 20:49
a wrapper class for Type that tries to behave exactly like a Type, and adds automatically saving the value to a settings file when modified or being destroyed, and executing a lambda when changed.
/*
==============================================================================
ScopedValueSaver.h
Created: 2 Sep 2018 9:46:07pm
Author: MatkatMusic
==============================================================================
*/
@matkatmusic
matkatmusic / sinewaveWriter.cpp
Last active November 10, 2018 21:06
Simple sinewave generator/writer example
/*
replace your initialize() in your juce GUI project with this
*/
void initialise (const String& commandLine) override
{
// This method is where you should put your application's initialisation code..
/*
we're going to write a 2-second long 16-bit wave file to disk.
*/
@matkatmusic
matkatmusic / OpenGLAudioVisualiserComponent.cpp
Created February 7, 2019 22:23 — forked from wtsnz/OpenGLAudioVisualiserComponent.cpp
A hacky version of the JUCE AudioVisualiserComponent that renders the graph OpenGL
/*
==============================================================================
OpenGLAudioVisualiserComponent.cpp
Created: 15 Apr 2017 8:00:56pm
Author: Will Townsend
==============================================================================
*/
@matkatmusic
matkatmusic / PEMFormatKey.cpp
Created June 9, 2022 04:12
OpenSSL <-> juce::RSAKey
/*
Code that allows conversion of OpenSSL public keys into the juce::RSAKey format.
This may or may not work with private keys.
I have not tested it with private keys from the server, only public keys from the server.
*/
struct PEMHelpers
{
using PEMMemoryBlock = juce::MemoryBlock;
using PEMDataType = juce::uint8;