Skip to content

Instantly share code, notes, and snippets.

21:42:52.578 Patchbay deactivated.
21:42:52.578 Statistics reset.
21:42:52.582 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
21:42:52.588 ALSA connection graph change.
21:42:54.555 JACK is starting...
21:42:54.556 /usr/bin/jackd -dalsa -dhw:0 -r44100 -p1024 -n2
Cannot connect to server socket err = No such file or directory
import de.sciss.file._
import de.sciss.synth.io
import scala.concurrent.{blocking, Future, ExecutionContext}
import scala.util.control.NonFatal
import ExecutionContext.Implicits.global
// can copy files from Flash card if they cause punctual
// I/O errors
def copyFlash(in: File, outDir: File): Future[Unit] = Future {
blocking {
val lines = file("/media/hhrutz/Mnemo3/CDs").children.map { tgt =>
val ref = file("/media/hhrutz/Mnemo2/CDs/") / tgt.name
s"touch -r '$ref' '$tgt'"
}
lines.foreach(println); ()
////////////////////
val fmt = new java.text.SimpleDateFormat("yyyyMMdd", java.util.Locale.US)
// Waschung
val x = play {
val v26 = "p1" ar -5484.198
val v35 = "p2" ar -3196.7556
val v17 = "p3" ar 4.817798E-5
val v7 = "p4" ar 0.012733769
val v22 = "p5" ar 0.012789907
val v41 = "p6" ar 0.022236781
val v48 = "p7" ar 0.02286103
// "Breathing"
// (C)opyright 2015 Hanns Holger Rutz
// licensed as Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)
// execute with ScalaCollider v1.17.1
implicit class CanDup[A](elem: A) { def ! (num: Int): Seq[A] = Vector.fill(num)(elem) }
play {
val v0 = 9418.244
val v1 = 42.465885
val af = io.AudioFile.openRead("feat_norms.aif")
val b = af.buffer(af.numFrames.toInt)
af.read(b)
af.close()
b.map(ch => ch.mkString("Array(", "f,", "f)"))
Array(Array(0.006015186f,1.4569731f), Array(-1.4816481f,3.093808f), Array(-1.4089416f,1.267046f), Array(-0.860692f,1.4034394f), Array(-0.65952975f,1.431201f), Array(-0.66072506f,0.8506244f), Array(-0.2808966f,0.90672106f), Array(-0.29912513f,0.705802f), Array(-0.22443223f,0.67802113f), Array(-0.1471797f,0.68207365f), Array(-0.104354106f,0.6723507f), Array(-0.2412649f,0.70821077f), Array(-0.16983563f,0.6771785f), Array(-0.10048226f,0.64655834f))
// make sure askpass is installed:
// $ sudo apt-get install ssh-askpass-gnome
import sys.process._
Process(List("sudo", "-A", "ls"), None, "SUDO_ASKPASS" -> "/usr/bin/ssh-askpass").!
// cf. http://geen.tehis.net/
~headsize = 8;
~numgenes = 2;
~ugens = [LFCub, LFPar, LFSaw, SinOsc, SinOscFB, Formant, LFGauss, LFTri, LFPulse, LFNoise1, LFNoise2, LFNoise0, Blip, Saw, PMOsc, VarSaw, Impulse, SyncSaw, LFClipNoise];
~linker = AbstractFunction.methods.select({arg meth; meth.name == '*' }).first;
~target = "~/Downloads/175234__kenders2000__nonsense-sentence.wav".absolutePath;
import scala.swing._
import javax.swing.KeyStroke
val f = new Frame {
private var _text: String = _
private var x: KeyStroke = _
private val b = new Button(null: String) {
listenTo(keys)