Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
import subprocess
import time
import os
import sys
import pyaudio
audio = pyaudio.PyAudio()
audiostream = audio.open(
#!/usr/bin/python3
import serial
import socket
import spidev
import sys
TCP_OK_CODE = b'ok'
TCP_ERR_CODE = b'err'
@giuliom95
giuliom95 / MIDIPedal.ino
Created May 3, 2020 15:35
MIDI pedal on Arduino Micro
#include <EEPROM.h>
#include "MIDIUSB.h"
#define MIDI_NOTEON 0x90
#define MIDI_NOTEOFF 0x80
#define MIDI_CC 0xB0
#define MIDI_SUSTAIN 64
#define MIDI_GM_BASSDRUM 36
#define MIDI_BASE_VELOCITY 64
@giuliom95
giuliom95 / stone_stairs.py
Last active March 7, 2017 14:57
Generating irregular stairs in Maya
"""Little PyMEL script for generating irregular or worn out stairs.
Needs a curve that defines the profile of each step and a bunch of curves to extrude the profile on.
"""
# Import PyMEL and random modules
import pymel.core as pmc
import random
# Select the profile curve and then run this command
profile = pmc.ls(sl=True)[0]