Skip to content

Instantly share code, notes, and snippets.

@hopbit
hopbit / sonicpi-makepeachthepresident.txt
Created November 7, 2018 10:54 — forked from hzulla/sonicpi-makepeachthepresident.txt
Sonic Pi: Make Peach the President
# make peach the president
#
# drumloop based on
# http://www.ethanhein.com/wp/2013/my-collection-of-transcribed-rhythm-patterns/
use_bpm 95
drumloop = {
:drum_bass_hard => [0,7,8,14],
:drum_snare_hard => [4,12],
@hopbit
hopbit / pwdp-setup.md
Last active November 8, 2018 17:14
Opis konfiguracji środowiska (komputera) na prezentację/warsztaty "Playing with Design Patterns"

Intro

Jeśli chcesz razem ze mną wykonywać poszczególne kroki podczas prezentacji będziesz potrzebował(a) poniższych kont oraz narzędzi.

Kod, slajdy i bibliografia

Konta

Załóż konta na poniższych portalach jeśli jeszcze ich nie posiadasz.

@hopbit
hopbit / test_live_loops
Last active November 1, 2018 09:08
this should show the difference in syncing cues across multiple live loops (Sonic Pi v3.1.0 vs 2.11.1)
# Use Sonic Pi v2.x to run below snippet.
# If You use v3.x + then it'll sound other than intended.
# More info: https://github.com/samaaron/sonic-pi/issues/1979
set_volume! 1
use_bpm 125
live_loop :beats do
8.times do
sample :bd_haus, amp: 0.5
sleep 1
@hopbit
hopbit / test_melody.rb
Created October 30, 2018 23:48
Passing lambda as a constructor parameter in Sonic Pi
test = lambda { |ctx|
puts "#{ctx.class}"
ctx.notes.each do |note|
play note, amp: 0.5
sleep 0.25
end
}
class TestMelody
attr_reader :notes
@hopbit
hopbit / SBAVMonL.dll.md
Last active July 12, 2019 08:19
Wystąpił problem podczas uruchamiania pliku SBAVMonL.dll Nie można odnaleźć określonego modułu.

EN description: Text below is the solution to this problem written in Polish language.

Problem

Od jakiegoś czasu na moim komputerze tuż po uruchomieniu się systemu (Windows 10) pojawiał się popup z komunikatem o treści Wystąpił problem podczas uruchamiania pliku SBAVMonL.dll Nie można odnaleźć określonego modułu.. Było to dość irytujące, zwłaszcza, że dosyć ciężko było znaleźć rozwiązanie tego problemu :/

@hopbit
hopbit / Vagrant
Last active September 16, 2017 05:37
Vagrant Initial Box 4 Angular 4 Workshops organised by Stacja.IT
# -*- mode: ruby -*-
# vi: set ft=ruby :
# See: https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck
Vagrant.configure(2) do |config|
config.vm.box = 'ubuntu/trusty64'
config.vm.provider :virtualbox do |vb|
host = RbConfig::CONFIG['host_os']
@hopbit
hopbit / output.md
Created March 14, 2017 21:44 — forked from wojtekerbetowski/output.md
Load most common PyWaw speakers

Output on 14.03.2017

$ python pywaw.py 
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.5.3-py3-none-any.whl
Collecting requests
  Using cached requests-2.13.0-py2.py3-none-any.whl
Installing collected packages: beautifulsoup4, requests
Successfully installed beautifulsoup4-4.5.3 requests-2.13.0
@hopbit
hopbit / README.md
Created July 11, 2016 19:51 — forked from xavriley/README.md
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip

@hopbit
hopbit / left_to_right_live_loop.rb
Created July 2, 2016 15:40
Simple live loop presenting panning option in Sonic Pi
live_loop :left_right do
curr_pan = tick % 2 == 1 ? 1 : -1
sample :loop_amen, pan: curr_pan
sleep sample_duration(:loop_amen)
end
@hopbit
hopbit / README.md
Created June 13, 2016 20:59 — forked from dergachev/README.md
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM