CHOPS looks like the most appropriate way to tie MIDI input into a particular scene, but I've got a sexy control surface (buttons / slider / job wheel) that I'd love to use to control Houdini more globally.
At the moment I'm using a Mac utility that converts MIDI input into keystrokes, which works OK, but it'd be much more powerful if I could access the raw MIDI input from within Houdini and do my own finagling with Python: not everything lends itself to keystroke input.
Has anyone done this kind of thing before? Are there any other physical control surfaces that work with Houdini that I could investigate?
I'm guessing I'd have to install my own Python MIDI module, though most of these require you to poll the MIDI input rather than giving you a way to set up a callback.
Any suggestions / pointers appreciated.
Using a MIDI (DAW) control surface to control Houdini (playback / setting keyframes and parameters)?
7210 11 1-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
-
- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
I use Midi in to control light rigs for example, but I am afraid the default procedure is Windows based and it does not work on mac (vanilla installation)
Meaning, Midi In does not allow to listen to devices, just open midi files.. which is a shame as controlling stuff with a hardware device makes the whole experience so much more rewarding.
If you are trying to hack it using Python MIDI i would love to hear about it.
Good luck
jb
Meaning, Midi In does not allow to listen to devices, just open midi files.. which is a shame as controlling stuff with a hardware device makes the whole experience so much more rewarding.
If you are trying to hack it using Python MIDI i would love to hear about it.
Good luck
jb
-
- jordanhalsey
- Member
- 12 posts
- Joined: 2月 2018
- Offline
I wonder if there is a way to pipe in midi from Touchdesigner? I have never really tried to do it but I bet there is a way through Chops and bridging the connection. Touch can control Ableton so I imagine with some creativity Houdini would not be that hard. I won't have time to look at this, this week, but next week I will look into it. One could use the free the version of Touch as all you would need it for would to send the control signal. http://www.derivative.ca [www.derivative.ca]
Jordan
Jordan
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
jordibares
Meaning, Midi In does not allow to listen to devices, just open midi file
Ha - hadn't noticed that. But I'm trying to avoid CHOPS if possible anyway; don't want to have scene files clogged up with workstation-specific Houdini control stuff.
I think Python's gonna be the way; when I have a moment I'll install one of the MIDI py-packages and see whether I can get ‘em talking. I’ve had luck using Serial ports from within Houdini already so I'm guessing it should be doable…
¯\_(ツ)_/¯
jordibares
If you are trying to hack it using Python MIDI i would love to hear about it.
I'll keep you in the loop. This is the thing I've got on the desk:
I've got basic transport controls working already just using a translator, but it'd be nice to get the timecode display working too, save me constantly having to mentally translate between H's frame numbers and HH:MM
![](/static/djangobb_forum/img/smilies/confused.png)
![](/static/djangobb_forum/img/smilies/wink.png)
(and as an aside, it's bloody frustrating that there's no standard protocol for these control surfaces. You can get audio ones like this pretty cheaply, or video jog/shuttle wheels. But audio-oriented ones don't work with video apps nor vice versa, despite being pretty much the same hardware. Bah.)
Edited by howiem - 2019年3月12日 10:08:39
-
- goldfarb
- スタッフ
- 3459 posts
- Joined: 7月 2005
- Offline
you might want to look at Palette Gear - https://palettegear.com/ [palettegear.com]
they support MIDI and keyboard inputs…plus the sliders are cool.
They have a bunch of ‘preset’ types for many applications.
they support MIDI and keyboard inputs…plus the sliders are cool.
They have a bunch of ‘preset’ types for many applications.
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
goldfarb
they support MIDI and keyboard inputs…plus the sliders are cool.
They're nice looking, but expensive, and they'd give me the same problem: how to interface them with Houdini
![](/static/djangobb_forum/img/smilies/smile.png)
Keyboard taps are grand but I'm after something better. And if I solve the problem for my control surface, it should work with the Palette stuff or anything else that sends/receives MIDI, whether it's a keyboard with a pitch-bend (live control of your character's mouth, anyone?) or a timecode display (because 100 times a day I have to divide by 25 then 60 in my head gahhh).
Plus my controller thingy has a sexy display on it, and Palette Gear stuff doesn't, and I'm just a sucker for blinkenlights. It's my weakness
![](/static/djangobb_forum/img/smilies/wink.png)
and my slider's motorised muhahaha take that palette gear
-
- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
jordibares
Nice idea the Palette gear thing… I wonder cost wise how is relative to professional audio equipment.
$199 for the starter kit: 2 push-buttons, a knob/encoder, and a non-motorised slider.
Or £106 for my DAW control surface (a Behringer X-Touch One), which has 34 buttons (with sexy lights), two knobs/encoders, and a motorised slider. A programmable LCD display, 12 x 7-seg displays. And it's a solidly built thing.
Whichever path you choose you still have to integrate it with Houdini; button presses are simple to do, but funkier stuff is… well, watch this space
![](/static/djangobb_forum/img/smilies/smile.png)
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
Yay… getting somewhere…
![](/forum/attachment/0d3dd420ac592d6656874bbbca2808c2ae383168/)
This is Houdini talking to a MIDI-based DAW using the pygame Python module. Which mostly doesn't work apart from pymidi, which is all you need. Getting the pygame module to work on the Mac has been… entertaining. But it's possible.
Gotta do some actual work for a bit but once I get some time I'll get the whole thing going… it's quite fun hitting play on the DAW and seeing Houdini play, and then watching as the motorised slider moves up and down in sync with a Houdini parameter
This is Houdini talking to a MIDI-based DAW using the pygame Python module. Which mostly doesn't work apart from pymidi, which is all you need. Getting the pygame module to work on the Mac has been… entertaining. But it's possible.
Gotta do some actual work for a bit but once I get some time I'll get the whole thing going… it's quite fun hitting play on the DAW and seeing Houdini play, and then watching as the motorised slider moves up and down in sync with a Houdini parameter
![](/static/djangobb_forum/img/smilies/smile.png)
Edited by howiem - 2019年3月13日 05:27:17
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
-
- nicholasralabate
- Member
- 114 posts
- Joined: 9月 2017
- Offline
This is so freaking cool, reminds me of what people do in videogame world although I guess if your sim is running sub-realtime it's about the same thing:
https://youtu.be/NwPIoVW65pE?t=1333 [youtu.be]
I have a similar issue with trying to tweak interactive art on iThings and am looking into OSC for that (it's harder to wire up instruments like this). In my experience even though it goes over the network OSC is typically fast enough for pleasurable parameter control. I tested it with shooting a Leathal Enforcers light gun to trigger the vfx from Unity and the sfx from Max! Anyways, the advantage of the OSC approach is that you wouldn't have to write an OS-specific layer for each of Mac/Linux/Windows.
Regardless, I am very interested in your code I hope you post it for the community soon! PM sent!
https://youtu.be/NwPIoVW65pE?t=1333 [youtu.be]
I have a similar issue with trying to tweak interactive art on iThings and am looking into OSC for that (it's harder to wire up instruments like this). In my experience even though it goes over the network OSC is typically fast enough for pleasurable parameter control. I tested it with shooting a Leathal Enforcers light gun to trigger the vfx from Unity and the sfx from Max! Anyways, the advantage of the OSC approach is that you wouldn't have to write an OS-specific layer for each of Mac/Linux/Windows.
Regardless, I am very interested in your code I hope you post it for the community soon! PM sent!
-
- howiem
- Member
- 146 posts
- Joined: 9月 2011
- Offline
Whelp - it's horrible code, pls wear thick gloves - but I'm not likely to have time to tidy / refactor etc for a while, so here it is:
https://gist.github.com/howiemnet/280d937d3507950a62b516dd93dcae38 [gist.github.com]
(warning - it's hardcoded to display timecode in 25fps format cos it was just for me and that's all I use)
In a nutshell: install the Python pygame stuff, and Houdini can then send and receive midi messages. You can add callbacks within Houdini to call your code every time there's a frame change (if you want to update displays etc), and you can have H poll your code regularly to see if there's a midi message (play / stop etc) it should act upon:
hou.ui.addEventLoopCallback(yourCheckForMIDIeventsFunction)
hou.playbar.addEventCallback(yourUpdateTransportFunction)
Took less than a day to knock together, and it's been in constant use for several months without a glitch. I'd hate to go back to life without that jog wheel now; particularly when tweaking and tuning character animation. Yay Houdini
https://gist.github.com/howiemnet/280d937d3507950a62b516dd93dcae38 [gist.github.com]
(warning - it's hardcoded to display timecode in 25fps format cos it was just for me and that's all I use)
In a nutshell: install the Python pygame stuff, and Houdini can then send and receive midi messages. You can add callbacks within Houdini to call your code every time there's a frame change (if you want to update displays etc), and you can have H poll your code regularly to see if there's a midi message (play / stop etc) it should act upon:
hou.ui.addEventLoopCallback(yourCheckForMIDIeventsFunction)
hou.playbar.addEventCallback(yourUpdateTransportFunction)
Took less than a day to knock together, and it's been in constant use for several months without a glitch. I'd hate to go back to life without that jog wheel now; particularly when tweaking and tuning character animation. Yay Houdini
-
- Quick Links