Desktop version of Hydra - live coding video synthesizer, built with Tauri for native performance.
Original Hydra: https://hydra.ojack.xyz
Original Repository: https://github.com/hydra-synth/hydra
This fork adds desktop application features:
Load local video and image files using helper functions:
// Load local video
loadVideo(s0, "C:/Users/YourName/Videos/video.mp4")
src(s0).out()
// Load local image
loadImage(s1, "C:/Users/YourName/Pictures/image.jpg")
src(s1).out()
// Or use file picker dialog
const fileUrl = await pickFile()
if (fileUrl) {
s0.initVideo(fileUrl)
src(s0).out()
}- F11 or Alt+Enter: Toggle fullscreen
- ESC: Exit fullscreen
- Or call
toggleFullscreen()in console
- F12: Open developer console (debug builds only)
localFile(path): Convert Windows path to asset URLloadVideo(source, path): Load local video fileloadImage(source, path): Load local image filepickFile(options): Open file picker dialogtoggleFullscreen(): Toggle fullscreen mode
- Linux (Arch Linux recommended)
- Node.js and npm
- Rust toolchain (
rustup)
# Clone and install dependencies
git clone <your-repo-url>
cd hydra
npm install# Install Tauri dependencies
sudo pacman -S webkit2gtk-4.1 gtk3 libayatana-appindicator
# Optional: NSIS for creating installer packages
sudo pacman -S nsis# Build Linux packages
npm run tauri build- AppImage:
src-tauri/target/release/bundle/appimage/Hydra_*_amd64.AppImage(portable, requires linuxdeploy) - DEB package:
src-tauri/target/release/bundle/deb/Hydra_*_amd64.deb - RPM package:
src-tauri/target/release/bundle/rpm/Hydra-*.x86_64.rpm - Binary:
src-tauri/target/release/app
# Run the binary directly
./src-tauri/target/release/app
# Or install DEB package (Debian/Ubuntu)
sudo dpkg -i src-tauri/target/release/bundle/deb/Hydra_*_amd64.deb
# Or run AppImage (if built)
chmod +x src-tauri/target/release/bundle/appimage/Hydra_*_amd64.AppImage
./src-tauri/target/release/bundle/appimage/Hydra_*_amd64.AppImage// Linux path format
loadVideo(s0, "/home/username/Videos/video.mp4")
src(s0).out()# Add Windows target
rustup target add x86_64-pc-windows-gnu
# Install MinGW cross-compiler (Arch Linux)
sudo pacman -S mingw-w64-gcc nsis
# Configure Cargo for cross-compilation
cat > ~/.cargo/config.toml << 'EOF'
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-ar"
EOF# Build Windows installer
npx tauri build --target x86_64-pc-windows-gnu- Installer:
src-tauri/target/x86_64-pc-windows-gnu/release/bundle/nsis/Hydra_*_x64-setup.exe - Executable:
src-tauri/target/x86_64-pc-windows-gnu/release/app.exe
// Windows path format (use forward slashes or escaped backslashes)
loadVideo(s0, "C:/Users/YourName/Videos/video.mp4")
src(s0).out()For Hydra syntax, functions, and examples, see:
// Oscillator
osc(20, 0.1, 0.8).out()
// Webcam
s0.initCam()
src(s0).out()
// Kaleidoscope
s0.initCam()
src(s0).kaleid(4).out()
// Local video (desktop only)
loadVideo(s0, "C:/path/to/video.mp4")
src(s0).kaleid(4).out()Web version:
Ctrl+Enter: Run lineCtrl+Shift+Enter: Run all codeAlt+Enter: Run blockCtrl+Shift+H: Hide/show code
Desktop additions:
F11orAlt+Enter: FullscreenF12: Developer tools
AGPL-3.0 (same as original Hydra)
Original Hydra by Olivia Jack
Desktop port modifications: Local file support, fullscreen toggle, Tauri integration