strudel/website/src/pages/learn/signals.mdx
Felix Roos b1202fcd55 split tutorial into multiple pages
+ improve layout a bit
2022-12-20 21:38:08 +01:00

110 lines
2.0 KiB
Plaintext

---
title: What is Strudel?
description: Strudel Tutorial
layout: ../../layouts/MainLayout.astro
---
import { MiniRepl } from '../../components/strudel/MiniRepl';
import { JsDoc } from '../../components/strudel/JsDoc';
# Continuous Signals
Signals are patterns with continuous values, meaning they have theoretically infinite steps.
They can provide streams of numbers that can be sampled at discrete points in time.
## saw
<JsDoc client:idle name="saw" h={0} />
## sine
<JsDoc client:idle name="sine" h={0} />
## cosine
<JsDoc client:idle name="cosine" h={0} />
## tri
<JsDoc client:idle name="tri" h={0} />
## square
<JsDoc client:idle name="square" h={0} />
## Ranges from -1 to 1
There is also `saw2`, `sine2`, `cosine2`, `tri2` and `square2` which have a range from -1 to 1!
## rand
<JsDoc client:idle name="rand" h={0} />
## perlin
<JsDoc client:idle name="perlin" h={0} />
## irand
<JsDoc client:idle name="irand" h={0} />
# Random Modifiers
These methods add random behavior to your Patterns.
## chooseCycles
<JsDoc client:idle name="chooseCycles" h={0} />
## Pattern.degradeBy
<JsDoc client:idle name="Pattern.degradeBy" h={0} />
## Pattern.degrade
<JsDoc client:idle name="Pattern.degrade" h={0} />
## Pattern.undegradeBy
<JsDoc client:idle name="Pattern.undegradeBy" h={0} />
## Pattern.sometimesBy
<JsDoc client:idle name="Pattern.sometimesBy" h={0} />
## Pattern.sometimes
<JsDoc client:idle name="Pattern.sometimes" h={0} />
## Pattern.someCyclesBy
<JsDoc client:idle name="Pattern.someCyclesBy" h={0} />
## Pattern.someCycles
<JsDoc client:idle name="Pattern.someCycles" h={0} />
## Pattern.often
<JsDoc client:idle name="Pattern.often" h={0} />
## Pattern.rarely
<JsDoc client:idle name="Pattern.rarely" h={0} />
## Pattern.almostNever
<JsDoc client:idle name="Pattern.almostNever" h={0} />
## Pattern.almostAlways
<JsDoc client:idle name="Pattern.almostAlways" h={0} />
## Pattern.never
<JsDoc client:idle name="Pattern.never" h={0} />
## Pattern.always
<JsDoc client:idle name="Pattern.always" h={0} />