From 6d02f4c2648b13656cad80cae77e1b76c9b4c0b2 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Thu, 24 Mar 2022 19:45:58 +0100 Subject: [PATCH] add tune --- repl/src/tunes.ts | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/repl/src/tunes.ts b/repl/src/tunes.ts index 9147f4b8..f5855fcf 100644 --- a/repl/src/tunes.ts +++ b/repl/src/tunes.ts @@ -595,9 +595,8 @@ stack( .tone((await piano()).chain(out())).fast(3/4)`; // iter, stut, stutWith -export const undergroundPlumber = `backgroundImage('https://images.nintendolife.com/news/2016/08/video_exploring_the_funky_inspiration_for_the_super_mario_bros_underground_theme/large.jpg',{ - className:'darken' -}) +export const undergroundPlumber = `backgroundImage('https://images.nintendolife.com/news/2016/08/video_exploring_the_funky_inspiration_for_the_super_mario_bros_underground_theme/large.jpg',{ className:'darken' }) + const drums = await players({ bd: 'bd/BT0A0D0.wav', sn: 'sn/ST0T0S3.wav', @@ -613,9 +612,28 @@ stack( .slow(2) .tone(synth({...osc('sawtooth7'),...adsr(0,.3,0)}).chain(out())), "[g2,[c3 eb3]]".iter(4) - .stutWith(4, 1/4, (x,n)=>x.transpose(n*12).velocity(Math.pow(.4,n))) + .stutWith(4, 1/8, (x,n)=>x.transpose(n*12).velocity(Math.pow(.4,n))) .legato(.1) ) .transpose("<0@2 5 0 7 5 0 -5>/2") - .pianoroll({minMidi:21,maxMidi:180, background:'transparent',inactive:'#3F8F90',active:'#DE3123'}) -)`; + +) + .fast(2/3) + .pianoroll({minMidi:21,maxMidi:180, background:'transparent',inactive:'#3F8F90',active:'#DE3123'})`; + +export const bridgeIsOver = `const breaks = (await players({mad:'https://freesound.org/data/previews/22/22274_109943-lq.mp3'})).chain(out()) +stack( + stack( + "c3*2 [[c3@1.4 bb2] ab2] gb2*2 <[[gb2@1.4 ab2] bb2] gb2>".legato(".5 1".fast(2)).velocity(.8), + "0 ~".scale('c4 whole tone') + .euclidLegato(3,8).slow(2).mask("x ~") + .stutWith(8, 1/16, (x,n)=>x.scaleTranspose(n).velocity(Math.pow(.7,n))) + .scaleTranspose("<0 1 2 3 4 3 2 1>") + .fast(2) + .velocity(.7) + .legato(.5) + .stut(3, .5, 1/8) + ).transpose(-1).tone((await piano()).chain(out())), + "mad".slow(2).tone(breaks) +).cpm(78).slow(4).pianoroll() +`;