Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploying Tulip Web #514

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tulip/web/static/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,13 @@ for b in [0, 1, 2, 3]:
tulip.bg_rect(x,y,w,h,c,1)
tc = 255-c
tulip.bg_str("%03d" % (c), x+7, y+41, tc, 8)
`},{
't':'music',
'd':'Put an echo effect on audio input',
'c':`
# "Allow audio input" must be turned on
amy.send(osc=30, pan=0, wave=amy.AUDIO_IN0, vel=1)
amy.send(osc=31, pan=1, wave=amy.AUDIO_IN1, vel=1)
amy.echo(level=1, delay_ms=400, max_delay_ms=1500, feedback=0.8, filter_coef=None)
`}
]
8 changes: 3 additions & 5 deletions tulip/web/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,22 @@ <h1><A HREF="https://tulip.computer/"><img src="/img/favicon.png"/ width=40></A>

<!-- MIDI settings panel if MIDI is available -->
<form name="tulip_settings">
<div class="row align-items-start">
<div class="col-3 align-self-end small">
<div class="row align-items-start pt-1">
<div class="col-3 align-top small">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="amy_audioin" onClick="toggle_audioin();"/>
<label class="form-check-label" for="amy_audioin">Allow audio input</label>
</div>
</div>
<div class="col-4 align-self-start">
<div class="col-4 align-self-start small">
<div id="midi-input-panel">
MIDI input device:
<select onchange="setup_midi_devices()" name="midi_input" class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>[Not available]</option>
</select>
</div>
</div>
<div class="col-4 align-self-start small">
<div id="midi-output-panel">
MIDI output device:
<select onchange="setup_midi_devices()" name="midi_output" class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>[Not available]</option>
</select>
Expand Down
4 changes: 2 additions & 2 deletions tulip/web/static/spss.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ async function start_midi() {
if(WebMidi.inputs.length>0) {
midi_in.options.length = 0;
WebMidi.inputs.forEach(input => {
midi_in.options[midi_in.options.length] = new Option(input.manufacturer + " " + input.name);
midi_in.options[midi_in.options.length] = new Option("MIDI in: " + input.name);
});
}

if(WebMidi.outputs.length>0) {
midi_out.options.length = 0;
WebMidi.outputs.forEach(output => {
midi_out.options[midi_out.options.length] = new Option(output.manufacturer + " " + output.name);
midi_out.options[midi_out.options.length] = new Option("MIDI out: "+ output.name);
});
}
// First run setup
Expand Down
File renamed without changes.

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions www/run/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,13 @@ for b in [0, 1, 2, 3]:
tulip.bg_rect(x,y,w,h,c,1)
tc = 255-c
tulip.bg_str("%03d" % (c), x+7, y+41, tc, 8)
`},{
't':'music',
'd':'Put an echo effect on audio input',
'c':`
# "Allow audio input" must be turned on
amy.send(osc=30, pan=0, wave=amy.AUDIO_IN0, vel=1)
amy.send(osc=31, pan=1, wave=amy.AUDIO_IN1, vel=1)
amy.echo(level=1, delay_ms=400, max_delay_ms=1500, feedback=0.8, filter_coef=None)
`}
]
12 changes: 5 additions & 7 deletions www/run/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>

<!-- These filenames are replaced by the build system -->
<script src="tulipcc-20250212100708.mjs" type="module"></script>
<script type="text/javascript" id="amy_js_include" src="amy-20250212100708.js"></script>
<script src="tulipcc-20250212103358.mjs" type="module"></script>
<script type="text/javascript" id="amy_js_include" src="amy-20250212103358.js"></script>
<script type="text/javascript" src="examples.js"></script>
<script type="text/javascript" src="spss.js"></script>
</head>
Expand Down Expand Up @@ -165,24 +165,22 @@ <h1><A HREF="https://tulip.computer/"><img src="/img/favicon.png"/ width=40></A>

<!-- MIDI settings panel if MIDI is available -->
<form name="tulip_settings">
<div class="row align-items-start">
<div class="col-3 align-self-end small">
<div class="row align-items-start pt-1">
<div class="col-3 align-top small">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="amy_audioin" onClick="toggle_audioin();"/>
<label class="form-check-label" for="amy_audioin">Allow audio input</label>
</div>
</div>
<div class="col-4 align-self-start">
<div class="col-4 align-self-start small">
<div id="midi-input-panel">
MIDI input device:
<select onchange="setup_midi_devices()" name="midi_input" class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>[Not available]</option>
</select>
</div>
</div>
<div class="col-4 align-self-start small">
<div id="midi-output-panel">
MIDI output device:
<select onchange="setup_midi_devices()" name="midi_output" class="form-select form-select-sm" aria-label=".form-select-sm example">
<option selected>[Not available]</option>
</select>
Expand Down
4 changes: 2 additions & 2 deletions www/run/spss.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ async function start_midi() {
if(WebMidi.inputs.length>0) {
midi_in.options.length = 0;
WebMidi.inputs.forEach(input => {
midi_in.options[midi_in.options.length] = new Option(input.manufacturer + " " + input.name);
midi_in.options[midi_in.options.length] = new Option("MIDI in: " + input.name);
});
}

if(WebMidi.outputs.length>0) {
midi_out.options.length = 0;
WebMidi.outputs.forEach(output => {
midi_out.options[midi_out.options.length] = new Option(output.manufacturer + " " + output.name);
midi_out.options[midi_out.options.length] = new Option("MIDI out: "+ output.name);
});
}
// First run setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Module['ready'] = new Promise((resolve, reject) => {
// web worker
PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');
}
var PACKAGE_NAME = 'build-standard/tulip/obj/tulipcc-20250212100708.data';
var REMOTE_PACKAGE_BASE = 'tulipcc-20250212100708.data';
var PACKAGE_NAME = 'build-standard/tulip/obj/tulipcc-20250212103358.data';
var REMOTE_PACKAGE_BASE = 'tulipcc-20250212103358.data';
if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) {
Module['locateFile'] = Module['locateFilePackage'];
err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)');
Expand Down Expand Up @@ -197,10 +197,10 @@ Module['FS_createPath']("/tulip4/sys/im", "tiny_town", true, true);
var files = metadata['files'];
for (var i = 0; i < files.length; ++i) {
DataRequest.prototype.requests[files[i].filename].onload();
} Module['removeRunDependency']('datafile_build-standard/tulip/obj/tulipcc-20250212100708.data');
} Module['removeRunDependency']('datafile_build-standard/tulip/obj/tulipcc-20250212103358.data');

};
Module['addRunDependency']('datafile_build-standard/tulip/obj/tulipcc-20250212100708.data');
Module['addRunDependency']('datafile_build-standard/tulip/obj/tulipcc-20250212103358.data');

if (!Module.preloadResults) Module.preloadResults = {};

Expand Down Expand Up @@ -937,13 +937,13 @@ function createExportWrapper(name) {
// end include: runtime_exceptions.js
var wasmBinaryFile;
if (Module['locateFile']) {
wasmBinaryFile = 'tulipcc-20250212100708.wasm';
wasmBinaryFile = 'tulipcc-20250212103358.wasm';
if (!isDataURI(wasmBinaryFile)) {
wasmBinaryFile = locateFile(wasmBinaryFile);
}
} else {
// Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
wasmBinaryFile = new URL('tulipcc-20250212100708.wasm', import.meta.url).href;
wasmBinaryFile = new URL('tulipcc-20250212103358.wasm', import.meta.url).href;
}

function getBinarySync(file) {
Expand Down Expand Up @@ -11579,7 +11579,7 @@ run();
})();
;
export default _createMicroPythonModule;/*
* This file is part of the MicroPython project, http://tulipcc-20250212100708.org/
* This file is part of the MicroPython project, http://tulipcc-20250212103358.org/
*
* The MIT License (MIT)
*
Expand Down Expand Up @@ -11607,7 +11607,7 @@ export default _createMicroPythonModule;/*
// Options:
// - pystack: size in words of the MicroPython Python stack.
// - heapsize: size in bytes of the MicroPython GC heap.
// - url: location to load `tulipcc-20250212100708.mjs`.
// - url: location to load `tulipcc-20250212103358.mjs`.
// - stdin: function to return input characters.
// - stdout: function that takes one argument, and is passed lines of stdout
// output as they are produced. By default this is handled by Emscripten
Expand Down Expand Up @@ -11968,7 +11968,7 @@ if (
typeof process.versions === "object" &&
typeof process.versions.node === "string"
) {
// Check if this module is run from the command line via `node tulipcc-20250212100708.mjs`.
// Check if this module is run from the command line via `node tulipcc-20250212103358.mjs`.
//
// See https://stackoverflow.com/questions/6398196/detect-if-called-through-require-or-directly-by-command-line/66309132#66309132
//
Expand All @@ -11992,7 +11992,7 @@ if (
}

/*
* This file is part of the MicroPython project, http://tulipcc-20250212100708.org/
* This file is part of the MicroPython project, http://tulipcc-20250212103358.org/
*
* The MIT License (MIT)
*
Expand Down Expand Up @@ -12233,7 +12233,7 @@ class PyProxyThenable {
}
}
/*
* This file is part of the MicroPython project, http://tulipcc-20250212100708.org/
* This file is part of the MicroPython project, http://tulipcc-20250212103358.org/
*
* The MIT License (MIT)
*
Expand Down