Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created June 29, 2015 15:22
Show Gist options
  • Select an option

  • Save Sciss/b400445bbb23d302578d to your computer and use it in GitHub Desktop.

Select an option

Save Sciss/b400445bbb23d302578d to your computer and use it in GitHub Desktop.
val in = Mix.mono(SinOsc.ar)
val cs = s"${in.getClass.getName}$$"
val cc = Class.forName(cs)
val mApply = cc.getMethods.find(_.getName == "apply").get
val fModule = cc.getField("MODULE$")
val c = fModule.get(null)
val out = mApply.invoke(c, SinOsc.ar)
assert(in == out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment