diff --git a/css/docs.css b/css/docs.css index ff9410f..5d63055 100644 --- a/css/docs.css +++ b/css/docs.css @@ -1,272 +1,313 @@ /* From CodeMirror docs */ @font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(//themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(//themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); } -body, html { margin: 0; padding: 0; height: 100%; } -section, article { display: block; padding: 0; } +body, +html { + margin: 0; + padding: 0; + height: 100%; +} + +section, +article { + display: block; + padding: 0; +} body { - background: #f8f8f8; - font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; - line-height: 1.5; + background: #f8f8f8; + font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; + line-height: 1.5; +} + +p { + margin-top: 0; +} + +h2, +h3, +h1 { + font-weight: normal; + margin-bottom: .7em; +} + +h1 { + font-size: 140%; +} + +h2 { + font-size: 120%; } -p { margin-top: 0; } +h3 { + font-size: 110%; +} -h2, h3, h1 { - font-weight: normal; - margin-bottom: .7em; +article>h2:first-child, +section:first-child>h2 { + margin-top: 0; } -h1 { font-size: 140%; } -h2 { font-size: 120%; } -h3 { font-size: 110%; } -article > h2:first-child, section:first-child > h2 { margin-top: 0; } #nav h1 { - margin-right: 12px; - margin-top: 0; - margin-bottom: 2px; - color: #d30707; - letter-spacing: .5px; + margin-right: 12px; + margin-top: 0; + margin-bottom: 2px; + color: #d30707; + letter-spacing: .5px; } -a, a:visited, a:link, .quasilink { - color: #A21313; - text-decoration: none; +a, +a:visited, +a:link, +.quasilink { + color: #A21313; + text-decoration: none; } em { - padding-right: 2px; + padding-right: 2px; } .quasilink { - cursor: pointer; + cursor: pointer; } article { - max-width: 700px; - margin: 0 0 0 160px; - border-left: 2px solid #E30808; - border-right: 1px solid #ddd; - padding: 30px 50px 100px 50px; - background: white; - z-index: 2; - position: relative; - min-height: 100%; - box-sizing: border-box; - -moz-box-sizing: border-box; + max-width: 700px; + margin: 0 0 0 160px; + border-left: 2px solid #E30808; + border-right: 1px solid #ddd; + padding: 30px 50px 100px 50px; + background: white; + z-index: 2; + position: relative; + min-height: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; } #nav { - position: fixed; - padding-top: 30px; - max-height: 100%; - box-sizing: -moz-border-box; - box-sizing: border-box; - overflow-y: auto; - left: 0; right: none; - width: 160px; - text-align: right; - z-index: 1; + position: fixed; + padding-top: 30px; + max-height: 100%; + box-sizing: -moz-border-box; + box-sizing: border-box; + overflow-y: auto; + left: 0; + right: none; + width: 160px; + text-align: right; + z-index: 1; } @media screen and (min-width: 1000px) { - article { - margin: 0 auto; - } - #nav { - right: 50%; - width: auto; - border-right: 349px solid transparent; - } + article { + margin: 0 auto; + } + + #nav { + right: 50%; + width: auto; + border-right: 349px solid transparent; + } } #nav ul { - display: block; - margin: 0; padding: 0; - margin-bottom: 32px; + display: block; + margin: 0; + padding: 0; + margin-bottom: 32px; } #nav li { - display: block; - margin-bottom: 4px; + display: block; + margin-bottom: 4px; } #nav li ul { - font-size: 80%; - margin-bottom: 0; - display: none; + font-size: 80%; + margin-bottom: 0; + display: none; } #nav li.active ul { - display: block; + display: block; } #nav li li a { - padding-right: 20px; - display: inline-block; + padding-right: 20px; + display: inline-block; } #nav ul a { - color: black; - padding: 0 7px 1px 11px; + color: black; + padding: 0 7px 1px 11px; } -#nav ul a.active, #nav ul a:hover { - border-bottom: 1px solid #E30808; - margin-bottom: -1px; - color: #E30808; +#nav ul a.active, +#nav ul a:hover { + border-bottom: 1px solid #E30808; + margin-bottom: -1px; + color: #E30808; } #logo { - border: 0; - margin-right: 12px; - margin-bottom: 25px; + border: 0; + margin-right: 12px; + margin-bottom: 25px; } section { - border-top: 1px solid #E30808; - margin: 1.5em 0; + border-top: 1px solid #E30808; + margin: 1.5em 0; } section.first { - border: none; - margin-top: 0; + border: none; + margin-top: 0; } #demo { - position: relative; + position: relative; } #demolist { - position: absolute; - right: 5px; - top: 5px; - z-index: 25; + position: absolute; + right: 5px; + top: 5px; + z-index: 25; } .yinyang { - position: absolute; - top: -10px; - left: 0; right: 0; - margin: auto; - display: block; - height: 120px; + position: absolute; + top: -10px; + left: 0; + right: 0; + margin: auto; + display: block; + height: 120px; } .actions { - margin: 1em 0 0; - min-height: 100px; - position: relative; + margin: 1em 0 0; + min-height: 100px; + position: relative; } .actionspicture { - pointer-events: none; - position: absolute; - height: 100px; - top: 0; left: 0; right: 0; + pointer-events: none; + position: absolute; + height: 100px; + top: 0; + left: 0; + right: 0; } .actionlink { - pointer-events: auto; - font-family: arial; - font-size: 80%; - font-weight: bold; - position: absolute; - top: 0; bottom: 0; - line-height: 1; - height: 1em; - margin: auto; + pointer-events: auto; + font-family: arial; + font-size: 80%; + font-weight: bold; + position: absolute; + top: 0; + bottom: 0; + line-height: 1; + height: 1em; + margin: auto; } .actionlink.download { - color: white; - right: 50%; - margin-right: 13px; - text-shadow: -1px 1px 3px #b00, -1px -1px 3px #b00, 1px 0px 3px #b00; + color: white; + right: 50%; + margin-right: 13px; + text-shadow: -1px 1px 3px #b00, -1px -1px 3px #b00, 1px 0px 3px #b00; } .actionlink.fund { - color: #b00; - left: 50%; - margin-left: 15px; + color: #b00; + left: 50%; + margin-left: 15px; } .actionlink:hover { - text-decoration: underline; + text-decoration: underline; } .actionlink a { - color: inherit; + color: inherit; } .actionsleft { - float: left; + float: left; } .actionsright { - float: right; - text-align: right; + float: right; + text-align: right; } @media screen and (max-width: 800px) { - .actions { - padding-top: 120px; - } - .actionsleft, .actionsright { - float: none; - text-align: left; - margin-bottom: 1em; - } + .actions { + padding-top: 120px; + } + + .actionsleft, + .actionsright { + float: none; + text-align: left; + margin-bottom: 1em; + } } th { - text-decoration: underline; - font-weight: normal; - text-align: left; + text-decoration: underline; + font-weight: normal; + text-align: left; } #features ul { - list-style: none; - margin: 0 0 1em; - padding: 0 0 0 1.2em; + list-style: none; + margin: 0 0 1em; + padding: 0 0 0 1.2em; } #features li:before { - content: "-"; - width: 1em; - display: inline-block; - padding: 0; - margin: 0; - margin-left: -1em; + content: "-"; + width: 1em; + display: inline-block; + padding: 0; + margin: 0; + margin-left: -1em; } .rel { - margin-bottom: 0; + margin-bottom: 0; } + .rel-note { - margin-top: 0; - color: #555; + margin-top: 0; + color: #555; } pre { - padding-left: 15px; - border-left: 2px solid #ddd; + padding-left: 15px; + border-left: 2px solid #ddd; } code { - padding: 0 2px; + padding: 0 2px; } strong { - text-decoration: underline; - font-weight: normal; + text-decoration: underline; + font-weight: normal; } .field { - border: 1px solid #A21313; -} + border: 1px solid #A21313; +} \ No newline at end of file diff --git a/css/editor.css b/css/editor.css index 1668385..279f632 100644 --- a/css/editor.css +++ b/css/editor.css @@ -1,228 +1,234 @@ html { - font-family: 'Roboto', sans-serif; - margin: 0px; - padding: 0px; + font-family: 'Roboto', sans-serif; + margin: 0px; + padding: 0px; } .application { - display: grid; - height:100%; - grid-template-columns: 80px auto; - grid-template-rows: 60px auto; + display: grid; + height: 100%; + grid-template-columns: 80px auto; + grid-template-rows: 60px auto; } .logozone { - grid-column: 1; - grid-row: 1; - background-color: #2b3373; - color:#343232; - text-align: center; - line-height: 4rem; - font-weight: bold; - font-size : 1.8rem; + grid-column: 1; + grid-row: 1; + background-color: #2b3373; + color: #343232; + text-align: center; + line-height: 4rem; + font-weight: bold; + font-size: 1.8rem; } .actionzone { - grid-column: 1; - grid-row: 2; - background-color: #2b3373; + grid-column: 1; + grid-row: 2; + background-color: #2b3373; } .dynamic-button { - width: auto; - margin: 10px; - padding: 4px; - height: 1.5rem; - text-align: center; - color: #fff; - opacity: 0.3; - background-color: #0069d9; - border-color: #0069d9; - border-radius: 2px; - user-select: none; + width: auto; + margin: 10px; + padding: 4px; + height: 1.5rem; + text-align: center; + color: #fff; + opacity: 0.3; + background-color: #0069d9; + border-color: #0069d9; + border-radius: 2px; + user-select: none; } .action-button { - width: auto; - margin: 10px; - padding: 4px; - height: 1.5rem; - text-align: center; - color: #fff; - background-color: #0069d9; - border-color: #0069d9; - border-radius: 2px; - user-select: none; + width: auto; + margin: 10px; + padding: 4px; + height: 1.5rem; + text-align: center; + color: #fff; + background-color: #0069d9; + border-color: #0069d9; + border-radius: 2px; + user-select: none; } .action-select { - text-align: center; + text-align: center; } + .export-button { - width: auto; - margin: 10px; - padding: 4px; - height: 1.5rem; - text-align: center; - color: #fff; - background-color: #0069d9; - border-color: #0069d9; - border-radius: 2px; - user-select: none; + width: auto; + margin: 10px; + padding: 4px; + height: 1.5rem; + text-align: center; + color: #fff; + background-color: #0069d9; + border-color: #0069d9; + border-radius: 2px; + user-select: none; } .export-button:hover { - background-color: #007bff; - border-color: #007bff; + background-color: #007bff; + border-color: #007bff; } .action-button:hover { - background-color: #007bff; - border-color: #007bff; + background-color: #007bff; + border-color: #007bff; } .dropzone { - grid-column: 2; - grid-row: 1; - width: auto; - height: auto; - font-weight: bold; - line-height: 3rem; - text-align: center; - padding: 0 0; - color: #8d97e8; - border: 4px dashed #8d97e8; - cursor: default; - font-size : 20px; + grid-column: 2; + grid-row: 1; + width: auto; + height: auto; + font-weight: bold; + line-height: 3rem; + text-align: center; + padding: 0 0; + color: #8d97e8; + border: 4px dashed #8d97e8; + cursor: default; + font-size: 20px; } -.dropzone:hover{ - color: #0069d9; - border-color: #0062cc; +.dropzone:hover { + color: #0069d9; + border-color: #0062cc; } .dropzone input { - min-width: 300px; - height: auto; - text-align: center; - line-height: 2.5rem; - font-size : 20px; - background-color: inherit; - color: #0069d9; - border-width: 0px; + min-width: 300px; + height: auto; + text-align: center; + line-height: 2.5rem; + font-size: 20px; + background-color: inherit; + color: #0069d9; + border-width: 0px; } + .editionzone { - grid-column: 2 3; - grid-row: 2 3; - height: calc(100vh - 61px); - width: calc(100vw - 86px); + grid-column: 2 3; + grid-row: 2 3; + height: calc(100vh - 61px); + width: calc(100vw - 86px); } .CodeMirror { - height: 100%; + height: 100%; } .modalwrapper { - display:none; - position: fixed; - z-index:4; - left: 0; - top:0; - height: 100%; - width:100%; - overflow: auto; - background-color: rgba(229, 231, 233, 0.83); + display: none; + position: fixed; + z-index: 4; + left: 0; + top: 0; + height: 100%; + width: 100%; + overflow: auto; + background-color: rgba(229, 231, 233, 0.83); } .faustui { - margin:20px 40px 40px 40px; - width: calc(100% - 80px); - height: calc(100% - 80px); + margin: 20px 40px 40px 40px; + width: calc(100% - 80px); + height: calc(100% - 80px); } /* Close Button used to stop the running Faust code */ -.closeBtn{ - float: right; - font-size:40px; - color:#0069d9; - margin: 0px 10px 0px 0px; - } +.closeBtn { + float: right; + font-size: 40px; + color: #0069d9; + margin: 0px 10px 0px 0px; +} -.closeBtn:hover,.closeBtn:focus{ - color:#007bff; - text-decoration: none; - cursor:pointer; +.closeBtn:hover, +.closeBtn:focus { + color: #007bff; + text-decoration: none; + cursor: pointer; } -.exportui{ - display: grid; - grid-template-columns: 1fr; - grid-gap:20px; - margin:auto; - margin-top:100px; - padding:20px; - width: 250px; - /* height: calc(100% - 80px); */ - background-color:white; - box-shadow: 3px 3px 5px 0px rgba(75, 81, 122, 0.46); +.exportui { + display: grid; + grid-template-columns: 1fr; + grid-gap: 20px; + margin: auto; + margin-top: 100px; + padding: 20px; + width: 250px; + /* height: calc(100% - 80px); */ + background-color: white; + box-shadow: 3px 3px 5px 0px rgba(75, 81, 122, 0.46); } .exportui h1 { - text-align: center; - color:hsla(220, 66%, 39%, 0.91); + text-align: center; + color: hsla(220, 66%, 39%, 0.91); } #qrDiv { - display: block; - min-height: 130px; + display: block; + min-height: 130px; } + #loader { - display: none; - text-align: center; - color:hsla(220, 66%, 39%, 0.91); - font-size: 3em; + display: none; + text-align: center; + color: hsla(220, 66%, 39%, 0.91); + font-size: 3em; } - -.configui{ - display: grid; - grid-template-columns: 1fr; - grid-gap:20px; - margin:auto; - margin-top:100px; - padding:20px; - width: 80%; - /* height: calc(100% - 80px); */ - background-color:white; - box-shadow: 3px 3px 5px 0px rgba(75, 81, 122, 0.46); +.configui { + display: grid; + grid-template-columns: 1fr; + grid-gap: 20px; + margin: auto; + margin-top: 100px; + padding: 20px; + width: 80%; + /* height: calc(100% - 80px); */ + background-color: white; + box-shadow: 3px 3px 5px 0px rgba(75, 81, 122, 0.46); } .configui h1 { - text-align: center; - color:hsla(220, 66%, 39%, 0.91); + text-align: center; + color: hsla(220, 66%, 39%, 0.91); } .config { - display:grid; - grid-template-columns: 1fr 1fr 1fr; - grid-gap: 8px; + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-gap: 8px; } .config-element { - border: none; - background-color: #9FA8EB; - padding: 10px; + border: none; + background-color: #9FA8EB; + padding: 10px; } + .config-element p { - font-style: italic; - font-size: 0.8em; + font-style: italic; + font-size: 0.8em; } + .config-element ul { - font-style: italic; - list-style-type: none; + font-style: italic; + list-style-type: none; } + .config-element li { - font-style: italic; - list-style-type: none; -} + font-style: italic; + list-style-type: none; +} \ No newline at end of file diff --git a/css/faust.css b/css/faust.css index 8337b0a..20f7a17 100644 --- a/css/faust.css +++ b/css/faust.css @@ -1,229 +1,230 @@ /* WEBKIT */ text { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } /**/ .faust-group-label { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 13px; - fill: rgba(199,190,162,0.6); + font-family: Arial, Verdana, Helvetica, sans; + font-size: 13px; + fill: rgba(199, 190, 162, 0.6); } .faust-tooltip-text { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 13px; + font-family: Arial, Verdana, Helvetica, sans; + font-size: 13px; } .faust-button-label { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 13px; - fill: rgba(122, 219, 255, 0.79); + font-family: Arial, Verdana, Helvetica, sans; + font-size: 13px; + fill: rgba(122, 219, 255, 0.79); } .faust-tgroup-label { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 13px; - fill: rgba(122, 219, 255, 0.79); + font-family: Arial, Verdana, Helvetica, sans; + font-size: 13px; + fill: rgba(122, 219, 255, 0.79); } .faust-label { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 14px; - fill: rgba(248, 187, 208, 0.75); + font-family: Arial, Verdana, Helvetica, sans; + font-size: 14px; + fill: rgba(248, 187, 208, 0.75); } .faust-value-text { - font-family: Arial, Verdana, Helvetica, sans; - font-size: 11px; - font-weight: bold; - fill: rgb(82,79,79); + font-family: Arial, Verdana, Helvetica, sans; + font-size: 11px; + font-weight: bold; + fill: rgb(82, 79, 79); } path { - -webkit-user-select: none; + -webkit-user-select: none; } rect { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } circle { - -webkit-user-select: none; + -webkit-user-select: none; } text:hover { - cursor: default; + cursor: default; } path.faust-vbox { - fill : white; - stroke : black; + fill: white; + stroke: black; } path.faust-rbutton-groove { - fill : rgb(152,251,152); - stroke : black; + fill: rgb(152, 251, 152); + stroke: black; } path.faust-rbutton-handle { - fill : grey; - stroke : black; + fill: grey; + stroke: black; } rect.faust-hslider-handle { - fill : black; + fill: black; } rect.faust-vslider-meter, rect.faust-hslider-meter { - fill : #F48FB1; + fill: #F48FB1; } rect.faust-vslider-groove, rect.faust-hslider-groove { - /*fill : #FCE4EC;*/ - fill : black; + /*fill : #FCE4EC;*/ + fill: black; } rect.faust-vslider-handle, rect.faust-hslider-handle { - fill : rgba(233, 30, 101, 0.63); - stroke : rgba(233, 30, 101, 0.99); + fill: rgba(233, 30, 101, 0.63); + stroke: rgba(233, 30, 101, 0.99); } rect.faust-hbargraph-curtain { - fill : rgb(20,20,20); - stroke : black; + fill: rgb(20, 20, 20); + stroke: black; } /* hbargraph meters cannot be defined via CSS because their widths and * heights are dynamic */ rect.faust-hbargraph-meter { - fill : url(#horizontalBarGraphMeterGradient); - stroke : black; + fill: url(#horizontalBarGraphMeterGradient); + stroke: black; } rect.faust-vbargraph-curtain { - fill : rgb(20,20,20); - stroke : black; + fill: rgb(20, 20, 20); + stroke: black; } rect.faust-vbargraph-meter { - fill : url(#verticalBarGraphMeterGradient); - stroke : black; + fill: url(#verticalBarGraphMeterGradient); + stroke: black; } rect.faust-checkbox-box { - fill : white; - stroke : black; + fill: white; + stroke: black; } path.faust-checkbox-check { - fill : black; - stroke : black; + fill: black; + stroke: black; } rect.faust-nentry-box { - fill : url(#numericalEntryUpGradient); - stroke : black; + fill: url(#numericalEntryUpGradient); + stroke: black; } path.faust-nentry-operation { - stroke : black; + stroke: black; } rect.faust-button-box { - fill : url(#buttonUpGradient); - stroke : black; + fill: url(#buttonUpGradient); + stroke: black; } rect.faust-tgroup-box { - fill : url(#tabGroupUpGradient); - stroke : black; + fill: url(#tabGroupUpGradient); + stroke: black; } circle.faust-rbutton-groove { - /*fill : rgba(233, 30, 101, 0.63);*/ - fill : url(#rotatingButtonHandleGradient); - stroke : rgb(233, 30, 101); + /*fill : rgba(233, 30, 101, 0.63);*/ + fill: url(#rotatingButtonHandleGradient); + stroke: rgb(233, 30, 101); } circle.faust-rbutton-dot { - fill : pink; - stroke : black; + fill: pink; + stroke: black; } path.faust-rbutton-meter { - fill : black; + fill: black; } path.faust-rbutton-mgroove { - fill : #F48FB1; + fill: #F48FB1; } /* as all of the above rectangles could be implemented as paths, we duplicate the definitions for paths */ path.faust-hslider-groove { - fill : red; - stroke : black; + fill: red; + stroke: black; } path.faust-hslider-handle { - fill : url(#horizontalSliderHandleGradient); - stroke : black; + fill: url(#horizontalSliderHandleGradient); + stroke: black; } path.faust-vslider-groove { - fill : red; - stroke : black; + fill: red; + stroke: black; } path.faust-vslider-handle { - fill : url(#verticalSliderHandleGradient); - stroke : black; + fill: url(#verticalSliderHandleGradient); + stroke: black; } path.faust-hbargraph-curtain { - fill : rgb(0,255,255); - stroke : black; + fill: rgb(0, 255, 255); + stroke: black; } path.faust-hbargraph-meter { - fill : grey; - stroke : black; + fill: grey; + stroke: black; } path.faust-vbargraph-curtain { - fill : rgb(0,255,255); - stroke : black; + fill: rgb(0, 255, 255); + stroke: black; } path.faust-vbargraph-meter { - fill : grey; - stroke : black; + fill: grey; + stroke: black; } path.faust-checkbox-box { - fill : white; - stroke : black; + fill: white; + stroke: black; } path.faust-nentry-box { - fill : url(#numericalEntryUpGradient); - stroke : black; + fill: url(#numericalEntryUpGradient); + stroke: black; } path.faust-button-box { - fill : #B0B0B0; - stroke : black; + fill: #B0B0B0; + stroke: black; } -/**/ + +/**/ \ No newline at end of file diff --git a/index.html b/index.html index f3fcd7e..ce05ce3 100644 --- a/index.html +++ b/index.html @@ -2,176 +2,206 @@ - - - - - Faust Editor - - - - - - - - + + + + + Faust Editor + + + + + + + + -
-
LOGO
-
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
-
-
- -
-
- -
- -
- -
- -
-
- - -
- × -
-
- -
- × -
-

Export Faust Code

- - - -
- Export -
- -
-
- -
-
-
-
- -
- × -
-

Configure Running Mode

- -
- -
-

Buffer size

-
- -
-

You can change the buffer size (from 256 to 8192 frames in ScripProcessor mode, it will be fixed at 128 frames - in AudioWorklet mode).

-
- -
-

Polyphonic instrument

-
- -
-

Assuming your DSP code is polyphonic - ready, you can activate the polyphonic mode, adjust the number of available voices, and test it with a MIDI - device or application (usable with Chrome which implements the Web - MIDI API). -

- -
-

ScriptProcessor/AudioWorklet

-
- -
-

ScriptProcessor: audio rendering is done using the old ScriptProcessor model

-

AudioWorklet: audio rendering is done using the new AudioWorklet model. This can only be tested with Chrome - Canary for now, be sure to activate - it -

-

-

Save DSP control parameters state -

-

Save DSP source

-
-
-
- - + + + + +
+ × +
+
+ +
+ × +
+

Export Faust Code

+ + + +
+ Export +
+ +
+
+ +
+
+
+
+ +
+ × +
+

Configure Running Mode

+ +
+ +
+

Buffer size

+
+ +
+

You can change the buffer size (from 256 to 8192 frames in ScripProcessor mode, it will be fixed + at 128 frames + in AudioWorklet mode).

+
+ +
+

Polyphonic instrument

+
+ +
+

Assuming your DSP code is polyphonic + ready, you can activate the polyphonic mode, adjust the number of available voices, and + test it with a MIDI + device or application (usable with Chrome which implements the Web + MIDI API). +

+ +
+

ScriptProcessor/AudioWorklet

+
+ +
+

ScriptProcessor: audio rendering is done using the old ScriptProcessor model

+

AudioWorklet: audio rendering is done using the new AudioWorklet model. This can only be tested + with Chrome + Canary for now, be sure to activate + it +

+

+ +
+

Sample format

+
+ +
+
+ +

Save DSP control + parameters state +

+ +

Save DSP + source

+
+
+
+ + - + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2583602..24f1b98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fausteditor", - "version": "1.2.15", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fausteditor", - "version": "1.2.15", + "version": "1.3.0", "dependencies": { "@fortawesome/fontawesome-free": "^6.4.0", "@grame/faustwasm": "^0.7.8", @@ -441,9 +441,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz", - "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.30.1.tgz", + "integrity": "sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==", "cpu": [ "arm" ], @@ -454,9 +454,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz", - "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.30.1.tgz", + "integrity": "sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==", "cpu": [ "arm64" ], @@ -467,9 +467,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz", - "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.30.1.tgz", + "integrity": "sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==", "cpu": [ "arm64" ], @@ -480,9 +480,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz", - "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.30.1.tgz", + "integrity": "sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==", "cpu": [ "x64" ], @@ -493,9 +493,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz", - "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.30.1.tgz", + "integrity": "sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==", "cpu": [ "arm64" ], @@ -506,9 +506,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz", - "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.30.1.tgz", + "integrity": "sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==", "cpu": [ "x64" ], @@ -519,9 +519,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz", - "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.30.1.tgz", + "integrity": "sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==", "cpu": [ "arm" ], @@ -532,9 +532,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz", - "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.30.1.tgz", + "integrity": "sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==", "cpu": [ "arm" ], @@ -545,9 +545,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz", - "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.30.1.tgz", + "integrity": "sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==", "cpu": [ "arm64" ], @@ -558,9 +558,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz", - "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.30.1.tgz", + "integrity": "sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==", "cpu": [ "arm64" ], @@ -571,9 +571,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz", - "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.30.1.tgz", + "integrity": "sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==", "cpu": [ "loong64" ], @@ -584,9 +584,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz", - "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.30.1.tgz", + "integrity": "sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==", "cpu": [ "ppc64" ], @@ -597,9 +597,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz", - "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.30.1.tgz", + "integrity": "sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==", "cpu": [ "riscv64" ], @@ -610,9 +610,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz", - "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.30.1.tgz", + "integrity": "sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==", "cpu": [ "s390x" ], @@ -623,9 +623,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", - "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.30.1.tgz", + "integrity": "sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==", "cpu": [ "x64" ], @@ -636,9 +636,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", - "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.30.1.tgz", + "integrity": "sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==", "cpu": [ "x64" ], @@ -649,9 +649,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz", - "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.30.1.tgz", + "integrity": "sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==", "cpu": [ "arm64" ], @@ -662,9 +662,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz", - "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.30.1.tgz", + "integrity": "sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==", "cpu": [ "ia32" ], @@ -675,9 +675,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz", - "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.30.1.tgz", + "integrity": "sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==", "cpu": [ "x64" ], @@ -1016,9 +1016,9 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, "node_modules/rollup": { - "version": "4.29.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", - "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", + "version": "4.30.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.30.1.tgz", + "integrity": "sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==", "dev": true, "dependencies": { "@types/estree": "1.0.6" @@ -1031,25 +1031,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.29.1", - "@rollup/rollup-android-arm64": "4.29.1", - "@rollup/rollup-darwin-arm64": "4.29.1", - "@rollup/rollup-darwin-x64": "4.29.1", - "@rollup/rollup-freebsd-arm64": "4.29.1", - "@rollup/rollup-freebsd-x64": "4.29.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", - "@rollup/rollup-linux-arm-musleabihf": "4.29.1", - "@rollup/rollup-linux-arm64-gnu": "4.29.1", - "@rollup/rollup-linux-arm64-musl": "4.29.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", - "@rollup/rollup-linux-riscv64-gnu": "4.29.1", - "@rollup/rollup-linux-s390x-gnu": "4.29.1", - "@rollup/rollup-linux-x64-gnu": "4.29.1", - "@rollup/rollup-linux-x64-musl": "4.29.1", - "@rollup/rollup-win32-arm64-msvc": "4.29.1", - "@rollup/rollup-win32-ia32-msvc": "4.29.1", - "@rollup/rollup-win32-x64-msvc": "4.29.1", + "@rollup/rollup-android-arm-eabi": "4.30.1", + "@rollup/rollup-android-arm64": "4.30.1", + "@rollup/rollup-darwin-arm64": "4.30.1", + "@rollup/rollup-darwin-x64": "4.30.1", + "@rollup/rollup-freebsd-arm64": "4.30.1", + "@rollup/rollup-freebsd-x64": "4.30.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.30.1", + "@rollup/rollup-linux-arm-musleabihf": "4.30.1", + "@rollup/rollup-linux-arm64-gnu": "4.30.1", + "@rollup/rollup-linux-arm64-musl": "4.30.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.30.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.30.1", + "@rollup/rollup-linux-riscv64-gnu": "4.30.1", + "@rollup/rollup-linux-s390x-gnu": "4.30.1", + "@rollup/rollup-linux-x64-gnu": "4.30.1", + "@rollup/rollup-linux-x64-musl": "4.30.1", + "@rollup/rollup-win32-arm64-msvc": "4.30.1", + "@rollup/rollup-win32-ia32-msvc": "4.30.1", + "@rollup/rollup-win32-x64-msvc": "4.30.1", "fsevents": "~2.3.2" } }, @@ -1100,9 +1100,9 @@ } }, "node_modules/vite": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.6.tgz", - "integrity": "sha512-NSjmUuckPmDU18bHz7QZ+bTYhRR0iA72cs2QAxCqDpafJ0S6qetco0LB3WW2OxlMHS0JmAv+yZ/R3uPmMyGTjQ==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.7.tgz", + "integrity": "sha512-RDt8r/7qx9940f8FcOIAH9PTViRrghKaK2K1jY3RaAURrEUbm9Du1mJ72G+jlhtG3WwodnfzY8ORQZbBavZEAQ==", "dev": true, "dependencies": { "esbuild": "^0.24.2", diff --git a/package.json b/package.json index 7cb9fb4..7a53d16 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fausteditor", "private": true, - "version": "1.2.15", + "version": "1.3.0", "description": "A simple Faust editor for the web", "scripts": { "dev": "vite", diff --git a/src/compilefaust.js b/src/compilefaust.js index a52f2bf..16fffc4 100644 --- a/src/compilefaust.js +++ b/src/compilefaust.js @@ -1,5 +1,5 @@ import { dsp_code } from "./faustlive"; -import { activateAudioInput, audio_input, buffer_size, checkPolyphonicDSP, ftz_flag, loadDSPState, poly_flag, poly_nvoices, rendering_mode, resetAudioInput } from "./runfaust"; +import { activateAudioInput, audio_input, buffer_size, checkPolyphonicDSP, ftz_flag, loadDSPState, poly_flag, poly_nvoices, rendering_mode, sample_format, resetAudioInput } from "./runfaust"; import { FaustUI } from "@shren/faust-ui"; var isWebKitAudio = (typeof (webkitAudioContext) !== "undefined"); @@ -141,9 +141,11 @@ export async function compileDSP() { var argv = []; argv.push("-ftz"); argv.push(ftz_flag); - // argv.push("-I"); - // Libraries are now included and loaded from the EMCC locale FS included in libfaust - // argv.push("libraries"); + if (sample_format === "float") { + argv.push("-single "); + } else { + argv.push("-double"); + } console.log(argv); if (poly_flag === "ON") { diff --git a/src/faustlive.js b/src/faustlive.js index 1767c4b..528bc5c 100644 --- a/src/faustlive.js +++ b/src/faustlive.js @@ -252,6 +252,7 @@ export function loadFaustCode() { // nvoices=4|8|16|32|64|128 // ftz=0|1|2 // rendering=ScriptProcessor|AudioWorklet +// format=float|double // code= // inline= // @@ -271,6 +272,7 @@ function configureEditorFromUrlParams() { if (params.has('nvoices')) poly_nvoices = params.get('nvoices'); if (params.has('ftz')) ftz_flag = params.get('ftz'); if (params.has('rendering')) rendering_mode = params.get('rendering'); + if (params.has('sample')) sample_format = params.get('sample'); // And reflect it in the menus restoreMenus(); @@ -604,7 +606,7 @@ window.addEventListener('touchstart', function () { // Main entry point, called when libfaust.js has finished to load function init() { - console.log('FaustEditor: version 1.2.15'); + console.log('FaustEditor: version 1.3.0'); // Try to load code from current URL configureEditorFromUrlParams(); diff --git a/src/runfaust.js b/src/runfaust.js index 19a3230..4916563 100644 --- a/src/runfaust.js +++ b/src/runfaust.js @@ -7,6 +7,7 @@ export var audio_input = null; export function resetAudioInput() { audio_input = null; } export var poly_flag = "OFF"; export var ftz_flag = "2"; +export var sample_format = "float"; export var poly_nvoices = 16; export var rendering_mode = "ScriptProcessor"; @@ -31,7 +32,7 @@ export function setPolyVoices(voices_item) { } // TODO(ijc): Unused? -function setFTZ(ftz_item) { +export function setFTZ(ftz_item) { ftz_flag = ftz_item.options[ftz_item.selectedIndex].value; } @@ -49,6 +50,11 @@ export function setRenderingMode(rendering_item) { } } +export function setSampleFormat(sample_item) { + sample_format = sample_item.options[sample_item.selectedIndex].value; + console.log("setSampleFormat", sample_format); +} + // MIDI input handling function keyOn(channel, pitch, velocity) { if (DSP && isPoly) { @@ -215,6 +221,7 @@ export function savePageState() { setStorageItemValue('FaustEditor', 'ftz_flag', ftz_flag); setStorageItemValue('FaustEditor', 'poly_nvoices', poly_nvoices); setStorageItemValue('FaustEditor', 'rendering_mode', rendering_mode); + setStorageItemValue('FaustEditor', 'sample_format', sample_format); // Possibly save DSP source if (getStorageItemValue('FaustEditor', 'FaustSourceStorage') === "on") { @@ -230,6 +237,7 @@ export function restoreMenus() { restoreMenu("polyVoices", poly_nvoices); restoreMenu("selectedFTZ", ftz_flag); restoreMenu("selectedRenderingMode", rendering_mode); + restoreMenu("selectedSampleFormat", sample_format); if (rendering_mode === "AudioWorklet") { document.getElementById("selectedBuffer").disabled = true; @@ -246,6 +254,7 @@ export function loadPageState() { poly_nvoices = (getStorageItemValue('FaustEditor', 'poly_nvoices') ? getStorageItemValue('FaustEditor', 'poly_nvoices') : 16); ftz_flag = (getStorageItemValue('FaustEditor', 'ftz_flag') ? getStorageItemValue('FaustEditor', 'ftz_flag') : 2); rendering_mode = (getStorageItemValue('FaustEditor', 'rendering_mode') ? getStorageItemValue('FaustEditor', 'rendering_mode') : "ScriptProcessor"); + sample_format = (getStorageItemValue('FaustEditor', 'sample_format') ? getStorageItemValue('FaustEditor', 'sample_format') : "float"); // Possibly restore DSP source if (getStorageItemValue('FaustEditor', 'FaustSourceStorage') === "on" && getStorageItemValue('FaustEditor', 'dsp_code')) {