Skip to content

Instantly share code, notes, and snippets.

View diegodukao's full-sized avatar

Diego Moreira Guimarães diegodukao

View GitHub Profile
@rbnpi
rbnpi / debrisplustomtoms.rb
Last active April 10, 2018 19:16
Two previous pieces Tom Tom rhythms and Debris played together by Sonic Pi. Listen to it here. https://soundcloud.com/user-195236670/debrisplustomtoms
#Tomtom rhythms found on wikipedia https://en.wikipedia.org/wiki/Rhythm_in_Sub-Saharan_Africa#/media/File:Standard_pattern,_six_beats.png
#form the basis of this piece coded for Sonic PI by Robin Newman, December 2017
#version 2, more interesting bass. Best with a pair of decent speakers with good bass response!
# here played together with my piece Debris
t=Time.now
l1=(ring 1,0,1,0,1,0,1,0,1,0,1,0)
l2=(ring 0,1,0,1,0,1,0,1,0,1,0,1)
l3=(ring 0,1,0,0,1,1,0,1,0,1,0,1)
l4=(ring 1,0,1,0,1,1,0,1,0,1,0,1)
@rbnpi
rbnpi / ReadMe.md
Last active December 23, 2018 05:05
Recorder Player for Sonic Pi Read the accompanying article at https://rbnrpi.wordpress.com/project-list/sonic-pi-3-player-recorder-using-touchosc/ for details of setup. Also there is a video at https://youtu.be/2yoJ2ygs0xM

Sonic Pi Record / Player

The three other files enable a TouchOSC interface to be used with Sonic Pi 3 and above to allow notes to be played on Sonic Pi, and also recorded in real time for subsequent replay. Recordings can also be stored in files on your computer. NB spRecordPlayer.rb changed to release 1.0.1 line 144 updated "piano,"pluck" changed to :piano,:pluck

The two Sonic Pi programs should be loaded into separate buffers, where they are both run. At any time you can re-run either file. If you ever press the stop button you must re-run both.

@rbnpi
rbnpi / ps3.py
Last active November 2, 2020 00:15
Control Sonic PI 3 from a wireless PS3 games controller See video at https://youtu.be/8HcHKyhZaSM
#!/usr/bin/env python3
#ps3 wireless controller interface by Robin Newman July 2017
#converts controller inputs to OSC messages
#which can be output to Sonic Pi 3, running on the local computer, or on an external machine
#rtested with ps3 "afterglow" wireless controller, dongle in Pi usb socket
#needs sudo apt-get install joystick after sudo apt-get update
#also needs sudo pip3 install python-osc
#Version 2. Modified to ensure clean exit on Ubuntu
import subprocess,pygame,sys
@nwjlyons
nwjlyons / common.sh
Last active September 5, 2021 22:21
Instructions on how to wire up your MacBook Pro function keys to control your laptop hardware in Crunchbang
#! /bin/bash
case $1 in
up)
TOTAL=`expr $CURRENT + $INCREMENT`
if [ $TOTAL -gt $MAX ]; then
exit 1
fi
echo $TOTAL > $FILE
;;