Default Settings - generic script for adjusting project defaults ("Look mum, no devices!")

Post Reply New Topic
RELATED
PRODUCTS

Post

Hello there,


I came up with a script for making some default settings. It involves no hardware devices, but controls various aspects of BWS from the Studio I/O panel (in the right hand side browser).

At this point, it's pretty much a hack, but I thought I'd share it already, since from what I gather, I'm not the only one who would like having some stuff behave differently by default.

Put the script in the controller script folder and it will appear in
Preferences->Controllers->Add controller manually->Generic->Default Settings.
Modify the script itself to make your own default settings, they are set as variables at the top of the script.

Here's what it looks like right now:

Image

I suppose that pretty much sums it up. There's an option for a new default tempo and metronome volume, disabling the "Audio mon." part will make sure that BWS doesn't monitor audio inputs, and the rest of the options are about overdubbing and setting the clip launcher's post recording actions.


In the script there's large sections that are commented out and uncommenting them will reveal these extra options:

Image


Now, the thing is, it probably doesn't behave the way you'd expect it to behave. And that's what I'd like to have some help on. Right now, there are no observers that look after if any of the settings are changed from somewhere else in the program. This leads to a situation in which those settings occasionally get reset to the defaults defined by the script. In some situations that really even doesn't matter, but in some, it can be irritating because you need to make those settings again. The irritation can be somewhat avoided by using the Studio I/O panel to make those changes, instead of wherever those settings are made in the main program.

The thing I need some help with is those observers. For instance, look at this snippet:

Code: Select all

arrOverDub = doc.getEnumSetting("Arranger", 'Recording', ['Overdub', 'Record new'], _arrOverDub);
arrOverDub.addValueObserver(function(value){
  if (value == 'Record new') { transport.setOverdub(true) }
  else { transport.setOverdub(false) }
})

transport.addOverdubObserver(function(value) {
  if (value == true) {arrOverDub.set("Overdub")}
  else {arrOverDub.set("Record new")}
})
That looks simple enough, but what that does is it creates a loop in which the setting gets set on and off until infinity. I reckon the logic there is that arrOverDub triggers transport.setOverdub() and at the same time, the transport's addOverdubObserver() sets the arrOverDub to a new value, but by the time that happens, BWS has already made a change to the overdub settings, which then gets sets again by the transport's observer. I would need to create some sort of functionality that allows arrOverDub to be set by the button on the main interface, but as it is now, it doesn't really work.

If someone comes up with a logical way to make it work, I would really appreciate it since then this script could be really useful. It's already somewhat useful, but.. not exactly useful the way I'd like it to be.

However, since the downside of not having any observers is that the settings occasionally get reset, it can also be beneficial in some situations. Right now, for instance, setting the Panel to Mixer will always bring up the mixer when the project has focus. You can for instance make it so that the arranger is all you see, no matter the project, and that just might be useful in some places (like when playing live, for instance). So perhaps it's something to look into, if you want to make a script that customises the main interface for a specific session.

Another thing that is just plain ridiculous is the function for looking if the project is new (which leads to setting the tempo to the new default). That could definitely use some looking into.


Please share modifications, if you find this useful.

The download is available below.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “Controller Scripting”