Thursday, February 27, 2025

Whorld Link: Synchronization and Synesthesia

Whorld is driven by oscillators. In order to make smooth graphics, the oscillators require a precise timing source. In V1, that source was a multimedia timer, but in V2, the timer is gone. In V2, the oscillators are driven by the display monitor: rendering is synchronized with the monitor’s vertical retrace, via a DXGI swap chain, just as in a game.

One consequence of this display-driven design is that precise synchronization with an external device is only possible in one direction: Whorld can be the master, but never the slave. Like V1, V2 currently only supports MIDI input, but it could also send MIDI output, such as MIDI clocks, which an external device could synchronize itself with. It would also be possible to send continuous controller messages for the phase of each oscillator, though this would need to be managed carefully to avoid overloading MIDI and/or the receiver.

For such a scheme, it will matter which type of MIDI we’re talking about. Old-school hardware MIDI has extremely limited bandwidth: 30K Baud or about 1000 messages per second at most. USB over MIDI is at least an order of magnitude faster. The fastest is a software connection within the same computer, via Tobias Erichsen's loopMIDI for example: that should be nearly instantaneous.

I like the idea of sending controller messages for oscillator phase, because it opens up possibilities for generative art, and specifically for synesthesia. I implemented a crude version of this scheme back in 2006. The name of that project is Plasmagon. It’s a specific Whorld patch controlling a music generator in real time. It was a hacked version of Whorld V1 that sent the phase of its oscillators to Propellerhead Reason via MIDI CC messages. There’s no proper video because Whorld doesn’t compress well, but the music is lovely and you can hear it HERE.

No comments: