Last active
September 21, 2017 15:20
-
-
Save Sciss/c1c40a82890146ceb4b7a3ca7936e583 to your computer and use it in GitHub Desktop.
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
package de.sciss.synth | |
package ugen | |
import UGenSource._ | |
object SinOsc { | |
def kr: SinOsc = kr() | |
def kr(freq: GE = 440.0f, phase: GE = 0.0f): SinOsc = new SinOsc(control, freq, phase) | |
def ar: SinOsc = ar() | |
def ar(freq: GE = 440.0f, phase: GE = 0.0f): SinOsc = new SinOsc(audio, freq, phase) | |
} | |
final case class SinOsc(rate: Rate, freq: GE = 440.0f, phase: GE = 0.0f) extends UGenSource.SingleOut { | |
protected def makeUGens: UGenInLike = unwrap(this, Vec(freq.expand, phase.expand)) | |
def makeUGen(args: Vec[UGenIn]): UGenInLike = UGen.SingleOut(name, rate, args) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment