Skip to content

Instantly share code, notes, and snippets.

View sudara's full-sized avatar
🧪
Brewing new formulas

Sudara sudara

🧪
Brewing new formulas
View GitHub Profile
@sudara
sudara / core_audio_tap_example.m
Created May 11, 2024 17:56 — forked from directmusic/core_audio_tap_example.m
An example how to use the new Core Audio Tap API in macOS 14.2.
// This is a quick example of how to use the CoreAudio API and the new Tapping
// API to create a tap on the default audio device. You need macOS 14.2 or
// later.
// Build command:
// clang -framework Foundation -framework CoreAudio main.m -o tapping
// License: You're welcome to do whatever you want with this code. If you do
// something cool please tell me though. I would love to hear about it!



An awesome list of open source JUCE libraries, plugins and utilities.

Organized by category. Stats update nightly.

@sudara
sudara / renderDropShadow.h
Created June 15, 2022 11:50
Drop shadows in JUCE
static void renderDropShadow (juce::Graphics& g, const juce::Path& path, juce::Colour color, const int radius = 1, const juce::Point<int> offset = { 0, 0 }, int spread = 0)
{
if (radius < 1)
return;
auto area = (path.getBounds().getSmallestIntegerContainer() + offset)
.expanded (radius + spread + 1)
.getIntersection (g.getClipBounds().expanded (radius + spread + 1));
if (area.getWidth() < 2 || area.getHeight() < 2)
@sudara
sudara / skitch2image.rb
Created June 21, 2021 17:01
Recover your .skitch files
#!/usr/bin/env ruby
# Prereq:
# gem install ox
# Usage:
# cd my_skitch_directory
# ./sktich2image.rb
# Warning #1: This doesn't check for the target .png/.jpg, etc, it just writes to the same filename as the skitch but with a png/jpg extension.
@sudara
sudara / cmake.md
Last active September 16, 2020 21:42
How to put an existing JUCE app on CMAKE
2019-3-4 23:0:30:444 REQUEST [2019-3-4 23:0:30:444] POST /session {"desiredCapabilities":{"browserName":"firefox","acceptSslCerts":true,"platform":"ANY","build":"local","browserstack.debug":true,"browserstack.local":true,"browserstack.console":"errors","os":"Windows","os_version":"10","browser":"Firefox","name":"02 Playback","acceptSslCert":true}}
2019-3-4 23:0:30:444 START_SESSION
2019-3-4 23:0:30:445 REQUEST [2019-3-4 23:0:30:445] GET /session/3f8b12b48869ea6522b28f876891dc25665f6882
2019-3-4 23:0:30:445 RESPONSE {"value":{"sessionId":"3f8b12b48869ea6522b28f876891dc25665f6882","capabilities":{"moz:profile":"C:\\Windows\\proxy\\rust_mozprofile.rIHl9pk02x68","rotatable":false,"capabilities":{"desiredCapabilities":{"acceptInsecureCerts":true,"browserVersion":"65.0","browserName":"firefox"}},"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"pageLoadStrategy":"normal","unhandledPromptBehavior":"dismiss and notify","strictFileInteractability":false,"moz:headless":false,"moz:accessibilityChecks":false,"
{
"files.associations": {
"*.js.erb": "javascript"
},
"workbench.editor.enablePreview": false,
"editor.selectionHighlight": false,
"telemetry.enableTelemetry": false,
"eslint.packageManager": "yarn",
"editor.fontFamily": "Operator Mono SSm",
"editor.fontSize": 14,
@sudara
sudara / perf_check.rb
Created May 6, 2018 11:36
config/perf_check.rb
# Place this at config/perf_check.rb in your app it will be included by bundle exec perf_check
# See https://github.com/rubytune/perf_check/blob/2988bcdfc1430ab6f83d526cc87c660719fe4144/lib/perf_check.rb#L47-L54
require 'shellwords'
options = perf_check.options
# Add a new option to perf_check that allows us to pass in a user
# You could also hardcode the actual user to allow --admin or --moderator
perf_check.option_parser.on('--user USER', '-u', 'Login as user') do |user|
def bloat
num_days = 50000000
start = Time.now
range = start.utc.to_date...(start.utc.to_date + num_days.days)
range.select{|t| [6, 0].include?(t.wday)}.size
render text: "have a bloaty good day!"
end

Definitions

Intervals
  Dissonant
    Second, Fourth, Tritone, Seventh (plus octave versions)
  Consonant
    Perfect
      Unison, Fifth (plus octave versions)
 Imperfect