Fixing broken examples and functions
This commit is contained in:
@ -1200,7 +1200,7 @@ export class UserAPI {
|
||||
rotate: number = 0
|
||||
): boolean => {
|
||||
return (
|
||||
this.beat(div) && this._euclidean_cycle(pulses, length, rotate).div(div)
|
||||
this.beat(div) && this._euclidean_cycle(pulses, length, rotate).beat(div)
|
||||
);
|
||||
};
|
||||
|
||||
@ -1250,7 +1250,7 @@ export class UserAPI {
|
||||
*/
|
||||
let convert: string = n.toString(2);
|
||||
let tobin: boolean[] = convert.split("").map((x: string) => x === "1");
|
||||
return this.beat(div) && tobin.div(div);
|
||||
return this.beat(div) && tobin.beat(div);
|
||||
};
|
||||
|
||||
// =============================================================
|
||||
|
||||
@ -19,7 +19,7 @@ Some features are not part of the core of Topos but are still very useful. They
|
||||
|
||||
${makeExample(
|
||||
"Hydra integration",
|
||||
`mod(4) :: app.hydra.osc(3, 0.5, 2).out()`,
|
||||
`beat(4) :: app.hydra.osc(3, 0.5, 2).out()`,
|
||||
true
|
||||
)}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ ${makeExample(
|
||||
"Using beat to create arpeggios",
|
||||
`
|
||||
// Arpeggio using pulse divisions
|
||||
beat([.5, .25].div(2)) :: sound('sine')
|
||||
beat([.5, .25].beat(2)) :: sound('sine')
|
||||
.hcutoff(400)
|
||||
.fmi([1,2].beat(8))
|
||||
.fmh([0.5,0.25,1].beat(2))
|
||||
|
||||
@ -60,7 +60,7 @@ ${makeExample(
|
||||
"pulse is the OG rhythmic function in Topos",
|
||||
`
|
||||
pulse([48, 24, 16].beat(4)) :: sound('linnhats').out()
|
||||
pulse(1)::snd('bd').out()
|
||||
beat(1)::snd('bd').out()
|
||||
`,
|
||||
false
|
||||
)};
|
||||
@ -170,7 +170,7 @@ ${makeExample(
|
||||
${makeExample(
|
||||
"rhythm is a beginner friendly rhythmic function!",
|
||||
`
|
||||
let speed = [0.5, 0.25].div(8);
|
||||
let speed = [0.5, 0.25].beat(8);
|
||||
rhythm(speed, 5, 12) :: snd('east').n(2).out()
|
||||
rhythm(speed, 2, 12) :: snd('east').out()
|
||||
rhythm(speed, 3, 12) :: snd('east').n(4).out()
|
||||
@ -248,7 +248,7 @@ beat([1/4,1/8,1/16].beat(8)):: sound('sine')
|
||||
.sustain(0.1).out()
|
||||
beat(1) :: sound('kick').out()
|
||||
beat(2) :: sound('dr').n(5).out()
|
||||
div(3) :: beat([.25,.5].beat(.5)) :: sound('dr')
|
||||
flip(3) :: beat([.25,.5].beat(.5)) :: sound('dr')
|
||||
.n([8,9].pick()).gain([.8,.5,.25,.1,.0].beat(.25)).out()
|
||||
// Time is elastic now!
|
||||
beat(.25) :: warp([12, 48, 24, 1, 120, 30].pick())
|
||||
|
||||
@ -162,7 +162,7 @@ beat(0.25) :: snd('hh').out();
|
||||
beat(2) :: snd('square')
|
||||
.cutoff(500).note(50-12).resonance(20).sustain(0.2).out()
|
||||
beat(1/4)::snd(['sawtooth', 'triangle', 'square'].beat(1))
|
||||
.note([50, 53, 55, 50, 50, 52, 58, 50+12, 50+15].beat(4) + [0, 12, 24].beat(0.5)))
|
||||
.note([50, 53, 55, 50, 50, 52, 58, 50+12, 50+15].beat(4) + [0, 12, 24].beat(0.5))
|
||||
.cutoff(usine(.5)*10000).resonance([10,20].beat(2))
|
||||
.fmi($(1) % 10).fmh($(2) % 5)
|
||||
.room(0.8).size(0.9)
|
||||
|
||||
@ -8,9 +8,6 @@ export default defineConfig(({ command, mode, ssrBuild }) => {
|
||||
server: {
|
||||
port: 8000,
|
||||
strictPort: true,
|
||||
https: true,
|
||||
open: true,
|
||||
cors: true,
|
||||
},
|
||||
};
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user