![見出し画像](https://assets.st-note.com/production/uploads/images/14056285/rectangle_large_type_2_b5fe14894fe2176a7b0e22f2d0f89706.png?width=1200)
creation.35weeks2019
今週も作りました。
今回も使ったツール(言語?)は、p5.jsとTidalCyclesです。
2つを合体させる時にiMovieを使ってますが、ただ合わせてYoutubeに上げているだけで特に目立ったことはしてません。
今回も、技術と知識が追いつかず、タイムアップです。
しかし、ちょっとずつできることが増えてきているし、納得度も少しずつアップしてきています。
p5.js
let NUM = 500;
let moveE = new Array(NUM);
let loc, vel, col, diameter, sw;
function setup() {
createCanvas(800, 600, P2D);
colorMode(HSB, 360, 100, 100, 100);
noStroke();
frameRate(60);
for (let i = 0; i < NUM; i++) {
moveE[i] = new Mover();
}
}
function draw() {
background(220, 100, 100, 100);
for (let i = 0; i < NUM; i++) {
moveE[i].moveEllipse();
}
}
class Mover {
constructor() {
this.loc = createVector(random(width), random(height));
this.vel = createVector(random(0, 3), random(0, 3));
this.col = color(random(360), 100, 100, random(20, 50));
this.diameter = random(10, 60);
this.sw = random(0.5, 2);
}
moveEllipse() {
ellipse(this.loc.x, this.loc.y, this.diameter, this.diameter);
this.loc.add(this.vel);
fill(this.col);
// noFill();
stroke(this.col);
strokeWeight(this.sw);
if (this.loc.x < 0 || this.loc.x > width) {
// this.vel.x = this.vel.x * -1;
this.loc.x = 0;
}
if (this.loc.y < 0 || this.loc.y > height) {
// this.vel.y = this.vel.y * -1;
this.loc.y = 0;
}
}
}
TidalCycles
d1 $ slow 2 $ s "glitch*4" # n "0 1 2 3"
# delay 0.5
# delaytime 0.125
d2 $ slow 2 $ s "casio:2"
# delay 0.3
# delaytime 0.2
今週は、p5.jsばかりやっていてTidalCyclesはほとんどできなかったです。
SuperColliderもずっとエラーが出ているのでなんとかしたいのですが、よくわからないので後回しです(泣)