Skip to content

Instantly share code, notes, and snippets.

View NickCulbertson's full-sized avatar

Nick Culbertson NickCulbertson

View GitHub Profile
@NickCulbertson
NickCulbertson / ESP32_MIDI_BLE.ino
Created January 4, 2024 15:07
This is an Arduino Sketch for a simple arcade button MIDI Controller using ESP32
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <BLE2902.h>
#define SERVICE_UUID "03b80e5a-ede8-4b33-a751-6ce34ec4c700"
#define CHARACTERISTIC_UUID "7772e5db-3868-4112-a1a9-f2669d106bf3"
BLECharacteristic *pCharacteristic;
bool deviceConnected = false;
@NickCulbertson
NickCulbertson / PicoMIDI.ino
Created January 4, 2024 15:05
This is an Arduino Sketch for a simple arcade button MIDI Controller using the Control Surface library and Raspberry Pi Pico
#include <Control_Surface.h>
//
USBMIDI_Interface midi;
using namespace MIDI_Notes;
// Button Rows
NoteButton button1 = { 2, {note(Eb, 3), CHANNEL_1}};
NoteButton button2 = { 3, {note( D, 3), CHANNEL_1}};
NoteButton button3 = { 4, {note(Db, 3), CHANNEL_1}};
@NickCulbertson
NickCulbertson / MiniMIDIController.ino
Last active March 11, 2024 21:58
This is a Teensy/Arduino sketch for a tiny MIDI Controller with transpose.
#include <Control_Surface.h>
USBMIDI_Interface midi;
using namespace MIDI_Notes;
// Transposer that can transpose from one octave down to one octave up
Transposer<-12, +12> transposer;
// Selector to change the transposition
IncrementDecrementSelector<transposer.getNumberOfBanks()> selector {
@NickCulbertson
NickCulbertson / gist:9873b9142a36cb8090e3af7bf6642643
Last active November 2, 2023 21:04
Looping audio test with AudioKit using Timer & CADisplayLink
///This loops between two audio files that are two seconds long.
///The audio files are longer than two seconds to include the fade between files
///
///Using CADisplayLink
import AudioKit
import AVFoundation
import SwiftUI
class InstrumentEXSConductor: ObservableObject, HasAudioEngine {
let engine = AudioEngine()
@NickCulbertson
NickCulbertson / AtariPunk.ino
Last active December 13, 2022 17:48
Arduino MIDI Atari Punk Console
#include <Control_Surface.h>
USBMIDI_Interface midi;
void setup() { Control_Surface.begin(); }
CCPotentiometer potentiometer1 = { A0, {MIDI_CC::General_Purpose_Controller_1} };
CCPotentiometer potentiometer2 = { A1, {MIDI_CC::General_Purpose_Controller_2} };
CCPotentiometer potentiometer3 = { A2, {MIDI_CC::General_Purpose_Controller_3} };
CCPotentiometer potentiometer4 = { A3, {MIDI_CC::General_Purpose_Controller_4} };
void loop() { Control_Surface.loop(); }
@NickCulbertson
NickCulbertson / MIDIButtons.ino
Last active February 26, 2023 20:41
Teensy Arcade Midi Controller
#include <Control_Surface.h>
USBMIDI_Interface midi;
unsigned int octave = 1;
int val1;
int val2;
int val3;
int val4;
bool playing1;
bool playing2;