From 78a366c993c7b9eb76e9dd89ae334713a6c5a9de Mon Sep 17 00:00:00 2001 From: tmhglnd Date: Sun, 29 Oct 2023 01:09:51 +0200 Subject: [PATCH] update docs --- docs/02-instrument.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/02-instrument.md b/docs/02-instrument.md index 1c3c3402..51396805 100644 --- a/docs/02-instrument.md +++ b/docs/02-instrument.md @@ -543,6 +543,9 @@ new voice Samantha speak("Hi Alex!") time(2 1) The modulator allows you to send a modulation signal as an argument to parameters from functions of other instruments. These parameters are continuously modulated at a specific rate with a specific waveform. The modulation rate is independent from the instruments `time()` (in comparison when using a list as an argument). +**arguments** +- {Name} -> waveform type: `sine`, `sawUp`, `sawDown`, `square`, `triangle` + ```java new modulator name() range( ) time() ``` @@ -551,6 +554,9 @@ new modulator name() range( ) time( the modulator name for reference in other functions + ```java // set the name to myModulator new modulator sine name(myModulator) @@ -562,6 +568,10 @@ new synth saw gain(myModulator) Set the modulation speed in division. The default is `1/1` (one period per bar). +**arguments** +- {Division} -> The time interval for one period of the modulation waveform (optional, default=1/1) +- {Division} -> The time offset for the modulation (optional, default=0) + ```java // modulate once per 4 bars new modulator sine time(4/1) @@ -571,6 +581,11 @@ new modulator sine time(4/1) Set the modulation range between a low and high value with an option exponential value. The default range is 0 to 1. +**arguments** +- {Number} -> The low output range (optional, default=0) +- {Number} -> The high output range (optional, default=1) +- {Number} -> The scaling exponent (optional, default=1) + ```java // set the range from 200 to 5000, for example to modulate a filter cutoff new modulator sine range(200 5000)