Spaces:
Runtime error
Runtime error
import{S as C,i as B,s as z,e as u,k as m,c as h,a as f,d as c,m as v,K as x,b as N,g as D,J as o,L as se,t as M,h as $,j as J,E as p,M as ne,w as y,x as b,y as S,q as R,o as w,B as k,N as le}from"../chunks/index-bc271058.js";import{w as Ee}from"../chunks/index-a16eaf24.js";const Te="Piano",ae="Chamber Music",re="Rock and Metal",Oe="Synthesizer",oe="Church",ie="Timpani, Contrabass, Harp",Ne="Country";var G={piano:Te,chamber:ae,rock_and_metal:re,synth:Oe,church:oe,timpani_strings_harp:ie,country:Ne};function X(T,e,s){const n=T.slice();return n[4]=e[s],n[6]=s,n}function Z(T){let e,s,n,a,_,l,E,t,r,i,O,g;return{c(){e=u("label"),s=u("div"),n=u("img"),l=m(),E=u("input"),r=m(),this.h()},l(d){e=h(d,"LABEL",{"data-selected":!0,class:!0});var I=f(e);s=h(I,"DIV",{class:!0});var L=f(s);n=h(L,"IMG",{src:!0,alt:!0,class:!0}),L.forEach(c),l=v(I),E=h(I,"INPUT",{type:!0,class:!0}),r=v(I),I.forEach(c),this.h()},h(){x(n.src,a=`${T[4]}.svg`)||N(n,"src",a),N(n,"alt",_=G[T[4]]),N(n,"class","svelte-1r9pswz"),N(s,"class","svelte-1r9pswz"),N(E,"type","radio"),E.__value=t=T[4],E.value=E.__value,N(E,"class","svelte-1r9pswz"),T[3][0].push(E),N(e,"data-selected",i=T[0]===T[4]),N(e,"class","svelte-1r9pswz")},m(d,I){D(d,e,I),o(e,s),o(s,n),o(e,l),o(e,E),E.checked=E.__value===T[0],o(e,r),O||(g=se(E,"change",T[2]),O=!0)},p(d,I){I&1&&(E.checked=E.__value===d[0]),I&1&&i!==(i=d[0]===d[4])&&N(e,"data-selected",i)},d(d){d&&c(e),T[3][0].splice(T[3][0].indexOf(E),1),O=!1,g()}}}function ce(T){let e,s,n=(G[T[0]]||"Synthesizer")+"",a,_,l,E=T[1],t=[];for(let r=0;r<E.length;r+=1)t[r]=Z(X(T,E,r));return{c(){e=u("fieldset"),s=u("legend"),a=M(n),_=m(),l=u("div");for(let r=0;r<t.length;r+=1)t[r].c();this.h()},l(r){e=h(r,"FIELDSET",{class:!0});var i=f(e);s=h(i,"LEGEND",{class:!0});var O=f(s);a=$(O,n),O.forEach(c),_=v(i),l=h(i,"DIV",{class:!0});var g=f(l);for(let d=0;d<t.length;d+=1)t[d].l(g);g.forEach(c),i.forEach(c),this.h()},h(){N(s,"class","svelte-1r9pswz"),N(l,"class","grid svelte-1r9pswz"),N(e,"class","svelte-1r9pswz")},m(r,i){D(r,e,i),o(e,s),o(s,a),o(e,_),o(e,l);for(let O=0;O<t.length;O+=1)t[O].m(l,null)},p(r,[i]){if(i&1&&n!==(n=(G[r[0]]||"Synthesizer")+"")&&J(a,n),i&3){E=r[1];let O;for(O=0;O<E.length;O+=1){const g=X(r,E,O);t[O]?t[O].p(g,i):(t[O]=Z(g),t[O].c(),t[O].m(l,null))}for(;O<t.length;O+=1)t[O].d(1);t.length=E.length}},i:p,o:p,d(r){r&&c(e),ne(t,r)}}}function ue(T,e,s){const n=Object.keys(G);let a="synth";const _=[[]];function l(){a=this.__value,s(0,a)}return[a,n,l,_]}class he extends C{constructor(e){super(),B(this,e,ue,ce,z,{})}}function ee(T,e,s){const n=T.slice();return n[5]=e[s],n[7]=s,n}function te(T){let e,s=T[5]+"",n,a,_,l,E,t,r;return{c(){e=u("label"),n=M(s),a=m(),_=u("input"),this.h()},l(i){e=h(i,"LABEL",{"data-selected":!0,class:!0});var O=f(e);n=$(O,s),a=v(O),_=h(O,"INPUT",{type:!0,class:!0}),O.forEach(c),this.h()},h(){N(_,"type","radio"),_.__value=l=T[5],_.value=_.__value,N(_,"class","svelte-1m848u0"),T[4][0].push(_),N(e,"data-selected",E=T[5]===T[1]),N(e,"class","svelte-1m848u0")},m(i,O){D(i,e,O),o(e,n),o(e,a),o(e,_),_.checked=_.__value===T[1],t||(r=se(_,"change",T[3]),t=!0)},p(i,O){O&1&&s!==(s=i[5]+"")&&J(n,s),O&1&&l!==(l=i[5])&&(_.__value=l,_.value=_.__value),O&2&&(_.checked=_.__value===i[1]),O&3&&E!==(E=i[5]===i[1])&&N(e,"data-selected",E)},d(i){i&&c(e),T[4][0].splice(T[4][0].indexOf(_),1),t=!1,r()}}}function fe(T){let e,s,n,a=T[0],_=[];for(let l=0;l<a.length;l+=1)_[l]=te(ee(T,a,l));return{c(){e=u("div");for(let l=0;l<_.length;l+=1)_[l].c();s=m(),n=u("input"),this.h()},l(l){e=h(l,"DIV",{class:!0});var E=f(e);for(let t=0;t<_.length;t+=1)_[t].l(E);s=v(E),n=h(E,"INPUT",{type:!0,class:!0}),E.forEach(c),this.h()},h(){N(n,"type","radio"),n.checked=!0,N(n,"class","svelte-1m848u0"),N(e,"class","options svelte-1m848u0")},m(l,E){D(l,e,E);for(let t=0;t<_.length;t+=1)_[t].m(e,null);o(e,s),o(e,n)},p(l,[E]){if(E&3){a=l[0];let t;for(t=0;t<a.length;t+=1){const r=ee(l,a,t);_[t]?_[t].p(r,E):(_[t]=te(r),_[t].c(),_[t].m(e,s))}for(;t<_.length;t+=1)_[t].d(1);_.length=a.length}},i:p,o:p,d(l){l&&c(e),ne(_,l)}}}function de(T,e,s){let{options:n}=e,{type:a}=e,_=n[1];const l=[[]];function E(){_=this.__value,s(1,_)}return T.$$set=t=>{"options"in t&&s(0,n=t.options),"type"in t&&s(2,a=t.type)},[n,_,a,E,l]}class _e extends C{constructor(e){super(),B(this,e,de,fe,z,{options:0,type:2})}}function Fe(T){let e,s,n,a,_,l,E;return l=new _e({props:{options:T[0],type:pe}}),{c(){e=u("div"),s=u("fieldset"),n=u("legend"),a=M("Note density"),_=m(),y(l.$$.fragment),this.h()},l(t){e=h(t,"DIV",{});var r=f(e);s=h(r,"FIELDSET",{class:!0});var i=f(s);n=h(i,"LEGEND",{class:!0});var O=f(n);a=$(O,"Note density"),O.forEach(c),_=v(i),b(l.$$.fragment,i),i.forEach(c),r.forEach(c),this.h()},h(){N(n,"class","svelte-1cq0vc2"),N(s,"class","svelte-1cq0vc2")},m(t,r){D(t,e,r),o(e,s),o(s,n),o(n,a),o(s,_),S(l,s,null),E=!0},p,i(t){E||(R(l.$$.fragment,t),E=!0)},o(t){w(l.$$.fragment,t),E=!1},d(t){t&&c(e),k(l)}}}const pe="density";function me(T){return[["Low","Medium","High"]]}class ve extends C{constructor(e){super(),B(this,e,me,Fe,z,{})}}function Ae(T){let e,s,n,a,_,l,E;return l=new _e({props:{options:T[0],type:Ie}}),{c(){e=u("div"),s=u("fieldset"),n=u("legend"),a=M("Temperature"),_=m(),y(l.$$.fragment),this.h()},l(t){e=h(t,"DIV",{});var r=f(e);s=h(r,"FIELDSET",{class:!0});var i=f(s);n=h(i,"LEGEND",{class:!0});var O=f(n);a=$(O,"Temperature"),O.forEach(c),_=v(i),b(l.$$.fragment,i),i.forEach(c),r.forEach(c),this.h()},h(){N(n,"class","svelte-nlqy14"),N(s,"class","svelte-nlqy14")},m(t,r){D(t,e,r),o(e,s),o(s,n),o(n,a),o(s,_),S(l,s,null),E=!0},p,i(t){E||(R(l.$$.fragment,t),E=!0)},o(t){w(l.$$.fragment,t),E=!1},d(t){t&&c(e),k(l)}}}const Ie="temperature";function ge(T){return[["Low","Medium","High","Very High"]]}class De extends C{constructor(e){super(),B(this,e,ge,Ae,z,{})}}const Le=Ee(!1);function Me(T){let e,s;return{c(){e=u("button"),s=M(T[1]),this.h()},l(n){e=h(n,"BUTTON",{class:!0});var a=f(e);s=$(a,T[1]),a.forEach(c),this.h()},h(){e.disabled=T[0],N(e,"class","svelte-aq73nm")},m(n,a){D(n,e,a),o(e,s)},p(n,[a]){a&2&&J(s,n[1]),a&1&&(e.disabled=n[0])},i:p,o:p,d(n){n&&c(e)}}}function $e(T,e,s){let n,a;return le(T,Le,_=>s(0,a=_)),T.$$.update=()=>{T.$$.dirty&1&&s(1,n=a?"Composing...":"Compose \u2728")},[a,n]}class ye extends C{constructor(e){super(),B(this,e,$e,Me,z,{})}}function be(T){let e,s;return{c(){e=u("audio"),this.h()},l(n){e=h(n,"AUDIO",{src:!0,class:!0}),f(e).forEach(c),this.h()},h(){e.controls=!0,x(e.src,s="download.wav")||N(e,"src",s),N(e,"class","svelte-1e9isw9")},m(n,a){D(n,e,a)},p,i:p,o:p,d(n){n&&c(e)}}}class Se extends C{constructor(e){super(),B(this,e,null,be,z,{})}}function Re(T){let e,s,n,a,_,l;return{c(){e=u("section"),s=u("h2"),n=M("Visualised notes"),a=m(),_=u("img"),this.h()},l(E){e=h(E,"SECTION",{class:!0});var t=f(e);s=h(t,"H2",{});var r=f(s);n=$(r,"Visualised notes"),r.forEach(c),a=v(t),_=h(t,"IMG",{src:!0,alt:!0,class:!0}),t.forEach(c),this.h()},h(){x(_.src,l="compose.png")||N(_,"src",l),N(_,"alt","MIDI notes of composition"),N(_,"class","svelte-1tzlz20"),N(e,"class","svelte-1tzlz20")},m(E,t){D(E,e,t),o(e,s),o(s,n),o(e,a),o(e,_)},p,i:p,o:p,d(E){E&&c(e)}}}class we extends C{constructor(e){super(),B(this,e,null,Re,z,{})}}function ke(T){let e,s,n,a,_,l;return{c(){e=u("section"),s=u("h2"),n=M("Tokenized notes"),a=m(),_=u("p"),l=M(`PIECE_START TRACK_START INST=DRUMS DENSITY=6 BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 | |
TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 | |
NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 | |
NOTE_OFF=35 NOTE_OFF=42 BAR_END BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 | |
TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 | |
TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 | |
NOTE_OFF=42 BAR_END BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 | |
TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 | |
NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42`),this.h()},l(E){e=h(E,"SECTION",{class:!0});var t=f(e);s=h(t,"H2",{});var r=f(s);n=$(r,"Tokenized notes"),r.forEach(c),a=v(t),_=h(t,"P",{});var i=f(_);l=$(i,`PIECE_START TRACK_START INST=DRUMS DENSITY=6 BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 | |
TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 | |
NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 | |
NOTE_OFF=35 NOTE_OFF=42 BAR_END BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 | |
TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 | |
TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 | |
NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 | |
NOTE_OFF=42 BAR_END BAR_START NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 | |
TIME_DELTA=1 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=38 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=38 NOTE_OFF=42 TIME_DELTA=1 | |
NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=35 NOTE_ON=42 TIME_DELTA=1 | |
NOTE_OFF=35 NOTE_OFF=42 TIME_DELTA=1 NOTE_ON=42 TIME_DELTA=1 NOTE_OFF=42`),i.forEach(c),t.forEach(c),this.h()},h(){N(e,"class","svelte-1sitrxx")},m(E,t){D(E,e,t),o(e,s),o(s,n),o(e,a),o(e,_),o(_,l)},p,i:p,o:p,d(E){E&&c(e)}}}class Ce extends C{constructor(e){super(),B(this,e,null,ke,z,{})}}function Be(T){let e,s,n,a,_,l,E,t,r,i,O,g,d,I,L,K,P,j,V,Y,q,U;return r=new he({}),O=new ve({}),d=new De({}),L=new ye({}),P=new Se({}),V=new we({}),q=new Ce({}),{c(){e=u("main"),s=u("h1"),n=M("Composer"),a=m(),_=u("p"),l=M("A hundred thousand songs used to train. One AI model. Infinite compositions."),E=m(),t=u("section"),y(r.$$.fragment),i=m(),y(O.$$.fragment),g=m(),y(d.$$.fragment),I=m(),y(L.$$.fragment),K=m(),y(P.$$.fragment),j=m(),y(V.$$.fragment),Y=m(),y(q.$$.fragment),this.h()},l(F){e=h(F,"MAIN",{class:!0});var A=f(e);s=h(A,"H1",{class:!0});var Q=f(s);n=$(Q,"Composer"),Q.forEach(c),a=v(A),_=h(A,"P",{class:!0});var W=f(_);l=$(W,"A hundred thousand songs used to train. One AI model. Infinite compositions."),W.forEach(c),E=v(A),t=h(A,"SECTION",{id:!0,class:!0});var H=f(t);b(r.$$.fragment,H),i=v(H),b(O.$$.fragment,H),g=v(H),b(d.$$.fragment,H),H.forEach(c),I=v(A),b(L.$$.fragment,A),K=v(A),b(P.$$.fragment,A),j=v(A),b(V.$$.fragment,A),Y=v(A),b(q.$$.fragment,A),A.forEach(c),this.h()},h(){N(s,"class","svelte-1m4hhxp"),N(_,"class","svelte-1m4hhxp"),N(t,"id","options"),N(t,"class","svelte-1m4hhxp"),N(e,"class","svelte-1m4hhxp")},m(F,A){D(F,e,A),o(e,s),o(s,n),o(e,a),o(e,_),o(_,l),o(e,E),o(e,t),S(r,t,null),o(t,i),S(O,t,null),o(t,g),S(d,t,null),o(e,I),S(L,e,null),o(e,K),S(P,e,null),o(e,j),S(V,e,null),o(e,Y),S(q,e,null),U=!0},p,i(F){U||(R(r.$$.fragment,F),R(O.$$.fragment,F),R(d.$$.fragment,F),R(L.$$.fragment,F),R(P.$$.fragment,F),R(V.$$.fragment,F),R(q.$$.fragment,F),U=!0)},o(F){w(r.$$.fragment,F),w(O.$$.fragment,F),w(d.$$.fragment,F),w(L.$$.fragment,F),w(P.$$.fragment,F),w(V.$$.fragment,F),w(q.$$.fragment,F),U=!1},d(F){F&&c(e),k(r),k(O),k(d),k(L),k(P),k(V),k(q)}}}class Ve extends C{constructor(e){super(),B(this,e,null,Be,z,{})}}export{Ve as default}; | |