Merge remote-tracking branch 'origin/HEAD' into vitest
This commit is contained in:
commit
29009e14f4
12 changed files with 499 additions and 287 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Pattern, toMidi } from '@strudel.cycles/core';
|
||||
import { samples } from '@strudel.cycles/webaudio';
|
||||
|
||||
export function prebake() {
|
||||
export function prebake(isMock = false) {
|
||||
samples(
|
||||
{
|
||||
piano: {
|
||||
|
|
@ -41,9 +41,11 @@ export function prebake() {
|
|||
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
|
||||
'./piano/',
|
||||
);
|
||||
fetch('EmuSP12.json')
|
||||
.then(res => res.json())
|
||||
.then(json => samples(json, './EmuSP12/'));
|
||||
if (!isMock) {
|
||||
fetch('EmuSP12.json')
|
||||
.then((res) => res.json())
|
||||
.then((json) => samples(json, './EmuSP12/'));
|
||||
}
|
||||
}
|
||||
|
||||
const maxPan = toMidi('C8');
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const uiHelpersMocked = {
|
|||
backgroundImage: id,
|
||||
};
|
||||
|
||||
prebake();
|
||||
prebake(true);
|
||||
|
||||
// TODO: refactor to evalScope
|
||||
extend(
|
||||
|
|
|
|||
|
|
@ -1019,3 +1019,14 @@ x=>x.add(7).color('steelblue')
|
|||
.stack(s("bd:1*2,~ sd:0,[~ hh:0]*2"))
|
||||
.out()
|
||||
.pianoroll({vertical:1})`;
|
||||
|
||||
export const bossaRandom = `const chords = "<Am7 Am7 Dm7 E7>"
|
||||
const roots = chords.rootNotes(2)
|
||||
|
||||
stack(
|
||||
chords.voicings(['F4', 'A5']).struct(
|
||||
\` x@2 ~ x ~ ~ ~ x |
|
||||
x? ~ ~ x@3 ~ x |
|
||||
x? ~ ~ x ~ x@3\`),
|
||||
roots.struct("x [~ x?0.2] x [~ x?] | x!4 | x@2 ~ ~ ~ x x x").transpose("0 7")
|
||||
).slow(2).pianoroll().note().piano().out();`;
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue