New Tool (3.1): PhraseMate

Trying to collect a phrase of a multi sample instrument which hits are spread across one group, the tool takes a long time processing each sequence. Although the sliced processing option is set to pattern, I still have to click away ‘the script is taking to long…’ notice windows around three times a sequence block.

Btw the source is set to ‘selected instrument’ and destination to ‘same instrument’, notes aren’t replaced by phrases and the collected phrases are set to be looped.

I decided to terminate processing because it was taking to long and I got;

‘C:\Users\pluge\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.PhraseMate.xrnx\main.lua’ failed in one of its notifiers.

The notifier will be disabled to prevent further errors.

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

.\source/ProcessSlicer.lua:122: main.lua:1313: Script execution terminated by user.

stack traceback:

[C]: in function ‘error’

.\source/ProcessSlicer.lua:122: in function <.\source/ProcessSlicer.lua:107>

edit;

tried the same thing with sliced processing set to disabled and eventually terminated the tool as well, which gave;

‘C:\Users\pluge\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.PhraseMate.xrnx\main.lua’ failed in one of its notifiers.

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

main.lua:1865: Script execution terminated by user.

stack traceback:

main.lua:1310: in function ‘allocate_phrase’

main.lua:1865: in function ‘do_collect’

main.lua:1698: in function ‘collect_from_matrix_selection’

main.lua:1418: in function ‘fn’

main.lua:250: in function ‘invoke_sliced_task’

main.lua:570: in function main.lua:566

In the end, the result would probably not be that useful anyway because each separate hit has its own phrase / isn’t merged together to form the complete beat, but though I’d share the bug notices anyway B).

@djeroek: thanks for reporting!

Trying to collect a phrase of a multi sample instrument which hits are spread across one group, the tool takes a long time processing each sequence.

Could you PM me the song? Would be very useful to tracking down this bug…

Chickycheck the pm B)

Ah, it’s maxing out the number of phrases you can create in a single instrument (126).

PhraseMate should skip those phrases (and issue a warning) - don’t know why it doesn’t… that’s definitely the cause of the problem.

I’m getting this fairly frequently. At the moment all it takes is open renoise and then press the close button, then this pops up:

'/home/alex/.renoise/V3.1.0/Scripts/Tools/com.renoise.PhraseMate.xrnx/main.lua' failed in one of its notifiers.
The notifier will be disabled to prevent further errors.
Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance...
main.lua:2392: attempt to index global 'rns' (a nil value)
stack traceback:
 main.lua:2392: in function 'detach_from_song'
 main.lua:2459: in function <main.lua:2457>

I’ve seen something that looks like that too, when quitting Renoise or making a new file. I’ll take a closer look next time it happens.

I’m getting this fairly frequently. At the moment all it takes is open renoise and then press the close button

Thanks. From a quick glance at the code I can see why it would happen. But - I’m using the tool myself, so it’s a bit spooky that I’m not getting those error messages here.

That’s definitely why it slipped under the radar :ph34r:

I don’t know if this is a bug, but it’s certainly behavior that could be changed to make it way more useful to me :slight_smile:

Scenario: I’ve got the instrument on program mode, and play G-4 0Z01 to transpose pattern 01 up 7 semitones. Then I run PhraseMate’s “write pattern to selection”

Expected: it writes the pattern to the selection, transposed

Actual: it writes the exact pattern

So if I have all C-4 notes in my pattern, I would expect “write pattern” to result in all G-4 notes (because I played a G-4 in the pattern editor). Instead it writes all C-4 notes.

There might be a special case too (I don’t know) with ghost phrases: where I initially play C-4 01 0Z01 and follow it with G-4 __ 0Z01 – which continues the pattern, but transposes it.

If PhraseMate could write out the transposed pattern, it would become even more insanely useful to me :slight_smile:


I will put together a short XRNS that shows exactly what I want it to output, I think that’ll be more helpful.

Edit: I think I’ve misunderstood how writing phrases is supposed to work. I thought I could put the phrases in the pattern editor, and then writing phrases would “explode” them and replace each phrase with the corresponding notes. But it looks like it just replaces them with the currently selected phrase.


I think there’s definitely a bug writing phrases to a track when using keymap mode.

Setup: I have two phrases each assigned to a key in keymap mode. I have a 20 line (hex) pattern. On line 0 I play C-0 and on line 10 I play D-0. I select the whole pattern and choose “write phrase to selection in pattern”

Expected: PhraseMate writes out the phrases exactly

Actual: PhraseMate skips the first line of the second pattern. More specifically, it fails to write the note of the first line. It enters the instrument number on line 10 but not a note number.

Yup, PM is currently just ‘dumping’ the phrase into the pattern. It’s definitely planned to make this part more sophisticated!
A lot of the groundwork is already done, but also fraught with edge cases. So realistically it will eventually be able to what you ask, but limited to a single ‘source’ note column.

I’m currently refactoring some of my tools, PM included - so much shared code going around… will take a look at the issue you reported, after this is done

Yeah, once I understood how output worked, I was able to get some good stuff going with it.

In a nutshell, here’s the workflow I’m looking for:

  1. Write patterns

  2. Select all patterns and extract to phrases

  3. Wriite new patterns using phrases

  4. Select all patterns and expand phrases to patterns

1-3 are a reality and super quick today. 4 is the missing piece right now.

Anyway, the more I use PM, the more I love it, so thanks for all your hard work! Renoise + PM is helping me compose in a way I’ve dreamed of for a long time.

Just a little teaser - almost done with a bunch of new features for PhraseMate.

Property tab : (batch-) apply properties to all phrases in instrument.
Supports all phrase properties, including LPB, number of lines, looping etc.
This is cool, e.g. when you want to double the tempo of all phrases.

props_tab.png?raw=1

Preset tab - batch import and export of phrase presets (.xrnz files)
Much easier than having to save/import a single preset at a time…

presets_tab.png?raw=1

The (MIDI-mappable. keyboard shortcut-able) phrase navigation in the top also have gotten “remove” and “insert” buttons. Perhaps it should have duplicate too?
New phrases are created according to settings specified in the “New” tab.

I’m also going to take a good look at the Zxx implementation. My ideas:

  • Allow “any” instrument to have Zxx command added (not just the selected one)
  • Optionally: prefer the local effect-column (the one associated with the note-column)

As always, ideas and suggestions are welcome!

As always, ideas and suggestions are welcome!

https://forum.renoise.com/t/idea-macros/32135

You would launch the tool with a hotkey combo, a prompt shows up, you enter something and the script will import the data from the textfile with the same filename as something.That way we could build complex sets of data for e.g. chord progressions or whatever.

So for example if you wrote “Fsus4” at the prompt, the script would look for a textfile called “Fsus4.txt” (or just “Fsus4” without the .txt extension) and insert whatever is in that file into the pattern editor (at the cursor).

Very cool, I like it. Pretty sure I’d never have thought about such a streamlined option. And indeed, this tool already provides much of the necessary “wiring” (assuming, of course, that you can limit yourself to phrases - the language that this tool speaks).

The way you describe it, it’s more or less a question of specifying an “import folder” and then doing some on-the-fly matching against the contents of this folder as you’re typing…

But I would also like to do the same thing for phrases within instruments that are already loaded into Renoise (i.e. not having to save presets to disk first).

Here is a preview of the next PhraseMate, v1.7
Attachment 6998 not found.
Edit: the stable release is now up at the tool page

It contains the largest set of new features yet, and a number of stability improvements

FEATURE Anchor to selection more refined, now works both vertically and horizontally
FEATURE Continuous paste now able to recreate looped phrases
FEATURE ‘Smart write’ dialog (text-based phrase browser, supports saved .xrnz files)
FEATURE Ability to batch-apply properties to phrases (set or transform values)
FEATURE Import and Export of individual presets and entire preset banks
FEATURE “Insert” and “Remove” phrase buttons + more MIDI mappings
FEATURE Output: include Z00 command to ignore/disable phrase playback
FIXME Write to pattern: “expand columns” was broken in some scenarios
FIXME Continuous paste: last line is skipped
FIXME Auto-assign to keymap do not supports keymappings with gaps
FIXME When applying to selection, always output at the track containing the selection
CORE Refactored code to make more use of classes (xLib,vLib+cLib)

https://forum.renoise.com/t/idea-macros/32135

Done! It’s called the Smart Write dialog, and can be launched via keyboard shortcut or found in the ‘Write’ tab

smart_write.png?raw=1

Basically, it’s an auto-completing text dialog which searches through either (a) the instrument phrases or (b )phrases that are located in the ‘export path’ (export of phrases is another new feature)

It’s designed to be completely keyboard driven. In the picture above, I’ve entered “m”, and the dialog responds by showing the two saved entries matching this letter.
Pressing Return will select the first entry. You can also use the popup to select between all matching entries.

Once selected, pressing return again will apply the phrase, using the settings specified settings in the ‘Write’ tab
Also, while the dialog is focused, pressing TAB will bring focus to the text input and allow another search.
ESC closes the dialog.

‘C:\Users\MIKEHAM\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.PhraseMate.xrnx’ failed to execute in one of its menu entry functions.

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

main.lua:426: attempt to index global ‘phrasemate’ (a nil value)

stack traceback:

main.lua:426: in function ‘show’

main.lua:85: in function main.lua:84

@Akiz: Good catch. This should be easy to fix.

Only, I wonder how you made it happen… Did you double-click the xrnx to launch/install it in Renoise?

Did some smaller tweaks and released v1.7 (see changelog)

A new feature is that you can choose to launch the tool at startup, but without showing the GUI.

This is pretty handy if you like the automatic insertion of Zxx commands, but can’t be bothered to see a dialog pop up every time you start Renoise.

Grab it from the tools page

Another release, v1.71.

As usual, grab it from thetools page(or add it to the tool updater).

Fixed a bug that would cause exports to be saved into an illegal location when export path not set.
Instead of complaining it would happily export to a folder called “:warning: Please select a path!” :blush:

Also, I added a feature to strip the prefixes that can (optionally) be set on export.
Should make presets survive a trip through the whole export/import/etc cycle without getting their names screwed up.

Finally, the keyboard shortcuts and MIDI mappings also had some trouble. Fixed that as well.

Excellent work being done here. What a fantastic tool!

In particular, the PhraseMate Smart Write update is very… well, smart. :wink: Lots of potential there.

To speed things up even further, the following two functions would be lovely:

(1) In the “Enter name of phrase field”: Allow the auto-complete/search to be optionally checkboxed for becoming hidden and disabled, only allowing for the precise manual text input + Return.

(2) In the “Mode” pull-down menu: Allow for a new option - Insert at pattern editor cursor. Meaning a one shot (1X times) writing at the current editor cursor position in the pattern editor. Would speed up things in the workflow quite a lot.

I’ll continue to test drive this tool further this next week when I have more time to explore it in depth.