Add standalone Infinity Monster Holodeck v3 web app#9
Add standalone Infinity Monster Holodeck v3 web app#9jpbpari-sys wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b96bdae9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let sessionRecorder, audioChunks=[], isRecording=false; | ||
| function toggleSessionRecording(){ | ||
| if(!isRecording){ | ||
| const dest=ctx.createMediaStreamDestination(); |
There was a problem hiding this comment.
Initialize audio context before starting session recording
Clicking Start/Stop Session Recording before INITIALIZE SYSTEM throws because toggleSessionRecording() unconditionally calls ctx.createMediaStreamDestination() while ctx is still undefined, so the recording control fails for first-time users who press record first. Add the same kind of ctx guard/auto-init used in startVoiceControl() before creating the recorder graph.
Useful? React with 👍 / 👎.
| function saveSwarm(swarm){ | ||
| const snapshot={ | ||
| id:crypto.randomUUID(), | ||
| sequence:swarm.sequence?.map(ev=>({...ev.sample}))||[], |
There was a problem hiding this comment.
Keep saved sequence events in same shape as runtime events
saveSwarm() stores each sequence item as ({...ev.sample}), which strips the outer event object, but later consumers like exportSessionMIDI() read evt.sample?.midiNote; after saving and reloading a swarm, that field is missing and MIDI export falls back to note 60 for every event. Preserve the original event schema when snapshotting (or update all readers to the flattened schema).
Useful? React with 👍 / 👎.
| play(note,0.2); | ||
| if(Math.random()<0.1) rootCenter+=(Math.random()>0.5?1:-1); | ||
| filter.frequency.setTargetAtTime(300+(morph*5000), ctx.currentTime, 0.1); | ||
| },60000/tempo/2); |
There was a problem hiding this comment.
Recompute sequencer interval when tempo slider changes
The sequencer delay is fixed when setInterval is created, so updating tempo inside the callback does not change playback speed after initialization; moving the slider changes the variable but not the timer period. Recreate the interval on tempo changes (or switch to a recursive setTimeout that reads current BPM each step) so the BPM control actually affects timing.
Useful? React with 👍 / 👎.
Motivation
Description
infinity_monster_holodeck_v3.htmlcontaining full UI and styling for the Holodeck interface.AudioContextgraph setup, voice input handling, generative sequencer,play()oscillator synth, and XY pad modulation.MIDIlibrary.setTargetFrequencies,analyzeSwarmSpectrum, andoptimizeSwarmForHealingfor per-swarm spectral analysis and parameter adjustment.Testing
python3 -m http.server 8000 --bind 0.0.0.0and verified the page loaded successfully.git status --shortand the change was committed; no repository code outside the new HTML was modified.Codex Task