Copy link to clipboard
Copied
I have a character I've been making for a while now that uses game controllers as well as a keyboard and mouse. This is achieved through a lot of custom code, virtual midi devices, and a whole lot of patience and artwork. I'm trying now to make a drawing tablet rig.
As you can see in the video, I have a few sliders that are attached to my hand, they move it on the X and Y axis. I was able to write some code so that I have two virtual midi sliders, one attatched to the X position of my mouse, the other the Y. When I drag the sliders manually, they work fine. When I move my mouse around with the code running, the sliders move, but for some reason, the artwork doesn't.
You see my hand sort of lift off the tablet twice, that's a separate bit I added, if my cursor stays still long enough it will show a graphic with me holding the pen off to the side. That's achieved through midi notes as well so you can see it is still controlling the puppet somehow.
I did the initial setup using a midi keyboard, clicked on the control in the control tab and moved the slider, then wrote the code to fit it, but I find it odd that I can make the sliders move but not the graphic? I tried this so many different ways, even in a new file with one of the test puppets just connected to an opacity slider. I can make the slider move but it doesn't change what happens on screen.
I'm really beating my head against a wall on this one if anyone has any suggestions, I'd be eternally grateful!
Copy link to clipboard
Copied
It almost looks like it's lost focus somewhere.
Is this the only view where this input is used? Would I be correct in assuming this is being used for some sort of streaming video? The level of work that went into this so far as awe inspiring, but is it really necessary? There may be some ways to "cheat" the y-axis to create the same level of "realism" without needing the fine detail of the slider. Maybe using the mouse wheel?
Copy link to clipboard
Copied
The input is probably used at least for the keyboard/mouse rig, but there's a lot of duplicate inputs in here and that's never caused an issue yet, plus I tried it on it's own with the basic crab puppet and an opacity slider with the same result.
Yeah, this is for my youtube channel and twitch. I originally made a working version that broke the screen up into a grid system, so if my mouse passed into a part of the screen it would play a new note, triggering a replay of the X and Y position. I was able to get my screen up to a 10x5 grid before the replay triggers became too awkward for it, but considering how small my movements can be when I'm drawing, it often meant my pen wasn't moving on the rig since it was staying within one square.
This honestly was the easiest method if this last part were working. X(
Copy link to clipboard
Copied
Perhaps if you're doing fine details, maybe you could set up a cycle animation to twitch the barrel of the pen while drawing and have it static when not drawing. I'm just brainstorming here.
Copy link to clipboard
Copied
I'm considering it. I'd vastly prefer the simplicity of this, but that's not a bad move either. Thank you for the ideas
Copy link to clipboard
Copied
Forgot to add, I had set it up on my physical midi keyboard and when I use the physical board's slider, it works as intended. The hand moves around just fine like it's suppossed to, so for some reason my virtual midi is only moving the sliders, but not the hand attatched to them?
Copy link to clipboard
Copied
Oops, did not read the whole thread first! I would check the rate you send MIDI events then as first investigation. If MIDI keyboard is working, that would be my first guess. It would be easy to write code in a tight loop that is flooding CH with MIDI events and it cannot keep up.
Copy link to clipboard
Copied
Hey there Alan! Was hoping you would see this, you actually helped me come up with all of this through your research into CA and Midi! (and in a few posts I've made in the past on the subject, haha)
So for the sake of testing I'm only using the crab puppet right now, all default settings, just a transform on the puppet has it's opacity linked to my midi slider and it's giving the same results. The slider will move, but no change in the puppet, unless I use the slider on the physical midi keyboard.
I did for the sake of testing bring it all the way down to 2 seconds per midi send, but no luck. I will say, CA has suprised me on how well it takes midi notes. With my controller rigs I regularly have to do things like hold a joystick to the right and press a button to jump at the same time and it never shows a problem. My keyboard/mouse rig at some points gets I think up to 5-6 signals being sent at once, some in short blips, others as constant holding notes. CA has handled it flawlessly, I'm super impressed by it. I don't think I've yet run into a max amount of Midi notes it could handle at one time.
Copy link to clipboard
Copied
If I understand the video and thread...
If the above is correct then... then... ummm...
Well, I am hoping I got something wrong in the above bullet point list! Lol! (E.g. did I get the second point right?) Anything else that is different between when you used physical and virtual keyboards? (E.g. different window focus like OC suggested?). Seeing the slider move from your MIDI events but no actual puppet movement has got me baffled. Trying to reduce the scope for that (conflicting behavior, different window focus, different rig/record/stream mode, ...). There must be a reason, just need to pin down the variable that is different.
Copy link to clipboard
Copied
You unfortunetely have it entirely correct. It really is so strange! I feel like if the sliders are moving, that was all I needed!
CA is usually in the background when I record, but currently it's always in focus. I'm only using the basic crab puppet to test with and it's behaving in the same way, so trying to figure it out here before I possibly do damage to my main rig (it is a copy, but I don't want to make a mistake somewhere I don't notice till later. Sadly wouldn't be the first I've done that, haha) I've turned off all other midi notes and code, so it's just my mouse' X position making any sound.
So far, sadly, no changes
Copy link to clipboard
Copied
Hopefully someone from Adobe can chip in. Really no idea from my side. I agree, if sliders are moving, that means CH is getting the MIDI notes. No idea why the character does not move when MIDI moves the slider.
Only other thing I can suggest if a physical MIDI keyboard works is to watch the MIDI events it generates. If you copy it exactly in code, does it work? E.g. are you sending MIDI note down events by no note up events or something? I have no idea why that would matter given the slider is moving though. I cannot think why a physical device vs virtual device should make a difference if generating the same events...
Copy link to clipboard
Copied
I'm not fully sure how the physical midi board is sending them, but I've tried sending all midi on (just velocity changing) midi switchiong on and off at the rate of the refresh, and even just "when I press the A key it sends a brief signal" all of which will move the sliders still but not the hand.
Oh gosh, I've seen so much of OkSamurai's work on youtube, shockingly the one good video I could find on using midi dials with CA sliders was from them, it'd be on honor to get their help on this.
Copy link to clipboard
Copied
I sent a message to our team, I'll let you know what we hear back from the MIDI experts!
Copy link to clipboard
Copied
We'd love to take a closer look. Can you please do the following:
Copy link to clipboard
Copied
On it, I'm gonna go for the DM if that's okay. Thank you so much for your help with this!!
Copy link to clipboard
Copied
Very cool. I noticed near the start and end of MIDI events the hand jumped between positions. Something made the hand move... what caused the jump? That could be important in tracking down the problem as clearly MIDI events are arriving. The top of the screen was chopped off so I was not sure when you were in rigging vs stream vs record modes.
Things I would look out for
Copy link to clipboard
Copied
That's a really cool rig. I confirmed MIDI as working on both platforms in the latest beta and the latest shipping version. That said, software always finds a way to do weird stuff. Which version of CH are you using? Can you try the latest beta to see if anything is different there?
Thanks,
Dan
Copy link to clipboard
Copied
I'm currently using the latest (22.1.1) but I hadn't even thought of the beta. I gave it a try but sadly, same problem