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
// Examples for Interactive Music II Tokyo University of Arts (2013.10.03) | |
// Hello World | |
"Hello world" | |
// 音を鳴らしてみる | |
play({SinOsc.ar(LFNoise0.kr(12, mul: 600, add: 1000), 0.3)}); | |
// SC 140 |
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 "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup(){ | |
ofBackground(63); | |
light.setup(); | |
light.setPosition(ofGetWidth()/2 - 100, ofGetHeight()/2 - 100, 400); | |
} |
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
// Mix 例1 | |
{ | |
SinOsc.ar([440,442], 0, 0.2) | |
+ SinOsc.ar([660,663], 0, 0.2) | |
}.play; | |
// Mix 例2 | |
{ | |
a = SinOsc.ar([440,442], 0, 0.2); | |
b = SinOsc.ar([660,663], 0, 0.2); |
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
// {}.playによる出力 | |
{SinOsc.ar}.play; | |
// SyntDefに変換 | |
SynthDef("sine", {Out.ar(0, SinOsc.ar)}).play; //left | |
SynthDef("sine", {Out.ar(1, SinOsc.ar)}).play; //right | |
// ----------------------------------------- | |
//関数による記述 | |
{ SinOsc.ar(440, 0, 0.2) }.play; |
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
//----- エンベロープ ----------------------------------------------- | |
// Env.linen - アタック、サステイン、リリース、レベルで指定 | |
Env.linen(0.05, 0.2, 0.5, 0.7).plot; | |
( | |
{ | |
var env = Env.linen(0.05, 0.1, 0.5); | |
SinOsc.ar(440) * EnvGen.kr(env, doneAction: 2) | |
}.play | |
) |
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
# Markdownのテスト | |
* マークダウンだよー | |
* ほげほげ | |
* らくちんだ | |
--- | |
> 引用だって書けちゃいます。ぽよよ。あいうえおー。 |
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
/* | |
* Processing_graph.pde | |
* | |
*/ | |
// グラフ描画のクラスのインスタンス化(初期化) | |
Graph MyArduinoGraph = new Graph(150, 80, 500, 300, color (200, 20, 20)); | |
// 4つのジェスチャーを記録する配列 | |
float[][] gesturePoints = new float[4][2]; | |
// 現在のジェスチャーと登録したジェスチャーとの距離 |
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
byte yMSB=0, yLSB=0, xMSB=0, xLSB=0, zeroByte=128, Checksum=0; | |
void SendData(int Command, unsigned int yValue,unsigned int xValue){ | |
yLSB=lowByte(yValue); //yの値(16bit)の後半8bit | |
yMSB=highByte(yValue); //yの値(16bit)の前半8bit | |
xLSB=lowByte(xValue); //xの値(16bit)の後半8bit | |
xMSB=highByte(xValue); //xの値(16bit)の前半8bit | |
//空白(0Byte)の値がある場所を記録 | |
zeroByte = 128; // 10000000 |
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.serial.*; | |
int SerialPortNumber=2; | |
int PortSelected=2; | |
//グローバル変数 | |
int xValue, yValue, Command; | |
boolean Error=true; | |
boolean UpdateGraph=true; | |
int lineGraph; | |
int ErrorCounter=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
// ファイルを指定して電力データを読み込む | |
// 関数(Function)バージョン | |
String date; // 日付 | |
int data[][]; // データの配列 data[行][列] | |
void setup() { | |
// 画面初期化 | |
size(800, 1004); | |
frameRate(30); |