Hello Sine
Welcome to Akkado! In this tutorial, you'll make your first sound and learn the basics of how the language works.
Welcome to Akkado! In this tutorial, you’ll make your first sound and learn the basics of how the language works.
The Simplest Patch
Every Akkado program is a signal flow graph. Let’s start with the simplest possible patch - a sine wave sent to the output.
osc("sin", 440) |> out(%, %) Click Run above to hear a 440 Hz sine wave (concert A).
Understanding the Code
Let’s break down what each part means:
osc("sin", 440)- Creates a sine wave oscillator at 440 Hz|>- The pipe operator, connecting nodes in the signal flow%- The hole, representing the signal from the left side of the pipeout(%, %)- Sends the signal to both left and right speakers
Changing the Frequency
Try different frequencies by changing the number:
// Lower octave (220 Hz)
osc("sin", 220) |> out(%, %) // Higher octave (880 Hz)
osc("sin", 880) |> out(%, %) Adding More Oscillators
You can combine multiple oscillators with math operators:
// Two detuned oscillators for a fatter sound
osc("sin", 440) + osc("sin", 442) |> out(%, %) * 0.5 The * 0.5 at the end reduces the volume so it doesn’t clip.
Different Waveforms
Akkado has several oscillator types, all accessible through osc():
// Sawtooth - rich and buzzy
osc("saw", 220) |> out(%, %) // Triangle - softer than sawtooth
osc("tri", 220) |> out(%, %) // Square - hollow and punchy
osc("sqr", 220) * 0.3 |> out(%, %) Tip: The osc() function is the standard way to create all oscillator types. Just change the first argument to select the waveform.
Next Steps
Now that you can make basic sounds, try:
- Combining different waveforms
- Using math to modulate the frequency
- Moving on to the Filters tutorial to shape your sounds
Congratulations - you’ve made your first sounds with Akkado!