Audio frequency generator: Difference between revisions
Content added Content deleted
(Added Axe) |
(Added SuperCollider example) |
||
Line 244: | Line 244: | ||
* Volume level and wave shape are graphically displayed. |
* Volume level and wave shape are graphically displayed. |
||
* More shapes, even free wave shape modelling could easily be added. |
* More shapes, even free wave shape modelling could easily be added. |
||
=={{header|SuperCollider}}== |
|||
SuperCollider is a sound programming language, so the task is predictably easy. |
|||
<lang SuperCollider> |
|||
// the server application detects audio hardware. |
|||
Server.default.boot; |
|||
// play a sine monotone at 440 Hz and amplitude 0.2 |
|||
{ SinOsc.ar(440) * 0.2 }.play; |
|||
// use the cursor position to adjust frequency and amplitude |
|||
// ranges are exponential |
|||
{ SinOsc.ar(MouseX.kr(40, 20000, 1)) * MouseY.kr(0.001, 0.5, 1) }.play; |
|||
// sound stops on exit |
|||
Server.default.quit; |
|||
</lang> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |