Jump to content


Photo

New Tool (3.1): PhraseMate

phrases zxx

  • Please log in to reply
87 replies to this topic

#76 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3310 posts
  • Gender:Not Telling

Posted 13 November 2017 - 23:03

Yes, that would be it. It's a planned feature *cough* - I'm quite busy these days, wouldn't have time to do it myself. 

But all the fundamentals should be in place...and if you're planning to go ahead with this, I would be happy to help...

 

Thanks, added this now in a lame way into tuned shortcuts, line 1025++. Currently does not render any phrase notes into the front track, so only works for fake "C-4" phrases.

 

Looking forward seeing this within this tool :)

 

EDIT: Also something fishy is going on, the result after rendering phrase + disabling the phase still does not seem to be identical, e.g. an instrument (with fake c-4 phrase) playing a C#6, applied with scale key G and scale "pentatonic major" will result in a C-6, but should be a B-5.


Edited by ffx, 13 November 2017 - 23:20.

Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz


#77 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6795 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 14 November 2017 - 09:57

Cool.

 

I think I've only tested against un-transposed notes so far :blush: .

I'll add a unit test for xScale which covers this scenario. 


  • ffx likes this

Tracking with Stuff. API wishlist | Soundcloud


#78 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3310 posts
  • Gender:Not Telling

Posted 14 November 2017 - 11:02

Wow thanks!


Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz


#79 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3310 posts
  • Gender:Not Telling

Posted 22 November 2017 - 22:24

hey danoise, any chance to see a xlib fix soon? Or later? Sorry, if getting on nerves  :blush:


Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz


#80 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6795 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 24 November 2017 - 18:22

hey danoise, any chance to see a xlib fix soon? 

 

I just committed something. According to the tests, I've fixed the issue - would be great if you could confirm this?

 

Here's a link to the raw file (xScale.lua)


  • ffx likes this

Tracking with Stuff. API wishlist | Soundcloud


#81 ffx

ffx

    Composes without Wires burns Directly from Brain to DVD that is already in Store Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3310 posts
  • Gender:Not Telling

Posted 24 November 2017 - 19:30

I just committed something. According to the tests, I've fixed the issue - would be great if you could confirm this?

 

Here's a link to the raw file (xScale.lua)

 

 

Yes, you fixed the particular case, I can confirm, and I couldn't find any issue so far. Thanks!


Test system: macOS 10.13.4, HFS+. Firewire Audio, i7 4770, 8GB Ram, GTX1050 2GB, 48kHz


#82 pat

pat

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 505 posts
  • Gender:Male

Posted 26 April 2018 - 04:27

Okay so I'm back to playing with this, and it's definitely really cool :)

 

A couple things that I think are problems...

 

  1. When I collect patterns to phrases (scope: "track in song"), the resulting phrases don't respect LPB automation. e.g. if I have a ZL08 command in the master track as the first line of a pattern, the phrase gets its LPB set to 4 instead of 8. Same when writing, if a phrase has LPB 8 and is written to a pattern that is LPB 4, I think it needs to create multiple columns with delay offsets to maintain the timing.
  2. If I write to a selection that already contains a Zxx command, PhraseMate keeps it there instead of overwriting / deleting it. I think a picture will help...

Screen Shot 2018-04-25 at 8.59.01 PM.png

 

The first track is the note with the Zxx command. The second track is what I get when I write a phrase to selection with mix-paste disabled, insert Z00 disabled. The third track is with insert Z00 enabled, mix-paste still disabled. I think the Z04 that we see there should be removed in the first case, and overwritten in the second case. The current behavior makes sense to me if I were to enable mix-paste.

 

Now for the feature request that would make PhraseMate the most ridiculously useful tool ever for me :)

 

Render phrase(s) to pattern.

 

Here's how it works (and I can do it manually with PhraseMate today!!)

 

1. Select an area to write the phrase to

2. Choose the phrase that corresponds to the Zxx command

3. Write phrase to selection

4. Transpose selection to match the original note with Zxx command

 

Again, a picture probably helps here...

 

phrasemate-unroll.gif

 

So you can see what I want to do is, insert phrases into the pattern to get the sound I want, then write the phrase data back into the pattern so I can manipulate it again.

 

What I would LOVE to do is select an area in the pattern or matrix that has phrase notes entered, run a command, and have it automatically do all those steps that I did above.


Edited by pat, 26 April 2018 - 15:47.


#83 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6795 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 26 April 2018 - 10:03

Hi Pat,

I didn't have plans to put out a new release any time soon, but:
 

When I collect patterns to phrases (scope: "track in song"), the resulting phrases don't respect LPB automation. e.g. if I have a ZL08 command in the master track as the first line of a pattern, the phrase gets its LPB set to 4 instead of 8. Same when writing, if a phrase has LPB 8 and is written to a pattern that is LPB 4, I think it needs to create multiple columns with delay offsets to maintain the timing.

 
This indeed doesn't happen - and probably should. It will add a lot of additional processing time, though, since the tool will have to examine all tracks (hm, but I just got an idea here...)
In any case, I would implement it so that, when reading from the pattern, the phrase is set to the highest LPB which was encountered during scanning (preserve fidelity and avoid creating extra columns).
 
On output - heh, well there is no guarantee that things will sound the same if the phrase LPB is higher than the song. So the tool should probably warn you when "compacting" things like that. 
 

  • If I write to a selection that already contains a Zxx command, PhraseMate keeps it there instead of overwriting / deleting it

 
I believe the tool isn't even aware of local Zxx commands (sample effect columns), so there's definitely room for improvement here. 
I like your thinking here, makes sense I think. 

 

Now for the feature request 

 
Yep, that justs needs to work like that - totally agree.


Tracking with Stuff. API wishlist | Soundcloud


#84 pat

pat

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 505 posts
  • Gender:Male

Posted 26 April 2018 - 15:45

I didn't have plans to put out a new release any time soon

 

I'm not sure if you're saying that now you're thinking about a new release based on my ideas  :)  or that you're still not planning to.

 

In any case, I'm happy to try helping with these. Part of my intention with that post was to 1) confirm these are things that you want to address and 2) talk through ideas for how to do it. I didn't want to spend a ton of time trying to figure this stuff out if you felt it didn't fit with the PhraseMate vision.

 

My basic plan is to start with a naive implementation that works only with my specific cases – I'll talk about those later.

 

This indeed doesn't happen - and probably should. It will add a lot of additional processing time, though, since the tool will have to examine all tracks (hm, but I just got an idea here...)

In any case, I would implement it so that, when reading from the pattern, the phrase is set to the highest LPB which was encountered during scanning (preserve fidelity and avoid creating extra columns).
 
I took a quick stab at this last night, and it seems like PhraseMate doesn't know the current LPB at any given pattern, does it? Like Renoise isn't calculating and reporting the song LPB at a specific position.
 
The way I use LPB, I have one command per pattern in the master track. So a first pass at this (for me) is reading the first line of the pattern on the master track to see if there's a ZL command on it. If so, use that value as the phrase LPB.
 
On output - heh, well there is no guarantee that things will sound the same if the phrase LPB is higher than the song. So the tool should probably warn you when "compacting" things like that.

 

Yeah I see how this is a bit tricky. I thought it would work similarly to inserting triplets, but I think the problem is that the note OFF won't be accurate. Even if you time all the note ONs correctly using delay, the OFF won't take place until the next line, right?

 

Perhaps PhraseMate can insert ZL commands to change LPB, and add lines to the pattern to fit the higher LPB phrase data? That seems like it could get dicey quick. Maybe I just need to split my patterns at the LPB switch points?

 

I believe the tool isn't even aware of local Zxx commands (sample effect columns), so there's definitely room for improvement here. 
I like your thinking here, makes sense I think.
 
Well this is strange because it doesn't seem to behave the same way for me right now as what I reported earlier. I'll have to keep an eye on it and see if I can figure out what's going on.
 
Yep, that justs needs to work like that - totally agree.

 

 

Okay tell me what you think about these first passes at the three pieces:

 

Transposition

 

1. Read the phrase base note

2. Read the note that triggers the Zxx command

3. Calculate the offset between them

4. Apply that offset to the notes being written to the pattern

 

Render current phrase

 

1. Look backwards from the current line until we find a Zxx command

2. Look forward until there's an OFF or a different note

3. Write phrase to pattern using those start and end points

 

Auto-render multiple phrases

 

1. User selects a range

2. Repeat the "render current phrase" process for each phrase found in the range


Edited by pat, 26 April 2018 - 19:46.


#85 pat

pat

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 505 posts
  • Gender:Male

Posted 26 April 2018 - 16:06

btw this is the error I get when trying to run PhraseMate from git:

'/Users/padillac/Library/Preferences/Renoise/V3.1.1/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/cLib/classes/cProcessSlicer.lua:118: ./source/PhraseMate.lua:883: variable 'xPatternSelection' is not declared
stack traceback:
  [C]: in function 'error'
  ./source/cLib/classes/cProcessSlicer.lua:118: in function <./source/cLib/classes/cProcessSlicer.lua:105>

Easy enough fix: add

cLib.require (_xlibroot..'xPatternSelection')

to main.lua


Edited by pat, 26 April 2018 - 16:10.


#86 pat

pat

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 505 posts
  • Gender:Male

Posted 26 April 2018 - 20:13

Well I added basic auto-capture and transpose, it makes the process a LOT faster! I'm going to use it for a bit, see if there are any problems, and then look into adding multiple / track auto-capture – or maybe that's something danoise can figure out :)

 

(also, you can see in the screen cap that it's incorrectly keeping the Zxx command in the effects column again... not sure what's going on there)

 

changes on GitHub: https://github.com/r...e/xrnx/pull/136

 

phrasemate-auto-capture.gif


Edited by pat, 26 April 2018 - 20:14.


#87 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6795 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 27 April 2018 - 12:06

I'm not sure if you're saying that now you're thinking about a new release based on my ideas  smile.png  or that you're still not planning to.


Eh, I see now I wasn't being clear. I just wanted to share my thoughts, as I currently don't have much time to spare.
But what you've done - very cool smile.png I hope my code has been readable enough.

I took a quick stab at this last night, and it seems like PhraseMate doesn't know the current LPB at any given pattern, does it? Like Renoise isn't calculating and reporting the song LPB at a specific position.
The way I use LPB, I have one command per pattern in the master track. So a first pass at this (for me) is reading the first line of the pattern on the master track to see if there's a ZL command on it. If so, use that value as the phrase LPB.

Yeah, that would work for your particular way of doing things, but is hardly a generic solution.
That "idea" that I mentioned basically involved asking Renoise to play a very brief segment of the song in order to determine the LPB. It's a hackish solution, but much bettern than having to (worst case, but potentially) checking each and every line in the entire song.
 With solid proof of the starting points LPB, we need only to parse the lines in the actual region being turned into a phrase.

Would definitely be nice to a method for determining this sort of thing via the API!

Perhaps PhraseMate can insert ZL commands to change LPB, and add lines to the pattern to fit the higher LPB phrase data? That seems like it could get dicey quick. Maybe I just need to split my patterns at the LPB switch points?

Seems a bit like creative workarounds to me. I would really prefer that it tries its best to conserve the song as-is, warning you when there's the possibility of "data loss" (the changes might be subtle, but it's hard for the tool to know).

Okay tell me what you think about these first passes at the three pieces:
 
Transposition
 
1. Read the phrase base note
2. Read the note that triggers the Zxx command
3. Calculate the offset between them
4. Apply that offset to the notes being written to the pattern


Figuring out the offset, yep.

Render current phrase
 
1. Look backwards from the current line until we find a Zxx command
2. Look forward until there's an OFF or a different note
3. Write phrase to pattern using those start and end points


Yep - looking forward/backwards can be achieved with `xNoteCapture`, using a custom callback function.
There is also xRule, but it's probably overkill for this particular scenario.

Also, in case the user has selected a scale, this needs to be applied to the notes being written.
Otherwise the rendered notes can end up sounding different than when playing through the phrase.


 

btw this is the error I get when trying to run PhraseMate from git:


Ah yes, the repository is not the stable version. But I believe the only changes I've done to PhraseMate, compared to the last release, are refactoring some parts into xLib/cLib classes.  

Tracking with Stuff. API wishlist | Soundcloud


#88 pat

pat

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 505 posts
  • Gender:Male

Posted 27 April 2018 - 17:27

But what you've done - very cool I hope my code has been readable enough.

 

Totally! I feel like I'm making a mess of things – I'm not familiar with all the tools that Renoise / xLib provide, but I'm getting there. But the fact that I've been able to add this functionality so quickly is a testament to all the work you've done, so thank you.

 

Seems a bit like creative workarounds to me. I would really prefer that it tries its best to conserve the song as-is, warning you when there's the possibility of "data loss" (the changes might be subtle, but it's hard for the tool to know).

 

Agreed. I was thinking maybe at first it just puts up an alert box saying the phrase LPB doesn't match the pattern LPB, and skips rendering that phrase. Just leave the note + Zxx command in there when LPB doesn't match. 

 

Yep - looking forward/backwards can be achieved with `xNoteCapture`, using a custom callback function.

 

Super cool, I used it to add "auto-capture current phrase" so I don't even need to make a selection. It just looks to see if there's a phrase command on the current line or a previous line, and write the phrase data to the pattern until the next note ON / OFF event stops the phrase. That certainly matches my way of working more.

 

Thank you!


  • danoise likes this





Also tagged with one or more of these keywords: phrases, zxx