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
class SonicPiOsc { | |
String synth; | |
String[] paramList; | |
void perse(OscMessage msg) { | |
if (msg.checkAddrPattern("/log/multi_message")) { | |
String[] allList = split(msg.get(5).stringValue(), ','); | |
String[] synthList = split(allList[0], ':'); | |
synth = synthList[1]; | |
String str = msg.get(5).stringValue(); |
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
import oscP5.*; | |
import netP5.*; | |
OscP5 oscP5; | |
NetAddress location; | |
void setup() { | |
size(400, 400); | |
oscP5 = new OscP5(this, 12000); | |
location = new NetAddress("127.0.0.1", 4557); |
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
@import url(http://fonts.googleapis.com/earlyaccess/notosansjapanese.css); | |
html[lang=ja] #content address, | |
html[lang=ja] #content blockquote, | |
html[lang=ja] #content caption, | |
html[lang=ja] #content cite, | |
html[lang=ja] #content code, | |
html[lang=ja] #content dl, | |
html[lang=ja] #content figcaption, | |
html[lang=ja] #content h1, |
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
ofTexture texture = cam.getTexture(); | |
ofPixels pixels; | |
texture.readToPixels(pixels); | |
ofImage img; | |
img.setFromPixels(pixels); |
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
import processing.pdf.*; //PDF Exportライブラリのインポート | |
float strength = 1400.0; //ノイズの強さ | |
int step = 6; //グリッドの細かさ | |
float noiseScale = 0.002; //パーリンノイズのスケール | |
void setup() { | |
size(1920, 1200); | |
noLoop(); //ループさせない(1フレームのみ書き出す) | |
} |
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
-- Example | |
d1 $ metre "[1 2 3 4]/8" $ sound "cp" | |
d1 $ metre (slow 256 $ run 256) $ sound "cp" | |
-- Patterns sorted by syncopation degree | |
-- using Sioros and Guedes (2011) syncopation models [1] | |
-- revised by Alex McLean https://gist.github.com/tado/7785ba7145f4c75ecbba1ababe68483f#gistcomment-2081699 | |
let metre metrep p = unwrap $ (\metren -> struct (xs !!! metren) p) <$> metrep | |
(!!!) xs n = xs !! (n `mod` length xs) |
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
#include "ofApp.h" | |
#include <fstream> | |
void ofApp::setup(){ | |
ofBackground(255); | |
ofSetColor(0); | |
ofNoFill(); | |
ofSetBackgroundAuto(false); | |
//select file |
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
std::vector<float> data; | |
float min = *min_element(data.begin(), data.end()); | |
float max = *max_element(data.begin(), data.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
// Spotクラスを宣言 | |
Spot spot; | |
void setup() { | |
size(800, 600); | |
noStroke(); | |
frameRate(60); | |
//位置ベクトルをランダムに生成 | |
PVector loc = new PVector(width/2.0, height/2.0); | |
//速度ベクトルをランダムに生成 |
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
SuperDirt.start | |
( | |
//forward OSC message (localhost, port 3333) | |
var addr = NetAddr.new("127.0.0.1", 3333); | |
OSCdef(\tidalplay2, { | |
arg msg; | |
addr.sendMsg("/play2", *msg); | |
}, '/play2', n); | |
) |