Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Group KV Task 3

visda edited this page Oct 13, 2014 · 6 revisions

Participants:

  • Hanns Holger

  • Kathi

  • Robert

  • Shelly

Task:

  • sonify wind data (following Task 2)

Dataset:

  • wind in zonal data, there is an annual (?) cycle, very static behavior over the whole globe: 18 latitudes in 2 heights

General question: how to display a vectorial value?

  • timbre space to represent vector's angle: e.g., 4 sounds that are blended to each other
  • two sounds that are mixed or, e.g., used to filter each other
  • NS as rising/ falling sound; EW cresc/decresc sound

Try out one part: EW with cres/decrescendo

  • (technical problems... ended the session)

Audio files:

Sonification Patches:

// graph function source code

val ns = Var("NS")
val ew = Var("EW")

val tns = Dim(ns, "time")
val tew = Dim(ew, "time")

val lns = Dim(ns, "lat")
val lew = Dim(ew, "lat")

val speed = UserValue("speed", 1).kr
// val amp_u = UserValue("amp", 0.1).kr

val ttn = tns.play(speed)
val tte = tew.play(speed)


val emax = 48
val wmax = -15
val nmax = 4.7
val smax = -4.7

val north = ns.play(ttn)
val east = ew.play(tte)

val lat = north.axis(lns).values

val mx_range = 12

val northscale = north.linlin(smax, nmax, mx_range, -mx_range)
val durscale = east.abs.linlin(0, emax, 0.01, 1)
val lats = lat.linexp(Reduce.min(lat), Reduce.max(lat), 200, 5000)
val delays = lat.linlin(Reduce.min(lat), Reduce.max(lat), 0, 1/speed)
val pos_e = east.linlin(0, emax, 0, 1)
val pos_w = east.linlin(wmax, 0, 1, 0)

val pos = -(pos_w.max(0).sqrt) + pos_e.max(0).sqrt

val trk = Impulse.kr(speed)
val tr = Impulse.ar(speed)

//val env_e = EnvGen.ar(Env.perc, tr, timeScale=durscale)
//val env_w = EnvGen.ar(Env.perc(1, 0.01), tr, timeScale=durscale)

val env_e = K2A.ar(Linen.kr(trk, 0.01, 1, durscale))
val env_w = K2A.ar(Linen.kr(trk, durscale, 1, 0.01))
val env_n = K2A.ar(Linen.kr(trk, durscale, 1, 0)).linlin(0, 1, 1, -1) * northscale 

val dir = east.signum.linlin(-1, 1, 0, 1)
val env_sel = Select.ar(dir, Seq(env_w, env_e))

north.poll(tr, "n")

val amp = (north.squared + east.squared).sqrt / 50
//val amp = AmpCompA.ar(lats) * amp0

val freq = lats * env_n.midiratio
freq.poll(tr, "f")

val sig = SinOsc.ar(freq) * env_sel * amp * 0.1
val del = DelayN.ar(sig, 1/speed, delays) 
val pan = Pan2.ar(del, pos)

val mix = Mix(pan)

output := mix
// graph function source code

val ns = Var("NS")
val ew = Var("EW")

val tns = Dim(ns, "time")
val tew = Dim(ew, "time")

val lns = Dim(ns, "lat")
val lew = Dim(ew, "lat")

val speed = UserValue("speed", 1).kr
// val amp_u = UserValue("amp", 0.1).kr

val ttn = tns.play(speed)
val tte = tew.play(speed)


val emax = 48
val wmax = -15
val nmax = 4.7
val smax = -4.7

val north = ns.play(ttn)
val east = ew.play(tte)

val lat = north.axis(lns).values

val mx_range = 12

val northscale = north.linlin(smax, nmax, mx_range, -mx_range)
val durscale = east.abs.linlin(0, emax, 0.01, 1)
val lats = lat.linexp(Reduce.min(lat), Reduce.max(lat), 200, 5000)
val delays = lat.linlin(Reduce.min(lat), Reduce.max(lat), 0, 1/speed)
val pos_e = east.linlin(0, emax, 0, 1)
val pos_w = east.linlin(wmax, 0, 1, 0)

val pos = -(pos_w.max(0).sqrt) + pos_e.max(0).sqrt

val trk = Impulse.kr(speed)
val tr = Impulse.ar(speed)

//val env_e = EnvGen.ar(Env.perc, tr, timeScale=durscale)
//val env_w = EnvGen.ar(Env.perc(1, 0.01), tr, timeScale=durscale)

val env_e = K2A.ar(Linen.kr(trk, 0.01, 1, durscale))
val env_w = K2A.ar(Linen.kr(trk, durscale, 1, 0.01))
val env_n = K2A.ar(Linen.kr(trk, durscale, 1, 0)).linlin(0, 1, 1, -1) * northscale 

val dir = east.signum.linlin(-1, 1, 0, 1)
val env_sel = Select.ar(dir, Seq(env_w, env_e))

north.poll(tr, "n")

val amp = (north.squared + east.squared).sqrt / 50
//val amp = AmpCompA.ar(lats) * amp0

val freq = lats * env_n.midiratio
freq.poll(tr, "f")

val sig = SinOsc.ar(freq) * env_sel * amp * 0.1
val del = DelayN.ar(sig, 1/speed, delays) 
val pan = Pan2.ar(del, pos)

val mix = Mix(pan)

output := mix