Home Technical Talk

Experiments in handmade CG input devices

polycounter lvl 12
Offline / Send Message
MrOneTwo polycounter lvl 12
Modo custom analog controller

(sorry for the video quality)

https://www.youtube.com/watch?v=UwXp9Kt44ek


Hey guys. Wanted to show you my project I was working on past week. I crated it simply because I wanted to check if I can (mostly inspired by what Perna showed here >>LINK<<). I'm studying Automatics and Robotics so I got into microcontrollers programing. It's pretty interesting stuff.

It's a custom analog controller for Modo... It's actually a AVR Atmega8 hook up through UART -> USB to a pc with a potentiometer. It's reading voltage on voltage divier (potentiometer), throwing it to ADC (Analog to Digital Converter) which gives me value between 0 and 1023. It then sends this number to a python program.

I tried to implement some custom controller through C++ program on PC side but it wasn't worth it. There were lots of issues on the way (I'm not a great programmer so...). I never used Python before... in a few days I had working program. With C++ you could probably create better program but this side of things works flawlessy so i don't see reason to abandon Python (especially since it's so easy to use).

Python program uses ModoSock module. It is a wrapper for sockets module. It makes connecting to Modo easier. Thanks to this wrapper you can send commands like you would in Modo (lx.eval and stuff like that). It sends them through a socket to a telnet server which is hosted on Modos side.

Modo supports telnet communication. Just type simple command in Modo and bam - Modo is listening.

Thanks to ModoSock wrapper you can even query command. You can ask Modo what types of items you have selected and it returns list of object types.


+ Pros:

+It works

I wasn't sure I could do something like that... wasn't hard though.

+It's really flexible (software)

By querying Modo you can change potentiometers role depending on the context. If you have Mesh selected you could do different things than if you had Light selected.

+It's really flexible (hardware)

Anytime I want to I can change the potentiometer for something more precise.

+It's cheap

It really is... as long as you want to do stuff like programming microcontrollers.

+Atmega8 has also digital pins

You can use buttons and any other digital input.

- Cons:

-It's just a prototype

It's just a breadboard... microcontroller hooked through a UART -> USB converter. Not really something everyone can try.

-It's not something everyone can try

...MIDI controllers are way easier to use and don't require microcontroller knowledge.

-MIDI controllers do exist

Midi controllers have lots of potentiometers and other... stuff.

-There is latency

That one puts everything about this project in question. When you send commands to Modo it is not lag free. It is usable. It's just not as cool and responsive as I would like. It can be improved by some better programming. I just don't know it's limits.

-No motorized control

If you set some value for one object and you want to slightly change the value on a second it will start from the value the potentiometer is on right now. Meaning that you can't just simply add a bit of value. Midi controllers often use motors to change hardware postition based on software changes. That's a neat feature...


I wrote down all those pros and cons because I don't know how far will I take this project... I like it. Don't know if it will be something more than just a science project D

Just wanted to share what's possible and maybe get your suggestions.

Credits:

Perna - the proper way of doing stuff like that
Farfarer - thanks.
Dude who made it first but through MIDI: http://community.thefoundry.co.uk/discussion/topic.aspx?f=37&t=39474

Replies

Sign In or Register to comment.