Skip to content
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

Play Region target #5

Closed
DLongoni opened this issue Jul 17, 2020 · 22 comments
Closed

Play Region target #5

DLongoni opened this issue Jul 17, 2020 · 22 comments
Labels
enhancement New feature or request

Comments

@DLongoni
Copy link

For Live purposes a common use case for Control Surfaces is to determine which region is currently played/looped. In other software they may be clips or scenes, but for my experience the most straightforward thing to do in reaper is to work with regions. It would be great to have a trigger that goes like "go to region x when cursor reaches the next region marker". I have currently implemented this using a custom action that combines sws and standard reaper actions, and I correctly trigger the actions using a midi surface. The big issue is feedback, which is fundamental, because while I'm playing live I'd like to know which one of the regions is being played. This can be achieved by lighting it with another color (or maybe flashing, or whatever, but let's say lit with another color).

I have no clue about how much a hassle can it be to implement this, I just want to mention that maybe a combination of custom actions + a check on whether the cursor in inside the region can be a cheaper way to do this.. Maybe (=

Thank you very much

@helgoboss
Copy link
Owner

The "go to region x" part sounds like a candidate for a new ReaLearn target. Doing it via an action doesn't give you feedback, but if there would be a dedicated target for this, feedback would be possible. That's not so difficult to implement.

The "when cursor reaches the next region marker" parts sounds more like a source - an incoming event to trigger a target change. That could be implemented but would require some more thought because it would be the first non-MIDI source. It's very different in nature.

@DLongoni
Copy link
Author

Implementing "go to region" as a trigger instead of an action was exactly my thought in order to allow midi feedback.

As for the "when cursor reaches the next region marker", I was thinking about it as part of the trigger itself, instead of an additional source. I think that sources for ReaLearn are fine as midi events only and adding this kind of non-midi source could make things a ton more complicated.

What I did as a custom action to make this work is

  • Regions: go to region 01 after current region finishes playing
  • Time Selection: copy loop points to time selection
  • (optional) SWS: set transport repeat state

So I was thinking that this two or three actions could be a target as a whole. But I have no clue if the first part can be difficult to implement.

Does this make sense to you?

@helgoboss helgoboss changed the title Play Region trigger Play Region target Jul 20, 2020
@helgoboss
Copy link
Owner

helgoboss commented Jul 22, 2020

I renamed this to "Play region target" because there's no such term "trigger" in ReaLearn's wording (at least not as a noun).

I'm not sure if ReaLearn is suitable or should be suitable for a use case like that. Making "when cursor reaches the next region marker" a part of the target itself sounds too specialized. Doesn't really fit into ReaLearn's philosophy (which is to have generic sources that emit events which trigger something and generic targets that change a parameter within REAPER). Wouldn't it be possible to have this "when cursor reaches ..." logic outside of ReaLearn and just let ReaLearn deal with delivering the correct feedback value for the currently playing region?

@DLongoni
Copy link
Author

Sorry for the "trigger", I just got confused with terms.

It definitely makes sense to me. If "feedback based on current region" is possible to implement then I think that there would be everything one needs, at least for the use cases I am thinking about.

@helgoboss helgoboss added the enhancement New feature or request label Aug 9, 2020
@helgoboss
Copy link
Owner

I'm thinking about 2 targets:

  • One to jump to a specific region (e.g. for use with a single button) - identified by its ID, independent from its position. Feedback would be ON if REAPER is currently playing this region, otherwise OFF.
  • Another one to navigate between all available regions (e.g. for use with encoders, faders, prev/next buttons): Feedback value would correspond to the position within the project. This could turn any motor fader into a seek slider.

@DLongoni
Copy link
Author

Having the first one available would be huge.

As for the second, I'm having a hard time figuring out how the feedback could be used except if you have a display on your device that can show the actual region number. Controlling and "reading/interpreting" a fader this way would be kinda tough IMO. The target could be very useful anyway.

A delicate thing to take into account would be also the jump timing. There are a few possibilities:

  • jump when triggered (immediately)
  • jump "when current region finishes playing
  • jump with smooth seek (next bar)

Imo the first of the the three is useless, the second is ideal, the third is usable but only barely.

Thank you for looking into this

@helgoboss
Copy link
Owner

This will be fun :) Works already, just needs a bit polishing.

@DLongoni
Copy link
Author

DLongoni commented Mar 7, 2021

Great news, can't wait to test it!

helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
helgoboss added a commit that referenced this issue Mar 7, 2021
@helgoboss
Copy link
Owner

I implemented the first target I've talked about for markers and regions. Regions use smooth seek.

@helgoboss
Copy link
Owner

@DLongoni Already gave it a spin? 2.6.0 still contained a known issue related to this feature but 2.7.1 fixes it.

@DLongoni
Copy link
Author

Well... what can I say, it works like a charm!! Tested it in a few use cases, it works perfectly with both regions and markers!! Feedback tested on Behringer x touch compact, maybe later I'll try with the novation pad X. This is huge imo, a feature that could be cool to really a number of people...

A few minor remarks:

  • user guide "marger" instead of "marker" typo
  • user guide "...as the currently playing region or measure has finished playing..." for me nothing happens at the end of measure, the jump will happen at the end of the region. Thank god also, because having the cursor jump at end of measure would be really undesirable. I think this is just a minor mistake in the user guide, but if not maybe I didn't understand it properly
  • I would mention in the user guide that all of this does not work in Record mode (I really think there is no way to make it work. Even sws and reaper action do not work in record mode)

Thank you so much, really awesome.

@helgoboss
Copy link
Owner

Glad it works well. Always good to not just test myself.

  • user guide "marger" instead of "marker" typo

Thanks, fixed.

  • user guide "...as the currently playing region or measure has finished playing..." for me nothing happens at the end of measure, the jump will happen at the end of the region. Thank god also, because having the cursor jump at end of measure would be really undesirable. I think this is just a minor mistake in the user guide, but if not maybe I didn't understand it properly

I just changed this into "If the project is playing, playback will continue with the given region as soon as the currently playing region (or measure if not in a region) has finished playing.".

  • I would mention in the user guide that all of this does not work in Record mode (I really think there is no way to make it work. Even sws and reaper action do not work in record mode)

Good point, will add that as a note.

@DLongoni
Copy link
Author

Awesome, thanks!
Tried with Launchpad X. Actions triggered perfectly, feedback is problematic, but it's a unit design issue, nothing to do with ReaLearn.

A final remark that I think would be important... When targeting regions, it would be great to have a "select region" flag, or even to do it by default. One can do it using two mappings on the same source and using the second mapping to trigger sws action "select region x", but it's not very elegant and in the spirit of ReaLearn, imho.
The reason why this is important is that there are plenty of actions (or generic reaper features) that work on selected areas, and if one has just pushed a button to go to a certain region, then it makes sense to perform your actions on that region. For instance if I realize that I have recorded a bad part on that region I might want to delete it, or to delete it for a specific track, or to mute it, and so on.. all things that are easy/better designed to do if the area is selected.

If you want I can open a new issue for this if this makes sense to you.

Thanks again!

@helgoboss
Copy link
Owner

I'm interested in what's the problem with Launchpad X. LED colors?

Yes, makes sense, please open an issue!

@DLongoni
Copy link
Author

I'll try to make it short (=

  • One can configure custom modes on the unit. Factory default is note velocity for each button, default led = off, turns green when pushed.
  • I wanted CCs instead of Note Velocity, and I wanted them coloured by default. So I edited the custom modes to my liking.
  • Now I want feedback to be sent to the unit, but there is no way I can make it work
  • Reset to default state, tested with midi tools, the leds are lighting as explained in the reference manual
  • I guess then that they failed to mention in the guide that you can send damn feedback only if you leave the custom modes in default state (I tried even just changing the default color of 1 button, then no feedback works for any button)
  • I have to throw away the custom modes I developed
  • Thank god (and you really) I can replicate them more or less by setting the "Source Min" value to the desired off color, and max to the desired On color.

So, after resetting to factory state the unit custom modes (the only ones that accept feedback at all) also regions are working! Yay!

@helgoboss
Copy link
Owner

Before you throw your custom modes away, you could also have a look at https://d2xhy469pqj8rc.cloudfront.net/sites/default/files/novation/downloads/4080/launchpad-programmers-reference.pdf. I didn't read it thoroughly but it looks like it can be programmed also in non-MIDI mode.

@DLongoni
Copy link
Author

Thanks for pointing me towards that (= That guide is for the LP 1st edition, while the unit I have here now it the Launchpad X, which guide is here:
https://d2xhy469pqj8rc.cloudfront.net/sites/default/files/novation/downloads/4080/launchpad-programmers-reference.pdf

I have read it many times, and this version also looks like it could work, but in reality it does not, or at lease I haven't even come close to making it work (= If there is any testing needed though I can try that!

@helgoboss
Copy link
Owner

@DLongoni #223 could be a nice addition to your "feedback story". With that you can easily visualize in realtime how long the current region will still be playing ... provided you have a controller that has either circular LEDs or motor faders (with their position indicating the progress within the region).

@DLongoni
Copy link
Author

That sounds awesome really!! Can you imagine any easy way to have the same thing displayed on the pc screen?

@helgoboss
Copy link
Owner

Either use a desktop OSC software (such as OSC Pilot) to build a kind of user interface and couple it with ReaLearn or wait for #235.

@DLongoni
Copy link
Author

All good considerations, thanks (=

@helgoboss
Copy link
Owner

#235 is implemented, check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants