New Tool (3.1): ScaleMate

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?

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)

  1. Thanks. I’ll add an additional “attach_to_song” call when initializing the tool. Won’t hurt.
    (To answer Raul:) I think tools don’t receive the “new_document” notification when when first installed. And some tools (including this one, heh) could expect/rely on this to work properly.

  2. I’m already tying the checkbox to a text field - there is no “chooser”. This allows you to style the text - something which is not possible with buttons.
    I simply forgot that the tying of checkbox ↔ text works fine when the checkbox is set to “visible = false” - using this approach in vLib too.

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

Yes, they are buttons. Everything you ask should be possible by using negative margin/spacing. I’m specifying a spacing of -3 to get them to line up perfectly.
And I guess you could encapsulate buttons in a rack (row/column) with a negative margin too, to remove the border. Haven’t tried this myself but it should work.

Yes, they are buttons. Everything you ask should be possible by using negative margin/spacing. I’m specifying a spacing of -3 to get them to line up perfectly.
And I guess you could encapsulate buttons in a rack (row/column) with a negative margin too, to remove the border. Haven’t tried this myself but it should work.

I remember reading something related in a forum long ago (negative values in margins and things like that), but I did not know exactly how to do it.Ok, with this method it is possible to compact the tools more, or the buttons are a little wider, and the GUI cleaner. I like it! :smiley:

  1. Thanks. I’ll add an additional “attach_to_song” call when initializing the tool. Won’t hurt.
    (To answer Raul:) I think tools don’t receive the “new_document” notification when when first installed. And some tools (including this one, heh) could expect/rely on this to work properly.

Ok, this is a detail that I have not even tried on my tool :o. I will have to check it out.

Thanks!!!

Side note :Yesterday I managed to use a 6-second timer to add a status foot that covers all the functions of a tool. It is very similar to the foot of Renoise, to the left side of the logo “Renoise”. I find this very useful for tools that do several things, informing the user of the operation just made with the tool.Whenever it may be useful, I invite you to use it in the tools, instead of “renoise.app():show_status( “status” )”.I love that the tools are compact. But sometimes it’s hard to understand, given the complexity of some functions.

  1. Thanks. I’ll add an additional “attach_to_song” call when initializing the tool. Won’t hurt.
    (To answer Raul:) I think tools don’t receive the “new_document” notification when when first installed. And some tools (including this one, heh) could expect/rely on this to work properly.

  2. I’m already tying the checkbox to a text field - there is no “chooser”. This allows you to style the text - something which is not possible with buttons.
    I simply forgot that the tying of checkbox ↔ text works fine when the checkbox is set to “visible = false” - using this approach in vLib too.

Both are done and uploaded to tool page:

http://www.renoise.com/tools/scalemate

I have a feature request that might fit into this tool.

A search mode that works in reverse (perhaps in a separate dialogue?), finding scales by clicking/toggling the keys on/off on the keyboard.

  1. Click the keyboard buttons to toggle them on/off

  2. A search result of matching key-scales is presented. (It’s “one-way exclusive”, so the chromatic scale will appear no matter what you search for.)

  3. Some kind of mini-keyboard next to each search result would be nice, to quickly get a feel for how much that is matching the search.

Other than being a simple search-for-scale feature, this is harmonically helpful to quickly identify when a harmony/melody is ambiguous. Or for finding how to make it ambiguous on purpose.

Wait, so you’re basically looking for a way to locate matching scales by inputting notes, one by one.

I guess it could be implemented exactly as that, labelled either “filter” or “search”.

Something to think about.

Really nice tool tank you!

Would therebe a way to make it work with vsti plugins? For now CC14 and CC15 controlling key changes are ignored when a vsti is loaded in the instrument slot, or if midi signal is routed somewhere else :mellow:

The GUI is MIDI mappable so it’s possible to control it externally.

I know, not exactly what you asked for - but then I’m not sure how you are using those CC messages in the first place.

Are you perhaps automating changes from a MIDI control device? Or in realtime, from some controller?

It would be in a live situation. Playing keyboard and having scale settings changing dynamicaly with the playing song to havoid hitting notes outside of the scale

It would be in a live situation. Playing keyboard and having scale settings changing dynamicaly with the playing song to havoid hitting notes outside of the scale

The tool writes those commands into the pattern. So, if you’re recording at the same time the notes will be restricted to the scale - but it won’t modify existing notes (unless triggered via a phrase).

https://forum.renoise.com/t/make-scales-scalekeys-usable-w-o-a-phrase/48438

So I would map the scale buttons in the tool GUI to whatever scales you need while playing, and then it should work - plugin or no plugin?

@danoise After looking through the github for this I just realised who you are, I’ve chatted with you about sononym via email a few times and didn’t know you were danoise!

Is this tool abandoned? I’d love to have some of the Japanese scales like Insen, Hirajoshi and Iwato available. I had a look through the code and can see that xScale contains the scales, which I could add to, but I’m not sure how get from that to a tool, does it need building somehow?

1 Like

Mostly abandoned, yes, but making changes like the one you mention should be pretty trivial.

The code isn’t compiled, it’s just plain .lua like all my other tools. So, to add your own scale, just install the tool, and modify the code in-place :slight_smile:
And perhaps, do yourself a favor and enable the scripting tool menu in Renoise (there is documentation on how to do this elsewhere) because then you can edit the source code and easily reload the tool from within Renoise :slight_smile:

That’s really handy and easy, thanks!

1 Like