From 4c929d20d3732e88da715704b0af93e32372114f Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Thu, 24 Aug 2023 14:03:02 +0200 Subject: [PATCH] polish --- src/Documentation.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Documentation.ts b/src/Documentation.ts index 82bd71e..dfa8d4b 100644 --- a/src/Documentation.ts +++ b/src/Documentation.ts @@ -213,7 +213,7 @@ And you can use it for other things inside a method parameter: } \`\`\` -## Pulses +## What are pulses? To make a beat, you need a certain number of time grains or **pulses**. The **pulse** is also known as the [PPQN](https://en.wikipedia.org/wiki/Pulses_per_quarter_note). By default, Topos is using a _pulses per quarter note_ of 48. You can change it by using the ppqn(number) function. It means that the lowest possible rhythmic value is 1/48 of a quarter note. That's plenty of time already. @@ -237,17 +237,7 @@ Every script can access the current time by using the following functions: - time(): returns the current wall clock time, the real time of the system. -These values are **extremely useful** to craft more complex syntax or to write musical scores. However, Topos is also offering more high-level sequencing functions to make it easier to play music. - -## To document! - -- divbar(chunk: number): returns true for every pulse in intervals of given number of bars - -- divseq(...values: number[]): returns true for every pulse in intervals of given number of beats returning different value each time. - -## Using time as a conditional - -You can use the time functions as conditionals. The following example will play a pattern A for 2 bars and a pattern B for 2 bars: +These values are **extremely useful** to craft more complex syntax or to write musical scores. However, Topos is also offering more high-level sequencing functions to make it easier to play music. You can use the time functions as conditionals. The following example will play a pattern A for 2 bars and a pattern B for 2 bars: \`\`\`javascript if((bar() % 4) > 1) { @@ -260,7 +250,6 @@ You can use the time functions as conditionals. The following example will play mod(.5) && sound('jvbass').freq(250).out() } \`\`\` - `; const midi: string = `