This file contains hidden or 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
// arbitrary shape windows (os x) | |
object Test { | |
import javax.swing._ | |
import java.awt._ | |
val f = new JFrame() | |
f.setUndecorated(true) | |
f.setBackground( new Color(0,0,0,0) ) | |
f.setSize( 400, 400 ) |
This file contains hidden or 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
/* | |
* TJUGens.scala | |
* (ScalaCollider-UGens) | |
* | |
* This is a synthetically generated file. | |
* Created: Sat Sep 24 02:12:30 CEST 2011 | |
* ScalaCollider-UGens version: 0.14-SNAPSHOT | |
*/ | |
package de.sciss.synth |
This file contains hidden or 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
// 3x stereo out | |
SynthDef( \test, { Out.ar( 0, [ In.ar(0,2), In.ar(0,3) ])}).writeDefFile( "~/Desktop/".standardizePath ) | |
// 3x stereo demand | |
SynthDef( \test2, { Demand.ar( Impulse.ar(1), 0, [ In.ar(0,2), In.ar(0,3) ])}).writeDefFile( "~/Desktop/".standardizePath ) | |
// 2x 3-channel out | |
SynthDef( \test3, { Out.ar( 0, Demand.ar( Impulse.ar(1), 0, [ In.ar(0,2), In.ar(0,3) ]))}).writeDefFile( "~/Desktop/".standardizePath ) | |
// 2x 3-channel out |
This file contains hidden or 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 collection.immutable.{IndexedSeq => IIdxSeq} | |
import actors.{Futures, Actor, Future} | |
trait FutureResult[ A ] { | |
def isSet : Boolean | |
def apply() : A | |
def respond( fun: A => Unit ) : Unit | |
def map[ B ]( fun: A => B ) : FutureResult[ B ] | |
def flatMap[ B ]( fun: A => FutureResult[ B ]) : FutureResult[ B ] | |
def peer : Future[ A ] |
This file contains hidden or 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
object FutureTest | |
def run() { | |
import actors.{TIMEOUT, Actor} | |
import Actor._ | |
actor { | |
val ev = FutureResult.event[ Int ]() | |
println( "spawing actor 2" ) | |
actor { | |
reactWithin( 3000L ) { |
This file contains hidden or 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
trait Fut[ A ] { def set( i: A ) : Unit } | |
object Fut { | |
def empty[ A ]() : Fut[ A ] = new Fut[ A ] { | |
final case class Set( value : A ) | |
def receive( x : AnyRef ) { x match { | |
case Set( value ) => println( "Got " + value ) | |
}} | |
def set( value : A ) { receive( Set( value ))} | |
} | |
} |
This file contains hidden or 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
META-INF/ | |
META-INF/MANIFEST.MF | |
com/ | |
com/jhlabs/ | |
com/jhlabs/jnitablet/ | |
de/ | |
de/sciss/ | |
de/sciss/app/ | |
de/sciss/common/ | |
de/sciss/gui/ |
This file contains hidden or 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
trait Ev[ A ] { def pull: Option[ A ]} | |
class EvOr[ A, A1 <: A, A2 <: A ]( val a: Ev[ A1 ], val b: Ev[ A2 ]) extends Ev[ A ] { | |
def pull = a.pull.orElse( b.pull ) | |
} | |
class EvOps[ A ]( ev: Ev[ A ]) { | |
def |[ AU >: A, A1 <: AU ]( that: Ev[ A1 ]) = new EvOr[ AU, A, A1 ]( ev, that ) | |
} |
This file contains hidden or 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
{ | |
"SCALA_HOME" = "/Users/hhrutz/Documents/devel/scala-2.9.1.final"; | |
"SC_HOME" = "/Applications/SuperCollider_3.4.4"; | |
} |
This file contains hidden or 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 javax.swing._ | |
val nim = UIManager.getInstalledLookAndFeels.find(_.getName.contains("Nimbus")).get | |
UIManager.setLookAndFeel(nim.getClassName) | |
val f = new JFrame( "Test" ) | |
val cp = f.getContentPane | |
class X extends JComponent { var fun: (java.awt.Graphics2D) => Unit = x => (); override def paintComponent( g: java.awt.Graphics ) { fun( g.asInstanceOf[ java.awt.Graphics2D ])}} | |
val x = new X | |
cp.add( x, java.awt.BorderLayout.CENTER ) |
OlderNewer