| import { options } from "preact"; | |
| import { Signal } from "@preact/signals"; | |
| // Add `bind:value` to JSX types | |
| declare global { | |
| namespace preact.createElement.JSX { | |
| interface HTMLAttributes { | |
| "bind:value"?: Signal<string | string[] | number | undefined>; | |
| } | |
| } |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>WebGPU Audio</title> | |
| </head> | |
| <body> | |
| <button type="button" id="play">Play</button> | |
| <script type="module"> | |
| const code = ` |
| #!/usr/bin/env -S deno run --allow-read --allow-write --allow-run | |
| // compeko - pack JavaScript into a self-extracting html+deflate | |
| // v2.0.0 | |
| // Copyright (c) 2022-2024 0b5vr | |
| // SPDX-License-Identifier: MIT | |
| // Usage: | |
| // - prepare a js code, which will be fed into `eval` |
| /* | |
| * Copyright (c) 2021 - Peter Johan Salomonsen | |
| */ | |
| setBPM(85); | |
| addInstrument('piano'); | |
| addInstrument('string'); | |
| addInstrument('drums'); | |
| addInstrument('guitar'); |
| // $ wat2wasm fft.wat | |
| // $ node --experimental-modules call-fft-dynamic.js | |
| (async function () { | |
| { | |
| const res = fetch(new URL("./fft.wasm", import.meta.url).href); | |
| const imports = { | |
| "./math.js": await import(new URL("./math.js", import.meta.url)) | |
| }; | |
| const {instance} = await WebAssembly.instantiateStreaming(res, imports); |
| from ctypes import cast, py_object | |
| from google.colab import output | |
| def set_var(v_id, value): | |
| obj = cast(v_id, py_object).value | |
| obj.value = value | |
| output.register_callback('set_var', set_var) | |
| class Checkbox: |
| // Pseudo Effect Via XML - Example File | |
| // Full Tutorial: https://www.youtube.com/watch?v=pHwBOFZgKcs&t=296s | |
| // Edit the PresetEffects.xml for your version of After Effects to add Pseudo Effects. | |
| // XML File Location on Windows: | |
| // Program Files > Adobe > After Effects (Version) > Support Files | |
| // XML File Location on OSX: | |
| // Apps > After Effects > Right-click After Effects.app > “Show Contents” > Contents > Resources |