How to send MIDI to Hydra?

Hydra’s documentation says it can be set up to respond to MIDI CC’s. It says here that if you run that “register WebMIDI” code in Hydra’s console, then you can communicate with Hydra via CC’s you set up with the code at the bottom of that page.

When I run the “register WebMIDI” code in Hydra, I get a message in its console that says, “navigator.requestMIDIAccess is not a function.” No MIDI port appears in Sonic Pi to send messages to. Any clues as to how to supply whatever the missing pieces are?

On my phone at the moment, but have you checked whether you’re using a compatible browser? (Such as an up to date version of Chrome).
Here’s a screenshot of the compatibility report from

1 Like

Nice Can I Use web site—I bookmarked that. I’m on the most recent Firefox, which is 88, so I should be able to use.

ADDED: trying in Safari, I get this message in Hydra’s console:

navigator.requestMIDIAccess is not a function. (In 'navigator.requestMIDIAccess()', 'navigator.requestMIDIAccess' is undefined)

Unfortunately, no. The red marking above indicates ‘not compatible’… likewise for Safari. The diagram indicates that only recent versions of Edge and Chrome are compatible :slightly_smiling_face:

1 Like

Yes, I see I should have examined the legend on the lower right side.

I’ve now executed that Hydra MIDI code in Chrome without error. Hydra’s MIDI documentation also says to execute noise(4).color( ()=>cc[16], ()=>cc[17], ()=>cc[18] ).out() to control color with those three CC numbers. That also runs without error. Sonic Pi, though, shows no Hydra-related port to send midi_cc to, just my unchanged set of active ports. I tried re-starting, but no change. Any ideas?

IIRC, Sonic Pi does not currently handle communicating with MIDI software devices. @samaaron - that’s correct yes?

I’m sensing a wish list-type situation here.

Not quite sure what you mean by ‘software’ devices. If you mean virtual MIDI ports, then it just depends on what operating system you’re running on and what our underlying MIDI library, RtMidi can do (GitHub - thestk/rtmidi: A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMIDI) and Windows (Multimedia))

1 Like

ha. Yes :wink: that’s what I meant :joy:

So guys can we use hydra with Sonic pi on windows ? If yes a simple example to help to start would be appreciated.