Convert analog CV to OSC? (for Unreal Engine)
-
- KVRian
- 587 posts since 8 May, 2012 from E.U.
Hi folks,
Imagine i want to take a CV source (say from Eurorack) and want to turn it into a digital signal and send it to a program that can understand OSC, how on earth would one go about doing that?
What hardware would do that?
Basically i want to be able to use CV to control stuff in Unreal Engine, which can understand OSC, but i'm at a loss to understand how to connect the two.
Any ideas?
Imagine i want to take a CV source (say from Eurorack) and want to turn it into a digital signal and send it to a program that can understand OSC, how on earth would one go about doing that?
What hardware would do that?
Basically i want to be able to use CV to control stuff in Unreal Engine, which can understand OSC, but i'm at a loss to understand how to connect the two.
Any ideas?
- KVRist
- 393 posts since 12 Apr, 2020
Cool Idea...
with little work you could easily get midi out, if you had (midi support in unreal) via CV with a rack like this. The Hardware Midi out has some latency downsides tho. would be cool if you could just use midi and not have the audio back in.
Another option would be to use the beginning part of that rack and read the knob modulatedValue() changes and forward those to OSC. I don't think it would be super performant and you could have some sloppy timing but it would certainly get you there. especially for something like abstract visuals. maybe since light travels faster than sound it won't matter in the end.
I have not worked with modulatedValues() yet, so i'm not sure if that is fully possible. but i'm pretty sure you could get there pretty quickly with a cursor track -> cursor device -> remote bank -> parameters and modulatedValue. Set an observer on it and forward the data to whatever osc port you need to translate the osc data too.
Seems like it would be a lot of data coming in. You may want to throttle the amount or just pass the data during flush(). (i'm not sure the refresh rate on flush... Moss?).
How many streams of CV are you looking to pass to Unreal?
with little work you could easily get midi out, if you had (midi support in unreal) via CV with a rack like this. The Hardware Midi out has some latency downsides tho. would be cool if you could just use midi and not have the audio back in.
Another option would be to use the beginning part of that rack and read the knob modulatedValue() changes and forward those to OSC. I don't think it would be super performant and you could have some sloppy timing but it would certainly get you there. especially for something like abstract visuals. maybe since light travels faster than sound it won't matter in the end.
Seems like it would be a lot of data coming in. You may want to throttle the amount or just pass the data during flush(). (i'm not sure the refresh rate on flush... Moss?).
How many streams of CV are you looking to pass to Unreal?
You do not have the required permissions to view the files attached to this post.
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
- KVRist
- 393 posts since 12 Apr, 2020
Yo! My ADHD mind went ballistic so... I cooked up some code because I wanted to try some OSC!(my first time in bitwig) and well it seems to work. I have not used it with any CV inputs(i don't have any) But I was able to test it with an LFO, i left both in so you can wire them up to the macro and observe the output... either way the framework is all there if you want to take it further.
https://github.com/kirkwoodwest/Bitwig-API-Utils/
You can download the extension and source in the releases on the right side of github.
For more information about it... Scroll down to the CV To Osc Module. There should be some loose instructions there to get it working. ports should be to 127.0.0.1 and 9000.
If you are editing code the base extension in there is CVToOscExtension. The example all starts there.
The data updates seem A LOT coming from the CV input you might need to slow down the data rate a bit, by timing updates or doing the updates only when flush() is called. Not sure what is recommended here tbh but i'm glad the power is there to do with what you will at your own cost.
I doubt osc is that popular but it seems like the hardware_surface could support some level of osc to reduce the script load.
(Also note the modules in the library are still in pre-release as I'm still developing them. But basically I expect people to pick apart the code and repurpose for their own greater good!! If you got any feedback on the modules I would love it!)
https://github.com/kirkwoodwest/Bitwig-API-Utils/
You can download the extension and source in the releases on the right side of github.
For more information about it... Scroll down to the CV To Osc Module. There should be some loose instructions there to get it working. ports should be to 127.0.0.1 and 9000.
If you are editing code the base extension in there is CVToOscExtension. The example all starts there.
The data updates seem A LOT coming from the CV input you might need to slow down the data rate a bit, by timing updates or doing the updates only when flush() is called. Not sure what is recommended here tbh but i'm glad the power is there to do with what you will at your own cost.
I doubt osc is that popular but it seems like the hardware_surface could support some level of osc to reduce the script load.
(Also note the modules in the library are still in pre-release as I'm still developing them. But basically I expect people to pick apart the code and repurpose for their own greater good!! If you got any feedback on the modules I would love it!)
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
- KVRist
- 393 posts since 12 Apr, 2020
oh and a simple answer might be to use this plugin suite by expert sleepers. there is a cv to osc vst in there.
https://www.expert-sleepers.co.uk/silentway.html
https://www.expert-sleepers.co.uk/silentway.html
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
-
- KVRian
- Topic Starter
- 587 posts since 8 May, 2012 from E.U.
Thanks man!
I'm going to look in detail into what you wrote, but if i can zoom out for a moment, is this roughly how it might work?:
Eurorack CV source >
Analog to digital converter >
Digital audio signal into DAW (Bitwig? Ableton?) with soundcard (ASIO drivers) >
DAW creates OSC data >
OSC data transfered to Unreal Engine (either internally or output via ethernet / wifi)
Is that basically how one might do it?
I guess you could skip the DAW step if there was a standalone app that could convert digital audio to OSC, but i doubt that exists.
Audio can be input directly into Unreal via the windows audio layer, but I don't think that Unreal Engine supports ASIO drivers without a lot of custom fiddling, so i guess the intermediate step of the DAW is required.
I also saw this piece of hardware that looks interesting:
https://www.addacsystem.com/en/products ... s/addac007
quote:
The ADDAC00x is a family of expansion modules that add functionality to your Voltage Controlled Computer (ADDAC001 VCC).
With the ADDAC007 you’ll get Ethernet I/O, so you can use your VCC with an Internet or OSC application, which can both send or receive data. It can be assigned to any specific parameter on your VCC program, like for example controlling the speed of an LFO or trigger a specific function.
Other interesting usages are controlling your synth remotely from a browser or connect it to any realtime data application on the web, such as a server feed of weather conditions or stock market.
Finally you can also connect your VCC to a router and have wireless connectivity to your synth, useful for applications like iPhone or iPad controllers.
I'm going to look in detail into what you wrote, but if i can zoom out for a moment, is this roughly how it might work?:
Eurorack CV source >
Analog to digital converter >
Digital audio signal into DAW (Bitwig? Ableton?) with soundcard (ASIO drivers) >
DAW creates OSC data >
OSC data transfered to Unreal Engine (either internally or output via ethernet / wifi)
Is that basically how one might do it?
I guess you could skip the DAW step if there was a standalone app that could convert digital audio to OSC, but i doubt that exists.
Audio can be input directly into Unreal via the windows audio layer, but I don't think that Unreal Engine supports ASIO drivers without a lot of custom fiddling, so i guess the intermediate step of the DAW is required.
I also saw this piece of hardware that looks interesting:
https://www.addacsystem.com/en/products ... s/addac007
quote:
The ADDAC00x is a family of expansion modules that add functionality to your Voltage Controlled Computer (ADDAC001 VCC).
With the ADDAC007 you’ll get Ethernet I/O, so you can use your VCC with an Internet or OSC application, which can both send or receive data. It can be assigned to any specific parameter on your VCC program, like for example controlling the speed of an LFO or trigger a specific function.
Other interesting usages are controlling your synth remotely from a browser or connect it to any realtime data application on the web, such as a server feed of weather conditions or stock market.
Finally you can also connect your VCC to a router and have wireless connectivity to your synth, useful for applications like iPhone or iPad controllers.
- KVRist
- 393 posts since 12 Apr, 2020
u might still be better off with going straight into unreal. im not sure how latent that whole chain would be. 
that hardware module looks slick. looks like you combine it with some of its buddies as a system in your eurorack. that would likey be the fastest less latent solution.
that hardware module looks slick. looks like you combine it with some of its buddies as a system in your eurorack. that would likey be the fastest less latent solution.
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
- KVRist
- 393 posts since 12 Apr, 2020
This is such an interesting subject for me. I keep finding new stuff...
http://spektroaudio.com/cv-toolkit-standalone
Does not look like this sends OSC Out... just OSC in, still pretty nifty...
Also what about vcv rack?
https://library.vcvrack.com/trowaSoft/cvOSCcv
https://library.vcvrack.com/trowaSoft/c ... utExpander
combined with the audio in on the rack... I still worry about the refresh rate on that... but maybe you want all the data.
http://spektroaudio.com/cv-toolkit-standalone
Does not look like this sends OSC Out... just OSC in, still pretty nifty...
Also what about vcv rack?
https://library.vcvrack.com/trowaSoft/cvOSCcv
https://library.vcvrack.com/trowaSoft/c ... utExpander
combined with the audio in on the rack... I still worry about the refresh rate on that... but maybe you want all the data.
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
-
- KVRian
- Topic Starter
- 587 posts since 8 May, 2012 from E.U.
Alrighty, so i managed to get it working! See vid below.
What i did was: get CV from Eurorack (Ladik U-081 CV fader) into Ableton via an RME Fireface UC.
After that i used the Expert Sleepers CV to OSC plugin to send it out to Unreal.
And i managed to print the values (or something anyway) onto the screen.
Unfortunately the values printed seem to bear no relation (in terms of CV level) to the fader position. It's more like the value printed is the difference with the previous value... or something.....so this will require a lot of fiddling and actually understanding how to do something useful with it in UE!
What i did was: get CV from Eurorack (Ladik U-081 CV fader) into Ableton via an RME Fireface UC.
After that i used the Expert Sleepers CV to OSC plugin to send it out to Unreal.
And i managed to print the values (or something anyway) onto the screen.
Unfortunately the values printed seem to bear no relation (in terms of CV level) to the fader position. It's more like the value printed is the difference with the previous value... or something.....so this will require a lot of fiddling and actually understanding how to do something useful with it in UE!
-
- KVRian
- Topic Starter
- 587 posts since 8 May, 2012 from E.U.
Wait, hold the press!
I realized that my RME interface doesn't have DC coupled inputs, so the CV i was getting into Ableton was total junk!
When i use the Silent Way DC creating plugin, i get perfect numbers, see vid below!!
So i'll need to get a soundcard with proper DC coupled inputs, i guess i'll just get an Expert Sleepers one.
I realized that my RME interface doesn't have DC coupled inputs, so the CV i was getting into Ableton was total junk!
When i use the Silent Way DC creating plugin, i get perfect numbers, see vid below!!
So i'll need to get a soundcard with proper DC coupled inputs, i guess i'll just get an Expert Sleepers one.
-
- KVRian
- Topic Starter
- 587 posts since 8 May, 2012 from E.U.
More interesting shit! http://midwestmodular.com/open-sound-wi ... -osc-midi/
- KVRist
- 393 posts since 12 Apr, 2020
damn that is a lot of data to respond to
i hope unreal is up for it. looking really cool... i guess its not bitwig api anymore
but the way in this world is to find one! looking forward to seeing what you are doing in UE. Im about to dive into some unity for some visualizers myself.
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
-
- KVRian
- Topic Starter
- 587 posts since 8 May, 2012 from E.U.
Thanks dude! ........ you know what, i'm an idiot, i didn't even realize i was posting in a Bitwig forum, oops! (was already a member of KVR, found this forum via google and saw some people discussing related stuff)
If i get any further with this will report back!
If i get any further with this will report back!
- KVRist
- 393 posts since 12 Apr, 2020
ok now that is funny shit. much love!
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
- KVRist
- 393 posts since 12 Apr, 2020
really slick. love it!
----------------------------------------------------------------------
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
/CTRL → http://slashctrl.io
Music & mixes → http://soundcloud.com/kirkwoodwest
