build
This commit is contained in:
parent
947aecdd33
commit
d87049c7f8
5 changed files with 98 additions and 107 deletions
4
docs/dist/CodeMirror.js
vendored
4
docs/dist/CodeMirror.js
vendored
|
|
@ -25,7 +25,7 @@ export const markEvent = (editor) => (time, event) => {
|
||||||
if (!locs || !editor) {
|
if (!locs || !editor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const marks = locs.map(({start, end}) => editor.getDoc().markText({line: start.line - 1, ch: start.column}, {line: end.line - 1, ch: end.column}, {css: "outline: 2px solid #FFCA28; box-sizing:border-box"}));
|
const marks = locs.map(({start, end}) => editor.getDoc().markText({line: start.line - 1, ch: start.column}, {line: end.line - 1, ch: end.column}, {css: "outline: 1px solid #FFCA28; box-sizing:border-box"}));
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
marks.forEach((mark) => mark.clear());
|
marks.forEach((mark) => mark.clear());
|
||||||
}, event.duration * 1e3);
|
}, event.duration * 1e3);
|
||||||
|
|
@ -35,7 +35,7 @@ export const markParens = (editor, data) => {
|
||||||
const v = editor.getDoc().getValue();
|
const v = editor.getDoc().getValue();
|
||||||
const marked = getCurrentParenArea(v, data);
|
const marked = getCurrentParenArea(v, data);
|
||||||
parenMark?.clear();
|
parenMark?.clear();
|
||||||
parenMark = editor.getDoc().markText(...marked, {css: "background-color: #0000dd20"});
|
parenMark = editor.getDoc().markText(...marked, {css: "background-color: #00007720"});
|
||||||
};
|
};
|
||||||
export function offsetToPosition(offset, code) {
|
export function offsetToPosition(offset, code) {
|
||||||
const lines = code.split("\n");
|
const lines = code.split("\n");
|
||||||
|
|
|
||||||
37
docs/dist/tunes.js
vendored
37
docs/dist/tunes.js
vendored
|
|
@ -316,12 +316,11 @@ stack(
|
||||||
drums.fast(2),
|
drums.fast(2),
|
||||||
synths
|
synths
|
||||||
).slow(2)`;
|
).slow(2)`;
|
||||||
export const callcenterhero = `()=>{
|
export const callcenterhero = `const bpm = 90;
|
||||||
const bpm = 90;
|
|
||||||
const lead = polysynth().set({...osc('sine4'),...adsr(.004)}).chain(vol(0.15),out())
|
const lead = polysynth().set({...osc('sine4'),...adsr(.004)}).chain(vol(0.15),out())
|
||||||
const bass = fmsynth({...osc('sawtooth6'),...adsr(0.05,.6,0.8,0.1)}).chain(vol(0.6), out());
|
const bass = fmsynth({...osc('sawtooth6'),...adsr(0.05,.6,0.8,0.1)}).chain(vol(0.6), out());
|
||||||
const s = scale(slowcat('F3 minor', 'Ab3 major', 'Bb3 dorian', 'C4 phrygian dominant').slow(4));
|
const s = scale(slowcat('F3 minor', 'Ab3 major', 'Bb3 dorian', 'C4 phrygian dominant').slow(4));
|
||||||
return stack(
|
stack(
|
||||||
"0 2".struct("<x ~> [x ~]").apply(s).scaleTranspose(stack(0,2)).tone(lead),
|
"0 2".struct("<x ~> [x ~]").apply(s).scaleTranspose(stack(0,2)).tone(lead),
|
||||||
"<6 7 9 7>".struct("[~ [x ~]*2]*2").apply(s).scaleTranspose("[0,2] [2,4]".fast(2).every(4,rev)).tone(lead),
|
"<6 7 9 7>".struct("[~ [x ~]*2]*2").apply(s).scaleTranspose("[0,2] [2,4]".fast(2).every(4,rev)).tone(lead),
|
||||||
"-14".struct("[~ x@0.8]*2".early(0.01)).apply(s).tone(bass),
|
"-14".struct("[~ x@0.8]*2".early(0.01)).apply(s).tone(bass),
|
||||||
|
|
@ -329,29 +328,24 @@ export const callcenterhero = `()=>{
|
||||||
"~ c2".tone(noise().chain(vol(0.2), out())),
|
"~ c2".tone(noise().chain(vol(0.2), out())),
|
||||||
"c4*4".tone(metal(adsr(0,.05,0)).chain(vol(0.03), out()))
|
"c4*4".tone(metal(adsr(0,.05,0)).chain(vol(0.03), out()))
|
||||||
)
|
)
|
||||||
.slow(120 / bpm)
|
.slow(120 / bpm)`;
|
||||||
}
|
export const primalEnemy = `const f = fast("<1 <2 [4 8]>>");
|
||||||
`;
|
stack(
|
||||||
export const primalEnemy = `()=>{
|
|
||||||
const f = fast("<1 <2 [4 8]>>");
|
|
||||||
return stack(
|
|
||||||
"c3,g3,c4".struct("[x ~]*2").apply(f).transpose("<0 <3 [5 [7 [9 [11 13]]]]>>"),
|
"c3,g3,c4".struct("[x ~]*2").apply(f).transpose("<0 <3 [5 [7 [9 [11 13]]]]>>"),
|
||||||
"c2 [c2 ~]*2".tone(synth(osc('sawtooth8')).chain(vol(0.8),out())),
|
"c2 [c2 ~]*2".tone(synth(osc('sawtooth8')).chain(vol(0.8),out())),
|
||||||
"c1*2".tone(membrane().chain(vol(0.8),out()))
|
"c1*2".tone(membrane().chain(vol(0.8),out()))
|
||||||
).slow(1)
|
).slow(1)`;
|
||||||
}`;
|
|
||||||
export const drums = `stack(
|
export const drums = `stack(
|
||||||
"c1*2".tone(membrane().chain(vol(0.8),out())),
|
"c1*2".tone(membrane().chain(vol(0.8),out())),
|
||||||
"~ c3".tone(noise().chain(vol(0.8),out())),
|
"~ c3".tone(noise().chain(vol(0.8),out())),
|
||||||
"c3*4".transpose("[-24 0]*2").tone(metal(adsr(0,.015)).chain(vol(0.8),out()))
|
"c3*4".transpose("[-24 0]*2").tone(metal(adsr(0,.015)).chain(vol(0.8),out()))
|
||||||
)
|
)
|
||||||
`;
|
`;
|
||||||
export const xylophoneCalling = `()=>{
|
export const xylophoneCalling = `const t = x => x.scaleTranspose("<0 2 4 3>/4").transpose(-2)
|
||||||
const t = x=> x.scaleTranspose("<0 2 4 3>/4").transpose(-2)
|
|
||||||
const s = x => x.scale(slowcat('C3 minor pentatonic','G3 minor pentatonic').slow(4))
|
const s = x => x.scale(slowcat('C3 minor pentatonic','G3 minor pentatonic').slow(4))
|
||||||
const delay = new FeedbackDelay(1/8, .6).chain(vol(0.1), out());
|
const delay = new FeedbackDelay(1/8, .6).chain(vol(0.1), out());
|
||||||
const chorus = new Chorus(1,2.5,0.5).start();
|
const chorus = new Chorus(1,2.5,0.5).start();
|
||||||
return stack(
|
stack(
|
||||||
// melody
|
// melody
|
||||||
"<<10 7> <8 3>>/4".struct("x*3").apply(s)
|
"<<10 7> <8 3>>/4".struct("x*3").apply(s)
|
||||||
.scaleTranspose("<0 3 2> <1 4 3>")
|
.scaleTranspose("<0 3 2> <1 4 3>")
|
||||||
|
|
@ -381,10 +375,8 @@ export const xylophoneCalling = `()=>{
|
||||||
"~ <c3!7 [c3 c3*2]>".tone(noise().chain(vol(0.8),out())),
|
"~ <c3!7 [c3 c3*2]>".tone(noise().chain(vol(0.8),out())),
|
||||||
// hihat
|
// hihat
|
||||||
"c3*4".transpose("[-24 0]*2").tone(metal(adsr(0,.02)).chain(vol(0.5).connect(delay),out()))
|
"c3*4".transpose("[-24 0]*2").tone(metal(adsr(0,.02)).chain(vol(0.5).connect(delay),out()))
|
||||||
).slow(1)
|
).slow(1)`;
|
||||||
}`;
|
export const sowhatelse = `// mixer
|
||||||
export const sowhatelse = `()=> {
|
|
||||||
// mixer
|
|
||||||
const mix = (key) => vol({
|
const mix = (key) => vol({
|
||||||
chords: .2,
|
chords: .2,
|
||||||
lead: 0.8,
|
lead: 0.8,
|
||||||
|
|
@ -410,7 +402,7 @@ export const sowhatelse = `()=> {
|
||||||
const t = transpose("<0 0 1 0>/8");
|
const t = transpose("<0 0 1 0>/8");
|
||||||
const sowhat = scaleTranspose("0,3,6,9,11");
|
const sowhat = scaleTranspose("0,3,6,9,11");
|
||||||
// track
|
// track
|
||||||
return stack(
|
stack(
|
||||||
"[<0 4 [3 [2 1]]>]/4".struct("[x]*3").mask("[~ x ~]").scale('D5 dorian').off(1/6, scaleTranspose(-7)).off(1/3, scaleTranspose(-5)).apply(t).tone(instr('lead')).mask("<~ ~ x x>/8"),
|
"[<0 4 [3 [2 1]]>]/4".struct("[x]*3").mask("[~ x ~]").scale('D5 dorian').off(1/6, scaleTranspose(-7)).off(1/3, scaleTranspose(-5)).apply(t).tone(instr('lead')).mask("<~ ~ x x>/8"),
|
||||||
"<<e3 [~@2 a3]> <[d3 ~] [c3 f3] g3>>".scale('D dorian').apply(sowhat).apply(t).tone(instr('organ')).mask("<x x x ~>/8"),
|
"<<e3 [~@2 a3]> <[d3 ~] [c3 f3] g3>>".scale('D dorian').apply(sowhat).apply(t).tone(instr('organ')).mask("<x x x ~>/8"),
|
||||||
"<[d2 [d2 ~]*3]!3 <a1*2 c2*3 [a1 e2]>>".apply(t).tone(instr('bass')),
|
"<[d2 [d2 ~]*3]!3 <a1*2 c2*3 [a1 e2]>>".apply(t).tone(instr('bass')),
|
||||||
|
|
@ -418,8 +410,7 @@ export const sowhatelse = `()=> {
|
||||||
"~ c3".tone(instr('snare')),
|
"~ c3".tone(instr('snare')),
|
||||||
"<[c1@5 c1] <c1 [[c1@2 c1] ~] [c1 ~ c1] [c1!2 ~ c1!3]>>".tone(instr('kick')),
|
"<[c1@5 c1] <c1 [[c1@2 c1] ~] [c1 ~ c1] [c1!2 ~ c1!3]>>".tone(instr('kick')),
|
||||||
"[2,4]/4".scale('D dorian').apply(t).tone(instr('pad')).mask("<x x x ~>/8")
|
"[2,4]/4".scale('D dorian').apply(t).tone(instr('pad')).mask("<x x x ~>/8")
|
||||||
).fast(6/8)
|
).fast(6/8)`;
|
||||||
}`;
|
|
||||||
export const barryHarris = `piano()
|
export const barryHarris = `piano()
|
||||||
.then(p => "0,2,[7 6]"
|
.then(p => "0,2,[7 6]"
|
||||||
.add("<0 1 2 3 4 5 7 8>")
|
.add("<0 1 2 3 4 5 7 8>")
|
||||||
|
|
@ -448,8 +439,8 @@ export const blippyRhodes = `Promise.all([
|
||||||
const delay = new FeedbackDelay(1/12, .4).chain(vol(0.3), out());
|
const delay = new FeedbackDelay(1/12, .4).chain(vol(0.3), out());
|
||||||
rhodes = rhodes.chain(vol(0.5).connect(delay), out());
|
rhodes = rhodes.chain(vol(0.5).connect(delay), out());
|
||||||
const bass = synth(osc('sawtooth8')).chain(vol(.5),out());
|
const bass = synth(osc('sawtooth8')).chain(vol(.5),out());
|
||||||
const scales = ['C major', 'C mixolydian', 'F lydian', ['F minor',slowcat('Db major','Db mixolydian')]];
|
const scales = sequence('C major', 'C mixolydian', 'F lydian', ['F minor', slowcat('Db major','Db mixolydian')]).slow(4);
|
||||||
const t = x => x.scale(sequence(...scales).slow(4));
|
const t = x => x.scale(scales);
|
||||||
return stack(
|
return stack(
|
||||||
"<bd sn> <hh hh*2 hh*3>".tone(drums.chain(out())),
|
"<bd sn> <hh hh*2 hh*3>".tone(drums.chain(out())),
|
||||||
"<g4 c5 a4 [ab4 <eb5 f5>]>".apply(t).struct("x*8").apply(scaleTranspose("0 [-5,-2] -7 [-9,-2]")).legato(.2).slow(2).tone(rhodes),
|
"<g4 c5 a4 [ab4 <eb5 f5>]>".apply(t).struct("x*8").apply(scaleTranspose("0 [-5,-2] -7 [-9,-2]")).legato(.2).slow(2).tone(rhodes),
|
||||||
|
|
|
||||||
|
|
@ -171877,7 +171877,7 @@ const markEvent = (editor)=>(time, event)=>{
|
||||||
ch: end.column
|
ch: end.column
|
||||||
}, //{ css: 'background-color: #FFCA28; color: black' } // background-color is now used by parent marking
|
}, //{ css: 'background-color: #FFCA28; color: black' } // background-color is now used by parent marking
|
||||||
{
|
{
|
||||||
css: 'outline: 2px solid #FFCA28; box-sizing:border-box'
|
css: 'outline: 1px solid #FFCA28; box-sizing:border-box'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
//Tone.Transport.schedule(() => { // problem: this can be cleared by scheduler...
|
//Tone.Transport.schedule(() => { // problem: this can be cleared by scheduler...
|
||||||
|
|
@ -171894,7 +171894,7 @@ const markParens = (editor, data)=>{
|
||||||
const marked = getCurrentParenArea(v, data);
|
const marked = getCurrentParenArea(v, data);
|
||||||
parenMark?.clear();
|
parenMark?.clear();
|
||||||
parenMark = editor.getDoc().markText(...marked, {
|
parenMark = editor.getDoc().markText(...marked, {
|
||||||
css: 'background-color: #0000dd20'
|
css: 'background-color: #00007720'
|
||||||
}); //
|
}); //
|
||||||
};
|
};
|
||||||
function offsetToPosition(offset, code) {
|
function offsetToPosition(offset, code) {
|
||||||
|
|
@ -183164,4 +183164,4 @@ exports.default = cx;
|
||||||
|
|
||||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["3uVTb"], "3uVTb", "parcelRequire94c2")
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["3uVTb"], "3uVTb", "parcelRequire94c2")
|
||||||
|
|
||||||
//# sourceMappingURL=index.b40b1a4b.js.map
|
//# sourceMappingURL=index.5d784197.js.map
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -11,6 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<script src="/tutorial/index.b40b1a4b.js" defer=""></script>
|
<script src="/tutorial/index.5d784197.js" defer=""></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue