New Tool (3.1): ScaleMate

  • “managed to put this together in a little hacking session last night”

7433 v0.2-dialog.png

Download most recent version(tool page)
Source code and documentation(github)

Simply great and usefull ! Thanks a lot.

Got this after playing with it, closing down the gui and booting it up again from the tool menu;

'C:\Users\pluge\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.ScaleMate.xrnx' failed to execute in one of its menu entry functions.

Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance…

std::logic_error: ‘trying to access an already closed dialog. the object is no longer available.’

stack traceback:

[C]: in function ‘show’

.\source/ScaleMate_UI.lua:66: in function ‘show’

main.lua:155: in function ‘show’

main.lua:61: in function main.lua:60

Got this

Thanks! Fixed and uploaded a new version…

Very nice

Thaks

Hi Danoise

I think it’s missing filtering for the type: track (sequence). For “group”, “master” and “send” give back a error for not having note columns.

.\source/xLib/classes/xLinePattern.lua:422: attempt to index local 'note_col' (a nil value)
stack traceback:
  .\source/xLib/classes/xLinePattern.lua:422: in function 'set_midi_command'
  .\source/ScaleMate.lua:92: in function 'write_scale'
  .\source/ScaleMate.lua:55: in function 'set_scale'
  .\source/ScaleMate_UI.lua:146: in function <.\source/ScaleMate_UI.lua:145>

Thanks for your tools! ^_^I will certainly look at the code for some details for my tool.

It will also listen for the selected scale and show it in the UI.

What do you mean by this exactly?

I think it’s missing filtering for the type: track (sequence). For “group”, “master” and “send” give back a error

Oh, I completely overlooked this detail.Thanks!

Edit: uploaded a new version (0.12) that fixes this problem.

This release also adds key-handling for the tool dialog - basically, the most fundamental pattern shortcuts: arrow keys, tab etc.

What do you mean by this exactly?

The tool is nothing more than a breakout console for quickly showing/selecting instrument scales.

And of course, a quicker way to enter those pesky scale commands into the pattern (MIDI command - CC command #15).

I guess you were hoping for something like analyzing the pattern contents and guessing what scale(s) you’re working in?

Sorry, nothing that fancy yet. Might have to get laffik on board to solve that riddle :wink:

Somebody should hack it to the “scale transposer tool” :]

I guess you were hoping for something like analyzing the pattern contents and guessing what scale(s) you’re working in?

Sorry, nothing that fancy yet. Might have to get laffik on board to solve that riddle :wink:

Ah yes, that is what I thought you meant originally.

Nevermind, still a handy tool, thanks.

I guess you were hoping for something like analyzing the pattern contents and guessing what scale(s) you’re working in?

Sorry, nothing that fancy yet. Might have to get laffik on board to solve that riddle :wink:

It’s a simple brute force operation of just using a scales table and find the best match (top ratio of matching notes vs non-matching notes = most probable scale).

Some scales do have the same notes, and you will “never” be able to distinguish them with an algorithm. You could show a list sorted on note matching ratio. Also, if the match is 100% for two scales, it should prefer the scale with fewer pitch classes.

It’s a simple brute force operation

I believe it could work, but only in ideal circumstances - imagine that you’re going through a chord progression? There could be a lot of notes to choose from.

Then, suddenly, the likeliness of a given chord vs. another chord becomes an important factor as well.

But perhaps you are right and a brute-force, statistics-based approach could be a powerful ally too. Let it crunch some numbers and offer you a few choices.

What I would like to do next is to introduce a feature to fit/remap existing notes to a scale. It’s such a basic thing that you’d expect from a tool like this.

Oh, and a small piano keyboard at the top, indicating the current key just like we have the scales.

  1. You should analyze a chord progression. The more notes, the more reliable the top match will be. The most optimal is to analyze the whole song except for atonal sounds (percs).

  2. Are you planning on doing some more elaborate reharmonization, or just a simple “snap to closest note in new scale”? (Renoise already does that natively, right?)

just a simple “snap to closest note in new scale”?

Yes, it would be simple - as in, “what you hear is what you get”. If you switch to a scale and like what you hear, you should get the same result by applying the scale.
The advanced thing about the implementation would be to make the tool examine all tracks as it applies the scale - as there can only ever be one active scale at a time, it could still be defined across tracks.

(Renoise already does that natively, right?)

Yes and no. The instrument scale is a trigger option - meaning, it’s applied when you liveplay/record notes, but not inplayback/editing.
There is an exception to this, however: when you’re using phrases, Renoise willsnap to notes (in the phrase) in realtime. Standalone notes in the pattern are still played back as-is.

So this tool would obviously affect the standalone notes, but not necessarily have an affect on notes that trigger phrases.

The most optimal is to analyze the whole song except for atonal sounds (percs).

I dunno, what would be the best way to separate melodic and percussive/atonal material anyway - short of analyzing the actual samples ?
IMO, you managed to demonstrate justhow big a can of worms it could become. All for the sake of telling you which chord you might_be using ^^

Yes, it would be simple - as in, “what you hear is what you get”. If you switch to a scale and like what you hear, you should get the same result by applying the scale.
The advanced thing about the implementation would be to make the tool examine all tracks as it applies the scale - as there can only ever be one active scale at a time, it could still be defined across tracks.

Yes and no. The instrument scale is a trigger option - meaning, it’s applied when you liveplay/record notes, but not inplayback/editing.
There is an exception to this, however: when you’re using phrases, Renoise willsnap to notes (in the phrase) in realtime. Standalone notes in the pattern are still played back as-is.

So this tool would obviously affect the standalone notes, but not necessarily have an affect on notes that trigger phrases.

Ah… Big picture: I’m not sure how musically useful this kind of “reharmonization” really is. It doesn’t seem too interesting to me, but I haven’t tried it so I can’t say for sure. To me, the Renoise scale feature seems like a real cheapo that makes more harm than good, so I probably shouldn’t say too much in this matter and in this thread :slight_smile:

I dunno, what would be the best way to separate melodic and percussive/atonal material anyway - short of analyzing the actual samples ?
IMO, you managed to demonstrate justhow big a can of worms it could become. All for the sake of telling you which chord you might_be using ^^

Yeah, you have to someway define what track you want to analyze. But a patterntrack with 4 chords will in many cases be enough to make a good guess on what key/scale that is being used. So analyzing a couple of patterns in selected_track_index should be enough imo. For melody, I would imagine that typically it would require just a little bit more scope to make the guess (depending on song of course). The user would have to take responsibility for selecting a harmonic/chord/melody track.

All for the sake of telling you which chord you might be using

This is not a matter of chords, I think? Chord recognition is a different beast where you don’t absolutely have to know what key you’re in. That’s also just simple search & match, with a table defining interval structures (e g, 0, 4, 7 = major - 0, 4, 7, 11 = maj7, + all inversions).

To me, the Renoise scale feature seems like a real cheapo that makes more harm than good

Well, yes. This tool can’t solve a fundamental problem that the scale implementation has. For that, you’d have to have something like an interval-based input method instead of fixed notes.
I mean, from a guitarists point of view you are strumming the strings and applying scales with the other hand. So here, each string is not representing a particular note - this is fundamentally different from playing on a piano.

Edit: and this would also be the reason why isomorphic layouts have become so popular. They fit better with this fluid scale concept than a piano ever could.

But on a more practical level, I think part of the problem with the scale feature is that has been so out of reach - a gap that this tool aims to fill.

New release, v0.2

I added a small piano that visualizes the scale/key arrangement.

Also detects changes to, and allows recording of scale-key in exactly the same way as the scale-mode.

Going to put this one on the tool page if no more issues are discovered:

Some minors:

  1. I installed the tool, set the shortcut and opened it while in master track. The tool didn’t work correctly until Renoise was restarted (nothing in the GUI really selectable).

  2. The button next to the scale names is not quite wide enough to hide the ‘radio box’ in vb:chooser (1 pixel too narrow). Maybe it’s dependant on theme setting, or I changed some font in the Renoise settings.

(PS. Technically, I think you can tie a vb:checkbox to a label for label-click support. Then adding a normal button on top of that seems like a slightly cleaner hack)

@Danoise, are the 12 piano keys buttons?

  1. How do you get that they only have 1 pixel of separation between them???
  2. Is it possible to remove 1 pixel box around each button or similar element???

I could substantially improve the GUI of my tool with these details…

  1. I installed the tool, set the shortcut and opened it while in master track. The tool didn’t work correctly until Renoise was restarted (nothing in the GUI really selectable).

Apparently some tools do not work well after installing. Need to restart Renoise or restart tools (Reload all Tools). Possibly have to see that before had an earlier version of the tool already installed, without removing. Maybe?