j4s0n-c / trowaSoft-VCV

trowaSoft Modules for VCV Rack
Other
105 stars 17 forks source link

OSC messages with multiple values #50

Closed djdoz closed 4 years ago

djdoz commented 4 years ago

This is more a question than an issue.

If I have a device sending OSC messages from a gyroscope with say /xxx/gyro with 3 floats (x,y,z) ranging from -245 to 245.

How do I access the 3 different values x, y and z from cvosccv? or does it default to just using the first value?

Also, the below crash maybe related to this issue.

[250.343 fatal src/main.cpp:45] Fatal signal 6. Stack trace: 10: 1 Rack 0x00000001071cb3cd _ZL18fatalSignalHandleri + 45 9: 2 libsystem_platform.dylib 0x00007fff7239c5fd _sigtramp + 29 8: 3 ??? 0x00007000062aa758 0x0 + 123145405769560 7: 4 libsystem_c.dylib 0x00007fff72272808 abort + 120 6: 5 libsystem_malloc.dylib 0x00007fff7236850b has_default_zone0 + 0 5: 6 libsystem_malloc.dylib 0x00007fff7236b40f malloc_report + 151 4: 7 plugin.dylib 0x000000000ab5726f _ZN5oscCV7processERKN4rack6engine6Module11ProcessArgsE + 6159 3: 8 Rack 0x00000001072229be _ZN4rack6engineL18Engine_stepModulesEPNS0_6EngineEi + 462 2: 9 Rack 0x00000001072235ab _ZNSt3114thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN4rack6engine6Engine5startEvE3$0EEEEEPvSC + 1419 1: 10 libsystem_pthread.dylib 0x00007fff723a8109 _pthread_start + 148 0: 11 libsystem_pthread.dylib 0x00007fff723a3b8b thread_start + 15

j4s0n-c commented 4 years ago

The CV inputs/outputs are polyphonic. So, use a VCV split module to access the incoming individual floats. To set the range click config, click the "ADV" button next to the channel, click "Convert Values", then set the OSC Value (IN) MIN and MAX, and click "save". Not sure on the crash. I was unable to reproduce. Let us know if it still happens with the proper config.

j4s0n-c commented 4 years ago

Also, make sure your namespace is blank unless your OSC sender is actually using a namespace.

djdoz commented 4 years ago

ok thanks! I tried using a VCV split module and that seems to work.

However, after a few minutes, it crashed with the below.

[2432.944 fatal src/main.cpp:45] Fatal signal 6. Stack trace: 10: 1 Rack 0x0000000101a0b3cd _ZL18fatalSignalHandleri + 45 9: 2 libsystem_platform.dylib 0x00007fff7239c5fd _sigtramp + 29 8: 3 ??? 0x00007000075c7758 0x0 + 123145425811288 7: 4 libsystem_c.dylib 0x00007fff72272808 abort + 120 6: 5 libsystem_malloc.dylib 0x00007fff7236850b has_default_zone0 + 0 5: 6 libsystem_malloc.dylib 0x00007fff7236b40f malloc_report + 151 4: 7 plugin.dylib 0x000000000539826f _ZN5oscCV7processERKN4rack6engine6Module11ProcessArgsE + 6159 3: 8 Rack 0x0000000101a629be _ZN4rack6engineL18Engine_stepModulesEPNS0_6EngineEi + 462 2: 9 Rack 0x0000000101a635ab _ZNSt3114thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN4rack6engine6Engine5startEvE3$0EEEEEPvSC + 1419 1: 10 libsystem_pthread.dylib 0x00007fff723a8109 _pthread_start + 148 0: 11 libsystem_pthread.dylib 0x00007fff723a3b8b thread_start + 15

j4s0n-c commented 4 years ago

Cool. Let's see if we can figure this out... Can you give some more info on your setup? What is the sender application?

djdoz commented 4 years ago

I'm using the Muse 2 headband (https://choosemuse.com/) which sends data to the Mind Monitor iPhone App (https://mind-monitor.com/FAQ.php#oscspec) and then to a MacBookPro running VCV Rack.

Another question, in regards to the trig output, I assume this will trigger whenever a new OSC value is received?

For example, I'm trying to get the eye blink to trigger a gate in VCV rack, the OSC spec is below, in cvosccv I set the input as int, min = 0, max = 1, the CV output remains at 1 (I guess this is because that value never changes). So, the only way is to use trig.

Blink | /muse/elements/blink | i | Blink detected | 1=Blink | 10Hz (if true)

j4s0n-c commented 4 years ago

Cool! I hope we can figure this out for ya. Yes, the trig output sends a pulse for every OSC message received. We have had mixed results with mac and windows trying to figure this out. I am testing with sensors2osc on my android phone, and rack to rack to/from windows/mac. I am getting it to crash but the errors are not yet clear. We are out of time tonight for this, but we'll try to sort it out ASAP.

djdoz commented 4 years ago

I've also realised that when using cvosccv with vcv split module for osc messages with multiple values, in vcv split only the 1st value will work. The 2nd, 3rd, 4th value doesn't show on the oscillscope. I wanted to ask if these values are also scaled according to the configuration in the advance tab of cvosccv?

j4s0n-c commented 4 years ago

I think we squashed it! Can you please try the latest release here... https://github.com/j4s0n-c/trowaSoft-VCV/releases/download/1.0.3/trowaSoft-1.0.3-mac.zip Move the unzipped "trowaSoft" folder to "~/Documents/Rack/plugins-v1/"

All values on a channel should follow the scaling in advanced settings.

j4s0n-c commented 4 years ago

@djdoz:

I think we squashed it! Can you please try the latest release here... https://github.com/j4s0n-c/trowaSoft-VCV/releases/download/1.0.3/trowaSoft-1.0.3-mac.zip Move the unzipped "trowaSoft" folder to "~/Documents/Rack/plugins-v1/"

All values on a channel should follow the scaling in advanced settings.

djdoz commented 4 years ago

o.k. I believe this has fixed the issue! I've had it running for about 1 hour now without crashing where it used to crash every few mins. Thanks for the quick turnaround. Also, in regards to the earlier comment on using the vcv split it was a user error where I misread the OSC spec.