diff --git a/src/Documentation.ts b/src/Documentation.ts
index 5e9fc07..286d2c5 100644
--- a/src/Documentation.ts
+++ b/src/Documentation.ts
@@ -61,17 +61,18 @@ Press ${key_shortcut(
bpm(80)
mod(0.25) :: sound('sawtooth')
.note(seqbar(
- pick(60, 67, 63) - 12, pick(60, 67, 63) - 12,
+ pick(60, 67, 63) - 12, pick(60, 67, 63) - 12,
pick(60, 67, 63) - 12 + 5, pick(60, 67, 63) - 12 + 5,
- pick(60, 67, 63) - 12 + 7, pick(60, 67, 63) - 12 + 7) + (sometimes() ? 24 : 12))
- .sustain(0.1).fmi(8).fmh(4).room(0.9)
- .gain(0.75).cutoff(500 + usine(8) * 10000)
- .delay(0.5).delaytime(bpm() / 60 / 4 / 3)
- .delayfeedback(0.25)
- .out()
- mod(1) && snd('kick').out()
- mod(2) && snd('snare').out()
- mod(.5) && snd('hat').out()
+ pick(60, 67, 63) - 12 + 7, pick(60, 67, 63) - 12 + 7) + (sometimes() ? 24 : 12)
+ )
+ .sustain(0.1).fmi(8).fmh(4).room(0.9)
+ .gain(0.75).cutoff(500 + usine(8) * 10000)
+ .delay(0.5).delaytime(bpm() / 60 / 4 / 3)
+ .delayfeedback(0.25)
+ .out()
+mod(1) && snd('kick').out()
+mod(2) && snd('snare').out()
+mod(.5) && snd('hat').out()
`;
@@ -219,29 +220,29 @@ if (div(16)) {
And you can use it for other things inside a method parameter:
\`\`\`javascript
- mod(.5)::snd(div(2) ? 'kick' : 'hat').out()
+mod(.5)::snd(div(2) ? 'kick' : 'hat').out()
\`\`\`
- divbar(n: number): works just like div but at the level of bars instead of beats. It allows you to think about even bigger time cycles. You can also pair it with regular div for making complex algorithmic beats.
\`\`\`javascript
- divbar(2)::mod(1)::snd('kick').out()
- divbar(3)::mod(.5)::snd('hat').out()
+divbar(2)::mod(1)::snd('kick').out()
+divbar(3)::mod(.5)::snd('hat').out()
\`\`\`
- onbar(n: number, ...bar: number[]): The first argument, n, is used to divide the time in a period of n consecutive bars. The following arguments are bar numbers to play on. For example, onbar(5, 1, 4) will return true on bar 1 and 4 but return false the rest of the time. You can easily divide time that way.
\`\`\`javascript
- // Only play on the fourth bar of a four bar cycle.
- onbar(4, 4)::mod(.5)::snd('hh').out();
+// Only play on the fourth bar of a four bar cycle.
+onbar(4, 4)::mod(.5)::snd('hh').out();
- // Here comes a longer version using JavaScript normal control flow
- if (onbar(4, 1, 3)) {
- mod(1)::snd('kick').out();
- } else {
- mod(.5)::snd('sd').out();
- }
+// Here comes a longer version using JavaScript normal control flow
+if (onbar(4, 1, 3)) {
+ mod(1)::snd('kick').out();
+} else {
+ mod(.5)::snd('sd').out();
+}
\`\`\`
## What are pulses?
@@ -610,7 +611,7 @@ Here is a simple example of a substractive synth:
\`\`\`javascript
mod(.5) && snd('sawtooth')
- .cutoff(pick(2000,500)) + usine(.5) * 4000)
+ .cutoff(pick(2000,500) + usine(.5) * 4000)
.resonance(0.9).freq(pick(100,150))
.out()
\`\`\`
diff --git a/src/main.ts b/src/main.ts
index c6685b8..93fd686 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -34,8 +34,8 @@ import showdownHighlight from "showdown-highlight";
const classMap = {
h1: "text-white lg:text-4xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
h2: "text-white lg:text-3xl text-xl lg:ml-4 lg:mx-4 mx-2 lg:my-4 my-2 lg:mb-8 mb-4 bg-neutral-900 rounded-lg py-2 px-2",
- ul: "text-underline",
- li: "ml-12 list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 lg:pl-4 my-2 leading-normal",
+ ul: "text-underline pl-6",
+ li: "list-disc lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 my-2 leading-normal",
p: "lg:text-2xl text-base text-white lg:mx-4 mx-2 my-4 leading-normal",
a: "lg:text-2xl text-base text-orange-300",
code: "lg:my-4 sm:my-1 text-base lg:text-xl block whitespace-pre overflow-x-hidden",