Jump to content


Photo

New Tool (3.1): SliceMate

Slices Pattern Editor Sample Editor

  • Please log in to reply
26 replies to this topic

#1 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 22 April 2017 - 21:46

splash_big_0.png

 

This is the place for discussing the SliceMate tool. 

The tool can automatically determine the playback position of a sample and, with a single shortcut, slice and produce a note at the cursor position in the song. In other words, if you are often using long or sliced samples, it could be quite the timesaver. 

The tool was inspired by this topic
 

Requirements: Renoise 3.1 or newer. 

 

Download from the tool page:

http://renoise.com/tools/slicemate

 

Documentation and source code: 

https://github.com/r....SliceMate.xrnx


  • Conner_Bw, ffx and Woodpecking Mantis like this

Tracking with Stuff. API wishlist | Soundcloud


#2 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 22 April 2017 - 21:57

I must be doing something wrong, but can't seem to have the tool slice anything? Although I have a sample loaded in the instrument list, autoseeked it, I keep getting "Unable to insert slice:

Can't determine position - please enable auto-seek on the sample", if there is a slice marker present in the sample, I'm getting "Unable to insert slice:
Could not resolve sample from note". How is this supposed to work? Will read first post in thread :-)


  • Woodpecking Mantis likes this

#3 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 22 April 2017 - 22:11

Found this in the log;

 

 

ScriptingEngine: std::logic_error: 'invalid line range: 65, 64.'

stack traceback:
[C]: in function 'lines_in_range'
.\source/xLib/classes/xNoteCapture.lua:148: in function 'search_track'
.\source/xLib/classes/xNoteCapture.lua:96: in function <.\source/xLib/classes/xNoteCapture.lua:86>
(tail call): ?
.\source/SliceMate.lua:254: in function 'select'
.\source/SliceMate.lua:503: in function 'on_idle'
.\source/SliceMate.lua:126: in function <.\source/SliceMate.lua:125>
 
 
Error Message: 'C:\Users\pluge\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.SliceMate.xrnx\main.lua' failed in one of its notifiers.
Error Message: The notifier will be disabled to prevent further errors.
Error Message: Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance...
Error Message: std::logic_error: 'invalid line range: 65, 64.'
Error Message: stack traceback:
Error Message: [C]: in function 'lines_in_range'
Error Message: .\source/xLib/classes/xNoteCapture.lua:148: in function 'search_track'
Error Message: .\source/xLib/classes/xNoteCapture.lua:96: in function <.\source/xLib/classes/xNoteCapture.lua:86>
Error Message: (tail call): ?
Error Message: .\source/SliceMate.lua:254: in function 'select'
Error Message: .\source/SliceMate.lua:503: in function 'on_idle'
Error Message: .\source/SliceMate.lua:126: in function <.\source/SliceMate.lua:125>
 
GraphPort: Trying to load Fallbackfont: 'Arial Unicode MS' (PS-Name: '')...
GraphPort: EnumFontFamilies for font family 'Arial Unicode MS' failed
 
Exception: Failed to resolve the font file for font 'Arial Unicode MS'.
 
GraphPort: EnumFontFamilies for font family 'Arial Unicode MS' failed
 
Exception: Failed to resolve the font file for font 'Arial Unicode MS'.
 
GraphPort: Trying to load Fallbackfont: 'MS PGothic' (PS-Name: '')...
GraphPort: Fallbackfont was successfully loaded, but can not handle the requested character(s). Skipping...
GraphPort: Trying to load Fallbackfont: 'MS Gothic' (PS-Name: '')...
GraphPort: Fallbackfont was successfully loaded, but can not handle the requested character(s). Skipping...

 

Note there are also some fonts failing to load, not sure they are related to your tool though?



#4 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 22 April 2017 - 22:15

There is a how-to on github:
https://github.com/r...xrnx#how-to-use
 

  • Load up some (long) sample and enter it into the pattern
  • Position the cursor somewhere in the 'trail' and hit slice
  • If sample settings are compatible, a new slice/note is inserted
  • Move cursor somewhere else, repeat and rinse

Now let me just follow those steps myself and see what happens ;-)

ScriptingEngine: std::logic_error: 'invalid line range: 65, 64.'
stack traceback:
[C]: in function 'lines_in_range'

Edit: Ah, this is good info. Somehow it chokes when capturing notes - pretty important part of the tool.  

 

I wonder how you're doing it. First, enter a note and then scroll a bit down and slice? 

And also, how large/small are the pattern(s) - are you entering note in one pattern, slicing from a different one, etc.? 

 

Try to describe what you're doing :-)  


Edited by danoise, 22 April 2017 - 22:16.

Tracking with Stuff. API wishlist | Soundcloud


#5 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 22 April 2017 - 22:24

First de-installed slicemate through the tool-browser.

Re-installed it through dragging inside of Renoise, causing it to auto boot.

Opened up a breakbeat recording through the diskop, beatsyncing the sample to 128 lines.

Set the pattern length to 128 and pressed play.

Immediately the error notice pops up;

 

'C:\Users\pluge\AppData\Roaming\Renoise\V3.1.0\Scripts\Tools\com.renoise.SliceMate.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...
 
std::logic_error: 'invalid line range: 129, 128.'
stack traceback:
  [C]: in function 'lines_in_range'
  .\source/xLib/classes/xNoteCapture.lua:148: in function 'search_track'
  .\source/xLib/classes/xNoteCapture.lua:96: in function <.\source/xLib/classes/xNoteCapture.lua:86>
  (tail call): ?
  .\source/SliceMate.lua:254: in function 'select'
  .\source/SliceMate.lua:494: in function 'on_idle'
  .\source/SliceMate.lua:126: in function <.\source/SliceMate.lua:125>

After clicking away the notice, the tool gui doesn't seem to recognize any note events present in the pattern editor.

 

Maybe another tool is (secretly :ph34r: ) running in the background interfering? Anyone else having similar issues?


Edited by Djeroek, 22 April 2017 - 22:24.


#6 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 22 April 2017 - 23:05

Hm, weird. Just loading a sample, set some property, hit play and BOOM?

 

What you could do (if you want to help more) is to enable additional debug logging in the tool. Read on for details. 

(damn, I was supposed to have some fun with this tool. But this is important too...)

 

First of all, you need to have the scripting console enabled, because that's where that logging is shown.

Next, in the SliceMate folder, open the file called main.lua and edit the following:

_trace_filters = nil
--_trace_filters = {".*"}

Into this

--_trace_filters = nil
_trace_filters = {".*"}

Then, if you have console enable you can choose "Reload all tools" from the tool menu. 

Otherwise you need to open the tool browser and disable/enable the tool to reload it. 

 

Once the tool has reloaded, it will begin tracing (printing) a lot of debug crap to the console. 

 

What I'm basically interested in is a log from the moment the tool is launched to the first error happens

Note that errors are printed in dimmed-out grey, so easy enough to spot. 

 

--

 

Now if you'll excuse me, I have some slicing to do. 


Tracking with Stuff. API wishlist | Soundcloud


#7 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 22 April 2017 - 23:32

Did the above, but it didn't crash right away so a lot of data collected, not sure if you need everything but here's a chunk leading up onto the bug;

 

Spoiler

 

So the fact that there is a mention of 129 in the invalid range bit isn't suspect on a pattern length of 128?



#8 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 23 April 2017 - 11:48

Thanks! 

 

I've found that the error is not particular to your PC - it happened here as well. But extremely rarely, as I'd been using the tool for hours.

So very nice with that debug log... 

 

Btw: also found that fine-tuning is not carried over to newly sliced samples. I was matching a 126 bpm render to a 128 bpm song, when I realized it. 

This is easy to fix, will be part of the next update.


  • Djeroek likes this

Tracking with Stuff. API wishlist | Soundcloud


#9 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 23 April 2017 - 13:07

There's a new version up. Think I nailed the bug? 

Download: http://renoise.com/tools/slicemate


  • Djeroek likes this

Tracking with Stuff. API wishlist | Soundcloud


#10 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 23 April 2017 - 13:34

There's a new version up. Think I nailed the bug? 

 

Download: http://renoise.com/tools/slicemate

 

unfortunately still doesn't work here, it doesn't find any sample/instrument. When having the cursor on a note event it does see the sample name, but it shows the exclamation icon; "Can't determine position - please enable auto-seek on the sample", while autoseek is on!

 

If I move the cursor away from the note event I'm getting 'Instrument N/A".

 

Have to run now, so can't test further, maybe tonight? (Btw I'm on windows 10, 32 bit 3.1 Renoise, 64 bit version same issues).



#11 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 23 April 2017 - 14:52

At least the error you first reported is gone, no? 

 

From what you write, it sounds almost like the tool is picking up wrong instrument. But before I head off on a wild goose chase, maybe it's better to let some more people test the tool. 

As an encouragement, I can only say that I did a lot of slicing yesterday night - and it was exactly as easy as I'd hoped it would be :)

 

Edit: and while using it, it occurred to me how useful it would be to support quantize across an arbitrary number of lines. 

This is particularly important, since slicing up a playing sample will make Renoise stop the sample playback. And while I can't magically fix that the sample keeps playing, at least the tool could be a bit smarter and place the slice point / note slightly into the future (a.k.a. forward quantize). 

The result would be slightly more useful when using the tool in realtime (with the cursor following playback position): you only get a brief moment of silence, from the moment you create the slice, until playback reaches the quantized note that was just inserted. 

 

I have no idea if anyone else if planning to use this tool to slice up samples in realtime, while the song is playing. But I know that I do, so this just made it to the top of my "planned features" list  B)


Edited by danoise, 23 April 2017 - 16:11.

Tracking with Stuff. API wishlist | Soundcloud


#12 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 23 April 2017 - 18:18

Nice tool!

 

@Danoise: On another topic:

This already has some of the math fundamentals needed for a simple note aligner tool (you're already converting samples<->lines, right?). Now that you have your head wrapped around it, maybe it would be simple for you to make a note aligner tool? Just a simple "align the end of the above note (sample) to the current cursor position". Alignmate.

 

EDIT: And another feature.. "Align note under cursor to end of previous sample". It makes theoretical sense in this framework too, like if you moved a perfect slice and later want to move it back.


Edited by joule, 24 April 2017 - 08:54.


#13 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 24 April 2017 - 11:05

At least the error you first reported is gone, no? 

 

yep, looks like it. 

 

I've tried disabling all other scripts, and a/b'ing different settings in the preferences to no avail, weird that it only sees the sample when the pattern editor cursor is on top of the note event.

There is a change in value of the Pos parameter in the tool that seems dependent on the octave setting, on the highest octave setting of 8 I get alternating results (for example 37762, 48551, 64735 etc), on octave setting of 4; 4046, 3709, 2698 etc.

 

I'm not sure this value is supposed to run, change while a pattern is playing equivalent of sample position, but I get value updates only when a note-event is triggered. 



#14 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 24 April 2017 - 12:25

@djeroek: let me shoot a small video when I get home tonight. Hopefully it will be more clear how things are supposed to work :-)

 

@joule: AlignMate, absolutely - if there's some potential for code reusability, that's great. Feel free to dig in. 


Tracking with Stuff. API wishlist | Soundcloud


#15 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 24 April 2017 - 19:19

@Danoise: On another topic:
This already has some of the math fundamentals needed for a simple note aligner tool (you're already converting samples<->lines, right?). Now that you have your head wrapped around it, maybe it would be simple for you to make a note aligner tool? Just a simple "align the end of the above note (sample) to the current cursor position". Alignmate

 

Just to clarify: you're looking for a way to shift a note so that it plays exactly up to a given position in the song. 

I'm imagining reversed cymbals, vocal recordings with breathing and "EDM risers" here - this is the general idea? 

 

Slightly related, I found, while using the tool, that it would be nice if I could move a given slice after it had been created. And obviously, not just the slice itself (which is simple), but also any associated notes. But that whole idea is a bit "dirty", because you might have used that sample in a manner of ways. Not just cleanly slicing up a source sound, but getting creative with it.

So I might skip that one, and instead focus on things that are relatively straightforward. This involves forward quantize (as previously mentioned), and that the tool actually monitors sample properties and pattern content in realtime. Because right now, when you're in the instrument editor and not actively playing the song, you don't get visual feedback about the playback position when you adjust properties such as sample transpose, fine-tune etc. - you have to pop back in the pattern editor and "nudge" the cursor position. Not intuitive at all. 

Same goes for editing the pattern - e.g. via shift+F1/F2 (transpose) - would be great if the values were updated here as well. 


Edited by danoise, 24 April 2017 - 20:35.

  • joule likes this

Tracking with Stuff. API wishlist | Soundcloud


#16 hazeltine

hazeltine

    Member

  • Normal Members
  • PipPip
  • 42 posts
  • Gender:Male

Posted 24 April 2017 - 20:30

Having the same issue. Just can't get it to work. I enter a note at step 00, Slice Mate is connected to the instrument slot, I scroll down 2 steps and try to insert slive and get "Could not find a sample to slice, perhaps the track doesn't contain any notes."



#17 mikobuntu

mikobuntu

    Member

  • Normal Members
  • PipPip
  • 64 posts

Posted 24 April 2017 - 20:43

I have installed the latest version by dragging onto the Renoise window and I get the following error ....

 

 '/home/miko/.renoise/V3.1.0/Scripts/Tools/com.renoise.SliceMate.xrnx/' failed to execute in one of its menu entry functions.

 
Please contact the author (danoise [bjorn.nesby@gmail.com]) for assistance...
 
std::runtime_error: 'ViewBuilder: bitmap './icons/warning.bmp' does not exist or failed to load'
stack traceback:
  [C]: in function 'bitmap'
  ./source/SliceMate_UI.lua:249: in function 'build'
  ./source/SliceMate.lua:144: in function <./source/SliceMate.lua:16>
  [C]: in function 'SliceMate'
  main.lua:64: in function 'show'
  main.lua:82: in function <main.lua:81>


#18 fladd

fladd

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1213 posts
  • Gender:Male
  • Location:The Netherlands

Posted 25 April 2017 - 09:25

I also don't get what the tool is supposed to do.

 

I get "Can't insert slice where notes are present -
please set the cursor somewhere else" when slicing being on the note,

and "Could not find a sample to slice,
perhaps the track doesn't contain any notes?" when slicing on the tail.



#19 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 25 April 2017 - 10:19

I was just about to release another new version when I discovered that I'm suddenly getting the same behaviour as some of you.

Finally, the error message !!

 

EDIT: GOT IT. New version coming up... 


Edited by danoise, 25 April 2017 - 10:42.

Tracking with Stuff. API wishlist | Soundcloud


#20 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1467 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 25 April 2017 - 10:49

@Danoise,

 

1) Yes, that's what I meant about aligning.

 

2) It's an interesting topic, letting different objects react to one another. Like you explain, it becomes a bit complicated with slices in this case (e g would only work on "perfect slice sequences". And should it react to every occurance everywhere?). I'm refactoring my f(tracks) project classes a bit with this kind of structures in mind, so I've thought a bit about it (e g, let an automation curve generate note data, which in turn "generates" note data in another track.. kind of modular/flexible). Sooner or later the usability of it all boils down to the need for 1) wanting to store custom data per object, 2) providing custom visual cues to the user in the Renoise GUI via the API. If these were available we could make awesome custom behaviors.. In your case, showing the user that this/that particular block of notes is tied/synced to sample slices.



#21 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 25 April 2017 - 12:34

Right, v0.12 is now up. I really hope it fixes the issues that people ran across. 

Get it here: http://renoise.com/tools/slicemate

 

The reason was, well, d'oh... I had some leftover preferences setting which only existed on my machine. 

 

@mikubuntu: thanks - this was actually a different issue. I tend to forget that windows file systems are case insensitive. Should be fixed as well. 

 

Apart from the fixes, I also added a slew of additional polish to the tool. It now detects changes to the instrument, samples, song (tempo) and pattern data. 

This means that SliceMate should be up to date with the information it shows at any time. In other words, feel more "integrated". 


Tracking with Stuff. API wishlist | Soundcloud


#22 mikobuntu

mikobuntu

    Member

  • Normal Members
  • PipPip
  • 64 posts

Posted 25 April 2017 - 19:11

thanks @danoise , the update fixed my issue and the tool seems to be working as expected, so far so good :)



#23 hazeltine

hazeltine

    Member

  • Normal Members
  • PipPip
  • 42 posts
  • Gender:Male

Posted 26 April 2017 - 02:55

Works now!!  :yeah:

Genius as always. Thank you!


  • Djeroek likes this

#24 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6706 posts
  • Gender:Male
  • Location:Borneo

Posted 26 April 2017 - 09:58

Genius as always. Thank you!

Awesome indeed, timesaver / lifesaver  :drummer:


  • danoise likes this

#25 danoise

danoise

    Probably More God or Borg Than Human Member

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

Posted 27 April 2017 - 16:56

I've added a new version which supports forward quantize on line/beat/bar/block and pattern. Yay for realtime-slicing! 

The feature can be disabled too, which creates notes that make use of the delay column (that is, when slicing while playing and cursor is following playback position...)

 

Also, a couple of minor improvements:

 

* detach button should now work when the instrument was not already detached (I hope?)

* the tool should clear the "slice status" when not connected to an instrument

 

As usual, download from the tools page


Tracking with Stuff. API wishlist | Soundcloud






Also tagged with one or more of these keywords: Slices, Pattern Editor, Sample Editor