Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
406 lines (317 sloc) 10.5 KB
<style type="text/css"> .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { text-transform: none; } .reveal ol, .reveal dl, .reveal ul { font-size: 0.75em; display: block; text-align: left; } .reveal section img { background: none; border: none; box-shadow: none; } .reveal code { font-family: monospace; } </style>

Ruby code from the stratosphere

- SIAF, Sonic Pi, Petal

Kenichi Kanai @kn1kn1
RubyKaigi 2018
2018.06.02 10:50-11:30 Hagi #rubykaigiC

Ruby code from the stratosphere

2017/10/19 21:37:11 `cfdr la:43.213702,lo:141.993971,a:11990.8`
2017/10/19 21:40:19 `d1'v*4 v*2',n:'irand',rate:'irand 1 2'`
2017/10/19 21:41:24 `cps 0.3`

Kenichi Kanai @kn1kn1

  • a software engineer at Sapporo
  • a member of SIAF LAB.
  • a contributor/translator of Sonic Pi
  • a software engineer at Farmnote

[PR] Farmnote

- https://farmnote.jp/ - 「世界の農業の頭脳を創る。」

Agenda


Petal


Sonic Pi




Livecoding

  • live coders expose and rewire the innards of software while it generates improvised music and/or visuals.

    • 「コンピュータの言語であるプログラムコードを直接操作することで、さまざまな音や映像をリアルタイムに生成する即興演奏の方法」
  • TopLap https://toplap.org/


  • Languages

    • ChucK
    • Extempore
    • Fluxus
    • Gibber
    • Max
    • Pure Data
    • SuperCollider
    • Overtone
      • using SuperCollider from Clojure
    • Sonic Pi
      • using SuperCollider from Ruby
    • TidalCycles
      • using SuperCollider from Haskell
  • https://github.com/toplap/awesome-livecoding/



TidalCycles


  • an open source live coding environment based off of his 16 years of experience with making algorithmic dance music.
  • simple notation generates complex sounds
    • 簡単な記法で複雑な音楽を記述可能



Petal


Petal (Tidal) patterns

  • one bass drum per cycle
d1 'bd'
  • two bass drums per cycle
d1 'bd bd'
  • nested bass drums
d1 'bd [bd bd]'
  • specifying tempo (cps: cycle per second)
cps 2
d1 'bd [bd bd]'

  • index option
d1 'v', n: 1
  • rate option
d1 'v', rate: 4
  • randomize
d1 'v', rate: 'irand 1 2'

Ruby code from the stratosphere

2017/10/19 21:37:11 `cfdr la:43.213702,lo:141.993971,a:11990.8`
2017/10/19 21:40:19 `d1'v*4 v*2',n:'irand',rate:'irand 1 2'`
2017/10/19 21:41:24 `cps 0.3`

  • Euclidean rhythm
d1 'bd(5,8)'
  • 5: pulse、8: step

  • Godfried Toussaint(2005) "The Euclidean Algorithm Generates Traditional Musical Rhythms"

    • The Euclidean algorithm which computes the greatest common divisor of two given integers may be used to generate traditional musical rhythms.
      • 「2つの数の最大公約数を求めるユークリッドのアルゴリズムをリズムに適用することにより、伝統的なリズムを記述可能である。」
    • The first number of sounds (5) will be distributed equally across the second number of steps (8).
      • 上の例では、2つめの数(8)のステップを通じて、最初の数(5)のパルスを等間隔で分散させようとします。
  • http://dbkaplun.github.io/euclidean-rhythm/


require "~/github/petal/petal.rb"

cps 0.5

d1 ":bd_klub(11,16)"
d2 ":bd_haus(6,16)"
d3 "hh(13,16)", rate: 'rand -1 1'
d4 "if(11,16)", n: 'irand 64', rate: 'rand -1 1'

Inside Petal

  • TidalCycles pattern is something like...

    • "bd", "bd bd", "bd [bd bd]"
    • "[bd]", "[bd bd]", "[bd [bd bd]]"
    • "(bd)", "(bd bd)", "(bd (bd bd))"
  • How to Write a (Lisp) Interpreter (in Ruby) by @melborne

  • https://melborne.github.io/2010/11/10/Ruby-Lisp/




SIAF2017

- https://siaf.jp/2017/

ARTSAT x SIAF LAB.


ARTSAT x SIAF LAB.

  • ARTSAT
  • SIAF LAB

ARTSAT

  • Art and Satellite Project

  • collaboration with Tama Art University and the University of Tokyo

  • promoting the cultural and artistic use of the universe with the motto “Satellites as media.”


  • In February 2014, the world’s first art satellite “ARTSAT 1: INVADER” was launched.
  • In December 2014, “ARTSAT 2: DESPATCH,” a deep space sculpture capable of leaving the gravitational sphere of the earth was launched into heliocentric orbit at the same time as the “Hayabusa 2.”

SIAF LAB.

  • began activities from 2015, the year after SIAF2014.
  • conducts civil collaborative projects
    • art-related lecture series
    • “Bent Icicle Project – Tulala”

Sonic Pi and SIAF LAB.


Moerenuma park

  • designed by Isamu Noguchi
  • it “constitutes one sculptural work as a whole.”


Launches

  • 2017-07-01 - 1st trial launch for exhibition
  • 2017-07-17 - 2nd trial launch for exhibition
  • 2017-08-23 - 1st launch with performance (FAIL)
  • 2017-10-07 - 3rd trial launch (with revised system)
  • 2017-10-19 - 2nd launch with performance

2017-07-01 - 1st trial launch for exhibition


System (gorgeous, but it FAILED)

--- - Live-coding performance 22.Aug.2017 - https://www.youtube.com/watch?v=5pka7xB2eh8 - https://youtu.be/5pka7xB2eh8?t=4160 --- #### Revised system


VirtualFPV

- created by @aike1000 (Keisuke Ai) SmileBoom - https://github.com/siaflab/VirtualFPV_balloon_trajectory_visualizer

Ruby code from the stratosphere

2017/10/19 21:37:11 `cfdr la:43.213702,lo:141.993971,a:11990.8`
2017/10/19 21:40:19 `d1'v*4 v*2',n:'irand',rate:'irand 1 2'`
2017/10/19 21:41:24 `cps 0.3`

space-moere-flight-data



You can’t perform that action at this time.