bramdebouvere / fltouch

FL Studio MIDI controller scripts for the Behringer X-Touch + extenders (MCU)
The Unlicense
11 stars 4 forks source link

Coding Xtouch universal controler Faders to Link Properly #7

Closed Zizzer4x closed 2 years ago

Zizzer4x commented 2 years ago

Hey. I'm sorry that I have to bug you with this request but i'm lacking in options. I'm using FL STUDIO. When I click the INST button at the top of the xtouch controller, it gives me the option of free knobs and faders to link to whatever parameter I choose. However, only the knobs seem to link correctly. When I try to link a Fader, the parameter just goes to 0%. Goes right to the bottom everytime. Can you write anything to fix this?

bramdebouvere commented 2 years ago

Thanks for letting me know. I won't be able to look at it in the first few days, but after that I'll try to have a look.

Zizzer4x commented 2 years ago

That would be awesome! I've tried a few other scripts too but all of them do the same thing so it's not anything you've changed. Also i know it might not be as easy as it sounds. But I really appreciate you getting back with me and I hope you can figure it out. It's almost like it's reading the on/off when you touch the fader, linking it to off and not linking all the pitchbends when moving the fader. Very confusing stuff to me. But thanks for taken a look at it.

bramdebouvere commented 2 years ago

Hey, I think I managed to fix the issue.

I had to debug and fiddle a lot to find out how this all works (I'm new to MIDI, Python AND FL Studio scripting). I don't understand what's going on in some of the original code, because it seems flawed to me, but perhaps that code does work properly on some other MCU devices. But my changes should now make it work properly on the Xtouch (+extenders) now.

Please note that I added an extra python file, so that will also be added to the script folder. I changed the instructions in the readme in case it's not quite clear.

Fixed in https://github.com/bramdebouvere/fltouch/commit/73bf79f5584836c04b91bb1a0586e2949a9dceef

EDIT: Let me know if this works for you and if you're still experiencing issues. If you have ideas on how to improve it, those are welcome as well.

Zizzer4x commented 2 years ago

Awesome! I will check it out. I'm super excited. Thank you so much!!!!!

Zizzer4x commented 2 years ago

Well, Not sure what happened but now nothing seems to be working right. I copied raw content and placed it into a note pad. Changed it to a py file and put it in a subfolder in the hardware section just like last time but this time not even the normal functions worked. You tried it and it worked for you though?

bramdebouvere commented 2 years ago

Hmm weird, it's working over here. Can you perhaps try to download the entire repository and put that in your scripts folder? Maybe something isn't going quite right when copying the raw file. Also, note that you will need more than just the 2 files from last time.

If that does not help, can you check if you're using the latest FL studio version? (I'm using 2.9.0 here)

EDIT: when you say that not even the normal functions work, I suppose you mean everything? Or just the Free assignable controls? EDIT2: you're using an XTouch, right? Or are you using another device?

Zizzer4x commented 2 years ago

Yes, I'm using the X-Touch Universal control surface on FL Studio 20.9.
I mean everything. The button that puts it into the free mode wont even work. So, I'm assuming that maybe I didn't copy it correctlly somehow.
I'm looking for the actual download or zip file but I'm just not seeing how to do that anywhere on this site. I'm looking for it right now.

Zizzer4x commented 2 years ago

Can you walk me through exactly how I do that like I'm an idiot cause I feel like I am at this point.

Zizzer4x commented 2 years ago

I click on the 73bf79f link.

It takes me to all these codes written but with BLUE and PINK and Green Highlights on the codes.

I scroll down till I see the Device_XTouch.py part. I click on the 3 dots and choose view file.

I'm at a page that shows the code like it's wrtten in a note pad but I see a RAW button and a BLAME button, a monitor looking icon, a copy to pasteboard Icon, a pencil icon and a trash icon. I don't see any other option to download anything.

I feel like I maybe I am in the wrong spot maybe. I don't know.

bramdebouvere commented 2 years ago

You're at the wrong spot, indeed. I'm sorry that I confused you, but I just added the link here to have a reference for myself. That link just shows the changes that I did to fix the issue.

I suggest you go to the main page: https://github.com/bramdebouvere/fltouch There you will find a green button with the text "Code". When you click that, you'll see the option "Download ZIP". Inside the ZIP, there will be a folder "fltouch_main", open that folder. Put the entire folder content in your scripts folder, where the other files used to be.

Let me know if that works for you.

Zizzer4x commented 2 years ago

YES! It Works! Super excited. Now I can globally link parameters and the knobs and faders will work every time I pull up that instrument or effect plugin. Now, if I can just figure out how to scroll through my effect plugins that I have loaded, I won't have to touch my mouse. Not sure if there is a way to do that but I'm super excited about what I have now. You have made the best midi script to date. GOOD JOB BUDDY! You are the S@#t

Zizzer4x commented 2 years ago

Well. I spoke a little too soon. You are almost there. with this code, you can link the parameters by clicking link to controller, and it works perfectly, which is awesome, BUT the only Fader that will link by clicking override global link, is fader 1. 2-8 will not globally link.

Everything below is just describing the differences between LINK TO CONTROLLER and OVERRIDE GLOBAL LINK in case you might not know.

The cool thing about global linking is that you only have to set it one time and then you never have to set it again on any project. it'll always be set to that parameter when and only when you pull up that plugin or instrument.

                   For instance. If I have a parametric eq on track 1 and a parametric eq on track 2, with the OVERRIDE GLOBAL LINK option,  I can assign all faders on the parametric eq to be controlled by the faders on a controller and it will always be set the same way every time I load that plugin on any and every project but will only adjust the parameter on that plugin when I have it pulled up in view and on top of everything.  I can use the same fader to adjust the plugin on track 1 without affecting anything on track 2 just by having it pulled up in view. and then vice versa, pull up the plugin on track 2 and make adjustments on the plugin on track 2 without affecting the plugin on track 1 using that same fader on the same controller all by just having the plugin I want to adjust in view. 

The LINK TO CONTROLLER option is different because once you link a fader to a parameter with this option, the fader will only be assigned to that parameter but still move it even if the plugin or instrument is not in view. It will only set it for that one plugin on that very specific rack and the controller will always move the parameter it is linked to even if it is not in view.

Both options have their own unique benefits, but the override global link is my biggest thing because I like to set and forget.

Zizzer4x commented 2 years ago

also, what I found interesting is that when you change the fader bank to 9-16 or 17-24 or so on, 9 and 17 will link globally. not as if it was the same fader but like it is still recognizing it to be a different fader controller like it's supposed to. it's like so close to being perfect.

bramdebouvere commented 2 years ago

Hey there. I've never used the global link before, I'll have to try it out. I tested everything using "link to controller". I'll reopen this issue so that I can have another look at what's going wrong.

Zizzer4x commented 2 years ago

You are in for a treat then my friend. Try it with the xtouch knobs in the free mode. you'll love it.

bramdebouvere commented 2 years ago

I apparently had to set MidiChanEx to 0 on the event that I send to FL Studio. I have absolutely no idea what that is, and what the difference with MidiChan is, but that (together with some other minor changes) did the trick. Can you please test again?

I also tried to make the sliders automatically reflect the linked values from FL studio, but I could not get that working yet. Well.. I could, but it was very buggy.

Changes in https://github.com/bramdebouvere/fltouch/commit/9a2231e1a77b6387d5b723b4d51414d758611095

Zizzer4x commented 2 years ago

It's working perfect as far as I can tell on my end. Now I am gonna have to spend a couple days mapping out all my plugins. this will be interesting. I'm about to have to go to work so I can't play on it till this evening, but you are AWESOME! How are you liking the global setting feature?

bramdebouvere commented 2 years ago

It's pretty cool, but as you said, it's going to take some time to map everything out. It's too bad I couldn't get the faders to automatically adjust themselves to the correct location for this without too much bugs.

I opened a question for this on the FL forum, but nobody replied yet. https://forum.image-line.com/viewtopic.php?f=1994&t=271358

Zizzer4x commented 2 years ago

I sent you a message but deleted it because I didn't really want it on a public domain. Should be in your inbox though.

Zizzer4x commented 2 years ago

I read your message on image line. So let me ask you, the only problem was when you did a link to controller and did a global link at the same time? Did the global link reflect the value back to the hardware when you didn't do a link to controller? I also noticed you were saying knob instead of motorized fader. That might not make a different because that type of processing is probably done in the xtouch but there might be an a different command for that as well. If their response doesn't seem to work.

bramdebouvere commented 2 years ago

Yeah I linked them at the same time. FL studio will use the "link to controller" link, but it reports back the "global link", resulting in me not being able to display the correct value on the fader. I know this might be an edgecase and probably nobody will be setting it up like this, but if I do it, I want to do it right. But other than that it was still a little buggy in general, so I'm first going to refactor some of the code in the scripts, so it's a little more readable. Right now it's structured like a big spaghetti and it's sometimes hard to figure out what exactly is going on.

bramdebouvere commented 2 years ago

I sent you a message but deleted it because I didn't really want it on a public domain. Should be in your inbox though.

Where did you send me this? I haven't seen anything so far... Feel free to contact me privately on any of these: https://www.sirfreak.com/contact/

Zizzer4x commented 2 years ago

Lol. That's funny. Too many ways to go with this. I've had spaghetti for the past 3 days now. I gotta say it does the trick and it's easy to make. It does the job. But yeah, if you want to put the noodles on the bottom then the sauce and top with with cheese to make it pretty that's cool.

As far as the message I deleted. When you comment on this site it sends me a message to my email that I can read without having to get on here to read it. I thought you might also get email notifications that might have what I said on it. I had sent you my email but I didn't want everyone to have it.

Zizzer4x commented 2 years ago

I wonder if there is a command that will send the color of the track to the scribble strips. I've been looking for a script that might already have it so I could send it to you but there doesn't seem to be one. I thought I found one a while back but can't seem to find it now so maybe I didn't see one. Anyways. Not a biggie but it would be cool if that's something you want to tackle one day.

bramdebouvere commented 2 years ago

I would also like that, but as far as I know it's not possible in MCU mode. It might be possible using the Xctl protocol, but it's going to be a lot of work to rewrite the entire script for this.

There's another repo that is making this for the Xctl protocol, but apparently it's not very stable yet: https://github.com/djnaoki-mrn/Behringer_X-Touch_for_FL_Studio_20

Zizzer4x commented 2 years ago

Oh. Well, I wouldn't worry about that then. I can do without the colors. I don't know anything about the xctl mode. I'm apprised image line hasn't gotten back with you yet. I guess they read the question and decided they would rather answer someone else's question.

bramdebouvere commented 2 years ago

After I'm done with some refactoring and other stuff, I'll have a look if I can have another attempt at it. If the issue still persists, it might be a bug in FL studio, and I'll raise a support ticket then.

Zizzer4x commented 2 years ago

Ok. I appreciate all that you are doing. I really do.