Working on documentation
This commit is contained in:
@ -135,7 +135,7 @@
|
||||
<details class="" open=true>
|
||||
<summary class="font-semibold lg:text-xl text-orange-300">Basics</summary>
|
||||
<div class="flex flex-col">
|
||||
<p rel="noopener noreferrer" id="docs_introduction" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Introduction </p>
|
||||
<p rel="noopener noreferrer" id="docs_introduction" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Welcome </p>
|
||||
<p rel="noopener noreferrer" id="docs_interface" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Interface</p>
|
||||
<p rel="noopener noreferrer" id="docs_interaction" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Interaction</p>
|
||||
<p rel="noopener noreferrer" id="docs_shortcuts" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Keyboard</p>
|
||||
@ -167,8 +167,8 @@
|
||||
<summary class="font-semibold lg:text-xl pb-1 pt-1 text-orange-300">Patterns</summary>
|
||||
<div class="flex flex-col">
|
||||
|
||||
<p rel="noopener noreferrer" id="docs_variables" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Variables</p>
|
||||
<p rel="noopener noreferrer" id="docs_lfos" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">LFOs</p>
|
||||
<p rel="noopener noreferrer" id="docs_variables" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Global Variables</p>
|
||||
<p rel="noopener noreferrer" id="docs_lfos" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Low Freq Oscs.</p>
|
||||
<p rel="noopener noreferrer" id="docs_probabilities" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Probabilities</p>
|
||||
<p rel="noopener noreferrer" id="docs_chaining" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Chaining</p>
|
||||
<p rel="noopener noreferrer" id="docs_functions" class="pl-2 pr-2 lg:text-xl text-sm hover:bg-neutral-800 py-1 my-1 rounded-lg">Functions</p>
|
||||
|
||||
@ -16,13 +16,16 @@ You can get the current position of the mouse on the screen by using the followi
|
||||
- <ic>mouseY()</ic>: the vertical position of the mouse on the screen (as a floating point number).
|
||||
|
||||
${makeExample(
|
||||
"FM Synthesizer controlled using the mouse",
|
||||
"Vibrato controlled by mouse",
|
||||
`
|
||||
beat(.25) :: sound('sine')
|
||||
.fmi(mouseX() / 100)
|
||||
.fmh(mouseY() / 100)
|
||||
.vel(0.2)
|
||||
.room(0.9).out()
|
||||
.note([0,4,5,10,11,15,16]
|
||||
.palindrome()
|
||||
.scale('pentatonic', 50).beat(.25)
|
||||
+ [-12, 0, 12].beat(0.25))
|
||||
.vib(mouseX()/700).vibmod(mouseY()/200)
|
||||
.pan(r(0, 1))
|
||||
.room(0.35).size(4).out()
|
||||
`,
|
||||
true
|
||||
)}
|
||||
@ -36,15 +39,13 @@ Current mouse position can also be used to generate notes:
|
||||
|
||||
|
||||
${makeExample(
|
||||
"The same synthesizer, with note control!",
|
||||
"Using the mouse to output a note!",
|
||||
`
|
||||
beat(.25) :: sound('sine')
|
||||
.fmi(mouseX() / 100)
|
||||
.lpf(7000)
|
||||
.delay(0.5).delayt(1/6).delayfb(0.2)
|
||||
.note(noteX())
|
||||
.fmh(mouseY() / 100)
|
||||
.vel(0.2)
|
||||
.room(0.9).out()
|
||||
`,
|
||||
.room(0.35).size(4).out()`,
|
||||
true
|
||||
)}
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ ${makeExample(
|
||||
beat(0.25) :: snd('sine')
|
||||
.pitch([0,1,2,3,4,6,7,8].beat(0.125))
|
||||
.key(["F4","F3"].beat(2.0))
|
||||
.scale("minor").out()
|
||||
.scale("minor").ad(0, .25).out()
|
||||
`,
|
||||
true
|
||||
)}
|
||||
|
||||
@ -7,7 +7,9 @@ export const variables = (application: Editor): string => {
|
||||
|
||||
# Variables
|
||||
|
||||
By default, each script is independant from each other. Scripts live in their own bubble and you cannot get or set variables affecting a script from any other script. **However**, everybody knows that global variables are cool and should be used everywhere. This is an incredibely powerful tool to use for radically altering a composition in a few lines of code.
|
||||
By default, each script is independant from each other. Scripts live in their own bubble and you cannot get or set variables affecting a script from any other script.
|
||||
|
||||
**However**, everybody knows that global variables are cool and should be used everywhere. Global variables are an incredibely powerful tool to radically alter a composition in a few lines of code.
|
||||
|
||||
- <ic>variable(a: number | string, b?: any)</ic>: if only one argument is provided, the value of the variable will be returned through its name, denoted by the first argument. If a second argument is used, it will be saved as a global variable under the name of the first argument.
|
||||
- <ic>delete_variable(name: string)</ic>: deletes a global variable from storage.
|
||||
|
||||
Reference in New Issue
Block a user