mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
WS: Improve mixer demo
This commit is contained in:
parent
2987350892
commit
1109fc7983
192 changed files with 29395 additions and 548 deletions
21
share/web_surfaces/builtin/protocol/ardour-icon.svg
Normal file
21
share/web_surfaces/builtin/protocol/ardour-icon.svg
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="92px" height="80px" viewBox="0 0 92 80" enable-background="new 0 0 92 80" xml:space="preserve">
|
||||
<path id="path6984" fill="#C61F40" d="
|
||||
M45.586,0.44L-0.082,79.558c3.356,0,2.828-2.382,4.417-2.382c1.681,0.004,1.367,1.19,2.951,1.19c0.814,0,1.467-0.806,1.466-2.804
|
||||
c0-2.664,0.661-4.017,1.476-4.017s1.476,1.187,1.476,2.372c0,1.492,0.662,2.678,1.476,2.678c0.814,0,1.477-2.019,1.477-4.512
|
||||
l-0.01-2.857c0-3.447,0.661-6.24,1.476-6.24s1.477,1.207,1.476,5.112c0,3.104,0.662,6.198,1.476,6.198
|
||||
c0.814,0,1.478-3.602,1.477-9.382c0-6.68,0.65-10.996,1.465-10.996c0.815,0,1.477,4.32,1.476,8.582c0,4.977,0.662,9.878,1.477,9.878
|
||||
s1.477-4.902,1.476-11.701c0-7.302,0.651-12.609,1.466-12.609c0.813,0,1.477,5.308,1.476,11.406c0,6.4,0.661,11.955,1.476,11.955
|
||||
s1.476-5.551,1.476-12.661c0-7.109,0.651-12.766,1.466-12.766s1.476,5.656,1.476,12.649c0,6.994,0.662,12.641,1.476,12.641
|
||||
c0.814,0,1.477-5.65,1.477-12.397c0-6.602,0.65-12.135,1.465-12.135s1.476,5.53,1.476,12.746c0,6.952,0.663,12.271,1.477,12.271
|
||||
c0.813,0,1.477-5.318,1.476-11.332c0-5.651,0.651-10.669,1.465-10.669c0.814,0,1.478,5.027,1.477,11.882
|
||||
c0,6.413,0.661,11.068,1.476,11.068s1.477-4.657,1.476-9.667c0-4.514,0.651-8.781,1.466-8.781s1.477,4.265,1.476,10.32
|
||||
c0,5.522,0.662,9.351,1.476,9.351c0.814,0,1.477-3.825,1.477-7.727c0-3.353,0.65-6.737,1.465-6.737s1.476,3.382,1.476,8.382
|
||||
c0,4.449,0.662,7.389,1.477,7.389s1.476-2.586,1.476-5.407c0-2.911,0.662-5.145,1.476-5.145c0.814,0,1.466,2.501,1.466,6.356
|
||||
c0,3.345,0.661,5.439,1.476,5.439s1.476-1.732,1.476-3.479c0-1.801,0.662-3.563,1.477-3.563c0.813,0,1.465,1.703,1.465,4.459
|
||||
c0,2.317,0.662,3.668,1.477,3.668s1.477-0.941,1.477-2.034c0-1.438,0.661-2.098,1.476-2.098s1.466,0.987,1.466,2.814
|
||||
c0,1.44,0.661,2.192,1.476,2.192c1.539,0,1.331-1.917,2.951-1.929c1.773,0,1.253,2.571,2.941,2.571c1.217,0,2.159-0.469,2.952-0.474
|
||||
c1.316,0,1.408,0.928,4.416,0.928L45.588,0.44H45.586z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
19
share/web_surfaces/builtin/protocol/index.html
Normal file
19
share/web_surfaces/builtin/protocol/index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ardour WebSockets Protocol</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="top">
|
||||
<img src="ardour-icon.svg">
|
||||
<span id="manifest"></span>
|
||||
</div>
|
||||
<div id="log"></div>
|
||||
</div>
|
||||
<script type="module" src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
67
share/web_surfaces/builtin/protocol/main.css
Normal file
67
share/web_surfaces/builtin/protocol/main.css
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: rgb(62,61,61);
|
||||
color: rgb(248,248,242);
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.25em 0.5em;
|
||||
box-shadow: 0px 0px 10px #000;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#top > img {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
#top > span {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
#log {
|
||||
padding: 1em;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden;
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
#log pre {
|
||||
margin: 0;
|
||||
font-family: Menlo, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.message-in {
|
||||
color: rgb(248,248,242);
|
||||
}
|
||||
|
||||
.message-out {
|
||||
color: rgb(172,128,255);
|
||||
}
|
||||
|
||||
.info {
|
||||
color: rgb(99,208,230);
|
||||
}
|
||||
|
||||
.error {
|
||||
color: rgb(249,36,114);
|
||||
}
|
||||
68
share/web_surfaces/builtin/protocol/main.js
Normal file
68
share/web_surfaces/builtin/protocol/main.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Luciano Iam <lucianito@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
import ArdourClient from '/shared/ardour.js';
|
||||
|
||||
(() => {
|
||||
|
||||
const MAX_LOG_LINES = 1000;
|
||||
|
||||
const ardour = new ArdourClient();
|
||||
|
||||
async function main () {
|
||||
ardour.on('connected', (connected) => {
|
||||
if (connected) {
|
||||
log('Client connected', 'info');
|
||||
} else {
|
||||
log('Client disconnected', 'error');
|
||||
}
|
||||
});
|
||||
|
||||
ardour.on('message', (msg, inbound) => {
|
||||
if (inbound) {
|
||||
log(`↙ ${msg}`, 'message-in');
|
||||
} else {
|
||||
log(`↗ ${msg}`, 'message-out');
|
||||
}
|
||||
});
|
||||
|
||||
await ardour.connect();
|
||||
|
||||
const manifest = await ardour.getSurfaceManifest();
|
||||
document.getElementById('manifest').innerHTML = manifest.name.toUpperCase()
|
||||
+ ' v' + manifest.version + ' — ' + manifest.description;
|
||||
}
|
||||
|
||||
function log (message, className) {
|
||||
const output = document.getElementById('log');
|
||||
|
||||
if (output.childElementCount > MAX_LOG_LINES) {
|
||||
output.removeChild(output.childNodes[0]);
|
||||
}
|
||||
|
||||
const pre = document.createElement('pre');
|
||||
pre.innerHTML = message;
|
||||
pre.className = className;
|
||||
|
||||
output.appendChild(pre);
|
||||
output.scrollTop = output.scrollHeight;
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
})();
|
||||
6
share/web_surfaces/builtin/protocol/manifest.xml
Normal file
6
share/web_surfaces/builtin/protocol/manifest.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<WebSurface>
|
||||
<Name value="Protocol"/>
|
||||
<Description value="Prints traffic between Ardour and the web browser. This is a tool primarily aimed at developers."/>
|
||||
<Version value="1.0.0"/>
|
||||
</WebSurface>
|
||||
Loading…
Add table
Add a link
Reference in a new issue