{!hideCode() && (
@@ -126,20 +127,7 @@ export function Repl() {
welcome to kabelsalat. this is a very experimental audio graph live
coding prototype.
-
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index 3862fdd..230d20f 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -2,10 +2,10 @@
import { Repl } from "../components/Repl";
---
-
+
-
+
kabelsalat
diff --git a/website/src/pages/learn.astro b/website/src/pages/learn.astro
new file mode 100644
index 0000000..9acf4fe
--- /dev/null
+++ b/website/src/pages/learn.astro
@@ -0,0 +1,255 @@
+---
+import { MiniRepl } from "../components/MiniRepl";
+import { Icon } from "../components/Icon";
+import Box from "../components/Box.astro";
+---
+
+
+
+
+
+
+
+ learn kabelsalat
+
+
+ go to REPL
+
+
What is kabelsalat?
+
+ kabelsalat (= cable salad) is a live codable modular synthesizer for the browser. It let's you write synthesizer patches with an easy to
+ use language based on JavaScript.
+ You don't need coding skills to learn this!
+
+
Hello World
+
Here is a very simple example that generates a sine wave:
+
+
+
+
Press to hear a beautiful sine tone.
+
Change the number 200 to 400
+
Hit ctrl+enter to update (or press )
+
Hit ctrl+. to stop (or press )
+
+
+
+
Amplitude Modulation
+
Let's modulate the amplitude using `mul`:
+
+
+
Frequency Modulation
+
Let's modulate the frequency instead:
+
+
Note: We could also have written `sine(sine(4).range(210,230))`
+
+
+
Subtractive Synthesis
+
+ A lonely sine wave is pretty thin, let's add some oomph with a sawtooth
+ wave and a filter:
+
+
+
+
Impulses & Envelopes
+
We can apply a simple decay envelope with `impulse` and `perc`:
+
+
For more control over the shape, we can also use ADSR:
+
+
+
+ Note: `impulse(1).perc(.5)` effectively creates a gate that lasts .5
+ seconds
+
+
+
+
Sequences
+
+ The `seq` function allows us to cycle through different values using an
+ impulse:
+
+
+
+ Note: `.saw()` will take everything on the left as input! More
+ generally, `x.y()` is the same as `y(x)`!
+
+
+
+
Reusing nodes
+
+ In the above example, we might want to use the impulse to control the
+ sequence and also an envelope:
+
+
+
+ Here we are creating the variable `imp` to use the impulse in 2 places.
+ Another way to write the same is this:
+
+ The `apply` method allows us to get a variable without breaking up our
+ patch into multiple blocks
+
+
slide
+ `slide` acts as a so called "slew limiter", making the incoming signal sluggish,
+ preventing harsh clicks. It can also be used for glissando effects:
+
+
Feedback Delay
+ Feedback is a core feature of kabelsalat. You can plug a node back to itself
+ using a so called lambda function:
+ x.delay(.1).mul(.8))
+.out()`
+ client:only="solid"
+ />
+
Multichannel Expansion
+ We can create multiple channels by using brackets:
+
+
+
+ In this case, we get 2 sine waves that will be used for the left and
+ right channel of your sound system.
+
+
+
+
If we want more channels, we have to mix them down:
+
+
Look what happens when brackets are used in more than one place:
+
+
Fold
+
fold limits the signal in between [-1,1] by folding:
+
+
Distort
+
+
Receiving MIDI Notes
+
+ You can also send midi to kabelsalat. The `midifreq` function will
+ receive any notes sent by any midi device. If you don't have a midi
+ device at hand, you can send MIDI with strudel
+
+
+
Receiving MIDI Gates
+
+
+ You can also limit it to a specific channel with `midifreq(1)` (to
+ listen only for notes on midi channel 1) Similarly, `midigate` can be
+ used:
+
+
+
Here is a monosynth that is a little bit more exciting:
+
+
Receiving MIDI CC Messages
+ You can receive cc messages with the `midicc` function:
+
+
Polyphonic MIDI
+ Using the `fork` function, you can clone a node multiple times. The midifreq
+ and midigate functions will automatically do voice allocation of incoming notes:
+ x.delay(0.2).mul(0.4)) // feedback delay
+ .out();`
+ client:only="solid"
+ />
+
+
+
diff --git a/website/tailwind.config.mjs b/website/tailwind.config.mjs
index 19f0614..2e9b1f7 100644
--- a/website/tailwind.config.mjs
+++ b/website/tailwind.config.mjs
@@ -1,8 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
- content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
- theme: {
- extend: {},
- },
- plugins: [],
-}
+ content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
+ theme: {
+ extend: {},
+ },
+ plugins: [require("@tailwindcss/typography")],
+};