-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle Mode for buttons using Learn mode or way to write actions into map #13
Comments
This is actually good news as you've arrived in the same place that @Disruptormon got to with this. Ultimately the reaper learn function is then eminently useable and probably the best way of doing the userspace mapping. There was talk of including an action mapping file for reaper too on this basis, just to get people started. |
So, you can activate toggle on any button by editing the map. Here's an example:
including the 'Toggle' attribute and setting it to true should tell that button to behave as a Toggle and only send OSC for 'ON'. |
Cool! that was fast! I will try that out. curious to know why the action mapping doesn't work. it would seem that that would give us access to LED states if they are available from Reaper. |
I am wondering if for the action mapping would it be possible to add a similar tag labeled Action that if > 0 then would cause the output to be '/action 12345' (for ACTION i/action in .reaperOSC) or '/action/12345' (for ACTION t/action/@ in .reaperOSC) instead of the usual output like
not sure how to code it but could be a way to continue testing that functionality. |
Yep, tried all sorts of variations on the action keyword and reaper seemed to ignore them all. |
strange based on what I read on the cockos forum a bunch of people have got this working. what kind of test harness are you proposing? |
I downloaded sendosc ( https://github.com/yoggy/sendosc ) to test out messages I was able to get Reaper to respond to an action command by sending:
This mute/unmutes all selected tracks and it works fine using the unmodified procontrol.ReaperOSC file from the DEV_OtherDevices branch and I left all the settings the same aside from the ip address since it wasn't coming from the pi Couldn't we get procontrolosc.py to send a similar message? |
I have tested the toggle function by adding it is still sending:
I was trying to use this button to go from one marker to the next but the on off sending s still causing a double trigger. |
This is interesting, does that utility provide a dump of the raw OSC conversation? |
Ugh, looks like this is over in the Release branch and somehow got done AFTER this Otherdevices branch was created. Sorry dude, it looks like I am going to have to merge all this mess before you can get that particular function. EDIT: had a go at merging up from the Release branch. Unfortunately the edits are in the control24 osc code! |
this is the only option but you can look at the source code and it appears to send messages the same way as procontrolosc but with the 'address' of /action folwed by an integer (the action ref no) |
that sucks. is it simple enough that I could fish it out from the release code? I have been trying to learn python but still early days, working through the syntax and such. |
well I had a go at it and got the toggle mode working by comparing the Release control24osc file and the procontrolosc. Interestingly the code that got the toggle working finally was not in the release code but in a pull from DEV_Mapping which was later removed: I wasn't super scientific about it and I made a bunch of other changes based on control24osc in an effort to make them as similar as possible without undoing the scrib strip enhncement so I don't know if it was just that addition that got it working but the toggle mode is working now. I am trying to experiment with the action commands also but have so far not got that working. |
Ok actually after a little reading I got the /action commands working! you can Specify {'Action': 23412} at the button's map and reaper will respond appropriately! I will create a pull request so you can review it as I most certainly messed around with things I probably shouldn't have, but it does work... |
yeah something I did in there messed up some stuff for the procontrol, the action and toggle stuff works but the transport (play and so on don't respond anymore and if you move the jog wheel procontrolosc.py crashes with:
makes sense though I suppose. I did change some stuff relating to command class if I remember correctly.... |
That's fine. I did merge the release branch changes upward and I could see the toggle stuff was in there. This landed it into the c 24 osc file but the 2 are still somewhat different to each other. I started a (overdue) process of making common base classes for all devices and allowing for override versions for specific devices. Now that the basic multi device changes seem to be working for you this is the next right step to allow for easy customisation inside the classes. This will put the 2nd scribble strip bank and such within reach. I picked up in this project to learn more. python, I was also pretty new to it. It's great you're having a go. Don't worry about doing the wrong thing as git provides the safety net. I'm also still working through the map. Those DSP banks need separating with a match or mask but I couldn't work out the right binary work to do it last I looked. You were dead right about PC starting from 0x08 though. |
cool! I am using VS Code right now with the python plug in. but I will take a look at pycharm too. There is a third set of eight scribble strips in the DSP section. One for each DSP section 1-8. I could easily get you the addresses for that area too but I don't want to throw too much at you. let me know if there is other stuff I can do to help out. |
Looking through these issues and such, toggle should be available now and I did put something in for allowing action mappings in the .OSC file. Could you try these things again to check where we are? |
hey, @phunkyg sorry I got distracted and then my pi broke, I will be back to testing soon though! |
Hey @phunkyg I recently purchased a control 24 and have started using your script. So far it’s working but with the same issues as mentioned above. Only certain buttons will switch to toggle mode when I edit them in the script. Also, the modifier section and the master fader button, does not work. One other bug is when working in large projects the meters and clock stop in place and the output of the is showing waiting for desk ack. After a random amount of time everything will comeback but all of the meter and fader data will catch up. If I touch a fader or control it will kick back in as well. Projects of 30 tracks and lower don’t have this issue. The larger ones (100 or more tracks) really have an issue. I tried the v-control pro stuff and it doesn’t have this issue but it doesn’t implement most of the console functions and is basically a machine control. I believe the issue may be in the either in the banking function or possibly a timing issue in one of the scripts. Reaper sends all track data unless a bank number is selected. If reaper receives a bank number it will only send data for the number of tracks listed in the reaper osc file. So instead of bank right and left, would it be possible to add a variable “Bank_Number” and have the bank buttons add and subtract by one. Also, it might be nice to have the modifiers affect the number pad. Ie... no mod=regions, shift=marker, opt=bank number etc.... I am more than happy to help test and code as I get better with python. I am a full time audio engineer and I love the control 24, I would love to help. Thank you for your work and time. |
@tubbybassengineer welcome to the project things have been quiet for a while but hopefully @phunkyg is seeing these and can come back to give us a hand. Which branch are you using right now? we had the toggle and action thing working in an earlier brute force method but it should be working better now. To the best of my understanding most of the changes are on the DEV_OtherDevices Branch though and not the Release one although I'm not 100% sure since I don't use the Release bnranch at all for the procontrol testing. |
The issue is that using the learn function in Reaper the default button behaviour in the mapping causes two triggers (one for button pushed and one for button released) resulting in a double trigger rather than a single. If the button could be set to a toggle mode (?) so that it only sends one trigger (pushed) then the learn mode would be more useful.
However this way of doing things does not give access to LED on/off on the button, so, alternatively....
it is possible to write in actions with:
ACTION i/action/@ where the output /action 23454 or /action/23454 would trigger action number 23454
But with the map structure we have how can get the above output instead of /button/command/utility_misc_meterselect_automationenable/Assign [f] 1.000000 ?
Ideally both options would be great cause it seems Reaper does not send LED states for all actions and the learn function is easy to use.
The text was updated successfully, but these errors were encountered: