Skip to content

Instantly share code, notes, and snippets.

@hiorws
hiorws / README.md
Created October 27, 2019 03:16 — 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

@hiorws
hiorws / trap3.rb
Created October 22, 2019 20:42 — forked from interstar/trap3.rb
Trap beat for sonic pi
use_bpm 145
# Our chord sequence
p1 = [chord(:E3,"minor7"),
chord(:G3,"major7"),
chord(:A3,"minor7"),
chord(:G3,"m9"),
chord(:E3,"m9"),
chord(:C3,"minor7"),
#Program to drive Sonic Pi 3 visualiser written in "processing"
#by Robin Newman, September 2017
#see article at https://rbnrpi.wordpress.com
#set up OSC address of processing sketch
use_osc '127.0.0.1',5000
#select shapes to show
osc "/viz/shapes","e" #"s" "e" "r" Star,Ellipse, Rectangle or combination
sleep 0.1
live_loop :c do
@hiorws
hiorws / README.md
Created October 2, 2019 17:21 — forked from HarryUPf/README.md
Raspberry Pi SunVox Headless Synth (in 10 easy steps)

Raspberry Pi SunVox Headless Synth Setup (in 10-easy-steps)

INSTRUCTIONS

STEP_01

STEP_02

  • write the extracted .img to sdcard with Etcher

STEP_03

@hiorws
hiorws / index.html
Last active August 21, 2019 00:03
p5.js empty template
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>p5.js example</title>
<style> body {padding: 0; margin: 0;} </style>
<script src="p5.min.js"></script>
<!-- <script src="../addons/p5.dom.min.js"></script> -->
<!-- <script src="../addons/p5.sound.min.js"></script> -->
@hiorws
hiorws / index.html
Created August 18, 2019 15:18 — forked from KentaYamada/index.html
Python Flask + JavaScript XMLHttpRequest
<!DOCTYPE html>
<html>
<head>
<title>Practice AJAX</title>
<script type="text/javascript">
function do_ajax() {
var req = new XMLHttpRequest();
var result = document.getElementById('result');
req.onreadystatechange = function()
{
@hiorws
hiorws / highres.pde
Created August 3, 2019 10:54 — forked from mvanga/highres.pde
A skeleton Processing sketch that allows for exporting high-resolution versions of whatever is on screen.
import processing.pdf.*;
/*
* A complete tutorial can be found over at:
* http://sighack.com/post/exporting-high-resolution-images-in-processing
*/
int seed;
int CONFIG_SCALE_FACTOR = 5;
@hiorws
hiorws / PWindow.pde
Created June 18, 2019 12:04 — forked from atduskgreg/PWindow.pde
Example of creating a Processing sketch with multiple windows (works in Processing 3.0)
class PWindow extends PApplet {
PWindow() {
super();
PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this);
}
void settings() {
size(500, 200);
}
urls:
http://mubert.com/
http://demo.mubert.com/
http://play.mubert.com/
http://play.mubert.com/pro/
http://play.mubert.com/en/
IDK (Chillstep?)
http://mubert.com:49994/
@hiorws
hiorws / genetic_algo_find_circle.pyde
Created April 11, 2019 10:07 — forked from bened-h/genetic_algo_find_circle.pyde
Simple "genetic" algorithm for Processing (Python mode) showing a random point polpulation evolving to become a circle
"""
This demonstration evolves a random point
population (parent) to order its points into a
circular arrangement (target).
The fitness is computed by measuring each point's
distance to its destination.
Read an introduction to genetic algorithms with python here:
https://www.codeproject.com/articles/1104747/introduction-to-genetic-algorithms-with-python-hel
"""