hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.13k stars 255 forks source link

Update that allows to select a MIDI device #231

Closed tmhglnd closed 1 year ago

tmhglnd commented 1 year ago

Hi!

I made a little update to the script for MIDI input here. The update will print all the connected devices' name and id to the console. You can then use a specific device by evaluating controller = <name|id> in the console or Hydra code.

I also adjusted the normalization so it actually normalizes 0-1, but maybe you want to put this back to how it was. Previously it would not have 0 as the lowest value because a 1 was added before division. The previous calculation was: (value+1)/128, now it's just value/127

Let me know what you think! :)

geikha commented 1 year ago

i like this, I'd merge