Skip to content

Instantly share code, notes, and snippets.

@tado
tado / techno.rb
Created May 20, 2018 23:53
Sonic Pi Electropop!
root1 = :C2 # <- change here!
root2 = root1 + 7
live_loop :riff do
with_fx :echo, phase: 0.375 do
use_synth :dsaw
32.times do
play scale(root1, :minor_pentatonic, num_octaves: 4).shuffle.take(2),
release: rand(0.5), cutoff: rrand(70, 130), pan: rrand(-0.7, 0.7), amp: 0.7
sleep 0.125
@tado
tado / generative_riff.rb
Created June 1, 2018 01:01
Generative melody with Sonic Pi
live_loop :live do
use_synth :dsaw
32.times do
play scale(:C2, :minor_pentatonic, num_octaves: 4).shuffle.take(2),
cutoff: rrand(40, 120), release: rand(0.5)
sleep 0.125
end
32.times do
play scale(:G2, :minor_pentatonic, num_octaves: 4).shuffle.take(2),
cutoff: rrand(40, 120), release: rand(0.5)
@tado
tado / sketch.pde
Created June 4, 2018 07:19
Processing、Classのサンプル基本テンプレート
// Spotクラスを宣言
Spot spot;
void setup() {
size(800, 600, P2D);
noStroke();
frameRate(60);
//位置ベクトルをランダムに生成
PVector loc = new PVector(width/2.0, height/2.0);
//速度ベクトルをランダムに生成
@tado
tado / default.css
Last active August 15, 2018 22:42
Stylus CSS to convert Mieryo -> Noto Sans CJK JP. Stylus : https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne
@font-face {
font-family: 'sans-serif';
src: local("Noto Sans CJK JP"),
url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff2) format('woff2'),
url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.woff) format('woff'),
url(//fonts.gstatic.com/ea/notosansjp/v5/NotoSansJP-Regular.otf) format('opentype');
}
@font-face {
font-family: 'Meiryo';
@tado
tado / index.html
Last active July 17, 2018 02:35
ml5.js プロジェクトテンプレート
<!DOCTYPE html>
<html>
<head>
<title>ml5.jsはじめの一歩</title>
<!-- p5.jsのライブラリ読み込み -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<!-- ml5.jsのライブラリ読み込み -->
<script src="https://unpkg.com/ml5"></script>
@tado
tado / keybindings.json
Created July 20, 2018 09:40
VS Code key setting
[
{
"key": "ctrl+i",
"command": "editor.action.formatDocument",
"when": "editorTextFocus"
},
{
"key": "ctrl+j",
"command": "-editor.action.insertLineAfter",
"when": "editorTextFocus"
@tado
tado / Style.css
Created July 26, 2018 05:49
Markdown Preview Style for VS Code
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAA
@tado
tado / index.html
Last active July 26, 2018 23:21
ml5.js Feature Extractor Classify Template
<html>
<head>
<meta charset="UTF-8">
<title>Image Classification using Feature Extraction with MobileNet. Built with p5.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<script src="ml5.min.js" type="text/javascript"></script>
@tado
tado / MyEmacsKeymap.ahk
Last active June 30, 2020 13:57
My Emacs-like Keybindings for AutoHotKey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; MyEmacsKeymap.ahk
;; - An AutoHotkey script to simulate Emacs keybindings on Windows
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Settings for testing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; enable warning
;#Warn All, MsgBox
@tado
tado / index.html
Last active October 8, 2018 00:05
tamabi web basic example 181001
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>多摩美術大学芸術学部情報デザイン学科メディア芸術コース</title>
</head>
<body>
<h1>Art &amp; Media Course Demartment of Information Desing Tama Art University</h1>
<h1>多摩美術大学芸術学部情報デザイン学科メディア芸術コース</h1>
<ul>