Skip to content

Instantly share code, notes, and snippets.

View yratof's full-sized avatar
🍊
Eating an orange

Andrew yratof

🍊
Eating an orange
View GitHub Profile
IN;PU;IP;
PA8090,4984;
PD;PA8028,4993,7537,4968,8090,4984;
PU;PA7856,5154;
PD;PA7532,4974,8028,4993,7885,5143,7856,5154;
PU;PA8028,4993;
PD;PA7532,4974,7537,4968,8028,4993;
PU;PA7885,5143;
PD;PA8028,4993,8090,4984,7885,5143;
PU;PA7885,5143;
@yratof
yratof / load.php
Created July 3, 2018 10:54
Pulling in CSS wth wordpress without giving two fucks,.
<?php
$url = untrailingslashit( plugin_dir_url( __DIR__ ) );
$file = "/assets/js/{$file_name}";
$mod_time = filemtime( __DIR__ . $file );
wp_register_style( $file_name, "{$url}{$file}", [], $mod_time );
wp_enqueue_style( $file_name );
@yratof
yratof / combined.hpgl
Last active June 21, 2018 14:04
combined hpgl
IN;PU;
IN;
PA15466,1456;
PD;
PA15511,1432,15806,1277;
PU;
PA15033,625;
PD;
PA16046,1090;
PU;
@yratof
yratof / dxy-from-bitmap.md
Last active July 14, 2018 22:28
Long winded process for Cinema4D to Plotter

Convert your image to .bmp, then run it through autotrace

autotrace --centerline --error-threshold 0.5 iceland.bmp --output-file iceland.eps

Convert EPS to HPGL, then Optimise it

pstoedit -f plot-hpgl -pagesize a4 iceland.eps iceland.hpgl && 
hpgl-distiller -i iceland.hpgl -o iceland_optimal.hpgl

Then plot!

@yratof
yratof / trailer.rb
Last active June 12, 2018 13:23
Sonic pi bass
in_thread do
live_loop :harm do
with_fx :bitcrusher, sample: 1000, bits: 2, mix: 1, amp: 0.7 do
a = 2.4
use_synth :fm
play chord(:e2,:add9).tick, decay: a / 2
sleep a
end
end
end
@yratof
yratof / left_right.rb
Last active May 29, 2018 09:05
Left and right pan arp
use_bpm 220
in_thread do
with_fx :pan, pan: 1 do
with_fx :slicer, phase: 1.25 / 0.5 do
with_fx :gverb, mix: 0.3, dry: 0, room: 150, spread: 1 do
live_loop :arp do
use_synth :beep
play (chord :b3, :add9, num_octaves: 2).shuffle.pick(3).tick(), release: 3, pan: rrand(-1, 1)
use_synth :beep
@yratof
yratof / ef.rb
Last active May 24, 2018 09:07
Ef
use_bpm 55
live_loop :melody do
use_synth :beep
with_fx :slicer, phase: 0.3, mix:1 do
play_pattern_timed [ :d4, :fs4, :d4, :fs4, :d4, :cs4, :a4, :cs4, :a4, :cs4, :g4, :a4, :g4, :a4, :cs4, :g4, :g4, :fs4, :fs4 ],
[ 0.6, 0.6, 0.6, 0.3, 0.3, 0.6, 0.6, 0.6, 0.3, 0.3, 0.6, 0.6, 0.6, 0.3, 0.3, 0.6, 0.6 ], release: 0.3, decay: 0.3
end
end
in_thread do
with_fx :gverb, mix: 0.3, dry: 0, room: 150, spread: 1 do
live_loop :arp do
use_synth :beep
play (chord :b3, :add9, num_octaves: 2).shuffle.pick(3).tick(), release: 3, pan: rrand(-1, 1)
use_synth :beep
play (chord :b2, :add9, num_octaves: 2).shuffle.pick(6).tick(), release: 2, pan: rrand(-1, 1)
use_synth :beep
play (chord :b4, :add9, num_octaves: 2).shuffle.pick(2).tick(), release: 0.25, amp: 0.125, pan: rrand(-1, 1)
sleep 0.125
@yratof
yratof / rules.md
Last active May 18, 2018 08:40
Table Football Official Rules
@yratof
yratof / sonic.rb
Last active May 7, 2018 10:42
Sonic PI ARP
# Bass line
in_thread do
live_loop :bass do
use_synth :mod_beep
play (chord :fs2, :add9, num_octaves: 2).shuffle.tick(), release: 2, amp: 0.4
sleep 2
end
end
# Staggers lead notes