Let's get started using gwion!
We are going to write a typical Gwion Hello, World!
In Gwion, a program typically makes sound.
Now we create a Sinusoidal generator
and connect it to thee audio output
dac stands for Digital to Audio Converter)
#import Modules new SinOsc ~> dac;
SinOscclass comes from the
Indeed, a Hello, world has to print something.
We do so using the gack operator (
<<< "Hello, World!" >>>;
Let's face it, we did not make any sound yet: No time passed, and if no time passed, there can't have been any sound. We can wait some time using
5::second => now;
Here is the complete example, editable and runnable.
#import Modules <<< "Hello, World!" >>>; new SinOsc ~> dac; 5::second => now;