Merge branch 'main' of https://github.com/Bubobubobubobubo/Topos
This commit is contained in:
@ -33,6 +33,7 @@ export async function loadSamples() {
|
||||
registerZZFXSounds(),
|
||||
samples("github:Bubobubobubobubo/Dough-Samples/main"),
|
||||
samples("github:Bubobubobubobubo/Dough-Amiga/main"),
|
||||
samples("github:Bubobubobubobubo/Dough-Amen/main"),
|
||||
samples("github:Bubobubobubobubo/Dough-Waveforms/main"),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -300,6 +300,13 @@ export class SoundEvent extends AudibleEvent {
|
||||
public size = (value: number) => this.updateValue("size", value);
|
||||
public sz = this.size;
|
||||
|
||||
// Unit
|
||||
public stretch = (beat: number) => {
|
||||
this.updateValue("unit", "c");
|
||||
this.updateValue("speed", 2 / beat)
|
||||
return this;
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
// AbstactEvent overrides
|
||||
// ================================================================================
|
||||
|
||||
@ -188,6 +188,7 @@ There are some basic controls over the playback of each sample. This allows you
|
||||
| loopBegin | | Beginning of the loop section (between <ic>0</ic> and <ic>1</ic>) |
|
||||
| loopEnd | | End of the loop section (between <ic>0</ic> and <ic>1</ic>) |
|
||||
| loop | | Whether to loop or not the audio sample |
|
||||
| stretch | | Stretches the audio playback rate of a sample over <ic>n</ic> beats |
|
||||
| speed | | Playback speed (<ic>2</ic> = twice as fast) |
|
||||
| cut | | Set with <ic>0</ic> or <ic>1</ic>. Will cut the sample as soon as another sample is played on the same bus |
|
||||
| clip | | Multiply the duration of the sample with the given number |
|
||||
@ -207,6 +208,15 @@ beat(.5)::snd('pad').begin(0.2)
|
||||
true
|
||||
)};
|
||||
|
||||
${makeExample(
|
||||
"Playing an amen break",
|
||||
`
|
||||
// Note that stretch has the same value as beat
|
||||
beat(4) :: sound('breaks165').stretch(4).out()
|
||||
beat(0.25) :: sound('hh').out()
|
||||
beat(1, 4, 8) :: sound('bd').out()`,
|
||||
true,
|
||||
)};
|
||||
|
||||
## Filters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user