Loading Instrument or FX Presets via the API - Is that possible?

Post Reply New Topic
RELATED
PRODUCTS

Post

Hi folks,
I can nicely create new tracks and then load instruments or effects onto that track. That could be VST2, VST3, CLAP, or Bitwig-internal devices. That‘s great.

But how about loading presets?

Let me give you an example: Loading NI Kontakt is easy, but what I really want is to load a specific sampling library inside Kontakt. For that I can create a patch and from the computer I can load it. But if would be great if I could also load this specific preset via OSC or my own script via the API Other examples: I have my external HW gear prepared in presets so that I can easily integrate them into a song. Or how about my own FX chain? Would be great to load that via my new TouchOSC surface…

Thanks and cheers
Martin

Post

markram71 wrote: Sun Mar 17, 2024 6:04 pm Hi folks,
I can nicely create new tracks and then load instruments or effects onto that track. That could be VST2, VST3, CLAP, or Bitwig-internal devices. That‘s great.

But how about loading presets?

Let me give you an example: Loading NI Kontakt is easy, but what I really want is to load a specific sampling library inside Kontakt. For that I can create a patch and from the computer I can load it. But if would be great if I could also load this specific preset via OSC or my own script via the API Other examples: I have my external HW gear prepared in presets so that I can easily integrate them into a song. Or how about my own FX chain? Would be great to load that via my new TouchOSC surface…

Thanks and cheers
Martin
The only way i know is: open the Browser, scroll to your preset, load it.
No direct access to single presets in the API as far as i know.
I built a Looper for Bitwig! :) https://www.youtube.com/watch?v=-z5ywDo2bU0

Post

Thanks, Nowiamone. Appreciated. Not the answer I was hoping for, but maybe I can figure something out with naming my presets in a way that I can pick them up via scrolling down a few times... let's see...

Post

markram71 wrote: Sun Mar 17, 2024 6:04 pm Hi folks,
I can nicely create new tracks and then load instruments or effects onto that track. That could be VST2, VST3, CLAP, or Bitwig-internal devices. That‘s great.

But how about loading presets?

Let me give you an example: Loading NI Kontakt is easy, but what I really want is to load a specific sampling library inside Kontakt. For that I can create a patch and from the computer I can load it. But if would be great if I could also load this specific preset via OSC or my own script via the API Other examples: I have my external HW gear prepared in presets so that I can easily integrate them into a song. Or how about my own FX chain? Would be great to load that via my new TouchOSC surface…

Thanks and cheers
Martin
hey Martin, just wanted to say I really like what you are doing in the Controller Space! I am also a MidiFighter Twister Guy! Thanks for being active on here.

I believe you need to first get the device insertion point and then you can specify a file there...
read up on the InsertionPoint Interface Reference...
Device and a few other class implement this. Then try insertFile() I havn't done this personally but I might have to try it!

I'm still using the Browser API which no longer supports Collections since 5.0!
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post

… thanks a lot, Kirkwood West, much appreciated. Let me try this out once I am back to my desk. That sound good…

What I have successfully implemented last week is the following: I create an instrument on a new track. Then I open the preset browser and move down n-times. That works surprisingly good. In Touch OSC, I can specify which instrument (ID) I want to open and how many times I want to scroll down. So, I currently have a nice touch screen behind my Midi Fighter Twister that let‘s me choose me favorite preset with a single click.

I will post a new release with this feature in the next few days.

Cheers
Martin

PS: I am planning to release a video to show how all this works, stay tuned :-)

Post

Looking forward to the video! :-)

Post

markram71 wrote: Wed Mar 27, 2024 9:05 am … thanks a lot, Kirkwood West, much appreciated. Let me try this out once I am back to my desk. That sound good…

What I have successfully implemented last week is the following: I create an instrument on a new track. Then I open the preset browser and move down n-times. That works surprisingly good. In Touch OSC, I can specify which instrument (ID) I want to open and how many times I want to scroll down. So, I currently have a nice touch screen behind my Midi Fighter Twister that let‘s me choose me favorite preset with a single click.

I will post a new release with this feature in the next few days.

Cheers
Martin

PS: I am planning to release a video to show how all this works, stay tuned :-)
Ohh cool!! Will be super interested in the video :)
I built a Looper for Bitwig! :) https://www.youtube.com/watch?v=-z5ywDo2bU0

Post

markram71 wrote: Wed Mar 27, 2024 9:05 am So, I currently have a nice touch screen behind my Midi Fighter Twister that let‘s me choose me favorite preset with a single click.

Cheers
Martin
You can set your favorite preset to be the default for that instrument/device and no click is needed. So the one click should be your second favorite preset :tu:

Post

Hi Kirkwood West,
thanks a lot for your tip with the "insertFile()" method. It worked! Yeah!

So how does this look like? Let's have a look at the code:

Code: Select all

this.model.getApplication().addInstrumentTrack();
final ITrack cursorTrack = this.model.getCursorTrack ();
final Object[] valueArray = (Object[]) value;
final String filePath = valueArray[0].toString();
final String instrumentName = valueArray[1].toString();
            
host.println("Load Instrument: " + filePath + instrumentName);
if (cursorTrack.doesExist ()){ 
                InsertionPoint endOfDeviceChainInsertionPoint = 	 
                     cursorTrack.endOfDeviceChainInsertionPoint();
                endOfDeviceChainInsertionPoint.insertFile(filePath + "/" + instrumentName);  
}
This snippet here creates a new track, then gets the path and the preset file name from TouchOSC and finally uses the insertionPoint to load the preset into the new track.

So far I was only able to load a preset with the full path name. A relative path name would be more robust. But anyway, it's a great way to load your favorite presets via a touch screen.

You can find the complete code right here
https://github.com/Markram71/Bitwig-Per ... odule.java

That code also contains a method that loads a preset via opening the browser and scrolling down n-times. (see method "addInstrumentPresetbyNumber").

Cheers
Martin

PS: I am still finalizing a few things for the release, video should be ready within the next month...

Post

markram71 wrote: Fri Apr 05, 2024 4:01 pm Hi Kirkwood West,
thanks a lot for your tip with the "insertFile()" method. It worked! Yeah!

So how does this look like? Let's have a look at the code:

Code: Select all

this.model.getApplication().addInstrumentTrack();
final ITrack cursorTrack = this.model.getCursorTrack ();
final Object[] valueArray = (Object[]) value;
final String filePath = valueArray[0].toString();
final String instrumentName = valueArray[1].toString();
            
host.println("Load Instrument: " + filePath + instrumentName);
if (cursorTrack.doesExist ()){ 
                InsertionPoint endOfDeviceChainInsertionPoint = 	 
                     cursorTrack.endOfDeviceChainInsertionPoint();
                endOfDeviceChainInsertionPoint.insertFile(filePath + "/" + instrumentName);  
}
This snippet here creates a new track, then gets the path and the preset file name from TouchOSC and finally uses the insertionPoint to load the preset into the new track.

So far I was only able to load a preset with the full path name. A relative path name would be more robust. But anyway, it's a great way to load your favorite presets via a touch screen.

You can find the complete code right here
https://github.com/Markram71/Bitwig-Per ... odule.java

That code also contains a method that loads a preset via opening the browser and scrolling down n-times. (see method "addInstrumentPresetbyNumber").

Cheers
Martin

PS: I am still finalizing a few things for the release, video should be ready within the next month...
Hell yeah! nice 1!

I will have my OSC stuff ready soon for open source. I just got everything moved over to the Observer Model so its nice and fast in flush(). When its ready I'll ping you... it really makes a lot of this cake of doing any OSC Implementation.
----------------------------------------------------------------------
http://instagram.com/kirkwoodwest/
http://soundcloud.com/kirkwoodwest

Post Reply

Return to “Controller Scripting”