Hello Sine
The simplest patch
Every Akkado program is a signal flow graph. The smallest one is a sine wave sent to the output:
sine(440) |> out(@) Click Run above to hear a 440 Hz sine wave (concert A).
Understanding the code
sine(440)- a sine wave oscillator at 440 Hz|>- the pipe operator, connecting nodes in the signal flow@- the hole, the signal coming in from the left side of the pipeout(@)- sends the signal to both left and right speakers
Changing the frequency
Try other frequencies:
// Lower octave (220 Hz)
sine(220) |> out(@) // Higher octave (880 Hz)
sine(880) |> out(@) Adding more oscillators
Combine multiple oscillators with math operators:
// Two detuned oscillators for a fatter sound
sine(440) + sine(442) |> out(@) * 0.5 The * 0.5 at the end reduces the volume so it doesn’t clip.
Different waveforms
osc() covers all the basic waveforms; pass the name as the first argument:
// Sawtooth - rich and buzzy
saw(220) |> out(@) // Triangle - softer than sawtooth
tri(220) |> out(@) // Square - hollow and punchy
sqr(220) * 0.3 |> out(@) Next steps
Layer waveforms, modulate the frequency with math, or head to the Filters tutorial to start shaping these raw tones.