fix Topos erroring on sample page

This commit is contained in:
2023-09-02 21:44:22 +02:00
parent 19430bf7ac
commit 483c3b797b
2 changed files with 5 additions and 35 deletions

View File

@ -66,6 +66,7 @@ export const template_universe = {
9: { candidate: "", committed: "", evaluations: 0 }, 9: { candidate: "", committed: "", evaluations: 0 },
}, },
init: { candidate: "", committed: "", evaluations: 0 }, init: { candidate: "", committed: "", evaluations: 0 },
example: { candidate: "", committed: "", evaluations: 0 },
notes: { candidate: "" }, notes: { candidate: "" },
}; };
@ -84,6 +85,7 @@ export const template_universes = {
9: { candidate: "", committed: "", evaluations: 0 }, 9: { candidate: "", committed: "", evaluations: 0 },
}, },
init: { candidate: "", committed: "", evaluations: 0 }, init: { candidate: "", committed: "", evaluations: 0 },
example: { candidate: "", committed: "", evaluations: 0 },
notes: { candidate: "" }, notes: { candidate: "" },
}, },
Help: tutorial_universe, Help: tutorial_universe,

View File

@ -69,40 +69,8 @@ Topos is deeply inspired by the [Monome Teletype](https://monome.org/). The Tele
## Demo Songs ## Demo Songs
Press ${key_shortcut( Reloading the application will get you one random song example to study every time. Press ${key_shortcut(
"Ctrl + G" "F5"
)} to switch to the global file. This is where everything starts! Evaluate the following script there by pasting and pressing ${key_shortcut( )} and listen to them all!
"Ctrl + Enter"
)}. You are now making music:
${makeExample(
"Obscure shenanigans",
`
mod([1/4,1/8,1/16].div(8)):: sound('sine')
.freq([100,50].div(16) + 50 * ($(1)%10))
.gain(0.5).room(0.9).size(0.9)
.sustain(0.1).out()
mod(1) :: sound('kick').out()
mod(2) :: sound('dr').n(5).out()
div(3) :: mod([.25,.5].div(.5)) :: sound('dr')
.n([8,9].pick()).gain([.8,.5,.25,.1,.0].div(.25)).out()`,
true
)}
${makeExample(
"Resonant madness",
`
mod(.25)::snd('arpy')
.note(30 + [0,3,7,10].beat())
.cutoff(usine(.5) * 5000).resonance(10).gain(0.3)
.end(0.8).room(0.9).size(0.9).n(0).out();
mod([.25,.125].div(2))::snd('arpy')
.note(30 + [0,3,7,10].beat())
.cutoff(usine(.5) * 5000).resonance(20).gain(0.3)
.end(0.8).room(0.9).size(0.9).n(3).out();
mod(.5) :: snd('arpy').note(
[30, 33, 35].repeatAll(4).div(1) - [12,0].div(0.5)).out()`,
false
)}
`; `;
}; };