distraction mode
fullscreen mode
autoscroll from/to source
termial settings -> don't override shortcuts
presentation asist
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
# Soundcloud: https://soundcloud.com/hopbit/live-coding-session-2015-08-05 | |
live_loop :melody do | |
#sync :cyk | |
#stop | |
use_synth :piano | |
#play :D5 | |
sleep 0.2 | |
#play :C5 | |
sleep 0.2 | |
play :E5 |
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
# Soundcloud preview: | |
# https://soundcloud.com/hopbit/simple-kick-pattern-with-random-amp-129-bpm | |
use_bpm 129 | |
live_loop :kick do | |
sample :elec_mid_snare, amp: rand(1.25) | |
sleep 0.25 | |
end |
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 CHARGE_PIN 13 | |
#define DISCHARGING_PIN 12 | |
#define VOLTAGE_PIN A0 | |
#define R 10000.0F | |
void setup() { | |
pinMode(CHARGE_PIN, OUTPUT); | |
digitalWrite(CHARGE_PIN, LOW); | |
Serial.begin(9600); | |
Serial.print("hello world \n"); |
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
# soundcloud preview: | |
# https://soundcloud.com/hopbit/playing-with-super-saw-synth | |
live_loop :hello do | |
use_synth :supersaw | |
use_synth_defaults release: 2, amp: 1 | |
use_bpm 98 | |
with_fx :wobble do | |
with_fx :echo do | |
play chord(:F, :major) | |
sleep 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
######################################### | |
## Sonic Pi Drum Machine | |
## coded by Darin Wilson | |
## | |
use_bpm 95 | |
in_thread(name: :drum_machine) do | |
# choose your kit here (can be :acoustic, :acoustic_soft, :electro, :toy) |
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
format = "there are %d samples" % all_sample_names.size | |
puts format | |
for voicenumber in 0..all_sample_names.size-1 do | |
puts voicenumber | |
voice = all_sample_names[voicenumber] | |
sample voice | |
sleep sample_duration voice | |
end |
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
for i in {1..9} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi0$i.pdf" | |
done | |
for i in {10..42} | |
do | |
wget "https://raspberrypi.org/magpi-issues/MagPi$i.pdf" | |
done | |
# http://www.cyberciti.biz/faq/bash-for-loop/ |
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
# calculates maximum heart rate for woman | |
# formula by sally edwards | |
def hr_max_woman(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight | |
end | |
# calculates maximum heart rate for man | |
# formula by sally edwards | |
def hr_max_man(age, weight) | |
return 210 - 0.5 * age - 0.022 * weight + 4 |
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
# play it with Sonic Pi v.2.9 (http://sonic-pi.net) | |
notes = { dd: 74, c: 72, bbbbbbb: 83, ffff: 77, aaaaaa: 81, cccccccc: 84, eee: 76, ggggg: 79 } | |
notes.keys.map { | key | key.to_sym }.sort_by(&:length).each { |key| | |
play_pattern [notes[key]] | |
} |