New Tool (3.4) command_palette

I see, thanks for the report. Once I have a bit of time I’ll make a test tool with just a text window to see if it’s something about the tool or something specific to the fairly new Mac port of Renoise.

In the meantime if anyone else could tell me how this behaves on their setup it would be useful to narrow it down.

Just updated to the latest version…just wanted to say thanks again for the tool. I use it daily!

I’m affected this issue too (on mac) and believe i’ve found the source:

@unless if I comment out this line, leaving the command palette open, the newly opened text dialogue is focused.

What I think is happening, is the new text prompt is opened, then the old dialogue is closed - on mac, this makes the main window regain focus.

I’m working on a fix for this now and will probably open a PR against your repo if that’s cool with you!

OK, here’s the code for a working fix,

main.lua:

elseif msg.type == "finish" then
		--  set callback to execute command after dialog is closed
		o.callback = function(exit_code, m, o)
			local command = m.list[m.selected]
			-- print(m.initial)
			local result = command.run(song, m.argument, m.initial)
			if m.argument ~= nil then
				command.finish(renoise.song(), m.argument, m)
				table.insert(m.history, 1, command_call(command.alias, m.argument))
			else
				if command.type == "action" or command.type == "string" then
					command.finish(renoise.song(), nil, m)
					remember(command.alias, nil)
				end
			end
		end

		return CommandExitCode.SUCCESS
	elseif msg.type == "crawl_history" then

The command execution logic has been moved into the handly callback you provided. This callback is invoked after the command palette is closed (I can’t remember how much of this i added, will consolidate into a PR when I have time)

lui.lua:

  o.process = function(m, msg, o)
    local exit_code = o.update(m, msg, o)
    if exit_code == CommandExitCode.CONTINUE then
      o.render(m)
    else
      if o.window.visible then
        o.window:close()
      end
      if o.callback then
        o.callback(exit_code, o.model, o)
      end

Hey, thanks @muximori! Give me a few days to check this, I am not at my PC right now.

1 Like

PR is up here: -Fix an issue on mac where text prompts aren't initially focused by deferring... (!1) · Merge requests · unless games / unless_renoise · GitLab, I’ve applied the fix to the main palette and the paramater palette, I believe there are still some unfixed cases.
I’ve also expanded the “load plugin” feature to be able to select “none”, i.e unload the plugin. Unsure if it should be included in this PR

EDIT: This tool is making me enjoy renoise a whole not more, especially now I have a handle on the code. I’ve added a “new sample” command and my next goal is to add a palette similar to the DSP/fx parameter palette for sample properties and modulation sets.

version 2.0.2 - focus on Mac

Merging the fixes provided by @muximori to handle secondary popups not receiving focus on Mac.

While the fixes are simple and make complete sense from the code, unfortunately I don’t have access to a Mac to actually verify they work as intended (on Linux both the previous and post-fix versions work fine for me).

@neutron hopefully this will solve the problems you’ve reported previously!

1 Like

Thanks again, your commits are merged now, I also added you in the readme and a GPL license file to make the legalities of code contributions clear for the future.

Unloading a plugin makes sense, haven’t thought about that, but maybe it should be a separate command?

Being able to set samples and their properties would be handy as well.

Feel free to send more pull requests.

1 Like

This really is a great tool, it almost feels like a native feature. It’s a small detail, but I think the command and parameter lists would be a little easier to read if they were left-aligned.

cp pp

1 Like

version 2.0.3 - alignments :straight_ruler:

  • uniform column-sizing similar to the mock-up provided by @detektiv_plok above

  • new command unload plugin to remove a loaded plugin from an instrument as proposed by @muximori

2 Likes

version 2.1.0 - looping back :arrows_counterclockwise:

new loop related commands and the beat looping revived from version 1

  • set the block loop as fraction like on the Renoise UI
  • toggle block looping
  • set the loop based on your current selection
  • set the loop by relative beats (for example 2 will loop the beat at your cursor and the next one, -3 will loop the previous 3 beats etc)

Unfortunately the looping part of the API in Renoise behaves somewhat unexpectedly but these commands might still be useful.

other commands

  • add a new empty sample
  • remove the selected sample
  • toggle groove on master
  • set the track headroom
  • set master volume
  • toggle single track edit view
  • set instrument properties (volume, transpose, monophony)

fixes

  • fixing some commands reverting to an incorrect value when canceled
  • adding modulation to the selected set instead of the first one
  • focusing the sampler when adding modulations
  • include None option on the plugin selection palette

Thanks to @muximori for contributing some of these fixes and commands and inspiring me to add the rest.

2 Likes

version 2.2.0 - improved parameter palette :level_slider:

  • the DSP device parameter palette can now write hovered/edited parameter value into the pattern using Ctrl+Enter
  • allow switching between tracks while keeping the palette open with Alt+Up Alt+Down (Option on Mac) in addition to the existing DSP device switch

additional commands

  • toggle keyboard velocity
  • toggle track collapse
  • toggle group collapse
4 Likes

version 2.4.0 - palette shortcuts, steps & fixes :shorts:

Following a discussion about possible gamepad controls for Renoise, I’ve made some additions to this tool that makes it better to be used in tandem with limited control devices (the changes are useful with a keyboard too).

  • added a few keybindings to open most common palettes without having to go through the main palette to get them, like selectors for samples, devices, instruments, plugins, tracks etc.
  • for numeric value settings you can now press Alt+Up/Down (Option on Mac) to step the value similar to my my other tool value_stepper, this makes the number based selectors more useful when you don’t have access to numeric input
  • made it so that number setters like BPM, velocity etc. will open a text field popup similar to renaming commands if you execute them without input
  • changed the select phrase command so that it lets you pick phrases from the entire project similar to the sample selector
  • added midi mappings to mirror each existing keybinding (further work is needed here to let midi actually control the palettes themselves)
  • select pattern command will omit patterns from the list that aren’t in any sequence (like if you only use pattern 3, 5 but not 4) since you can’t select those anyway.
  • fixed a few edge-case crashes when trying to open various selectors in an empty project

If you think some other command should also be accessible as a shortcut, let me know!

downloads and source on my manual page

2 Likes

@unless It seems like a pretty good fix/feature addition.
It means that even if you don’t remember the target command, it is now easier to find it with a partial search.
thanks!

It might be more useful to be able to use Pagedown/Pageup.

1 Like

Well, the search functionality was there before this update already, the short codes like t etc are just there to allow for “motions-like” input as they take predence over the search.

I might add pageup/pagedown later, currently I’d like to make it so that the basic navigation would work via midi as well because right now everything is tied to keys.

1 Like