Spaces:
Runtime error
Runtime error
Ron Au
commited on
Commit
•
866477c
1
Parent(s):
49ece12
Update static/_app/pages/index.svelte-b34d5edf.js
Browse files
static/_app/pages/index.svelte-b34d5edf.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
import{S as J,i as K,s as Q,e as v,k as D,c as b,a as E,d as p,m as C,K as se,b as f,g as P,J as u,L as G,t as H,h as j,j as Ie,E as ne,M as Ue,N as z,O as he,P as Ve,w as q,x as W,y as X,Q as Fe,q as L,o as R,B as Y,R as fe,T as We,U as _e,f as ie,V as Xe,W as ce,n as De,p as Ce,X as Ye,l as pe,v as Je,u as Ke,Y as Qe}from"../chunks/index-f8f7cfca.js";import{w as ae}from"../chunks/index-7a30815e.js";const me=ae("synth"),we=ae("medium"),ke=ae("medium"),ye=ae(!1),Ee=ae(""),$e=ae(""),Te=ae(""),le={piano:"Piano",chamber:"Chamber Music",rock_and_metal:"Rock and Metal",synth:"Synthesizer",church:"Church",timpani_strings_harp:"Timpani, Contrabass, Harp",country:"Country",reggae:"Reggae-esque"},Ze={low:"Low",medium:"Medium",high:"High"},xe={low:"Low",medium:"Medium",high:"High",very_high:"Very High"};function je(l,e,s){const t=l.slice();return t[4]=e[s],t[6]=s,t}function Be(l){let e,s,t,r,n,a,i,o,d,h,c,m;return{c(){e=v("label"),s=v("div"),t=v("img"),a=D(),i=v("input"),d=D(),this.h()},l(_){e=b(_,"LABEL",{"data-selected":!0,class:!0});var T=E(e);s=b(T,"DIV",{class:!0});var g=E(s);t=b(g,"IMG",{src:!0,alt:!0,class:!0}),g.forEach(p),a=C(T),i=b(T,"INPUT",{type:!0,class:!0}),d=C(T),T.forEach(p),this.h()},h(){se(t.src,r=`static/${l[4]}.svg`)||f(t,"src",r),f(t,"alt",n=le[l[4]]),f(t,"class","svelte-1r9pswz"),f(s,"class","svelte-1r9pswz"),f(i,"type","radio"),i.__value=o=l[4],i.value=i.__value,f(i,"class","svelte-1r9pswz"),l[3][0].push(i),f(e,"data-selected",h=l[0]===l[4]),f(e,"class","svelte-1r9pswz")},m(_,T){P(_,e,T),u(e,s),u(s,t),u(e,a),u(e,i),i.checked=i.__value===l[0],u(e,d),c||(m=G(i,"change",l[2]),c=!0)},p(_,T){T&1&&(i.checked=i.__value===_[0]),T&1&&h!==(h=_[0]===_[4])&&f(e,"data-selected",h)},d(_){_&&p(e),l[3][0].splice(l[3][0].indexOf(i),1),c=!1,m()}}}function et(l){let e,s,t=(le[l[0]]||"Synthesizer")+"",r,n,a,i=l[1],o=[];for(let d=0;d<i.length;d+=1)o[d]=Be(je(l,i,d));return{c(){e=v("fieldset"),s=v("legend"),r=H(t),n=D(),a=v("div");for(let d=0;d<o.length;d+=1)o[d].c();this.h()},l(d){e=b(d,"FIELDSET",{class:!0});var h=E(e);s=b(h,"LEGEND",{class:!0});var c=E(s);r=j(c,t),c.forEach(p),n=C(h),a=b(h,"DIV",{class:!0});var m=E(a);for(let _=0;_<o.length;_+=1)o[_].l(m);m.forEach(p),h.forEach(p),this.h()},h(){f(s,"class","svelte-1r9pswz"),f(a,"class","grid svelte-1r9pswz"),f(e,"class","svelte-1r9pswz")},m(d,h){P(d,e,h),u(e,s),u(s,r),u(e,n),u(e,a);for(let c=0;c<o.length;c+=1)o[c].m(a,null)},p(d,[h]){if(h&1&&t!==(t=(le[d[0]]||"Synthesizer")+"")&&Ie(r,t),h&3){i=d[1];let c;for(c=0;c<i.length;c+=1){const m=je(d,i,c);o[c]?o[c].p(m,h):(o[c]=Be(m),o[c].c(),o[c].m(a,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},i:ne,o:ne,d(d){d&&p(e),Ue(o,d)}}}function tt(l,e,s){let t;z(l,me,i=>s(0,t=i));const r=Object.keys(le),n=[[]];function a(){t=this.__value,me.set(t)}return[t,r,a,n]}class st extends J{constructor(e){super(),K(this,e,tt,et,Q,{})}}function Le(l,e,s){const t=l.slice();return t[5]=e[s],t}function Pe(l){let e,s=l[1][l[5]]+"",t,r,n,a,i,o,d;return{c(){e=v("label"),t=H(s),r=D(),n=v("input"),this.h()},l(h){e=b(h,"LABEL",{"data-selected":!0,class:!0});var c=E(e);t=j(c,s),r=C(c),n=b(c,"INPUT",{type:!0,class:!0}),c.forEach(p),this.h()},h(){f(n,"type","radio"),n.__value=a=l[5],n.value=n.__value,f(n,"class","svelte-1m848u0"),l[4][0].push(n),f(e,"data-selected",i=l[5]===l[0]),f(e,"class","svelte-1m848u0")},m(h,c){P(h,e,c),u(e,t),u(e,r),u(e,n),n.checked=n.__value===l[0],o||(d=G(n,"change",l[3]),o=!0)},p(h,c){c&2&&s!==(s=h[1][h[5]]+"")&&Ie(t,s),c&1&&(n.checked=n.__value===h[0]),c&1&&i!==(i=h[5]===h[0])&&f(e,"data-selected",i)},d(h){h&&p(e),l[4][0].splice(l[4][0].indexOf(n),1),o=!1,d()}}}function nt(l){let e,s,t,r=l[2],n=[];for(let a=0;a<r.length;a+=1)n[a]=Pe(Le(l,r,a));return{c(){e=v("div");for(let a=0;a<n.length;a+=1)n[a].c();s=D(),t=v("input"),this.h()},l(a){e=b(a,"DIV",{class:!0});var i=E(e);for(let o=0;o<n.length;o+=1)n[o].l(i);s=C(i),t=b(i,"INPUT",{type:!0,class:!0}),i.forEach(p),this.h()},h(){f(t,"type","radio"),t.checked=!0,f(t,"class","svelte-1m848u0"),f(e,"class","options svelte-1m848u0")},m(a,i){P(a,e,i);for(let o=0;o<n.length;o+=1)n[o].m(e,null);u(e,s),u(e,t)},p(a,[i]){if(i&7){r=a[2];let o;for(o=0;o<r.length;o+=1){const d=Le(a,r,o);n[o]?n[o].p(d,i):(n[o]=Pe(d),n[o].c(),n[o].m(e,s))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},i:ne,o:ne,d(a){a&&p(e),Ue(n,a)}}}function lt(l,e,s){let{options:t}=e;const r=Object.keys(t);let{selection:n=r[1]}=e;const a=[[]];function i(){n=this.__value,s(0,n)}return l.$$set=o=>{"options"in o&&s(1,t=o.options),"selection"in o&&s(0,n=o.selection)},[n,t,r,i,a]}class qe extends J{constructor(e){super(),K(this,e,lt,nt,Q,{options:1,selection:0})}}function at(l){let e,s,t,r,n,a,i,o;function d(c){l[1](c)}let h={options:Ze};return l[0]!==void 0&&(h.selection=l[0]),a=new qe({props:h}),he.push(()=>Ve(a,"selection",d)),{c(){e=v("div"),s=v("fieldset"),t=v("legend"),r=H("Note density"),n=D(),q(a.$$.fragment),this.h()},l(c){e=b(c,"DIV",{});var m=E(e);s=b(m,"FIELDSET",{class:!0});var _=E(s);t=b(_,"LEGEND",{class:!0});var T=E(t);r=j(T,"Note density"),T.forEach(p),n=C(_),W(a.$$.fragment,_),_.forEach(p),m.forEach(p),this.h()},h(){f(t,"class","svelte-1ikh8be"),f(s,"class","svelte-1ikh8be")},m(c,m){P(c,e,m),u(e,s),u(s,t),u(t,r),u(s,n),X(a,s,null),o=!0},p(c,[m]){const _={};!i&&m&1&&(i=!0,_.selection=c[0],Fe(()=>i=!1)),a.$set(_)},i(c){o||(L(a.$$.fragment,c),o=!0)},o(c){R(a.$$.fragment,c),o=!1},d(c){c&&p(e),Y(a)}}}function rt(l,e,s){let t;z(l,we,n=>s(0,t=n));function r(n){t=n,we.set(t)}return[t,r]}class ot extends J{constructor(e){super(),K(this,e,rt,at,Q,{})}}function it(l){let e,s,t,r,n,a,i,o;function d(c){l[1](c)}let h={options:xe};return l[0]!==void 0&&(h.selection=l[0]),a=new qe({props:h}),he.push(()=>Ve(a,"selection",d)),{c(){e=v("div"),s=v("fieldset"),t=v("legend"),r=H("Temperature"),n=D(),q(a.$$.fragment),this.h()},l(c){e=b(c,"DIV",{});var m=E(e);s=b(m,"FIELDSET",{class:!0});var _=E(s);t=b(_,"LEGEND",{class:!0});var T=E(t);r=j(T,"Temperature"),T.forEach(p),n=C(_),W(a.$$.fragment,_),_.forEach(p),m.forEach(p),this.h()},h(){f(t,"class","svelte-1ikh8be"),f(s,"class","svelte-1ikh8be")},m(c,m){P(c,e,m),u(e,s),u(s,t),u(t,r),u(s,n),X(a,s,null),o=!0},p(c,[m]){const _={};!i&&m&1&&(i=!0,_.selection=c[0],Fe(()=>i=!1)),a.$set(_)},i(c){o||(L(a.$$.fragment,c),o=!0)},o(c){R(a.$$.fragment,c),o=!1},d(c){c&&p(e),Y(a)}}}function ct(l,e,s){let t;z(l,ke,n=>s(0,t=n));function r(n){t=n,ke.set(t)}return[t,r]}class ut extends J{constructor(e){super(),K(this,e,ct,it,Q,{})}}function ft(l){let e,s,t;return{c(){e=H("Compose "),s=v("img"),this.h()},l(r){e=j(r,"Compose "),s=b(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){se(s.src,t="static/wand.svg")||f(s,"src",t),f(s,"alt","Magic wand"),f(s,"class","svelte-18w38ow")},m(r,n){P(r,e,n),P(r,s,n)},d(r){r&&p(e),r&&p(s)}}}function dt(l){let e;return{c(){e=H("Composing...")},l(s){e=j(s,"Composing...")},m(s,t){P(s,e,t)},d(s){s&&p(e)}}}function ht(l){let e,s,t;function r(i,o){return i[0]?dt:ft}let n=r(l),a=n(l);return{c(){e=v("button"),a.c(),this.h()},l(i){e=b(i,"BUTTON",{class:!0});var o=E(e);a.l(o),o.forEach(p),this.h()},h(){e.disabled=l[0],f(e,"class","svelte-18w38ow")},m(i,o){P(i,e,o),a.m(e,null),s||(t=G(e,"click",l[1]),s=!0)},p(i,[o]){n!==(n=r(i))&&(a.d(1),a=n(i),a&&(a.c(),a.m(e,null))),o&1&&(e.disabled=i[0])},i:ne,o:ne,d(i){i&&p(e),a.d(),s=!1,t()}}}function _t(l,e,s){let t,r,n,a,i,o,d;z(l,ye,g=>s(0,t=g)),z(l,Te,g=>s(2,r=g)),z(l,$e,g=>s(3,n=g)),z(l,Ee,g=>s(4,a=g)),z(l,ke,g=>s(5,i=g)),z(l,we,g=>s(6,o=g)),z(l,me,g=>s(7,d=g));const h=()=>{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new MediaMetadata({title:`${le[d]} omposition`,artist:"AI Guru Composer",album:"Hugging Face",artwork:[{src:"static/hugging-face-headphones.png",sizes:"512x512",type:"image/png"}]}))},c=async({music_style:g,density:w,temperature:S})=>{var N;const A=await fetch("task/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({music_style:g,density:w,temperature:S})});if(!A.ok||!((N=A.headers.get("content-type"))!=null&&N.includes("application/json")))throw new Error(`Unable to create composition: [${A.status}] ${await A.text()}`);return await A.json()},m=async g=>{var S;const w=await fetch(`task/poll?task_id=${g.task_id}`);if(!w.ok||!((S=w.headers.get("content-type"))!=null&&S.includes("application/json")))throw new Error(`Unable to create composition: [${w.status}] ${await w.text()}`);return await w.json()},_=async(g,w=1e3,S=100)=>(g=await m(g),g.status==="completed"||g.status==="failed"||S&&g.poll_count>S?g:(await new Promise(A=>setTimeout(A,w)),await _(g,w,S)));return[t,async()=>{fe(ye,t=!0,t);try{const g=await c({music_style:d,density:o,temperature:i}),w=await _(g),{audio:S,image:A,tokens:B}=w.output;fe(Ee,a=S,a),fe($e,n=A,n),fe(Te,r=B,r),h()}catch(g){console.error(g)}finally{fe(ye,t=!1,t)}}]}class pt extends J{constructor(e){super(),K(this,e,_t,ht,Q,{})}}function ue(l,{delay:e=0,duration:s=400,easing:t=We}={}){const r=+getComputedStyle(l).opacity;return{delay:e,duration:s,easing:t,css:n=>`opacity: ${n*r}`}}function ze(l){let e,s,t,r,n,a,i,o=!1,d,h=!0,c,m,_=`translate(${l[5]*(l[0]/l[1])}px, -2%)`,T,g,w,S,A,B,N,F,Z;function y(){cancelAnimationFrame(d),a.paused||(d=Qe(y),o=!0),l[14].call(a)}let k=l[2]&&Re();return{c(){e=v("section"),s=v("img"),r=D(),n=v("div"),a=v("audio"),c=D(),m=v("div"),T=D(),k&&k.c(),g=D(),w=v("a"),S=H("Download"),this.h()},l($){e=b($,"SECTION",{class:!0});var I=E(e);s=b(I,"IMG",{class:!0,src:!0,alt:!0}),r=C(I),n=b(I,"DIV",{class:!0,tabindex:!0});var U=E(n);a=b(U,"AUDIO",{src:!0,class:!0}),E(a).forEach(p),c=C(U),m=b(U,"DIV",{class:!0}),E(m).forEach(p),T=C(U),k&&k.l(U),U.forEach(p),g=C(I),w=b(I,"A",{href:!0,download:!0,class:!0});var V=E(w);S=j(V,"Download"),V.forEach(p),I.forEach(p),this.h()},h(){f(s,"class","visualisation svelte-hbmhov"),se(s.src,t=l[8])||f(s,"src",t),f(s,"alt",""),se(a.src,i=l[7])||f(a,"src",i),f(a,"class","svelte-hbmhov"),l[1]===void 0&&_e(()=>l[15].call(a)),f(m,"class","handle svelte-hbmhov"),ie(m,"transform",_,!1),f(n,"class","player svelte-hbmhov"),f(n,"tabindex","0"),ie(n,"width",l[5]+"px",!1),ie(n,"height",l[6]+"px",!1),f(w,"href",l[7]),f(w,"download",A=`${le[l[9]]} Composition - AI Guru ft. Hugging Face.wav`),f(w,"class","download svelte-hbmhov"),f(e,"class","svelte-hbmhov")},m($,I){P($,e,I),u(e,s),l[13](s),u(e,r),u(e,n),u(n,a),u(n,c),u(n,m),u(n,T),k&&k.m(n,null),l[17](n),u(e,g),u(e,w),u(w,S),N=!0,F||(Z=[G(a,"timeupdate",y),G(a,"durationchange",l[15]),G(a,"play",l[16]),G(a,"pause",l[16]),G(n,"mousemove",l[10]),G(n,"touchmove",Xe(l[11])),G(n,"keydown",l[12]),G(n,"click",l[18])],F=!0)},p($,I){(!N||I&256&&!se(s.src,t=$[8]))&&f(s,"src",t),(!N||I&128&&!se(a.src,i=$[7]))&&f(a,"src",i),!o&&I&1&&!isNaN($[0])&&(a.currentTime=$[0]),o=!1,I&4&&h!==(h=$[2])&&a[h?"pause":"play"](),I&35&&_!==(_=`translate(${$[5]*($[0]/$[1])}px, -2%)`)&&ie(m,"transform",_,!1),$[2]?k?I&4&&L(k,1):(k=Re(),k.c(),L(k,1),k.m(n,null)):k&&(De(),R(k,1,1,()=>{k=null}),Ce()),I&32&&ie(n,"width",$[5]+"px",!1),I&64&&ie(n,"height",$[6]+"px",!1),(!N||I&128)&&f(w,"href",$[7]),(!N||I&512&&A!==(A=`${le[$[9]]} Composition - AI Guru ft. Hugging Face.wav`))&&f(w,"download",A)},i($){N||(L(k),_e(()=>{B||(B=ce(e,ue,{},!0)),B.run(1)}),N=!0)},o($){R(k),B||(B=ce(e,ue,{},!1)),B.run(0),N=!1},d($){$&&p(e),l[13](null),k&&k.d(),l[17](null),$&&B&&B.end(),F=!1,Ye(Z)}}}function Re(l){let e,s,t,r;return{c(){e=v("img"),this.h()},l(n){e=b(n,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),this.h()},h(){f(e,"class","play-button svelte-hbmhov"),se(e.src,s="static/play.svg")||f(e,"src",s),f(e,"alt","Play button"),f(e,"draggable","false")},m(n,a){P(n,e,a),r=!0},i(n){r||(_e(()=>{t||(t=ce(e,ue,{},!0)),t.run(1)}),r=!0)},o(n){t||(t=ce(e,ue,{},!1)),t.run(0),r=!1},d(n){n&&p(e),n&&t&&t.end()}}}function mt(l){let e,s,t=l[7]&&ze(l);return{c(){t&&t.c(),e=pe()},l(r){t&&t.l(r),e=pe()},m(r,n){t&&t.m(r,n),P(r,e,n),s=!0},p(r,[n]){r[7]?t?(t.p(r,n),n&128&&L(t,1)):(t=ze(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(De(),R(t,1,1,()=>{t=null}),Ce())},i(r){s||(L(t),s=!0)},o(r){R(t),s=!1},d(r){t&&t.d(r),r&&p(e)}}}function gt(l,e,s){let t,r,n;z(l,Ee,y=>s(7,t=y)),z(l,$e,y=>s(8,r=y)),z(l,me,y=>s(9,n=y));let a,i,o=!0,d,h,c,m;const _=()=>{s(5,c=h&&h.clientWidth),s(6,m=h&&h.clientHeight)};Je(()=>{_(),"mediaSession"in navigator&&(navigator.mediaSession.setActionHandler("play",()=>s(2,o=!1)),navigator.mediaSession.setActionHandler("pause",()=>s(2,o=!0)),navigator.mediaSession.setActionHandler("stop",()=>{s(2,o=!0),s(0,a=0)}))}),Ke(()=>{_()});const T=y=>{if(!i||!y.buttons)return;const{left:k,right:$}=d.getBoundingClientRect();s(0,a=i*(y.clientX-k)/($-k))},g=y=>{if(!i)return;const{left:k,right:$}=d.getBoundingClientRect();s(0,a=i*(y.touches[0].clientX-k)/($-k))},w=y=>{y.preventDefault(),y.code==="Space"&&s(2,o=!o),y.code==="ArrowLeft"&&s(0,a=a>=1?a-1:0),y.code==="ArrowRight"&&s(0,a=a<=i-1?a+1:i)};function S(y){he[y?"unshift":"push"](()=>{h=y,s(4,h)})}function A(){a=this.currentTime,s(0,a)}function B(){i=this.duration,s(1,i)}function N(){o=this.paused,s(2,o)}function F(y){he[y?"unshift":"push"](()=>{d=y,s(3,d)})}return[a,i,o,d,h,c,m,t,r,n,T,g,w,S,A,B,N,F,()=>s(2,o=!o)]}class vt extends J{constructor(e){super(),K(this,e,gt,mt,Q,{})}}function Ge(l){let e,s,t,r,n,a,i,o;return{c(){e=v("section"),s=v("h2"),t=H("Tokenized notes"),r=D(),n=v("p"),a=H(l[0]),this.h()},l(d){e=b(d,"SECTION",{class:!0});var h=E(e);s=b(h,"H2",{});var c=E(s);t=j(c,"Tokenized notes"),c.forEach(p),r=C(h),n=b(h,"P",{class:!0});var m=E(n);a=j(m,l[0]),m.forEach(p),h.forEach(p),this.h()},h(){f(n,"class","svelte-4un5mw"),f(e,"class","svelte-4un5mw")},m(d,h){P(d,e,h),u(e,s),u(s,t),u(e,r),u(e,n),u(n,a),o=!0},p(d,h){(!o||h&1)&&Ie(a,d[0])},i(d){o||(_e(()=>{i||(i=ce(e,ue,{},!0)),i.run(1)}),o=!0)},o(d){i||(i=ce(e,ue,{},!1)),i.run(0),o=!1},d(d){d&&p(e),d&&i&&i.end()}}}function bt(l){let e,s,t=l[0]&&Ge(l);return{c(){t&&t.c(),e=pe()},l(r){t&&t.l(r),e=pe()},m(r,n){t&&t.m(r,n),P(r,e,n),s=!0},p(r,[n]){r[0]?t?(t.p(r,n),n&1&&L(t,1)):(t=Ge(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(De(),R(t,1,1,()=>{t=null}),Ce())},i(r){s||(L(t),s=!0)},o(r){R(t),s=!1},d(r){t&&t.d(r),r&&p(e)}}}function yt(l,e,s){let t;return z(l,Te,r=>s(0,t=r)),[t]}class wt extends J{constructor(e){super(),K(this,e,yt,bt,Q,{})}}function kt(l){let e,s,t,r,n,a,i,o,d,h,c,m,_,T,g,w,S,A,B,N,F,Z,y,k,$,I,U,V,ge,x,ve,ee,be,te,de;return k=new st({}),I=new ot({}),V=new ut({}),x=new pt({}),ee=new vt({}),te=new wt({}),{c(){e=v("main"),s=v("h1"),t=H("Composer"),r=D(),n=v("p"),a=H("Trained on fifteen thousand songs. One AI model. Infinite compositions."),i=D(),o=v("p"),d=H(`This space contains a deep neural network model that can compose music. You can use it to generate music in
|
2 |
different styles, 4 bars at a time.`),h=D(),c=v("p"),m=H("Developed by "),_=v("a"),T=H("Ron Au"),g=H(` and
|
3 |
-
`),w=v("a"),S=H("Tristan Behrens"),A=H("."),B=D(),N=v("p"),F=H("Have fun! And always feel free to send us some feedback and share your compositions!"),Z=D(),y=v("section"),q(k.$$.fragment),$=D(),q(I.$$.fragment),U=D(),q(V.$$.fragment),ge=D(),q(x.$$.fragment),ve=D(),q(ee.$$.fragment),be=D(),q(te.$$.fragment),this.h()},l(M){e=b(M,"MAIN",{class:!0});var O=E(e);s=b(O,"H1",{class:!0});var Se=E(s);t=j(Se,"Composer"),Se.forEach(p),r=C(O),n=b(O,"P",{class:!0});var Ae=E(n);a=j(Ae,"Trained on fifteen thousand songs. One AI model. Infinite compositions."),Ae.forEach(p),i=C(O),o=b(O,"P",{class:!0});var Ne=E(o);d=j(Ne,`This space contains a deep neural network model that can compose music. You can use it to generate
|
4 |
different styles, 4 bars at a time.`),Ne.forEach(p),h=C(O),c=b(O,"P",{class:!0});var re=E(c);m=j(re,"Developed by "),_=b(re,"A",{href:!0,rel:!0,target:!0});var Oe=E(_);T=j(Oe,"Ron Au"),Oe.forEach(p),g=j(re,` and
|
5 |
`),w=b(re,"A",{href:!0,rel:!0,target:!0});var Me=E(w);S=j(Me,"Tristan Behrens"),Me.forEach(p),A=j(re,"."),re.forEach(p),B=C(O),N=b(O,"P",{class:!0});var He=E(N);F=j(He,"Have fun! And always feel free to send us some feedback and share your compositions!"),He.forEach(p),Z=C(O),y=b(O,"SECTION",{id:!0,class:!0});var oe=E(y);W(k.$$.fragment,oe),$=C(oe),W(I.$$.fragment,oe),U=C(oe),W(V.$$.fragment,oe),oe.forEach(p),ge=C(O),W(x.$$.fragment,O),ve=C(O),W(ee.$$.fragment,O),be=C(O),W(te.$$.fragment,O),O.forEach(p),this.h()},h(){f(s,"class","svelte-1rfjlkw"),f(n,"class","heading svelte-1rfjlkw"),f(o,"class","svelte-1rfjlkw"),f(_,"href","https://twitter.com/ronvoluted"),f(_,"rel","noopener"),f(_,"target","_blank"),f(w,"href","https://twitter.com/DrTBehrens"),f(w,"rel","noopener"),f(w,"target","_blank"),f(c,"class","svelte-1rfjlkw"),f(N,"class","svelte-1rfjlkw"),f(y,"id","options"),f(y,"class","svelte-1rfjlkw"),f(e,"class","svelte-1rfjlkw")},m(M,O){P(M,e,O),u(e,s),u(s,t),u(e,r),u(e,n),u(n,a),u(e,i),u(e,o),u(o,d),u(e,h),u(e,c),u(c,m),u(c,_),u(_,T),u(c,g),u(c,w),u(w,S),u(c,A),u(e,B),u(e,N),u(N,F),u(e,Z),u(e,y),X(k,y,null),u(y,$),X(I,y,null),u(y,U),X(V,y,null),u(e,ge),X(x,e,null),u(e,ve),X(ee,e,null),u(e,be),X(te,e,null),de=!0},p:ne,i(M){de||(L(k.$$.fragment,M),L(I.$$.fragment,M),L(V.$$.fragment,M),L(x.$$.fragment,M),L(ee.$$.fragment,M),L(te.$$.fragment,M),de=!0)},o(M){R(k.$$.fragment,M),R(I.$$.fragment,M),R(V.$$.fragment,M),R(x.$$.fragment,M),R(ee.$$.fragment,M),R(te.$$.fragment,M),de=!1},d(M){M&&p(e),Y(k),Y(I),Y(V),Y(x),Y(ee),Y(te)}}}class Tt extends J{constructor(e){super(),K(this,e,null,kt,Q,{})}}export{Tt as default};
|
|
|
1 |
+
import{S as J,i as K,s as Q,e as v,k as D,c as b,a as E,d as p,m as C,K as se,b as f,g as P,J as u,L as G,t as H,h as j,j as Ie,E as ne,M as Ue,N as z,O as he,P as Ve,w as q,x as W,y as X,Q as Fe,q as L,o as R,B as Y,R as fe,T as We,U as _e,f as ie,V as Xe,W as ce,n as De,p as Ce,X as Ye,l as pe,v as Je,u as Ke,Y as Qe}from"../chunks/index-f8f7cfca.js";import{w as ae}from"../chunks/index-7a30815e.js";const me=ae("synth"),we=ae("medium"),ke=ae("medium"),ye=ae(!1),Ee=ae(""),$e=ae(""),Te=ae(""),le={piano:"Piano",chamber:"Chamber Music",rock_and_metal:"Rock and Metal",synth:"Synthesizer",church:"Church",timpani_strings_harp:"Timpani, Contrabass, Harp",country:"Country",reggae:"Reggae-esque"},Ze={low:"Low",medium:"Medium",high:"High"},xe={low:"Low",medium:"Medium",high:"High",very_high:"Very High"};function je(l,e,s){const t=l.slice();return t[4]=e[s],t[6]=s,t}function Be(l){let e,s,t,r,n,a,i,o,d,h,c,m;return{c(){e=v("label"),s=v("div"),t=v("img"),a=D(),i=v("input"),d=D(),this.h()},l(_){e=b(_,"LABEL",{"data-selected":!0,class:!0});var T=E(e);s=b(T,"DIV",{class:!0});var g=E(s);t=b(g,"IMG",{src:!0,alt:!0,class:!0}),g.forEach(p),a=C(T),i=b(T,"INPUT",{type:!0,class:!0}),d=C(T),T.forEach(p),this.h()},h(){se(t.src,r=`static/${l[4]}.svg`)||f(t,"src",r),f(t,"alt",n=le[l[4]]),f(t,"class","svelte-1r9pswz"),f(s,"class","svelte-1r9pswz"),f(i,"type","radio"),i.__value=o=l[4],i.value=i.__value,f(i,"class","svelte-1r9pswz"),l[3][0].push(i),f(e,"data-selected",h=l[0]===l[4]),f(e,"class","svelte-1r9pswz")},m(_,T){P(_,e,T),u(e,s),u(s,t),u(e,a),u(e,i),i.checked=i.__value===l[0],u(e,d),c||(m=G(i,"change",l[2]),c=!0)},p(_,T){T&1&&(i.checked=i.__value===_[0]),T&1&&h!==(h=_[0]===_[4])&&f(e,"data-selected",h)},d(_){_&&p(e),l[3][0].splice(l[3][0].indexOf(i),1),c=!1,m()}}}function et(l){let e,s,t=(le[l[0]]||"Synthesizer")+"",r,n,a,i=l[1],o=[];for(let d=0;d<i.length;d+=1)o[d]=Be(je(l,i,d));return{c(){e=v("fieldset"),s=v("legend"),r=H(t),n=D(),a=v("div");for(let d=0;d<o.length;d+=1)o[d].c();this.h()},l(d){e=b(d,"FIELDSET",{class:!0});var h=E(e);s=b(h,"LEGEND",{class:!0});var c=E(s);r=j(c,t),c.forEach(p),n=C(h),a=b(h,"DIV",{class:!0});var m=E(a);for(let _=0;_<o.length;_+=1)o[_].l(m);m.forEach(p),h.forEach(p),this.h()},h(){f(s,"class","svelte-1r9pswz"),f(a,"class","grid svelte-1r9pswz"),f(e,"class","svelte-1r9pswz")},m(d,h){P(d,e,h),u(e,s),u(s,r),u(e,n),u(e,a);for(let c=0;c<o.length;c+=1)o[c].m(a,null)},p(d,[h]){if(h&1&&t!==(t=(le[d[0]]||"Synthesizer")+"")&&Ie(r,t),h&3){i=d[1];let c;for(c=0;c<i.length;c+=1){const m=je(d,i,c);o[c]?o[c].p(m,h):(o[c]=Be(m),o[c].c(),o[c].m(a,null))}for(;c<o.length;c+=1)o[c].d(1);o.length=i.length}},i:ne,o:ne,d(d){d&&p(e),Ue(o,d)}}}function tt(l,e,s){let t;z(l,me,i=>s(0,t=i));const r=Object.keys(le),n=[[]];function a(){t=this.__value,me.set(t)}return[t,r,a,n]}class st extends J{constructor(e){super(),K(this,e,tt,et,Q,{})}}function Le(l,e,s){const t=l.slice();return t[5]=e[s],t}function Pe(l){let e,s=l[1][l[5]]+"",t,r,n,a,i,o,d;return{c(){e=v("label"),t=H(s),r=D(),n=v("input"),this.h()},l(h){e=b(h,"LABEL",{"data-selected":!0,class:!0});var c=E(e);t=j(c,s),r=C(c),n=b(c,"INPUT",{type:!0,class:!0}),c.forEach(p),this.h()},h(){f(n,"type","radio"),n.__value=a=l[5],n.value=n.__value,f(n,"class","svelte-1m848u0"),l[4][0].push(n),f(e,"data-selected",i=l[5]===l[0]),f(e,"class","svelte-1m848u0")},m(h,c){P(h,e,c),u(e,t),u(e,r),u(e,n),n.checked=n.__value===l[0],o||(d=G(n,"change",l[3]),o=!0)},p(h,c){c&2&&s!==(s=h[1][h[5]]+"")&&Ie(t,s),c&1&&(n.checked=n.__value===h[0]),c&1&&i!==(i=h[5]===h[0])&&f(e,"data-selected",i)},d(h){h&&p(e),l[4][0].splice(l[4][0].indexOf(n),1),o=!1,d()}}}function nt(l){let e,s,t,r=l[2],n=[];for(let a=0;a<r.length;a+=1)n[a]=Pe(Le(l,r,a));return{c(){e=v("div");for(let a=0;a<n.length;a+=1)n[a].c();s=D(),t=v("input"),this.h()},l(a){e=b(a,"DIV",{class:!0});var i=E(e);for(let o=0;o<n.length;o+=1)n[o].l(i);s=C(i),t=b(i,"INPUT",{type:!0,class:!0}),i.forEach(p),this.h()},h(){f(t,"type","radio"),t.checked=!0,f(t,"class","svelte-1m848u0"),f(e,"class","options svelte-1m848u0")},m(a,i){P(a,e,i);for(let o=0;o<n.length;o+=1)n[o].m(e,null);u(e,s),u(e,t)},p(a,[i]){if(i&7){r=a[2];let o;for(o=0;o<r.length;o+=1){const d=Le(a,r,o);n[o]?n[o].p(d,i):(n[o]=Pe(d),n[o].c(),n[o].m(e,s))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},i:ne,o:ne,d(a){a&&p(e),Ue(n,a)}}}function lt(l,e,s){let{options:t}=e;const r=Object.keys(t);let{selection:n=r[1]}=e;const a=[[]];function i(){n=this.__value,s(0,n)}return l.$$set=o=>{"options"in o&&s(1,t=o.options),"selection"in o&&s(0,n=o.selection)},[n,t,r,i,a]}class qe extends J{constructor(e){super(),K(this,e,lt,nt,Q,{options:1,selection:0})}}function at(l){let e,s,t,r,n,a,i,o;function d(c){l[1](c)}let h={options:Ze};return l[0]!==void 0&&(h.selection=l[0]),a=new qe({props:h}),he.push(()=>Ve(a,"selection",d)),{c(){e=v("div"),s=v("fieldset"),t=v("legend"),r=H("Note density"),n=D(),q(a.$$.fragment),this.h()},l(c){e=b(c,"DIV",{});var m=E(e);s=b(m,"FIELDSET",{class:!0});var _=E(s);t=b(_,"LEGEND",{class:!0});var T=E(t);r=j(T,"Note density"),T.forEach(p),n=C(_),W(a.$$.fragment,_),_.forEach(p),m.forEach(p),this.h()},h(){f(t,"class","svelte-1ikh8be"),f(s,"class","svelte-1ikh8be")},m(c,m){P(c,e,m),u(e,s),u(s,t),u(t,r),u(s,n),X(a,s,null),o=!0},p(c,[m]){const _={};!i&&m&1&&(i=!0,_.selection=c[0],Fe(()=>i=!1)),a.$set(_)},i(c){o||(L(a.$$.fragment,c),o=!0)},o(c){R(a.$$.fragment,c),o=!1},d(c){c&&p(e),Y(a)}}}function rt(l,e,s){let t;z(l,we,n=>s(0,t=n));function r(n){t=n,we.set(t)}return[t,r]}class ot extends J{constructor(e){super(),K(this,e,rt,at,Q,{})}}function it(l){let e,s,t,r,n,a,i,o;function d(c){l[1](c)}let h={options:xe};return l[0]!==void 0&&(h.selection=l[0]),a=new qe({props:h}),he.push(()=>Ve(a,"selection",d)),{c(){e=v("div"),s=v("fieldset"),t=v("legend"),r=H("Temperature"),n=D(),q(a.$$.fragment),this.h()},l(c){e=b(c,"DIV",{});var m=E(e);s=b(m,"FIELDSET",{class:!0});var _=E(s);t=b(_,"LEGEND",{class:!0});var T=E(t);r=j(T,"Temperature"),T.forEach(p),n=C(_),W(a.$$.fragment,_),_.forEach(p),m.forEach(p),this.h()},h(){f(t,"class","svelte-1ikh8be"),f(s,"class","svelte-1ikh8be")},m(c,m){P(c,e,m),u(e,s),u(s,t),u(t,r),u(s,n),X(a,s,null),o=!0},p(c,[m]){const _={};!i&&m&1&&(i=!0,_.selection=c[0],Fe(()=>i=!1)),a.$set(_)},i(c){o||(L(a.$$.fragment,c),o=!0)},o(c){R(a.$$.fragment,c),o=!1},d(c){c&&p(e),Y(a)}}}function ct(l,e,s){let t;z(l,ke,n=>s(0,t=n));function r(n){t=n,ke.set(t)}return[t,r]}class ut extends J{constructor(e){super(),K(this,e,ct,it,Q,{})}}function ft(l){let e,s,t;return{c(){e=H("Compose "),s=v("img"),this.h()},l(r){e=j(r,"Compose "),s=b(r,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){se(s.src,t="static/wand.svg")||f(s,"src",t),f(s,"alt","Magic wand"),f(s,"class","svelte-18w38ow")},m(r,n){P(r,e,n),P(r,s,n)},d(r){r&&p(e),r&&p(s)}}}function dt(l){let e;return{c(){e=H("Composing...")},l(s){e=j(s,"Composing...")},m(s,t){P(s,e,t)},d(s){s&&p(e)}}}function ht(l){let e,s,t;function r(i,o){return i[0]?dt:ft}let n=r(l),a=n(l);return{c(){e=v("button"),a.c(),this.h()},l(i){e=b(i,"BUTTON",{class:!0});var o=E(e);a.l(o),o.forEach(p),this.h()},h(){e.disabled=l[0],f(e,"class","svelte-18w38ow")},m(i,o){P(i,e,o),a.m(e,null),s||(t=G(e,"click",l[1]),s=!0)},p(i,[o]){n!==(n=r(i))&&(a.d(1),a=n(i),a&&(a.c(),a.m(e,null))),o&1&&(e.disabled=i[0])},i:ne,o:ne,d(i){i&&p(e),a.d(),s=!1,t()}}}function _t(l,e,s){let t,r,n,a,i,o,d;z(l,ye,g=>s(0,t=g)),z(l,Te,g=>s(2,r=g)),z(l,$e,g=>s(3,n=g)),z(l,Ee,g=>s(4,a=g)),z(l,ke,g=>s(5,i=g)),z(l,we,g=>s(6,o=g)),z(l,me,g=>s(7,d=g));const h=()=>{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new MediaMetadata({title:`${le[d]} Composition`,artist:"AI Guru Composer",album:"Hugging Face",artwork:[{src:"static/hugging-face-headphones.png",sizes:"512x512",type:"image/png"}]}))},c=async({music_style:g,density:w,temperature:S})=>{var N;const A=await fetch("task/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({music_style:g,density:w,temperature:S})});if(!A.ok||!((N=A.headers.get("content-type"))!=null&&N.includes("application/json")))throw new Error(`Unable to create composition: [${A.status}] ${await A.text()}`);return await A.json()},m=async g=>{var S;const w=await fetch(`task/poll?task_id=${g.task_id}`);if(!w.ok||!((S=w.headers.get("content-type"))!=null&&S.includes("application/json")))throw new Error(`Unable to create composition: [${w.status}] ${await w.text()}`);return await w.json()},_=async(g,w=1e3,S=100)=>(g=await m(g),g.status==="completed"||g.status==="failed"||S&&g.poll_count>S?g:(await new Promise(A=>setTimeout(A,w)),await _(g,w,S)));return[t,async()=>{fe(ye,t=!0,t);try{const g=await c({music_style:d,density:o,temperature:i}),w=await _(g),{audio:S,image:A,tokens:B}=w.output;fe(Ee,a=S,a),fe($e,n=A,n),fe(Te,r=B,r),h()}catch(g){console.error(g)}finally{fe(ye,t=!1,t)}}]}class pt extends J{constructor(e){super(),K(this,e,_t,ht,Q,{})}}function ue(l,{delay:e=0,duration:s=400,easing:t=We}={}){const r=+getComputedStyle(l).opacity;return{delay:e,duration:s,easing:t,css:n=>`opacity: ${n*r}`}}function ze(l){let e,s,t,r,n,a,i,o=!1,d,h=!0,c,m,_=`translate(${l[5]*(l[0]/l[1])}px, -2%)`,T,g,w,S,A,B,N,F,Z;function y(){cancelAnimationFrame(d),a.paused||(d=Qe(y),o=!0),l[14].call(a)}let k=l[2]&&Re();return{c(){e=v("section"),s=v("img"),r=D(),n=v("div"),a=v("audio"),c=D(),m=v("div"),T=D(),k&&k.c(),g=D(),w=v("a"),S=H("Download"),this.h()},l($){e=b($,"SECTION",{class:!0});var I=E(e);s=b(I,"IMG",{class:!0,src:!0,alt:!0}),r=C(I),n=b(I,"DIV",{class:!0,tabindex:!0});var U=E(n);a=b(U,"AUDIO",{src:!0,class:!0}),E(a).forEach(p),c=C(U),m=b(U,"DIV",{class:!0}),E(m).forEach(p),T=C(U),k&&k.l(U),U.forEach(p),g=C(I),w=b(I,"A",{href:!0,download:!0,class:!0});var V=E(w);S=j(V,"Download"),V.forEach(p),I.forEach(p),this.h()},h(){f(s,"class","visualisation svelte-hbmhov"),se(s.src,t=l[8])||f(s,"src",t),f(s,"alt",""),se(a.src,i=l[7])||f(a,"src",i),f(a,"class","svelte-hbmhov"),l[1]===void 0&&_e(()=>l[15].call(a)),f(m,"class","handle svelte-hbmhov"),ie(m,"transform",_,!1),f(n,"class","player svelte-hbmhov"),f(n,"tabindex","0"),ie(n,"width",l[5]+"px",!1),ie(n,"height",l[6]+"px",!1),f(w,"href",l[7]),f(w,"download",A=`${le[l[9]]} Composition - AI Guru ft. Hugging Face.wav`),f(w,"class","download svelte-hbmhov"),f(e,"class","svelte-hbmhov")},m($,I){P($,e,I),u(e,s),l[13](s),u(e,r),u(e,n),u(n,a),u(n,c),u(n,m),u(n,T),k&&k.m(n,null),l[17](n),u(e,g),u(e,w),u(w,S),N=!0,F||(Z=[G(a,"timeupdate",y),G(a,"durationchange",l[15]),G(a,"play",l[16]),G(a,"pause",l[16]),G(n,"mousemove",l[10]),G(n,"touchmove",Xe(l[11])),G(n,"keydown",l[12]),G(n,"click",l[18])],F=!0)},p($,I){(!N||I&256&&!se(s.src,t=$[8]))&&f(s,"src",t),(!N||I&128&&!se(a.src,i=$[7]))&&f(a,"src",i),!o&&I&1&&!isNaN($[0])&&(a.currentTime=$[0]),o=!1,I&4&&h!==(h=$[2])&&a[h?"pause":"play"](),I&35&&_!==(_=`translate(${$[5]*($[0]/$[1])}px, -2%)`)&&ie(m,"transform",_,!1),$[2]?k?I&4&&L(k,1):(k=Re(),k.c(),L(k,1),k.m(n,null)):k&&(De(),R(k,1,1,()=>{k=null}),Ce()),I&32&&ie(n,"width",$[5]+"px",!1),I&64&&ie(n,"height",$[6]+"px",!1),(!N||I&128)&&f(w,"href",$[7]),(!N||I&512&&A!==(A=`${le[$[9]]} Composition - AI Guru ft. Hugging Face.wav`))&&f(w,"download",A)},i($){N||(L(k),_e(()=>{B||(B=ce(e,ue,{},!0)),B.run(1)}),N=!0)},o($){R(k),B||(B=ce(e,ue,{},!1)),B.run(0),N=!1},d($){$&&p(e),l[13](null),k&&k.d(),l[17](null),$&&B&&B.end(),F=!1,Ye(Z)}}}function Re(l){let e,s,t,r;return{c(){e=v("img"),this.h()},l(n){e=b(n,"IMG",{class:!0,src:!0,alt:!0,draggable:!0}),this.h()},h(){f(e,"class","play-button svelte-hbmhov"),se(e.src,s="static/play.svg")||f(e,"src",s),f(e,"alt","Play button"),f(e,"draggable","false")},m(n,a){P(n,e,a),r=!0},i(n){r||(_e(()=>{t||(t=ce(e,ue,{},!0)),t.run(1)}),r=!0)},o(n){t||(t=ce(e,ue,{},!1)),t.run(0),r=!1},d(n){n&&p(e),n&&t&&t.end()}}}function mt(l){let e,s,t=l[7]&&ze(l);return{c(){t&&t.c(),e=pe()},l(r){t&&t.l(r),e=pe()},m(r,n){t&&t.m(r,n),P(r,e,n),s=!0},p(r,[n]){r[7]?t?(t.p(r,n),n&128&&L(t,1)):(t=ze(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(De(),R(t,1,1,()=>{t=null}),Ce())},i(r){s||(L(t),s=!0)},o(r){R(t),s=!1},d(r){t&&t.d(r),r&&p(e)}}}function gt(l,e,s){let t,r,n;z(l,Ee,y=>s(7,t=y)),z(l,$e,y=>s(8,r=y)),z(l,me,y=>s(9,n=y));let a,i,o=!0,d,h,c,m;const _=()=>{s(5,c=h&&h.clientWidth),s(6,m=h&&h.clientHeight)};Je(()=>{_(),"mediaSession"in navigator&&(navigator.mediaSession.setActionHandler("play",()=>s(2,o=!1)),navigator.mediaSession.setActionHandler("pause",()=>s(2,o=!0)),navigator.mediaSession.setActionHandler("stop",()=>{s(2,o=!0),s(0,a=0)}))}),Ke(()=>{_()});const T=y=>{if(!i||!y.buttons)return;const{left:k,right:$}=d.getBoundingClientRect();s(0,a=i*(y.clientX-k)/($-k))},g=y=>{if(!i)return;const{left:k,right:$}=d.getBoundingClientRect();s(0,a=i*(y.touches[0].clientX-k)/($-k))},w=y=>{y.preventDefault(),y.code==="Space"&&s(2,o=!o),y.code==="ArrowLeft"&&s(0,a=a>=1?a-1:0),y.code==="ArrowRight"&&s(0,a=a<=i-1?a+1:i)};function S(y){he[y?"unshift":"push"](()=>{h=y,s(4,h)})}function A(){a=this.currentTime,s(0,a)}function B(){i=this.duration,s(1,i)}function N(){o=this.paused,s(2,o)}function F(y){he[y?"unshift":"push"](()=>{d=y,s(3,d)})}return[a,i,o,d,h,c,m,t,r,n,T,g,w,S,A,B,N,F,()=>s(2,o=!o)]}class vt extends J{constructor(e){super(),K(this,e,gt,mt,Q,{})}}function Ge(l){let e,s,t,r,n,a,i,o;return{c(){e=v("section"),s=v("h2"),t=H("Tokenized notes"),r=D(),n=v("p"),a=H(l[0]),this.h()},l(d){e=b(d,"SECTION",{class:!0});var h=E(e);s=b(h,"H2",{});var c=E(s);t=j(c,"Tokenized notes"),c.forEach(p),r=C(h),n=b(h,"P",{class:!0});var m=E(n);a=j(m,l[0]),m.forEach(p),h.forEach(p),this.h()},h(){f(n,"class","svelte-4un5mw"),f(e,"class","svelte-4un5mw")},m(d,h){P(d,e,h),u(e,s),u(s,t),u(e,r),u(e,n),u(n,a),o=!0},p(d,h){(!o||h&1)&&Ie(a,d[0])},i(d){o||(_e(()=>{i||(i=ce(e,ue,{},!0)),i.run(1)}),o=!0)},o(d){i||(i=ce(e,ue,{},!1)),i.run(0),o=!1},d(d){d&&p(e),d&&i&&i.end()}}}function bt(l){let e,s,t=l[0]&&Ge(l);return{c(){t&&t.c(),e=pe()},l(r){t&&t.l(r),e=pe()},m(r,n){t&&t.m(r,n),P(r,e,n),s=!0},p(r,[n]){r[0]?t?(t.p(r,n),n&1&&L(t,1)):(t=Ge(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(De(),R(t,1,1,()=>{t=null}),Ce())},i(r){s||(L(t),s=!0)},o(r){R(t),s=!1},d(r){t&&t.d(r),r&&p(e)}}}function yt(l,e,s){let t;return z(l,Te,r=>s(0,t=r)),[t]}class wt extends J{constructor(e){super(),K(this,e,yt,bt,Q,{})}}function kt(l){let e,s,t,r,n,a,i,o,d,h,c,m,_,T,g,w,S,A,B,N,F,Z,y,k,$,I,U,V,ge,x,ve,ee,be,te,de;return k=new st({}),I=new ot({}),V=new ut({}),x=new pt({}),ee=new vt({}),te=new wt({}),{c(){e=v("main"),s=v("h1"),t=H("Composer"),r=D(),n=v("p"),a=H("Trained on fifteen thousand songs. One AI model. Infinite compositions."),i=D(),o=v("p"),d=H(`This space contains a deep neural network model that can compose music. You can use it to generate audio in
|
2 |
different styles, 4 bars at a time.`),h=D(),c=v("p"),m=H("Developed by "),_=v("a"),T=H("Ron Au"),g=H(` and
|
3 |
+
`),w=v("a"),S=H("Tristan Behrens"),A=H("."),B=D(),N=v("p"),F=H("Have fun! And always feel free to send us some feedback and share your compositions!"),Z=D(),y=v("section"),q(k.$$.fragment),$=D(),q(I.$$.fragment),U=D(),q(V.$$.fragment),ge=D(),q(x.$$.fragment),ve=D(),q(ee.$$.fragment),be=D(),q(te.$$.fragment),this.h()},l(M){e=b(M,"MAIN",{class:!0});var O=E(e);s=b(O,"H1",{class:!0});var Se=E(s);t=j(Se,"Composer"),Se.forEach(p),r=C(O),n=b(O,"P",{class:!0});var Ae=E(n);a=j(Ae,"Trained on fifteen thousand songs. One AI model. Infinite compositions."),Ae.forEach(p),i=C(O),o=b(O,"P",{class:!0});var Ne=E(o);d=j(Ne,`This space contains a deep neural network model that can compose music. You can use it to generate audio in
|
4 |
different styles, 4 bars at a time.`),Ne.forEach(p),h=C(O),c=b(O,"P",{class:!0});var re=E(c);m=j(re,"Developed by "),_=b(re,"A",{href:!0,rel:!0,target:!0});var Oe=E(_);T=j(Oe,"Ron Au"),Oe.forEach(p),g=j(re,` and
|
5 |
`),w=b(re,"A",{href:!0,rel:!0,target:!0});var Me=E(w);S=j(Me,"Tristan Behrens"),Me.forEach(p),A=j(re,"."),re.forEach(p),B=C(O),N=b(O,"P",{class:!0});var He=E(N);F=j(He,"Have fun! And always feel free to send us some feedback and share your compositions!"),He.forEach(p),Z=C(O),y=b(O,"SECTION",{id:!0,class:!0});var oe=E(y);W(k.$$.fragment,oe),$=C(oe),W(I.$$.fragment,oe),U=C(oe),W(V.$$.fragment,oe),oe.forEach(p),ge=C(O),W(x.$$.fragment,O),ve=C(O),W(ee.$$.fragment,O),be=C(O),W(te.$$.fragment,O),O.forEach(p),this.h()},h(){f(s,"class","svelte-1rfjlkw"),f(n,"class","heading svelte-1rfjlkw"),f(o,"class","svelte-1rfjlkw"),f(_,"href","https://twitter.com/ronvoluted"),f(_,"rel","noopener"),f(_,"target","_blank"),f(w,"href","https://twitter.com/DrTBehrens"),f(w,"rel","noopener"),f(w,"target","_blank"),f(c,"class","svelte-1rfjlkw"),f(N,"class","svelte-1rfjlkw"),f(y,"id","options"),f(y,"class","svelte-1rfjlkw"),f(e,"class","svelte-1rfjlkw")},m(M,O){P(M,e,O),u(e,s),u(s,t),u(e,r),u(e,n),u(n,a),u(e,i),u(e,o),u(o,d),u(e,h),u(e,c),u(c,m),u(c,_),u(_,T),u(c,g),u(c,w),u(w,S),u(c,A),u(e,B),u(e,N),u(N,F),u(e,Z),u(e,y),X(k,y,null),u(y,$),X(I,y,null),u(y,U),X(V,y,null),u(e,ge),X(x,e,null),u(e,ve),X(ee,e,null),u(e,be),X(te,e,null),de=!0},p:ne,i(M){de||(L(k.$$.fragment,M),L(I.$$.fragment,M),L(V.$$.fragment,M),L(x.$$.fragment,M),L(ee.$$.fragment,M),L(te.$$.fragment,M),de=!0)},o(M){R(k.$$.fragment,M),R(I.$$.fragment,M),R(V.$$.fragment,M),R(x.$$.fragment,M),R(ee.$$.fragment,M),R(te.$$.fragment,M),de=!1},d(M){M&&p(e),Y(k),Y(I),Y(V),Y(x),Y(ee),Y(te)}}}class Tt extends J{constructor(e){super(),K(this,e,null,kt,Q,{})}}export{Tt as default};
|