- Parametric effect engine: 23 shader families × palettes × variants (~2300 presets) with a filterable library and an effect sequence (auto-cycle by time or beat). - Effect categories: fractals/abstract, dancing silhouettes, SVG/Image source (loads any SVG/image as a recolourable audio-reactive effect; 50+ bundled CC0 SVGs), and VU-Meter (32-band spectrum bars, analogue needle, stereo LEDs). - Dual-window architecture: control panel + fullscreen output on an external display (reliable via simple-fullscreen); tabbed control UI (Audio, Effetti, Pad, Immagini, Testo, Registra, Schermo). - Audio: file playback + live input + output device selection, per-band visual EQ, audio playlist (reorder, hotkeys, per-track play/pause, repeat). - Pad bank: 5×4 launchpad with persistent assignments; pressing a pad stops the current. - Overlays: slideshow images (resizable), two freely positioned/resizable logos, scrolling ticker text. - MP4 recording of the composited output (visual + overlays + audio) via MediaRecorder + ffmpeg, with selectable aspect ratios (16:9, 9:16, 1:1, 4:3, 3:4, 21:9). - App icon (.icns) and dock icon; author Dj LuZa. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.6 KiB
JavaScript
35 lines
1.6 KiB
JavaScript
const { contextBridge, ipcRenderer, webUtils } = require('electron');
|
|
|
|
// Each window is launched with --role=control or --role=output.
|
|
const roleArg = process.argv.find(a => a.startsWith('--role='));
|
|
const role = roleArg ? roleArg.split('=')[1] : 'control';
|
|
|
|
contextBridge.exposeInMainWorld('djv', {
|
|
role,
|
|
// Control -> Output commands.
|
|
send: (msg) => ipcRenderer.send('ctl', msg),
|
|
onControl: (cb) => ipcRenderer.on('ctl', (_e, m) => cb(m)),
|
|
// Output -> Control reports.
|
|
report: (msg) => ipcRenderer.send('rpt', msg),
|
|
onReport: (cb) => ipcRenderer.on('rpt', (_e, m) => cb(m)),
|
|
// Display management (control window).
|
|
// Bundled svg/ folder, read in the main process, as same-origin data URLs.
|
|
listBuiltinSvgs: () => ipcRenderer.invoke('svg:listBuiltin'),
|
|
// Resolve a dropped/picked File to its absolute filesystem path.
|
|
pathForFile: (file) => {
|
|
try { return webUtils.getPathForFile(file); }
|
|
catch (e) { return file && file.path ? file.path : null; }
|
|
},
|
|
listDisplays: () => ipcRenderer.invoke('displays:list'),
|
|
moveOutputTo: (id) => ipcRenderer.invoke('output:moveTo', id),
|
|
toggleOutputFullscreen: () => ipcRenderer.invoke('output:toggleFullscreen'),
|
|
// Recording (output streams chunks to main, which muxes/transcodes to MP4).
|
|
recStart: () => ipcRenderer.invoke('rec:start'),
|
|
recChunk: (bytes) => ipcRenderer.send('rec:chunk', bytes),
|
|
recStop: (opts) => ipcRenderer.invoke('rec:stop', opts),
|
|
openRecordingsFolder: () => ipcRenderer.invoke('rec:openFolder'),
|
|
// Pad bank persistence.
|
|
loadPads: () => ipcRenderer.invoke('pads:load'),
|
|
savePads: (data) => ipcRenderer.invoke('pads:save', data)
|
|
});
|