New Tool (3.1): PhraseMate

New version (v1.52) is up, fixing all reported issues (?)

New in this version is sliced processing. Instead of it locking down the entire UI, progress is shown in the status bar.

Using the lates version;

‘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:130: std::logic_error: ‘invalid phrases index ‘9’. valid values are (1 to 8).’

stack traceback:

[C]: in function ‘error’

.\source/ProcessSlicer.lua:130: in function <.\source/ProcessSlicer.lua:115>

selection in matrix

capture all instruments

same instrument

replace notes with phrases

edit;

Got this one in another track during processing;

‘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:130: main.lua:1059: Expected instr_idx to be a number

stack traceback:

[C]: in function ‘error’

.\source/ProcessSlicer.lua:130: in function <.\source/ProcessSlicer.lua:115>

Selection in matrix

capture all instruments

Same instrument

include empty phrases

include duplicate phrases

replace notes with phrase

Indeed, I can make it bug out as well - but only when I disable both include empty + duplicates

Does it work when both of these are enabled?

check the edited post above, there both are enabled giving the ‘Expected instr_idx to be a number’ error. It’s from another song as the initial report though, so not sure having both enabled means something in relation.

Third follow-up, squashing bugs as they appear.

FIXME Missing updates of phrase info UI when not in realtime mode
FIXME Error when performing “capture_all” with empty + duplicate phrases
FEATURE Customizable process slicer : disable, once per pattern or pattern-track

I also made the process slicing optional. You can now decide how often generate undo points :slight_smile:

I don’t understand what the slice processing option means… but in any case, the update seems to solve the problem I brought up earlier :slight_smile:

I’m really looking forward to using this from now on. Thank you so much!

I don’t understand what the slice processing option means…

When running the tool collecting everything on a finished song, it can take a while to finish…you’d be clicking away a bunch of ‘script is taking to long’ notices in the process. The slice processing feature gets rid of these notices, I think at the expense of taking somewhat longer(?), but it is optional now…so choose your destiny :slight_smile:

When running the tool collecting everything on a finished song, it can take a while to finish…you’d be clicking away a bunch of ‘script is taking to long’ notices in the process. The slice processing feature gets rid of these notices, I think at the expense of taking somewhat longer(?), but it is optional now…so choose your destiny :slight_smile:

Okay. So what do the different options mean? Does “Disabled” mean that I won’t have to click the notices away (but it may take a bit longer)?

@danoise the only remaining suggestion I have for you is how it handles duplicate phrases when you disable “include duplicate phrases”. Currently, if you have duplicate patterns then it will insert a 0Zxx command in the first pattern, but not in the second one. And in fact this comes up as a bug if you have patterns ABBA – it won’t insert a 0Zxx in the second B, or in the second A. So when you play it back, you effectively get ABBB.

Perhaps I’m misunderstanding what the “include duplicate phrases” option is intended to do. But it seems useful to not create duplicates if you don’t need to… so I think PhraseMate needs to insert a 0Zxx for the correct phrase when it detects a duplicate.

I hope that makes sense…

So what do the different options mean? Does “Disabled” mean that I won’t have to click the notices away (but it may take a bit longer)?

Try it out :slight_smile: , disabled means it won’t slice process, so you’ll get the ‘taking to long’ notices running the tool on large content sweeps, pattern will process one pattern at a time (less undo’s), patt-track will process every matrix block independently (more undo’s).

Perhaps I’m misunderstanding what the “include duplicate phrases” option is intended to do

Let’s say you’re creating phrased instruments from already finished songs, collecting every pattern-track inside. Having duplicates (or empty pattern-tracks) included can save having to manually ctrl+d duplicate a phrase, if you’d quickly like to create variations. It is more an option geared towards content creation I think.

Try it out :slight_smile: , disabled means it won’t slice process, so you’ll get the ‘taking to long’ notices running the tool on large content sweeps, pattern will process one pattern at a time (less undo’s), patt-track will process every matrix block independently (more undo’s).

I tried but it kept raising an error “expected instr_idx to be a number”. Try out the DemoSong – Daed – Bears and you’ll see the same thing. I selected everything in the pattern matrix, right-clicked and chose “Create phrase from selection”.

Other songs work fine though. I dig the Patt-track behavior.

Let’s say you’re creating phrased instruments from already finished songs, collecting every pattern-track inside. Having duplicates (or empty pattern-tracks) included can save having to manually ctrl+d duplicate a phrase, if you’d quickly like to create variations. It is more an option geared towards content creation I think.

Okay. That makes sense (I think). So I create two patterns with duplicate content. PhraseMate creates two phrases that are duplicates of one another. Then I can modify one without messing with the other one?

I definitely prefer the behavior when it’s disabled, where it doesn’t create a second phrase. But as mentioned above, I think it’s buggy – it should insert a 0Zxx command for the duplicate phrases.

Try it out :slight_smile: , disabled means it won’t slice process, so you’ll get the ‘taking to long’ notices running the tool on large content sweeps, pattern will process one pattern at a time (less undo’s), patt-track will process every matrix block independently (more undo’s).

Yes, exactly. You should only have to muck around with this if you are getting a “Script is taking some time to process” dialog from Renoise.
To further illustrate the point, I made a quick couple of GIFs.

sliced_disabled.gif?raw=1
Without slicing

sliced_pattern.gif?raw=1
Slicing set to pattern

sliced_pattern-track.gif?raw=1
Slicing set to pattern-track

Edit: I was hoping it would be more obvious from these GIFs, but the sliced processing always takes slightly longer time to complete.
The more often it yields (returns time back to Renoise) the longer it takes. In this case, “pattern-track” slicing takes approx. two or three times as long as without slicing.

I tried but it kept raising an error “expected instr_idx to be a number”. Try out the DemoSong – Daed – Bears and you’ll see the same thing. I selected everything in the pattern matrix, right-clicked and chose “Create phrase from selection”.

Yes, this indeed breaks the tool. Thanks for reporting!
I think it’s because of the pattern sequence order, third pattern is an “alias”: patt 0, 1, 1 (here it breaks).

It’s a regular tool sprint - v1.54 is out now :slight_smile:

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

FIXME Detect when pattern sequence is using aliased patterns (skip processing)
FIXME (When removing duplicates in post-processing stage) use source phrase-index when replacing notes
FIXME When inserting phrase trigger-notes, take the existing visible column into consideration (never hide already visible columns)
FIXME Ignore when note-off (with no instrument number) are the the first thing to appear during collection
FEATURE Update UI + ability to abort while sliced task is running

Okay! This is awesome.

There’s one last thing I found :slight_smile:

If you have an empty pattern, and disable “include empty phrases” then it inserts a phrase into the empty pattern. I think it should do a NOTE OFF at the end of the previous pattern / start of the empty pattern…

So for example, if you have:

A

empty

B

A

B

then with both “include empty phrases” and “include duplicate phrases” disabled, you get:

Z01

Z02

Z02

Z01

Z02

I think it should result in:

Z01 (… OFF on last line?)

empty (or OFF on first line?)

Z02

Z01

Z02

hrm… I think that scenario is a bit trickier than I first anticipated. It works fine on drums, for example…

but let’s say I’m using 1-bar patterns, and have a pad sequence. I play a chord in the first bar. No notes in the second bar (the pad is sustaining) and then a chord change in the third bar.

With the current behavior of disabling “include empty phrases”, it would re-trigger the notes in bar 2. But enabling “include empty phrases” would insert an empty phrase, stopping the pad sound.

I’m not sure of a good way to handle that…

It would be cool if extracting phrases led to a result that sounded exactly the same as the original. But I don’t know if that’s possible?

It would be cool if extracting phrases led to a result that sounded exactly the same as the original. But I don’t know if that’s possible?

As long as we are collecting phrases while limiting ourselves to the pattern threshold, sound which extend/play beyond this boundary is tricky to deal with.
Another thing that can lead to different sounding results is the fact that the collected phrases are looped by default. I’ve thought of setting this to OFF (or even making it an option).

But yeah, we should try to get as close to a 1:1 representation as possible. It’s tricky, but I’m pretty sure it can be done. And hopefully without making the tool a complicated mess to deal with :smiley:

Btw: I have no plans of releasing a new version in the next few days, so there’s plenty of time to give it a good spin.
I’m pretty sure there are still a few “actual” bugs lurking too in v1.54

Edit: hold on - you were actually describing a bug and not some “philosophical issue” ?

A
empty
B
A
B

then with both “include empty phrases” and “include duplicate phrases” disabled, you get:

Z01
Z02
Z02
Z01
Z02

Re-reading this, I now understand what you meant. Yes, the ‘empty’ should_not_be turned into a phrase trigger but rather, be left out with these settings. This is a bug and should of course be fixed.

But - (and now we’re back to the philosophical discussion) - even if the empty space was left alone (the bug was fixed), the “A” phrase would in fact repeat in lieu of the empty space, due to the default looping of phrases. I think it’s simply a better/safer choice to leave looping disabled as the default choice. This will also cause sustained chords to continue playing across pattern boundaries…

hold on - you were actually describing a bug and not some “philosophical issue” ?

Re-reading this, I now understand what you meant. Yes, the ‘empty’ should_not_be turned into a phrase trigger but rather, be left out with these settings. This is a bug and should of course be fixed.

But - (and now we’re back to the philosophical discussion) - even if the empty space was left alone (the bug was fixed), the “A” phrase would in fact repeat in lieu of the empty space, due to the default looping of phrases. I think it’s simply a better/safer choice to leave looping disabled as the default choice. This will also cause sustained chords to continue playing across pattern boundaries…

yes I think it’s a bug in all cases

the simplest solution is just to set the phrases to not loop, as you said. Then you get the same end result when phrases are extracted and replaced.

edit: and it makes sense that the phrases would not loop… they were written as a pattern, and thus were not intended to loop in the first place. Although it may be different if you select something in the pattern sequencer vs the matrix… anyway, I think a simple “loop phrases” checkbox option would do the job.

About resulting phrases not looping, can this please be made optional? For a lot of stuff i’m generating, for example beat, percussion phrases I want them to!

New version, v1.55, some bug fixes and enhancements:
http://www.renoise.com/tools/phrasemate

FIXME phrase not allocated when instrument is used in multiple tracks in same pattern
FIXME do not attempt to allocate phrase when pattern-track is empty
FIXME capture all: reset source instrument on each copy
FIXME Check for (non-)existing instrument
TWEAK do not include track/global effect-commands when collecting
FEATURE specify looping mode for collected phrases

Just to demonstrate how far this tool has now gotten, here is a version of the demosong Access Pwd by Medievil Music - completely converted into phrases.
Medievil%20Music%20-%20Access%20Pwd%20(phrasified).xrns

About resulting phrases not looping, can this please be made optional?

Done now :slight_smile:

Had this bug tonight;

‘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:1273: attempt to index local ‘instr’ (a nil value)

stack traceback:

[C]: in function ‘error’

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

running on every block in the matrix, capturing all instruments inside the same instrument, not replacing notes with phrases.

Okay I just want to jump back in here and give a big THANK YOU to danoise for making this!

I hit on kind of a cool workflow today… it lets me record a song by playing live, and then pimp it out in the computer with Renoise:

  1. Use my MPC to create a basic 16-bar sequence with all the sounds and phrases I want
  2. Record a draft using pad mutes to make the basic arrangement
  3. Export the sequence as a midi file and load it into Renoise
  4. Extract phrases using this sweet tool
  5. Re-create the arrangement using volume = 80 (on) or 00 (off)

It’s that last step that is the most tedious… it involves listening to the draft recording repeatedly (autoseek ftw!) and setting my phrases on / off appropriately. That said, I think it’ll be worth the effort: once I’ve got my basic arrangement done in Renoise, I can do all sorts of layering, effects, resampling… all that good stuff.

And this tool makes it possible, so thank you danoise for all your hard work!

I’ll now be going into a hole and composing non-stop for a while… :w00t: