Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lua script requests
#21
(06-07-2017, 12:05 AM)Pro-Doucher Wrote: A script to show/ hide all mixbusses would be cool. If there isn't already a feature for it.

This ought to work, actually.

Code:
function factory (unused_params)
  return function ()

    --Make a new group
    local g = Session:new_route_group("mb")
      g:set_active (false, nil)
      g:set_color(false)
      g:set_gain(false)
      g:set_monitoring(false)
      g:set_mute(false)
      g:set_recenable(false)
      g:set_route_active(false)
      g:set_select(false)
      g:set_solo(false)

    --hit all of our mixbuses
    for s = 0, 11 do
        t = Session:get_mixbus(s)
        assert(t)
        g:add(t)
    end

    --set the group to hide
    g:set_hidden(true, nil)
  end
end

(paste: https://paste.debian.net/970456/)

This turned out to be more complicated than I had anticipated but hey, at least we learned something from it. You can't hide a route using rtav (route time axis view) if it's a mixbus apparently, but you can if it's in a group and you hide the entire group! ¯\_(ツ)_/¯

Note, if you're not a MB 32c user, the for loop will need to be changed to be 0, 7 (we count mixbuses from 0) instead of 0, 11. And if you want to show them again, just unhide them from the group pane.
Welcome to Zombocom
Reply
#22
(06-07-2017, 09:23 AM)Nikolaus Gullotta Wrote:
(06-07-2017, 12:05 AM)Pro-Doucher Wrote: A script to show/ hide all mixbusses would be cool. If there isn't already a feature for it.

This ought to work, actually.

Code:
function factory (unused_params)
  return function ()

    --Make a new group
    local g = Session:new_route_group("mb")
      g:set_active (false, nil)
      g:set_color(false)
      g:set_gain(false)
      g:set_monitoring(false)
      g:set_mute(false)
      g:set_recenable(false)
      g:set_route_active(false)
      g:set_select(false)
      g:set_solo(false)

    --hit all of our mixbuses
    for s = 0, 11 do
        t = Session:get_mixbus(s)
        assert(t)
        g:add(t)
    end

    --set the group to hide
    g:set_hidden(true, nil)
  end
end

(paste: https://paste.debian.net/970456/)

This turned out to be more complicated than I had anticipated but hey, at least we learned something from it. You can't hide a route using rtav (route time axis view) if it's a mixbus apparently, but you can if it's in a group and you hide the entire group! ¯\_(ツ)_/¯

Note, if you're not a MB 32c user, the for loop will need to be changed to be 0, 7 (we count mixbuses from 0) instead of 0, 11. And if you want to show them again, just unhide them from the group pane.


Awesome thanks! works like a charm! You're a genius!

I'll have to try and find a way to show all the mixbusses with one click
Reply
#23
(06-08-2017, 03:27 AM)Pro-Doucher Wrote: Awesome thanks! works like a charm! You're a genius!

I'll have to try and find a way to show all the mixbusses with one click

Well, the nice thing about this script is, since it groups them anyways, you can just tick the box in the groups window that says 'show'.

But... since I'm already in the mood to write something useful, here's a version that checks to see whether or not the group is already hidden and flips it accordingly. Have fun! (note this is kind of sloppy, use at your own risk).

Code:
ardour {
    ["type"]    = "EditorAction",
    name        = "Mixbus Show/Hide",
    license     = "MIT",
    author      = "Ardour Lua Taskforce",
    description = [[Show/Hide Mixbuses]]
}

function factory (unused_params)
  return function ()

    local mb_group = nil

    for t in Session:route_groups():iter() do
        if t:name() == "mb" then
            mb_group = t
        else
            mb_group = nil
        end
    end

    if mb_group == nil then
      local g = Session:new_route_group("mb")
      g:set_active (false, nil)
      g:set_color(false)
      g:set_gain(false)
      g:set_monitoring(false)
      g:set_mute(false)
      g:set_recenable(false)
      g:set_route_active(false)
      g:set_select(false)
      g:set_solo(false)

      --hit all of our mixbuses
      for s = 0, 11 do
          t = Session:get_mixbus(s)
          assert(t)
          g:add(t)
      end
      --set the group to hide
      g:set_hidden(true, nil)
    end

    if mb_group ~= nil then
      if mb_group:is_hidden() == true then
        mb_group:set_hidden(false, nil)
      elseif mb_group:is_hidden() == false then
        mb_group:set_hidden(true, nil)
      end
    end

  end
end
Welcome to Zombocom
Reply
#24
(06-12-2017, 08:56 AM)Nikolaus Gullotta Wrote:
(06-08-2017, 03:27 AM)Pro-Doucher Wrote: Awesome thanks! works like a charm! You're a genius!

I'll have to try and find a way to show all the mixbusses with one click

Well, the nice thing about this script is, since it groups them anyways, you can just tick the box in the groups window that says 'show'.

But... since I'm already in the mood to write something useful, here's a version that checks to see whether or not the group is already hidden and flips it accordingly. Have fun! (note this is kind of sloppy, use at your own risk).

Code:
ardour {
    ["type"]    = "EditorAction",
    name        = "Mixbus Show/Hide",
    license     = "MIT",
    author      = "Ardour Lua Taskforce",
    description = [[Show/Hide Mixbuses]]
}

function factory (unused_params)
  return function ()

    local mb_group = nil

    for t in Session:route_groups():iter() do
        if t:name() == "mb" then
            mb_group = t
        else
            mb_group = nil
        end
    end

    if mb_group == nil then
      local g = Session:new_route_group("mb")
      g:set_active (false, nil)
      g:set_color(false)
      g:set_gain(false)
      g:set_monitoring(false)
      g:set_mute(false)
      g:set_recenable(false)
      g:set_route_active(false)
      g:set_select(false)
      g:set_solo(false)

      --hit all of our mixbuses
      for s = 0, 11 do
          t = Session:get_mixbus(s)
          assert(t)
          g:add(t)
      end
      --set the group to hide
      g:set_hidden(true, nil)
    end

    if mb_group ~= nil then
      if mb_group:is_hidden() == true then
        mb_group:set_hidden(false, nil)
      elseif mb_group:is_hidden() == false then
        mb_group:set_hidden(true, nil)
      end
    end

  end
end

Awesome thanks! I did try it and it worked but I did get a few crashes, don't know if it was the script or just regular old mixbus. You're right though it is just easier to click the show button. Thanks for all your hard work!
Reply
#25
Hmm. It doesn't crash for me even on multiple computers. Are you on 32c or MB4?
Welcome to Zombocom
Reply
#26
Hello! Lua script request: I would like to have a script doing this: when I click on for ex script button nbr 1 all the plugins inserted on channel one will be opened. I know the idea with mixbus is to use mimimum amount of plugins but anyway. I tend to use 1-6 per track and so do others too (I think)
Reply
#27
(05-05-2017, 03:18 PM)Andy76 Wrote: Hopefully this thread will be a place to collect Lua script requests from users.

Lets use numbers to mark our requests in order to scan them more easily. Making the font bold would increase the readability even more.


1. Gainstage all waveforms to -18 RMS.

The idea is to even out the RMS of the files` waveforms in non-destructive way with one click and then finetune it further by ears. -18 RMS seems a good choice to input into analogue emulation plugins.

I know im late to the party here but Russell Cottier did a video on this and produced a script.
https://www.youtube.com/watch?v=r6aQzpJeDf8&t=63s
Reply
#28
I would like to be able to return the playhead to where I started playing, whilst playing Wink

Sort of 'auto return' feature, but without stopping playback.

I guess it could query the 'auto return' state, optionally toggle it on if it was off, and then stop and start playback. If the 'auto return' was previously off, it should be toggled to off again.
Reply
#29
(05-05-2017, 04:45 PM)x42 Wrote: Not a one-click solution, but in object (grab) mode: ctrl+a (select all), Alt+3 (region > gain > normalize) can do this already.

Apart from that, there is such a script already: a snippet "Normalize Regions" comes bundled with Mixbus4.
It be turned into an Editor-Action with minimal changes, but a small problem there is that there's no progress report (the GUI stalls while the script runs). Adding the capability to display script-progress is in the queue.

This is what I've always done, exactly with these keystrokes. Works really well.
Windows 10 64, HP Z-220 Workstation, I7 3770 16 GB RAM, RME Multiface 2, PCIe
Mac OS Sierra, 2012 Mac Mini, i5 16 GB RAM, Behringer XR18
Mixbus 32C 6.2.26
Harrison MixBus V5.2
Presonus Studio One 5
Statesboro, GA, USA
Reply
#30
I'm on it. I have all the building pieces, but something does not work when doing all of them in a row. I hope I will have some time to finish the script soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)