This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SynthDef.new(\DFM1ping, { |out, freq = 440, attack = 1, release = 1, gain = 1, pan = 0, | |
resonance = 0, sustain = 2, transitionTime = 0.875, | |
disProb = 0, disMult =0, ringzAmp = 1, pulseAmp = 0 | | |
var sig, env, resonanceEnv ; | |
freq = freq.clip(20, 20000); | |
env = EnvGen.kr(Env.new([0, 1, 1, 0], [attack, sustain, release], \sine)) ; // An envelope for some stuff. Mostly amplitude. It goes up, then holds there, then goes down again. | |
resonanceEnv = EnvGen.ar(Env.new([resonance, resonance, resonance, 0.9], [attack, sustain, release], curve: \sine)) ; // An envelope for the resonance. | |
sig = DFM1.ar(BrownNoise.ar(1)*Decay.ar(Impulse.ar(0.01),0.1),freq,resonanceEnv) ; // This filter is a special treat. It has character. Get the SC3 plugins now. | |
sig = sig + (Ringz.ar(Dust2.ar(freq.range(0.0,0.0009765625)),freq,attack+sustain+release,ringzAmp) * 0.00025) ; // Ringz is a ringing filter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// Simple DIY Electronic Music Projects | |
// diyelectromusic.wordpress.com | |
// | |
// Simple MIDI Serial Monitor | |
// https://diyelectromusic.wordpress.com/2022/04/06/simple-midi-serial-monitor/ | |
// | |
MIT License | |
Copyright (c) 2020 diyelectromusic (Kevin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <MIDI.h> | |
#define MIDI_HW_SERIAL2 1 | |
// ---- Definitions for MIDI INPUT devices ---- | |
// | |
#ifdef MIDI_HW_SERIAL2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original code is from | |
# https://www.notesandvolts.com/2015/02/midi-for-arduino-input-test.html | |
#include <MIDI.h> // Add Midi Library | |
#define LED 13 // Arduino Board LED is on Pin 13 | |
//Create an instance of the library with default name, serial port and settings | |
MIDI_CREATE_DEFAULT_INSTANCE(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MIDI_CLOCK 0xF8 | |
#define MIDI_CLOCK_PIN 1 | |
// Define the MIDI baud rate | |
#define MIDI_BAUD_RATE 31250 | |
unsigned long previousMicros = 0; | |
unsigned long intervalBetweenTempoChanges = 2000; // 2 seconds in microseconds | |
unsigned long lastTempoChangeTime = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//crude and incomplete but it works | |
var fs = require('fs'); | |
var Buffer = require('buffer').Buffer; | |
var constants = require('constants'); | |
var size = 0; | |
var encoded = ''; | |
var fileName = ''; | |
var wavFileName = ''; | |
var base64FileName = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mashing up breakbeats in Sonic Pi | |
# resulting audio: https://soundcloud.com/kindohm/sonic-pi-breaks | |
# this var changes the playback speed of the breaks, | |
# which in turn controls the loop sleep time and overall tempo | |
rate = 1 | |
# samples paths | |
samples = [] | |
samples.push("C:\\tidal-samples\\samples\\akuma\\Half Baked break a.wav") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
let nn num = stack [speed (segment 1 $ range 0.5 3 $ (cF 1 num)) # s "arpy", s "drum" ] | |
step1 = nn "96" | |
step2 = nn "98" | |
step3 = nn "100" | |
step4 = nn "70" | |
step5 = nn "72" | |
step6 = nn "74" | |
step7 = nn "76" | |
step8 = nn "78" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bps (140/120) | |
do | |
let spat = "[1.2 ~ ~ ~ ~ ~ 0.4 ~ ~ ~]" | |
let fpat = "[0 ~ ~ ~ ~ ~ 127 ~ ~ ~]" | |
let dpat = "[0 ~ ~ ~ ~ ~ 3 ~ ~ ~]" | |
let mod p = spaceOut [1,1.1,0.9,0.95,1.7,1.25,0.8,1.65,1,0.7,0.823,1.5,1,2,1.8] $ p | |
d1 $ mod $ gain spat # note "-12" # s "midi" # midichan 15 | |
d2 $ mod $ control fpat # ctlNum 100 # s "midi" # midichan 15 # midicmd "control" | |
d3 $ mod $ midinote dpat # s "midi" # gain 1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do | |
d1 | |
$ limit | |
$ stack [ | |
-- kick | |
, gain "{1@9 1@6 1@7 1@8}%2" # midichan 1 # note "c3" | |
-- pad swell | |
, gain "{1@15 1@16 1@13 1@12 1@14}%4" # midichan 3 # note "c3" | |
-- pad | |
, slow "<2 3 4 5>" $ (0.5 ~>) $ midichan 7 # note "c3" |
NewerOlder