New Tool (3.0): CDP lua tool

If you are handy with the scripting editor try changing lines 99 and 100 to:

  
local in_ana = os.tmpname('txt')  
local out_ana = os.tmpname('txt')  
  

the same result, but with .txt extension

Can you try and run the pvoc commands in the dos terminal manually, not sure if it is a Renoise tool issue or general compatibility with Win 7 64bit

yeah, the same result
seems to be pvoc’s compatibility with Win7 64bit. unfortunately :(

Are you sure you have the latest version of the tool which supports pvoc’s installed? How about uninstalling and re-installing?

Yeah, sure. I tried to do this through win’s cmd and found that pvoc.exe refuses to work (with the same error message).

Its a shame if thats the case, I saw this info leaflet for CDP v6 which says Win7 64bit is supported: http://www.composersdesktop.com/pdf/sysinfopgPC-R6.pdf
Might be worth contacting them if you continue having issues

Made a request on CDP forum about this issue.

By the way, there is a fix for this processes also:

Request:
With a stock install of CDP R7 on Windows 7 64-bit, even simple interrogation of commands ABFPAN, ABFPAN2, ABFDCODE, FASTCONV, REVERB, RMVERB, RMRESP, RMSINFO from the CMD prompt will bring up the following System Error dialog:

“The program can’t start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.”

Richard Dobson’s answer:
This was an error of mine in building on Mingw without including “static linking” of the C++ runtime.

We will get some new distribution channel going for individual updates as soon as we can; in the meantime I have put a zip with new builds of the affected programs on my Bath Uni server here:

http://people.bath.ac.uk/masrwd/r7PCrebuilds.zip

cool,

update of the previously non-working reverb definitions;

dsp["Reverb - Multi-Channel reverb "] = {   
 cmds = { exe = "reverb", mode = "", tip = " REVERB implements the now classic Schroeder/Moorer model, consisting of six comb filters in parallel, followed by four allpass filters in series. The comb filters generate the dense reverberation, and the allpass filters (with much shorter delay times) apply further smearing of the echoes to minimize the spectral colouration of the comb filters. A further allpass is applied to each output channel, each with a different randomly-chosen delay time. Each comb filter contains a simple low-pass filter to simulate high-frequency absorption - this also affects the overall reverberation time. A preset set of early reflections as defined by Moorer is incorporated; this can be replaced by a user-defined set either hand-written or created using ROOMRESP. The delay times for the filters are preset to suit a 'medium room' model, as suggested by Moorer. In most situations the user will not want to change these; however the option is provided to change these times by means of a simple text file." },  
 arg1 = { name = "N", switch = "-c", min = 1, max = 16, def = 2, tip = "create outfile with N channels (Range: 1 <= N < 16; Default = 2)" },  
 arg2 = { name = "N", switch = "-H", min = 0, max = 22050, def = 10000, tip = "Apply Highcut filter to infile with cutoff frequency NHz(6dB per octave)" },  
 arg3 = { name = "N", switch = "-L", min = 0, max = 22050, def = 400, tip = "apply Lowcut filter to infile with cutoff frequency NHz (12dB per octave)" },  
 arg4 = { name = "N", switch = "-p", min = 0, max = 1000, tip = "set reverb predelay to N msecs (shifts early reflections)" },  
 arg5 = { name = "egain", min = 0.0, max = 1.0, tip = "set level of early reflections (Range: 0.0 to 1.0)" },  
 arg6 = { name = "mix", mix = 0.0, max = 1.0, tip = "balance of direct and reverb signal (Range: 1.0 [weighted towards direct signal] to 0.0 [weighted towards reverb signal])" },  
 arg7 = { name = "rvbtime", min = 0, max = 20, tip = "reverb decay time (to -60dB) in seconds" },  
 arg8 = { name = "absorb", min = 0.0, max = 1.0, tip = "degree of hf damping to suggest roomsize (Range: 0.0 to 1.0)" },  
 arg9 = { name = "lpfreq", min = 0, max = 22050, tip = "lowpass filter cutoff frequency in Hz applied at input to reverb" },  
 arg10 = { name = "trailertime", min = 0, max = 30, def = 0, tip = "time in seconds added to outfile for reverb tail" },   
}  
  
dsp["Roomverb - Multi-channel reverb with room simulation "] = {   
 cmds = { exe = "rmverb", mode = "", tip = "Although many of the parameters are the same as those for REVERB (q.v), the program operates very differently. Rather than use comb filters in parallel, ROOMVERB uses a variable network of 'nested' allpass filters inside an overall feedback loop. This has the effect of increasing the density of the reverberation over time, as is characteristic of most 'real' acoustic spaces. It is therefore dedicated more specifically to that task than is REVERB. Nevertheless, as the roomsize and feedback parameters are independently controllable, some unusal effects can still be created. For authentic reverb, it is important that the feedback level is not set too high, otherwise audible pulsations can be heard at the start of the reverberation. These can be mitigated to a degree by running REVERB several times in parallel, with slightly different reverb times, and mixing the results, or combining into a multi-channel file. Conversely, it is also possible to create an 'infinite reverb' effect by setting the feedback level to 1.0.The preset early reflections for a given room size are the same as those in REVERB." },  
 arg1 = { name = "N", switch = "-c", min = 1, max = 2, def = 2, tip = "create outfile with N channels (Range: 1 <= N < 16; Default = 2)" },  
 arg2 = { name = "N", switch = "-H", min = 0, max = 22050, tip = "Apply Highcut filter to infile with cutoff frequency NHz(6dB per octave)" },  
 arg3 = { name = "N", switch = "-L", min = 0, max = 22050, tip = "apply Lowcut filter to infile with cutoff frequency NHz (12dB per octave)" },  
 arg4 = { name = "rmsize", min = 1, max = 3, def = 1.0, tip = "1 (small), 2 (medium), or 3 (large)" },  
 arg5 = { name = "egain", min = 0.0, max = 1.0, tip = "set level of early reflections (Range: 0.0 to 1.0)" },  
 arg6 = { name = "mix", mix = 0.0, max = 1.0, tip = "balance of direct and reverb signal (Range: 1.0 [weighted towards direct signal] to 0.0 [weighted towards reverb signal])" },  
 arg7 = { name = "fback", min = 0.0, max = 1.0, tip = "reverb feedback level: controls decaytime (Range: 0.0 to 1.0)" },  
 arg8 = { name = "absorb", min = 0.0, max = 1.0, tip = "degree of hf damping to suggest roomsize (Range: 0.0 to 1.0)" },  
 arg9 = { name = "lpfreq", min = 0, max = 22050, tip = "lowpass filter cutoff frequency in Hz applied at input to reverb" },  
 arg10 = { name = "trailertime", min = 0, max = 30, def = 0, tip = "time in seconds added to outfile for reverb tail" },   
}  
  
dsp["Tapdelay - stereo multi-echo generator with feedback"] = {   
 cmds = { exe = "tapdelay", mode = "", tip = "The principle behind a tapped delay line is that whereas in a standard delay line (e.g., 1 second long) the ouput is taken at the end, in a tapped delay line extra outputs are also taken at intermediate points, such as 0.1 secs, 0.3 secs and 0.75 secs. "  
 },  
 arg1 = { name = "tapgain", min = 0.0001, max = 1.0, tip = "gain factor applied to output from delay line (Range: > 0.0; typical value: 0.25)" },  
 arg2 = { name = "feedback", min = -1.0, max = 1.0, tip = "delayed signal fed back into the input (Range: -1.0 to 1.0)" },  
 arg3 = { name = "mix", min = 0.0, max = 1.0, tip = "proportion of source mixed with delay output (Range: 0.0 to < 1.0)" },  
 arg4 = { name = "taps.txt", min = 0.0, max = 1.0, input = "brk", tip = "text file consisting of a list of taps in the format: time amp [pan]" },  
 arg5 = { name = "trailtime", min = 0, max = length / 1000, tip = "extra time in seconds (beyond infile duration) for delays to play out" },  
}  

So not having ‘mode’ specified wasn’t the problem at all :) (Note that tapdelay needs a taps.txt to work & enabling the flags in reverb & roomverb doesn’t return any results, not sure about the parameter ranges for highcut/lowcut filter (terminal gives no info)).

Edit;

We currently can’t make a selection in the sample and have only this section affected through running the cdp script, on the to-do list :) . Been going through Johann’s tool which can do this and found something.

Might be useful to see how he manages this?

[details=“Click to view contents”] ```
– create temporary sample 1
if bool_use_input_file or bool_use_output_file then
renoise.app():show_status(“Creating temporary sample buffer…”)
temp_sample = renoise.song().selected_instrument:insert_sample_at(renoise.song().selected_sample_index + 1)
temp_buffer = temp_sample.sample_buffer
– copy the selection to temp sample 1 and save it
if bool_use_input_file then
if (not temp_buffer:create_sample_data(buffer.sample_rate, buffer.bit_depth, buffer.number_of_channels, (int_selection_end - int_selection_start) + 1 )) then
renoise.app():show_error(“Couldn’t create sample!”) return
end
for int_chan = 1, buffer.number_of_channels do
int_new_frame = 1
for int_frame = int_selection_start, int_selection_end do
temp_buffer:set_sample_data(int_chan, int_new_frame, buffer:sample_data(int_chan, int_frame))
int_new_frame = int_new_frame + 1
end
end

renoise.app():show_status("Saving " … temp_buffer.number_of_frames … " frames as input file: " … ifile)
temp_buffer:save_as(ifile, ‘wav’)
end
end

if bool_use_input_file then
str_commandline = string.gsub(str_commandline, str_placeholder_input_file, ifile)
end
if bool_use_output_file then
str_commandline = string.gsub(str_commandline, str_placeholder_output_file, ofile)
end

renoise.app():show_status(“Executing command line #” … str_commandline_index … ": " … str_commandline)
os.execute(str_commandline)

if bool_use_input_file then
os.remove(ifile)
end

if bool_use_output_file then
if not io.exists(ofile) then
if bool_use_input_file then
instrument:delete_sample_at(renoise.song().selected_sample_index + 1)
end
renoise.app():show_error(“Something must have went terribly, terribly wrong: output file not found.”)
return
end
– create temporary sample 2
local temp_sample2 = renoise.song().selected_instrument:insert_sample_at(renoise.song().selected_sample_index + 1)
local temp_buffer2 = temp_sample2.sample_buffer

– load the processed result into temp sample 1
renoise.app():show_status("Loading output file: " … ofile)
temp_buffer:load_from(ofile)
os.remove(ofile)

renoise.app():show_status(“Creating temporary sample…”)
– allocate the second sample buffer (size is “stuff outside the selection” + “size of processed file”)
if not temp_buffer2:create_sample_data(buffer.sample_rate, buffer.bit_depth, buffer.number_of_channels,
(buffer.number_of_frames - (int_selection_end - int_selection_start) - 1) + temp_buffer.number_of_frames)
then
instrument:delete_sample_at(renoise.song().selected_sample_index + 1)
renoise.app():show_error(“Couldn’t create sample, aborting.”)
return
end

int_new_frame = 1

– copy the part before the selection to temp sample 2
if int_selection_start > 1 then
renoise.app():show_status(“Copying part before the selection to temporary sample…”)
for int_frame = 1, int_selection_start - 1 do
for int_chan = 1, buffer.number_of_channels do
temp_buffer2:set_sample_data(int_chan, int_frame, buffer:sample_data(int_chan, int_frame))
end
int_new_frame = int_new_frame + 1
end
end

– copy the processed selection to temp sample 2
for int_frame = 1, temp_buffer.number_of_frames do
renoise.app():show_status(“Copying processed part to temporary sample…”)
for int_chan = 1, buffer.number_of_channels do
temp_buffer2:set_sample_data(int_chan, int_new_frame, temp_buffer:sample_data(int_chan, int_frame))
end
int_new_frame = int_new_frame + 1
end

– copy the part after the selection to temp sample 2
if int_selection_end < buffer.number_of_frames then
renoise.app():show_status(“Copying part after the selection to temporary sample…”)
for int_frame = int_selection_end + 1, buffer.number_of_frames do
for int_chan = 1, buffer.number_of_channels do
temp_buffer2:set_sample_data(int_chan, int_new_frame, buffer:sample_data(int_chan, int_frame))
end
int_new_frame = int_new_frame + 1
end
end

int_selection_end = int_selection_start + temp_buffer.number_of_frames - 1

renoise.app():show_status("Saving result sample: " … xfile)
– save temp sample 2
temp_buffer2:save_as(xfile, ‘wav’)

– remove temporary sample 2
– TODO: are you sure this NEVER deletes the wrong sample… ?!
instrument:delete_sample_at(renoise.song().selected_sample_index + 1)

– load temp sample 2 into the original sample slot (so all sample properties get preserved)
renoise.app():show_status("Loading result sample: " … xfile)
buffer:load_from(xfile)

buffer.selection_start = int_selection_start
buffer.selection_end = int_selection_end
os.remove(xfile)
end

– remove temporary sample 1
if bool_use_input_file or bool_use_output_file then
instrument:delete_sample_at(renoise.song().selected_sample_index + 1)
end
end

–print (‘[after]’)
–print ('buffer.number_of_frames: ’ … buffer.number_of_frames)

end

  
from the 'processing.lua' portion of his runcommandsonselection script.

Seems to be a problem with writing the .ana files on my Win7 box.

see couple of posts above, xrxs is having the same problem with windows 7, has made a post on their forum;
http://unstablesound.net/cdpforum/index.php?topic=24.0

Thanks, I suspected it to be the same or a related problem.

Richard Dowson’s answer:

The usual cause of this error message is that the environment variable CDP_SOUND_EXT has not been defined (to wav). This can be done via Control Panel->System Settings->Advanced->Environment Variables.

We are in the process of preparing an update release (all platforms) where this variable is internally preset to wav by default, so that setting it explicitly will be optional. We will of course announce the update here, as well as on the CDP download page.

And it works finally :yeah:

Brilliant
Enjoy the pvocs!

Cool… I was thinking about definitions and wondered if you would be interested in managing the whole definitions.lua file? It’s probably quicker for you to update this than for me to go through and update things hat have changed. I am also only making definitions for testing new features so it makes sense to me if you own the definitions file and post updated ones here. I will then bundle the latest one posted on new tool updates… If you are ok with doing that of course…

Thanks, looked at the code and I expect that way of doing it will be slow for large samples, however I think that may be the only way of doing it. It is on the list, speaking of which…

I thought it would be useful to list some kind of roadmap here for the tool, so below is my features to implement list in order of priority. I think it includes everything that has been suggested so far but do let me know if I have missed anything. I’m also open to reprioritise some of these if certain features are desired sooner than others…

  • Support for processes requiring two input sounds - Use Renoise instrument envelopes for breakpoint entry - Process selection (in place and new sample) - Process to new sample in instrument - Add support for stereo samples to mono processes - Slider min max rules that are informed by other sliders to avoid out of range errors - Preserve loop points after processing in place - Automatic GUI refresh after sample processing - User snapshots - Expanding description box - Expanding terminal box - Add to context menus for sample/instrument

Sure!

I think you have the most important stuff covered with the right priority order :)/>/> , couple of additions for future updates I can think of besides these;

Currently we can use ‘input = ‘brk’’ to create a toggle and open up a file inside the tool gui, I’ve used this in definitions that don’t use breakpoint files but need data files as well. ‘input = ‘brk’’ always needs to have min and max settings though (throws up an error notice if I leave these out), could you create a similar toggle for opening data, text files that doesn’t need min / max settings, just the toggle?

Support for the process parameters which can have text input, for example ‘Blur Shuffle’ ( file:///C:/cdpr7/docs/html/cblurfrm.htm ). Commandline example; ‘blur shuffle infile outfile domain-image grpsize ‘. For the domain-image parameter, you must specify two strings of letters, separated by a hyphen (’-’); the first string is the domain and the second string is the image, e.g., ‘abc-abbabcc’. The same domain-image principle is used in ‘Distort Shuffle’ ( file:///C:/cdpr7/docs/html/cdistort.htm#SHUFFLE ).

Support for processes that can output more than one sound, like ‘sfedit randchunks’ ( file:///C:/cdpr7/docs/html/cgroedit.htm#RANDCHUNKS ). Ideally have all results collected in the same Renoise nulti-sample instrument. In the randchunks description it says; ‘There is no outfile name. The cut sections will be saved as new soundfiles, named infile truncated by one character, with a number added, starting from zero.’, the currently non working definition is somewhere in the bottom of the list, maybe you can make it work?

Support for processes that have alternate infiles (next to the usual sample or .ana input), for example; some need an additional pitch file like the process ‘Pitch Altharms’ which deletes alternate harmonics ( file:///C:/cdpr7/docs/html/cpitcfrm.htm ).

The pitchfiles are made with ‘repitch getpitch’ ( file:///C:/cdpr7/docs/html/crepitch.htm#GETPITCH ) which extracts the pitch content from a soundfile. Maybe similar to how we can specify ‘input = pvoc’ inside the cmds line of the script, we can have ‘input = repitch’?
There are a bunch of processes which take pitchfiles derived from repitch getpitch and manipulate these back to a new pitchfile. Maybe already think about achieving some kind of modularity between processes? So we can chain processes similar to the batch .bat example PSN posted a few pages back.

I.o.w please support processes that don’t output sound, but output other stuff (= pitchfiles, brk files, vowelfils, .env files etc), as processes take the particular output as their input, support all of the possible inputs & outputs eventually and have a way to define the order in the definition file.

Less important :)/>/>, find a way to support processes that don’t need a sound or .ana input at all, ones that only output sound (they may have a .text or data file input parameter to define midi or frequencies), like the Synth processes ( file:///C:/cdpr7/docs/html/cgrosynf.htm ). Also there are processes that just return info about either a sound or .ana input file, return some kind of descriptive information in the terminal. Right now these return an error, I guess because the current CDP tool always expects a specific output?

Least important; a way to link the html info from the installed docs.

Phew…I think with this all of cdp is covered :wink: .

edit;

bonus suggestions:

Optionally be able to automatically append the picked process name to a sample name after processing a sound. So when you’re making variations, you can see from the sample description what to expect, sort of.

Another suggestion, which I think I mentioned somewhere in this thread before, is to be able to optionally have the tool batch process a multi sampled Renoise instrument. It would go through the kit one sample at a time for the same process settings.

Shame the searchbox functionality isn’t easily accessed through lua, could be helpful in this tool quickly selecting a definition. Maybe the selection dropdown list can be pimped somehow? So instead of a complete list with everything, we could collect stuff in categories like filters, delays, granular et cetera?

thanks:) ace idea and implementation!!!

The environment variable did it for me too. Thanks guys!

Cool, thats useful and most of those look fairy simple to implement. Repitch looks interesting and looks like it will function in a similar way to pvoc.

Just need to find the time now :)

Glad to hear these are no impossible missions :drummer:

Sure, besides romancing the girlfriend don’t forget to make music once in a while too :wink: . If you have an idea on how to implement some of the suggested stuff, feel free to drop an early notice, hint, so I can make definitions in advance!

Ha! Yeah, I should finish of some of those loops I have sitting around, I’m getting some great sounds out of this CDP which is gonna help, just finding it easier to do some coding at the moment though :)

Sure I will keep you updated on the definitions, for the next feature you can start on the pvoc processes that take 2 input files like morph, just insert: input = “2pvoc” in the cmds section where you normally specify a pvoc process. Will release this soon…