Jump to content


Photo

Tool Idea: Modular Sample Processing Framework


  • Please log in to reply
10 replies to this topic

#1 KMaki

KMaki

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 672 posts
  • Gender:Male
  • Location:Tampere, Finland
  • Interests:Survival (e.g. breathing). Small scale renoise-tool-coding. The Melvins. Absurdity of it all. Zen / Not-zen. Wifey&Kids.

Posted 15 March 2012 - 09:22

I'm thinking of a tool that would serve as a general framework for sample processing. Something that could load in separate processing modules written in Lua. It would handle all the basic stuff like GUI and general processing (writing sample data, managing sample and instrument list) et cetera.
The actual modules could be more lightweight, sort of "original sample data in, processed sample data out" -things.
I think this would lower the threshold of creating simple (and complicated) sample editing scripts. Also it could make sample editing with tools a more streamlined experience for users by providing a consistent GUI. -> Better user experience.

Anyone dig this? I'd go for this myself but I'm rather preoccupied.

Edited by KMaki, 15 March 2012 - 09:23.

Renoise (2.6->) 2.8 / Mac mini 2010 - 2.66GHz Intel Core 2 Duo - 4 Gb 1067 MHz DDR3 / OS X 10.8 / M-Audio Fast Track USB

#2 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 15 March 2012 - 09:37

Sounds like a great idea.
Specially working with the mapping areas can be a tedious job.
Simplifying processes with wrappers sounds like a nice idea. It is not a thing that can be done by one person anyway.

What i would suggest is if one has written code in this area (and i know some have done things with the sample editor and mappings, including myself), considering what could be useful and then try to pull that piece of code out and create a class from it.
No doubt we would have several snippets in no time to assemble a library (need to agree on the structure somehow to make it managable by multiple persons).
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#3 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 15 March 2012 - 18:41

Interesting idea. What sample processing are you thinking?

I have a lot of code that works with sample data and mappings with I could contribute.

Also, what sort of interface are you thinking?

I usually work with sample data as a lua table of sample frame points. It's fairly easy to create functions which read/write tables like this to samples in Renoise, e.g:

[lua]
read_sample_data(sample_reference) -> returns table of data points
write_sample_data(sample_reference, table) -> writes table of data points to sample
[/lua]
Is a footer a sweater for feet?

#4 aklt

aklt

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 121 posts
  • Gender:Male
  • Interests:Drumming

Posted 15 March 2012 - 18:59

Nice idea!

I think it would be nice to be able to layer sample processing modules, i.e.:

[lua]
data.pipe(removeSilence).pipe(maximizeVolume).pipe(...)
[/lua]

if possible.

Edit:

Btw about mappings, are there any conventions (should there be?)
for how to map keyboard shortcuts in tools?

Edited by aklt, 15 March 2012 - 19:05.

Cpu: Core I5 3.3GHz
Ram: 8GB
Os: Arch Linux
Tool: dk.bladre.Marks

#5 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 15 March 2012 - 20:45

The actual modules could be more lightweight, sort of "original sample data in, processed sample data out" -things.


I'm no coder or anything, but I remember retired forum member Johann wanting a better way of handling/manipulating sample data through Lua, other then collecting data in tables as it was slow. A way to directly access sample data in memory? His 'run cmd on selection' tool ( http://forum.renoise...d-on-selection/ ) suffered because of the then Api, dunno if anything has changed in that regard?

#6 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 15 March 2012 - 21:55

Interesting idea. What sample processing are you thinking?

I have a lot of code that works with sample data and mappings with I could contribute.

Also, what sort of interface are you thinking?

I usually work with sample data as a lua table of sample frame points. It's fairly easy to create functions which read/write tables like this to samples in Renoise, e.g:

[lua] read_sample_data(sample_reference) -> returns table of data points write_sample_data(sample_reference, table) -> writes table of data points to sample [/lua]


Indeed such functions, but i can also think of these:
[lua]
set_sample_selection(ins,sample,start,end)
copy_selection(src_ins,src_sample,tgt_ins,_tgt_sample,tgt_position)
[/lua]

But also very necessary gadgets like embedding the idle-notifier, to prevent renoise from firing a script is hanging error and basic progress stuff like:
[lua]
function progress_meter(title, pmin, pmax, pvalue)
if dialog == nil then
progress_slider = vb:row {
vb:text {
id="meter_text",
width = 20,
text = (pvalue*100).."%"
},
vb:minislider {
id="meter",
min = pmin,
max = pmax,
value = pvalue,
active = false,
notifier = function(value)
vb.views.meter_text.text = (value*100).."%"
end
}
}
dialog_content = vb:column {
margin = DIALOG_MARGIN,
spacing = CONTENT_SPACING,
vb:row{
spacing = 4*CONTENT_SPACING,

vb:column {
spacing = CONTENT_SPACING,

progress_slider,
},
},
}
else
if vb.views.meter.value > 0 then
vb.views.meter.value = 0
end
end
if not dialog or not dialog.visible then
dialog = renoise.app():show_custom_dialog(title, dialog_content)
end
end
[/lua]
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#7 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 15 March 2012 - 22:05

Edit:

Btw about mappings, are there any conventions (should there be?)
for how to map keyboard shortcuts in tools?


The mappings was about the sample-layer mappings. Not keyboard shortcuts.


I'm no coder or anything, but I remember retired forum member Johann wanting a better way of handling/manipulating sample data through Lua, other then collecting data in tables as it was slow. A way to directly access sample data in memory? His 'run cmd on selection' tool ( http://forum.renoise...d-on-selection/ ) suffered because of the then Api, dunno if anything has changed in that regard?


I don't think this situation can be really improved, because an external application is used to process the content.
You can use the idle notifier to update Renoise during copying and pasting of the frame-buffer data (he perhaps didn't used that trick), but once the data has been stored on disc and submitted to an external program, it means waiting out the ride until the external program is ready.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#8 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 16 March 2012 - 00:27

...it means waiting out the ride until the external program is ready.


The processing in the external program(s) often happens really quickly (depending on what dsp process you're using, length of the sample), but then the processed result has to be collected in a table, then pasted in a new instrument slot (if I remember correctly).. and this takes ages.. having to click away a lot of 'script is taking to long, do you want to abort yes/no?' notices. Shame Johann has left these parts, probably could explain the bottleneck a lot better!

#9 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 16 March 2012 - 00:34

*nevermind*

Edited by Jonas, 16 March 2012 - 00:38.


#10 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 16 March 2012 - 09:48

having to click away a lot of 'script is taking to long, do you want to abort yes/no?' notices.

I understand, i have walked the same road when writing the slices to instrument tool. When using the idle notifier to give Renoise some room, this problem got resolved. When adding the progress meter, i also got an insight of frankly how long stuff takes. Thanks to some piece of Taktiks code, i could improve the speed of the process tremendously.
You can choose to work either frame by frame or simply copy a complete range. The first choice is a very poor choice.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual

#11 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 16 March 2012 - 10:06

I'm no coder or anything, but I remember retired forum member Johann wanting a better way of handling/manipulating sample data through Lua, other then collecting data in tables as it was slow. A way to directly access sample data in memory? His 'run cmd on selection' tool ( http://forum.renoise...d-on-selection/ ) suffered because of the then Api, dunno if anything has changed in that regard?



The only slow part is really getting the data in/out of renoise into a Lua table.

If you work on a single copy of the table then actual operations are fast (in my experience).
Is a footer a sweater for feet?