Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Unit generator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Examples == A simple unit generator called OSC could generate a sinusoidal waveform of a specific frequency (given as an input or argument to the [[function (programming)|function]] or [[class (computer science)|class]] that represents the unit generator). ENV could be a unit generator that delineates a breakpoint function. Thus ENV could be used to drive the [[amplitude]] [[ADSR_envelope|envelope]] of the oscillator OSC through the equation OSC*ENV. Unit generators often use predefined arrays of values for their functions (which are filled with [[waveform]]s or other [[shape]]s by calling a specific generator function). In the [[SuperCollider]] language, the .ar [[method (computer science)|method]] in the SinOsc class<ref>{{Cite web |title=SinOsc {{!}} SuperCollider 3.13.0 Help |url=https://docs.supercollider.online/Classes/SinOsc.html |access-date=2024-11-03 |website=docs.supercollider.online}}</ref> [[Inheritance (object-oriented programming)|inherits]] methods from an overarching unit generator class (UGen)<ref name=supercollider-ugen /> that generates a [[sine wave]]. The example below makes a sine wave at frequency 440, phase 0, and amplitude 0.5. :<pre><nowiki>SinOsc.ar(440, 0, 0.5);</nowiki></pre>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)