-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
enhancement: automation, add option 'Mirror pattern' #1289
Comments
👍 Should be relatively simple to implement too, for someone familiar |
On 11/12/2014 07:31 PM, Tres Finocchiaro wrote:
AutomationPatternView is where the context menu of an Automation pattern In there, you need to add an option to "reverse" (a better term than Then you add that slot to AutomationPattern, which copies m_timeMap to a After that, generateTangents() has to be called once at the end of the |
Are we talking about flipping over the x axis or y axis here? Because I can |
Yeah, both ways would be useful. Also I suggest to copy the flipped version to the clipboard so one could easily paste it in the same pattern/clip/segment/box. Fade in and out for example. Auto-pasting the pattern every other time flipped and original could be a way of implementing the repeat function you thought were useful. Hmm, but copying automation isn't possible yet. |
Hmm. I've got this working, sort of. You can only flip it vertically so far, it takes forever, and it doesn't actually mirror the pattern 👍 I can't quite describe the behavior, I'll edit this after some testing. |
If it takes forever, I reckon you make a new opposite point for every tick or every quantization? In linear and discrete mode it would be a matter of replacing/giving the points a new value = largest value possible - point value. |
@Sti2nd originally it added tons of points (and only between the start and the second point), but I've fixed that now. |
|
How long does it take to invert when you press the button? |
Not a noticeable time. I'll test with a more advanced pattern later on and |
Oh, then it is fast... I thought you said it was slow |
@Sti2nd it seemed slow earlier, but it was just the visual part that wasn't |
Very nice progress @Spekular! Perhaps I read it wrong, but I thought @musikBear's request was to extend and flip (rather than simply flipping?) i.e -Tres |
Flipping in both y and x is useful. For now it's only y, I'll work on |
On 11/21/2014 10:52 PM, Stian Jørgensrud wrote:
The function stays the same... it doesn't care which way it is. |
Oh, it don't! |
On 11/23/2014 01:22 PM, Stian Jørgensrud wrote:
It does get perfectly mirrored. Cubic hermite is symmetric, if you have |
I get confused when you say wrong
That is y-flip 👍 @diizy Yeah, the images showed I was wrong, so I deleted my comment. |
@Sti2nd Those images show the pattern being flipped/mirrored OVER the y axis, but they're flipping in the direction of the x axis (the points move on the x axis). It's more clear if you consider having two points above the 0 line getting y flipped. The mirror over the x axis, but they move down on the y axis and end up under the 0 line. I agree it's not all that clear, but that was my reasoning. The icons should do a better job conveying it once they're done, and the name can be changed. |
This is what Gimp uses for "flip". Not really the same context, but figured I'd mention it for sake if conversation. |
I think the icons look good, could be clearer with real arrows at the ends. As long as there is hover text which explains what the function does the user will get it. |
We shouldn't change the dimensions of the entire toolbar for a single pixmap tho. |
On 11/23/2014 06:22 PM, Spekular wrote:
So then it is not inconsistent. Length simply isn't a factor for |
@diizy I still feel like it's inconsistent, and to me it looks like a bug when the pattern gets cut off. It doesn't seem as useful either, especially considering the first part of the pattern gets kept, and not the last part as one would expect. |
On 11/23/2014 06:44 PM, Spekular wrote:
Why would anyone expect the part that is invisible to be kept? A pattern should be considered as what is seen in the song editor. The |
It must be failing. When I make a three bar long automation, the track in the song editor stays at one bar. |
On 11/23/2014 06:54 PM, Spekular wrote:
Right, because you set the length from the song editor. That's the |
Well if only the visible part of the pattern plays, why not reverse the entire pattern and let the user "crop" it to the part they want. That's extremely flexible. |
Mainly because cropping from the left isn't easy in our current editor. I don't necessarily disagree with this behavior though. When you flip a layer in Gimp for example, it flips everything, unless you've explicitly selected a smaller area. The point is, does the pattern signify a "smaller selection"? Currently, yes... and no, since a one-bar pattern usually starts as the canvas until the pattern is expanded. Piano rolls auto-expand which prevents this dilemma. Automation and bbeditors can behave a bit different in this regard. |
I think it is good now, I must admit that I don't exactly understand what diizy is trying to say. If you have a point far to the right which you aren't seeing in the Song Editor, then you flip, maybe you didn't want that to be a part of the flip, but you probably knew the point was there, and it would be strange if it was cut out or continued to be there IMO. |
Flip selection is what you are describing, diizy? |
@Sti2nd "length" in automation pattern gets the visible part of the pattern in song editor, so if your pattern takes more bars in the automation editor than in the song editor, the extra bars would get cut off. I've implemented it so they stay instead, but diizy wants me to revert it. |
Only the visible part should be reversed... the rest don't have to be |
@diizy ah ok. That makes more sense but it's still problematic. only reversing part would require reversing and clearing only part of the pattern while making sure to keep the rest. Also if the visible pattern doesn't start at the same point as the whole pattern there would have to be an offset implemented. I'm not sure I'd like to make this function more advanced considering my skill level. |
Both cons and pros... Diizy have a point in that the user probably only want to flip the area visible in the Song Editor, though I can easily see it being annoying. Example: You drag a knob to autotrack and then it creates one bar long pattern. I usually don't drag out how long automation I want before I have made the automation in the Automation Editor, so when a user click flip when editing the automation he will be surprised. I think that is the workflow many have, I have watched many guys on YouTube, lol. Question: I always drag my automation tracks to the end of my song, would a flipping x (mirror vertical) cause all the points to be at the end of the automation instead of the beginning? And when per track automation is implemented, would that be like dragging them out, like I do, and flipping would cause the points to go to the end of the automation instead? |
My previous answer explains this, because people don't adjust the length of the pattern in the Song Editor before they make the automation. |
On 11/23/2014 07:33 PM, Spekular wrote:
Not possible. Everything starts at 0.
Well, you can learn while you do it... |
Maybe I can add both. In the automation editor it flips the whole thing |
On 11/24/2014 07:32 AM, Spekular wrote:
Even in the automation editor, I would assume that the flipping would
No that is not possible currently and probably never will be. It's safe |
@tresf @diizy I've been trying to find time to work on this, but my branch was 103 commits behind. When I pulled all those changes to my branch it says it's 1 commit ahead, which it shouldn't be.I'd rather learn to do this right than to always delete and recreate my branches when I need to update them, so what should I do? |
On 12/13/2014 02:26 PM, Spekular wrote:
Try git log or git diff to see if there's anything in your branch that |
@diizy It wasn't ahead before the pull, which is odd. I think it's counting the pull I used to get up to date as a commit. Should I still do log/diff? |
You can usually hard reset to a specific commit, but as Vesa said, it doesn't matter much if you're ahead or behind, just that the diff against upstream only touches the files you've worked on. I took at look at your branch and didn't find anything obvious that stood out. When writing your first feature, it's hard to know how long these branches will be out there, but as a rule of thumb, a major change should be put into its own branch so that your own personal clone of upstream version (i.e. The other benefit of using pull requests is that they never need to actually be accepted, so if you royally screw something up and want to start from scratch, you can always copy off your code and delete your personal branch and start fresh. I've done this before when I accidentally rebased |
Alright. I've got a repo setup with this feature working on master. Two issues remain:
|
How many files have you had to change? Sometimes it's easier to commit them by hand, but normally, you'd just rebase your code (or "fast-foward" it) against upstream as explained here: Before you do this, backup your code. If you run into problems, just backup your changes and reapply them by hand. Sometimes fast-forwarding is quick and it merges automatically, but if there have been major changes, it can require quite a bit of work and you'll have to weigh the difficulty of hand-merging each conflict over just starting fresh from master and pasting in your changes again. -Tres |
@tresf that seems to work, thanks! Now onto issue number 2. I'd consider this worthy of adding even in it's current state, so it gets into LMMS already (it's taken way longer to deal with git issues and all that than making it, and it's bothering me that it was pretty much done ages ago), but what do you think? |
Do a pull request and wait for feedback then. 👍 |
On 12/22/2014 11:42 PM, Spekular wrote:
It'll have to go to master branch anyway, it's way too late to get in to So there's no rush really... you can take your time to get it right. |
Closed per #1486 |
im sure all have had/ done this task.
you make a smooth pattern that works well. Then you think - oh, it would have been nice if i could 'flip' this for the oposit transistion. I sugest to add a button 'Mirror pattern' So a user will get 2 automation blocks, one with the pattern user drawed, and one exactly oposit, or mirrored of the pattern.
The text was updated successfully, but these errors were encountered: