Jump to content


Photo

New Tool (3.0): CDP lua tool


  • Please log in to reply
238 replies to this topic

#1 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 22 April 2014 - 07:23 AM

EDIT;

Find the latest update of the tool here;


http://forum.renoise...post__p__317355

For the last user_definitions;

Extract and put this file in your _cfprogs directory together with all the process .exe's;

Attached File  user_definitions.rar   120.89KB   202 downloads


If you are running into problems with it on windows 7, you probably need to do extra stuff;

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.

http://unstablesound.net/cdpforum/index.php?topic=24.msg71#new


Apparently there are also permission issues on certain Mac OS versions;

Installation on Mountain Lion and Mavericks.

Admin permissions will be required to complete the installation.

It has transpired that Apple made unannounced changes in these versions of OS X which
mean that the settings created and configured by the installer are simply ignored. This
affects primarily the installation of environment variables (which need to be visible to
Soundloom as well as to the command line programs). We have yet to identify a
compatible substitute for the functionality lost by this OS change.

Instructions on completing the installation by hand are provided
in the supplied file "Manualconfig.pdf".



For pro support there is the CDP forum;
http://www.unstablesound.net/cdpforum/




Ey yo,

just received notice that a formerly 250 dollar dsp package called CDP is now downloadable for free! (http://www.unstablesound.net/cdp.html)

Cdp is;

..an ever evolving set of sound design and sound processing tools, to be used offline (non-real time processing), which incorporate some unique DSP algorithms to process sound files in interesting ways. could be used on individual samples or an entire track or composition.


It is developed in the academic Electro Acoustic arty-farty world and there have been 2 main programs for using it (Soundshaper & Soundloom). Both pretty archaic in use and hard to grasp.


I propose a Renoise lua tool front-end for the CDP processing set which can be used in Renoises sample editor (similar to how the Akaizer & rubberband tool use external .exe's).
:drummer:/> A front end in which you can control the commandline structure, values through sliders/knobs.


I once acquired version CDP 5 for doing a review and managed to use Johann's 'run cmnd on selection' tool with it ( http://sandboxx.org/...e/3339/details/ ), maybe this tool is a good starting point?


If no one will pick this up, it might be a good project for myself to learn Lua, but I unfortunately have no time at the moment :(/>

Edited by Djeroek, 23 May 2014 - 08:30 AM.

  • 3

#2 xrxs

xrxs

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 162 posts

Posted 22 April 2014 - 08:43 AM

Could be really cool!
  • 1

#3 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 24 April 2014 - 09:04 PM

Thanks for the heads up on this, it looks like a beast! I have just got this working on my mac so am gonna have a play around with this. The soundloom interface doesn't look that friendly or easy to figure out but the DSP's do look quite interesting.
I could be interested in your suggestion if I can get usable results out of it, I'm looking at the the tutorials for now.
  • 2

#4 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 25 April 2014 - 12:12 AM

I could be interested in your suggestion if I can get usable results out of it, I'm looking at the the tutorials for now.


Cool!

I preferred working with Soundshaper Pro, couldn't get my head around Soundloom, but for soundshaper you'll need to get a license to use it properly.

Not sure how it works on a Mac, but on a pc you can open up the different dsp process .exe's located in the C:\cdpr7\_cdp\_cdprogs folder through a ms-dos box, and alter soundfiles using commandline instructions. Eventually I used Johanns commandline script putting the CDP process .exes in the particular lua scripts folder, type stuff the processes accept like 'distort reform 1 $1 $2' and have that work on a selection in Renoises sample editor after pressing run in the tool gui.
It is trial and error with a lot of processes in conjunction with the tool as some only work on mono or stereo files.

Johann included Sox with his RunCommandsOnSelection tool (the swiss army knife of soundprocessing programs; http://sox.sourceforge.net/ ), in his tool you can launch the Sox 'reverse reverb' setting for example. Launching opens up a small tool gui with sliders to set the command line values Sox accepts. I want to create something similar for some of the CDP stuff.

Dunno how CDP's license is for distributing separate .exe's with a Renoise tool?
  • 2

#5 xrxs

xrxs

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 162 posts

Posted 25 April 2014 - 10:19 AM

lol. I can't force to work anything except distort reform so far. Do you have more examples of successful usage for this processes, Jonas? extend freeze 1 for example. I can't figure out how to reinterpret this infile outfile outduration delay rand pshift ampcut starttime_of_freeze endtime gain [-sseed] for Johann's command line. I realized that infile outfile = $1 $2. But how to write down the rest? I always get "output file not found"

Anyway, to have proper frontend for this tools could be really really cool and interesting

Even this distort reform process sounds tasty, convert to sinusoid mode for example

edit: distort repeat works fine too and sounds cool

Edited by xrxs, 25 April 2014 - 10:46 AM.

  • 0

#6 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 25 April 2014 - 12:21 PM

Dunno how CDP's license is for distributing separate .exe's with a Renoise tool?



There might not be a need to distribute the exe's. On mac once you have run the installer all the exe folder is added to a system path so you can then run them from a terminal window. I'm not sure if this is the same on Windows but we can find this out as we go along.
I will look at Johann's tool and it seem best to use that as a starting point, in principle it should be fairly simple to setup a GUI to do this.

To speed this up a bit it would be useful as xrxs says to have some examples of commands that can be run. To start with I think its best if I make a GUI for one of the commands lets say distort reform and get that working first, start small and build on that.
There may be issues getting this to work cross platform so lets tackle that first and get a proof of concept working first. There are lots of exe's in this and we may need to store information about all of them in the tool, it depends on if there is a standard set of parameters or categories of exe's. I also notice that CDP supports breakpoint envelopes as well so maybe these could be read from Renoise envelopes or I could adapt earlier tools like Reseq, perhaps there is potential for Renoise to become a general front end for CDP.

Anyway what would be useful right now would be details of one command and the parameters it takes, also what range and type these parameters are, I could build a GUI for that and we can go from there. This would save me wading through manuals etc..

Exciting stuff Posted Image

Edited by afta8, 25 April 2014 - 12:23 PM.

  • 0

#7 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 25 April 2014 - 12:22 PM

Do you have more examples of successful usage for this processes, Jonas?


I still have a few presets saved from Johann's tool, but they're based on CDP 5.0 processes, I'll bet there have been a bunch of changes so not sure about the compatibility with CDP 7.0. Also keep in mind that certain processes only work on mono or stereo soundfiles, and some need additional files to work which can't be done from Johann's tool(for example breakpoint envelope when doing a variable timestretch).

Some Sox presets, dunno if these came default with Johanns tool;

sox\sox $1 $2 repeat 1 (when running, doubles the selection in Renoise sample editor, as it repeats 1 time, replace 1 with 3 and it will repeat 3 times, you catch the drift :)

sox\sox $1 $2 speed 1200c (when running, speeds up the selection with an amount of cents, setting it to 1200 is like shifting the octave)

sox\sox $1 $2 pitch 1200
(when running sounds like its formant / pitch shifting the sounds using time-stretching, check the Sox manual for the ranges you can set the shift values, if you put a minus symbol in front you can pitch it downwards)

sox\sox $1 $2 bend .35,180,.25 .15,740,.53 0,-520,.3
(I don't have the Sox manual in front of me, but this presets does some strange phase vocoding wobble the sample selection)

sox\sox $1 $2 tempo 0.5 sox $1 $2 pitch 1200
(this one threw up an error, but still produced something)
Same for sox\sox $1 $2 pitch 1200 sox $1 $2 tempo 0.5

sox\sox $1 $2 synth 3 sine 300-3300 brownnoise (seems to destroy the original soundfile and generate brwonnoise within a certain set frequency range)

sox\sox $1 $2 contrast 50 (some kind of distortion thingy)

et cetera..check the Sox site what kind of commandline stuff it accepts, ranges of values. If you find something succesful, you can press 'Add' in Johann's tool gui to save it as a preset.


Some CDP 5.0 stuff;

filter bank 1 $1 $2 500 50 500 4000 (Check the manual what the numbers represent, looks like frequency min/max ranges, seems to produce a resonant output + tail, will distort certain soundfiles with too high resonance settings)

distort average $1 $2 5 (This one produces an error when used on a stereo file, but works on a mono file, glitches it up nicely)

distort average $1 $2 100 (abstracts it even more, creating bleeps)

distort fractal $1 $2 1000 0.5 (This one also solely works on mono files, I think it multiplies a sample window with fractals whatever that means :) , glitchy output)

distort interpolate $1 $2 2 (another glitcher, only works on mono files, replacing value 2 with a higher value seems to lengthen the original soundfile, create digital artifacts)

distort multiply $1 $2 8 -s (messes up the sound badly, only works with one channel mono sounds)

distort omit $1 $2 1 3 (seems to omit certain sample values to create a distorted sound, only works on mono files)

distort pitch $1 $2 4 (creates a turntable like wobble effect, only works on mono files)
distort reform 1 $1 $2 (destroys the fuck out of a wave file, check the manual what it supposed to do, only on mono)

Same for; distort reform 2 $1 $2 , distort reform 3 $1 $2 , distort reform 4 $1 $2 , distort reform 5 $1 $2 , distort reform 6 $1 $2 , distort reform 7 $1 $2 , distort reform 8 $1 $2 30 .

distort repeat $1 $2 2 (doubles and glitches up a mono soundfile)

Same for distort repeat $1 $2 2 -c50 , distort repeat2 $1 $2 4 -c50

distort repeat2 $1 $2 2 (glitcher of mono files) Setting to a higher value; distort repeat2 $1 $2 10 abstracts it to bleeps.

distort replace $1 $2 10 (only works on monofiles, lengthens the original soundfile) Lower value; distort replace $1 $2 2 will obviously give less longer result. Be aware that a very high value; distort replace $1 $2 100 can create very large, long files.

distort replim $1 $2 2 (lengthens, glitches, pitches down the original mono file)
distort replim $1 $2 2 -c10 (variation of above, dunno what -c10 means)
distort replim $1 $2 2 -c5 -f4000 (seems to timestretch it)

distort reverse $1 $2 1 (seems to reverse samples, to glitch a mono sound up)

distort reverse $1 $2 50 (higher value will reverse larger sample chunks)

distort shuffle $1 $2 abcd-aacccbdd (I like this one personally, with the whole abcd-aaccbdd thing you can specify how a certain sample chunk abcd is repeated aacccbdd, you can change it how you want it abcd-dbbacdc et cetera, check manual for better explanation)

distort telescope $1 $2 2 (seems to cut out, shorten the original mono file)
Higher values; distort telescope $1 $2 10 will cut out more of the sample.


distort overload 1 $1 $2 0.5 0.5 (some kind of ampltude, clipping effect)
Variations; distort overload 1 $1 $2 0.1 1 , distort overload 2 $1 $2 0.1 1 500 , distort overload 2 $1 $2 0.1 1 1200 .

All distortion processes only seem to work on mono files.

Here are a bunch more presets I don't have time to test whether they work on mono or stereo files, copied from Johann's tools preferences.xml:

Spoiler



extend freeze 1 for example. I can't figure out how to reinterpret this infile outfile outduration delay rand pshift ampcut starttime_of_freeze endtime gain [-sseed] for Johann's command line. I realized that infile outfile = $1 $2. But how to write down the rest? I always get "output file not found"


Try it on a mono file, there is a preset in the above spoiler; extend freeze 1 $1 $2 10 0.3 0.5 6 0.1 1 1.5 , but mmm doesn't seem to work on mono or stereo files..maybe I got the values wrong, need to check the manual again.
  • 2

#8 xrxs

xrxs

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 162 posts

Posted 25 April 2014 - 01:19 PM

Incredible. Thanks!

I also notice that CDP supports breakpoint envelopes as well so maybe these could be read from Renoise envelopes or I could adapt earlier tools like Reseq, perhaps there is potential for Renoise to become a general front end for CDP.


This should be really cool.
There are not only breakpoint enevelopes, there are also txt files with tunings etc. There also tools with more than one input files, various convolution and morphing tools for example.
  • 1

#9 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 25 April 2014 - 01:27 PM

There might not be a need to distribute the exe's. On mac once you have run the installer all the exe folder is added to a system path so you can then run them from a terminal window. I'm not sure if this is the same on Windows but we can find this out as we go along.


Yes, I think this is the same on windows, but if for example you only create a tool for the 515kB 'Distort' process, imo it would be overkill to have to install 100+ mb CDP completely :) . Would be cool if it was allowed to distribute separate CDP .exe's with the Renoise tool, similar to SOX.

I will look at Johann's tool and it seem best to use that as a starting point, in principle it should be fairly simple to setup a GUI to do this.


Yes, like I mentioned above, that tool automatically comes with SOX installed and has a launch option in the tool gui for a few SOX functions, giving you sliders to set the min / max ranges before running the script. Using common sense and no Lua scripting skills :) , I think I could reverse engineer, get how the external sox.exe is linked to the script and replace this with a CDP process and change the sliders to correspond with it. It would take me a long time though, bet this is easy for you!

To speed this up a bit it would be useful as xrxs says to have some examples of commands that can be run.


See my presets post above, I dunno if it is a limitation in the CDP processes or how Johann's tool processes the selection, but there can be a mono / stereo file dependency.

Check out the documentation for more in depth explanation and commandline examples. Go to the docs portion of the install folder C:\cdpr7\docs and open up 'index', this opens up a html file in your browser. Here you have all transformation processes listed.

To start with I think its best if I make a GUI for one of the commands lets say distort reform and get that working first, start small and build on that.


Sounds good :drummer:

When in the docs index html, check out DISTORT from which distort reform is a part of, here all functions that DISTORT accepts are listed and explained, with the commandline syntax structure.

I also notice that CDP supports breakpoint envelopes as well so maybe these could be read from Renoise envelopes or I could adapt earlier tools like Reseq, perhaps there is potential for Renoise to become a general front end for CDP.


Would be so cool if some of the phase vocoding functions that need breakpoint envelopes could be drawn from within Renoise, I have thought about the automation editor for this, but you have a good basis with Reseq indeed.

Anyway what would be useful right now would be details of one command and the parameters it takes, also what range and type these parameters are, I could build a GUI for that and we can go from there. This would save me wading through manuals etc..



Yes, check out the docs folder, index.html and select one of the processes. Here the structure is explained.

Good luck!
  • 1

#10 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 25 April 2014 - 07:30 PM

Good luck!


Thanks for all that, very useful and the docs are just what I need.. Going to have a go at this, however I can't seem to get Johann's tool to work, returns an error about output file not found.. maybe it's a mac thing Posted Image

EDIT: Rubberband tool works fine so will hack that instead

Edited by afta8, 25 April 2014 - 07:52 PM.

  • 0

#11 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 26 April 2014 - 02:04 AM

..however I can't seem to get Johann's tool to work, returns an error about output file not found.. maybe it's a mac thing


When does it throw up the error, after installing his tool? Using one of the included Sox or soundstretch presets or when trying one of the CDP presets I linked above?

For his tool to work with the CDP processes you need to copy the processes to the scripts folder first, put them inside de.johann-lau.RunCommandsOnSelection.xrnx folder. Or maybe it is because I already manually updated the api version in the manifest that I've never seen 'output file not found' notice, can you check the api version in the manifest?
  • 0

#12 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 26 April 2014 - 09:44 AM

When does it throw up the error, after installing his tool? Using one of the included Sox or soundstretch presets or when trying one of the CDP presets I linked above?

For his tool to work with the CDP processes you need to copy the processes to the scripts folder first, put them inside de.johann-lau.RunCommandsOnSelection.xrnx folder. Or maybe it is because I already manually updated the api version in the manifest that I've never seen 'output file not found' notice, can you check the api version in the manifest?


Yes, I did all that and none of it worked even with the Sox presets which come bundled with it, as soon as you press run you get the error: "Something must have went terribly, terribly wrong: output file not found."

It's no big deal though, I managed to figure out how to do this without it, so....

Here is a very basic version of the tool that is tied to the filter bank 1 process, I'm concentrating on one process just to make sure it all works cross platform and to get the basic features right.
Run this from the tools menu and the first time you run it it a dialog will pop up asking you to specify where the CDP executables are located, once this is set you won't need to do it again. Then just make settings and hit process, it should work on the selected sample.

Can you test this on Windows to make sure it is handling paths properly, once that is working then I can concentrate on developing this more.

I need to put some thought into how a GUI can be generated for all the processes, there are so many of them and doing this by hand for each one is going to take ages. Dynamically generated GUI's would be better but I can't figure out how to query the exe's so that it can find out what parameters it takes. Maybe the best way forward is to do something like what the GURU tool does and enable the tool to read definition files that specify each command, its arguments, value ranges etc.

Anyway have a go, let me know what you think.

P.S. I must say this thing sounds really nice, I never really considered offline processing given the abundance of VST's, thanks again for the heads up.. Posted Image

Edited by afta8, 26 April 2014 - 09:47 AM.

  • 3

#13 xrxs

xrxs

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 162 posts

Posted 26 April 2014 - 10:03 AM

Yeah, it works
  • 0

#14 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 26 April 2014 - 10:30 AM

Yeah, it works


Sweet, thanks :)
  • 0

#15 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 26 April 2014 - 11:27 AM

Works beautifully! :drummer:

I need to put some thought into how a GUI can be generated for all the processes, there are so many of them and doing this by hand for each one is going to take ages. Dynamically generated GUI's would be better but I can't figure out how to query the exe's so that it can find out what parameters it takes. Maybe the best way forward is to do something like what the GURU tool does and enable the tool to read definition files that specify each command, its arguments, value ranges etc.


Maybe we can ask the CDP developers if there is some kind of hidden command line argument that lists all options for a process? Indeed, this would be too much work for all of CDP. Concentrate on the cooler stuff first.

P.S. I must say this thing sounds really nice, I never really considered offline processing given the abundance of VST's, thanks again for the heads up.. Posted Image


I like offline processing, often using the fx button with vst for sounds-haping/sculptng of existing samples. Besides for vst cpu relieve, to create more unique sounds after experimentation. I'm most curious for all of CDP's phase vocoding processes, like the morphing stuff.

You can't use these now in Johann's tool, because all of the phase vocoding depend on analysis files which need to be generated first using another CDP process in combination. Would be great if, when inspired & have enough time ;-) , you can look at some of those functions.
  • 0

#16 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 26 April 2014 - 01:58 PM

Maybe we can ask the CDP developers if there is some kind of hidden command line argument that lists all options for a process?


It does that already, if I type filter bank into the terminal I get this output:

---
CDP Release 7 2014

BANK OF FILTERS, WITH TIME-VARIABLE Q




USAGE: filter bank 1-3 infile outfile Q gain lof hif [-ttail] [-sscat] [-d]

OR: filter bank 4-6 infile outfile Q gain lof hif param [-ttail] [-sscat] [-d]

MODES...

1) HARMONIC SERIES over lofrq.

2) ALTERNATE HARMONICS over lofrq.

3) SUBHARMONIC SERIES below hifrq.

4) HARMONIC SERIES WITH LINEAR OFFSET: param = offset in Hz.

5) EQUAL INTERVALS BETWEEN lo & hifrq: param = no. of filters.

6) EQUAL INTERVALS BETWEEN lo & hifrq: param = interval semitone-size.




Q Q (tightness) of filters (Range 0.001000 <= Q < 10000.0)

GAIN overall gain (Range 0.001000 to 10000.0).

LOF lofrq limit of filters (Range: 10 to srate/3).

HIF hifrq limit of filters (Range: lofrq+ to srate/3).

TAIL decay tail duration

SCAT Random scatter of filter frqs (Range 0 to 1: Default 0).

-d Double filtering.




Q may vary over time.


--


I just haven't worked how to get that info fed back to the lua API so that I can do something with it.

You can't use these now in Johann's tool, because all of the phase vocoding depend on analysis files which need to be generated first using another CDP process in combination. Would be great if, when inspired & have enough time ;-) , you can look at some of those functions.


There are not only breakpoint enevelopes, there are also txt files with tunings etc. There also tools with more than one input files, various convolution and morphing tools for example.



I'm going to look at these type of functions next, now that I have a basic template for the command line stuff I want to look at the other more complex stuff before I start working on data structures to build dynamic GUI's.
If you have any examples of usage of these type of functions that would help.
  • 0

#17 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 27 April 2014 - 01:26 AM

It does that already, if I type filter bank into the terminal I get this output:
---
I just haven't worked how to get that info fed back to the lua API so that I can do something with it.


I see, so you would need some kind of parser that'd analyze the description and filter out keywords intelligently? Sounds like a hell of a chore to program.

I'm going to look at these type of functions next, now that I have a basic template for the command line stuff I want to look at the other more complex stuff before I start working on data structures to build dynamic GUI's.
If you have any examples of usage of these type of functions that would help.


For all the spectral stuff audio files need to be analyzed first, going from time amplitude to a frequency amplitude representation of the sound in a .ana file. I think this is done through the pvoc.exe in the _cdprogs folder. The results can be fed into the functions that need them, for example BLUR.

I think BLUR's functions have a .ana file as infile, but I'm not sure if BLUR AVRG (averaging spectral energy) automatically re-synthesizes back to a time amplitude result, or it just generates another .ana file as output that needs to be re-synthesized using pvoc again.

I used to do this in Soundshaper Pro, but it is a long time ago and re-synthesizing was done automatically, under the hood.

For the morphing stuff (MORPH MORPH - file:///C:/cdpr7/docs/html/cmorpfrm.htm ), I imagine you'd have to analyze two audio files, maybe read them from within the same Renoise multi-sample instrument, create 2 .ana files using pvoc.exe, feed the results into infile & infile2 of morph morph, return the result as a new sample inside the same Renoise instrument or create new Renoise instrument altogether.
  • 0

#18 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 28 April 2014 - 01:55 AM

Sounds like a hell of a chore to program.


Yeah and probably quite buggy as well, I've decided to rely on people power for this instead... so behold here is the next version..

Screenshot 2014-04-28 00.44.04.png


The key difference is that it uses definitions to dynamically build the GUI, which means anyone can add new CDP processes to this by going through the CDP docs and adding the settings to the definitions.lua file.

An example definition looks like this:

dsp["Filter Bank 6 - Semitone Intervals"] = { 
  cmds = { exe = "filter", mode = "bank 6" },
  arg1 = { name = "Q", min = 0.001, max = 10000 },
  arg2 = { name = "Gain", min = 0.001, max = 10000 },
  arg3 = { name = "LoFrq", min = 10, max = srate()/3 },
  arg4 = { name = "HiFrq", min = 10, max = srate()/3 },
  arg5 = { name = "Semitones", min = 1, max = 12 },
  arg6 = { name = "Scatter", switch = "-s", min = 0, max = 1 },
  arg7 = { name = "Double", switch = "-d" }
}


So it's not too difficult to deconstruct if you compare this to the documentation. This format can be refined further as we add new commands and come up against new parameters etc.. Would be good to test this for now and add new things to see how it copes.

The tool only currently works on single input/output processes. I will start to look at processes that require analysis files and other input files next, that part of it is still a bit more confusing but your explanation helped, I didn't realise Pvoc works for a range of tools.. I'll get there eventually but glad I have got the basis done..

Have fun.. oh and if anyone makes more definitions please do post them here so I can add them to future versions. Cheers Posted Image
  • 1

#19 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 28 April 2014 - 02:09 AM

so behold here is the next version..


legend!

Got this error notice though upon initializing the tool, probably because there was no sample present;

'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

std::logic_error: 'can not access properties of a sample buffer with no sample data.'
stack traceback:
[C]: ?
[C]: in function '__index'
[string "do..."]:36: in function <[string "do..."]:35>
main.lua:45: in function 'srate'
.\definitions.lua:9: in main chunk
[C]: in function 'require'
main.lua:109: in function <main.lua:96>


The key difference is that it uses definitions to dynamically build the GUI, which means anyone can add new CDP processes to this by going through the CDP docs and adding the settings to the definitions.lua file.

An example definition looks like this:

dsp["Filter Bank 6 - Semitone Intervals"] = { 
  cmds = { exe = "filter", mode = "bank 6" },
  arg1 = { name = "Q", min = 0.001, max = 10000 },
  arg2 = { name = "Gain", min = 0.001, max = 10000 },
  arg3 = { name = "LoFrq", min = 10, max = srate()/3 },
  arg4 = { name = "HiFrq", min = 10, max = srate()/3 },
  arg5 = { name = "Semitones", min = 1, max = 12 },
  arg6 = { name = "Scatter", switch = "-s", min = 0, max = 1 },
  arg7 = { name = "Double", switch = "-d" }
}


So it's not too difficult to deconstruct if you compare this to the documentation. This format can be refined further as we add new commands and come up against new parameters etc.. Would be good to test this for now and add new things to see how it copes.


So good, will try to do a bunch this week, see if I can make it work.

I didn't realise Pvoc works for a range of tools..


yep, for all the phase vocoding transformations. I think 'pvoc anal' makes the .ana file, and another pvoc function re-synthesizes. Check in terminal what kind of arguments it accepts, these can be printed to a text file as well, for example type; modify speed > modspeed.txt (<-outputs all info to a text file).

Very nice work dude, thanks :drummer:/>

edit:

got the following error initializing the tool with a sample present;

'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

main.lua:109: loop or previous error loading module 'definitions'
stack traceback:
[C]: in function 'require'
main.lua:109: in function <main.lua:96>


edit 2;

Might be cool if for the arguments, you could also put in the description from the docs inside the definition file for a tool-tip pop up when you hover with the mouse over it. Helpful to understand what certain things do.

Also I run into a first 'problem' when trying to make a definition for distort average, one of the arguments 'cyclecnt' has a range of >1 ( cyclecnt – number of cycles over which to average (Range: > 1) )..How would I set up the min and max for this. I see in the filter examples you sometimes have max = srate()/2 , should I put in something like this when a max isn't specified in the docs?

Edited by Djeroek, 28 April 2014 - 02:38 AM.

  • 3

#20 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 28 April 2014 - 09:46 AM

got the following error initializing the tool with a sample present;


I can reproduce these, I think the second bug relates to the first error. Will fix this, if it happens again 'reload all tools' and make sure you run it with a sample selected.

Might be cool if for the arguments, you could also put in the description from the docs inside the definition file for a tool-tip pop up when you hover with the mouse over it. Helpful to understand what certain things do.


Good idea, I will add support for this in the next version. I am also going to add an option for a default value as I am always lowering the gain on some of these. These will be optional fields and an example of an argument definition will look like this:

arg2 = { name = "Gain", min = 0.001, max = 10000, def = 10, tip = "Some info" },


You can start adding these now if you want, the next version will pick these up.

Also I run into a first 'problem' when trying to make a definition for distort average, one of the arguments 'cyclecnt' has a range of >1 ( cyclecnt – number of cycles over which to average (Range: > 1) )..How would I set up the min and max for this. I see in the filter examples you sometimes have max = srate()/2 , should I put in something like this when a max isn't specified in the docs?


srate() is a function that returns the sample rate so wherever you see srate() it will substitute it for the selected samples rate. I added this because some of the parameters require the range to be a division of the sample rate.

Looking at the distort function I'm guessing the cyclecnt parameter is something to do with the number of cyles in the waveform. I already have code that gets the number of cycles (from EasyTune) so I will add a cycles() function to the next update. Once this is done the range values would look like: min = 1, max = cycles()

In future I can add similar functions that return data about the sample if other processes need it, maybe sample size, channels, etc... whatever is needed really.

The CDP docs aren't always clear about what the ranges are so in some cases a bit of guess work will be needed. Maybe you can get that info from the Soundshaper software, see what ranges are available in that. I only get Soundloom on mac and could look there but I haven't figured it out yet, the UI is very unfriendly!
  • 0

#21 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 28 April 2014 - 10:56 AM

Good idea, I will add support for this in the next version. I am also going to add an option for a default value as I am always lowering the gain on some of these. These will be optional fields and an example of an argument definition will look like this:

arg2 = { name = "Gain", min = 0.001, max = 10000, def = 10, tip = "Some info" },


You can start adding these now if you want, the next version will pick these up.


Nice, will update the bunch that I already did for the distort process.

Looking at the distort function I'm guessing the cyclecnt parameter is something to do with the number of cyles in the waveform. I already have code that gets the number of cycles (from EasyTune) so I will add a cycles() function to the next update. Once this is done the range values would look like: min = 1, max = cycles()

In future I can add similar functions that return data about the sample if other processes need it, maybe sample size, channels, etc... whatever is needed really.

The CDP docs aren't always clear about what the ranges are so in some cases a bit of guess work will be needed. Maybe you can get that info from the Soundshaper software, see what ranges are available in that. I only get Soundloom on mac and could look there but I haven't figured it out yet, the UI is very unfriendly!


heh yeah Soundloom is one of a kind, I apparently deleted Soundshaper from my system, can't find it anymore but think through trial and error, going through the docs we can find out most stuff. Could also consult the CDP dev's through email.

Some things I came across;

I noticed that for certain processes, besides min and max values, you'll see something like "Cyclecnt may vary over time" or "freq may vary over time", *insert parameter " * may vary over time". I think these arguments can take break-point files, sets of numbers that describe an envelope over time. Like for instance in the process 'Distort Delete'. Something to look into for the future, would be nice to have for the time-stretching processes, start of speeding up a sound, gradually slowing it down et cetera.

Also in the docs, certain parameters have a range of for example 2 to 16 and than it says integer only. Look at 'Distort Divide' for the divider argument. What if an argument only takes integers, is there a way to set a min and max for this, or maybe it doesn't matter?

In 'Distort Shuffle' you can shuffle wavecycles through defining a domain (for example abcd) and describing a so called image (for example aacccbdd, or dcbba, or dac). Using commandline you have to connect these using a dash like abcd-aacccbdd. Is there a way, for processes that accept them, you could also implement some kind of imput field for characters, letters?


edit;

could you also implement a 'tip' option for the cmds line, something to paste the musical application and/or additional info, for example;

cmds = { exe = "distort", mode = "average", tip = "DISTORT AVERAGE performs a mathematical averaging of the data in cyclecnt pseudo-wavecycles. The effect is more akin to a loss of resolution than the blurring which might be expected. Values below 10 retain some semblance of the original, while values of, for example, 100 seem to create a kind of 'sample hold' effect. For modest distortion, values 5 or less are recommended." },

Cheers :-)

Edited by Djeroek, 28 April 2014 - 11:33 AM.

  • 0

#22 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 28 April 2014 - 12:10 PM

Here's a bunch I already did (including tips), am sure I messed up some ranges, but I'm getting results so am happy :-)

Spoiler


Only thing I can't get any sound of is the 'distort pulsed' process, not sure what I'm doing wrong in the definition.

After adding the tips and trying to run the script I got;

'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

main.lua:109: loop or previous error loading module 'definitions'
stack traceback:
[C]: in function 'require'
main.lua:109: in function <main.lua:96>


'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

main.lua:167: attempt to index local 'arg' (a nil value)
stack traceback:
main.lua:167: in function 'build_arg_params_row'
main.lua:232: in function 'build_args_column'
main.lua:326: in function <main.lua:96>


I guess because the tips portion in each argument isn't expected, or maybe I made a mistake?


edit;

I've noticed the added processes don't get alphabetically ordered in the drop down menu of the tool gui, is this possible for better overview?

edit 2; updated the code list with more stuff, unfortunately can't check for syntax errors.

edit 3; updated list, fixed typo's

Edited by Djeroek, 28 April 2014 - 03:07 PM.

  • 2

#23 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 28 April 2014 - 04:24 PM

Here's a bunch I already did...


Amazing! Posted Image

Thanks! I have added these to the latest version which is attached to this post.
WARNING: Make sure you back up your definitions file, before you install the update as it will overwrite your old files. I have added everything up to [modify stack] so any you have done after that will be lost unless you back them up.

I have also marked of where your presets are in the definitions file also and I won't mess with them for now as you might want to change them given some of the new things I have added.

Keep them coming!

could you also implement a 'tip' option for the cmds line


Good idea, I have added this to this version. As you have suggested any text added to the 'tips' in cmds will be displayed above the sliders. I have done this for a few as an example.

I noticed that for certain processes, besides min and max values, you'll see something like "Cyclecnt may vary over time" or "freq may vary over time", *insert parameter " * may vary over time". I think these arguments can take break-point files, sets of numbers that describe an envelope over time. Like for instance in the process 'Distort Delete'. Something to look into for the future, would be nice to have for the time-stretching processes, start of speeding up a sound, gradually slowing it down et cetera.


I did wonder what that meant! I'll look into this some more, maybe we can use Renoise envelopes for this.

Also in the docs, certain parameters have a range of for example 2 to 16 and than it says integer only. Look at 'Distort Divide' for the divider argument. What if an argument only takes integers, is there a way to set a min and max for this, or maybe it doesn't matter?


Will look at this, if it doesn't throw an error when it receives a fractional number then we could leave this, otherwise there will need to be a tag in the arg that indicates an integer is required.

In 'Distort Shuffle' you can shuffle wavecycles through defining a domain (for example abcd) and describing a so called image (for example aacccbdd, or dcbba, or dac). Using commandline you have to connect these using a dash like abcd-aacccbdd. Is there a way, for processes that accept them, you could also implement some kind of imput field for characters, letters?


Interesting, not sure I get how this works but I will look into it, adding an input field should be fairly simple.

Only thing I can't get any sound of is the 'distort pulsed' process, not sure what I'm doing wrong in the definition.


Will look at this.

Bugs...


I fixed a few in this update so lets see how we go from here.

I've noticed the added processes don't get alphabetically ordered in the drop down menu of the tool gui, is this possible for better overview?


Fixed in this update.

Also added to this update is a cycle() function that returns number of cycles in a sample, use this in the same way srate() is being used but where you need the cycle numbers.. cyclecnt I think. And I added key pass through so you can play sounds when the dialog is focussed.

Phew! Thanks for all your input Posted Image
  • 0

#24 Djeroek

Djeroek

    Probably More God or Borg Than Human Member

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

Posted 28 April 2014 - 04:42 PM

WARNING: Make sure you back up your definitions file, before you install the update as it will overwrite your old files. I have added everything up to [modify stack] so any you have done after that will be lost unless you back them up.


Thanks for the heads up!

Btw, after installing the latest version, and initializing the script on an empty instrument it still throws up an error notice;

'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

std::logic_error: 'can not access properties of a sample buffer with no sample data.'
stack traceback:
[C]: ?
[C]: in function '__index'
[string "do..."]:36: in function <[string "do..."]:35>
main.lua:47: in function 'srate'
.\definitions.lua:44: in main chunk
[C]: in function 'require'
main.lua:125: in function 'show_dialog'
main.lua:389: in function <main.lua:386>


If I do load a sample, than open up the tool it says;

'C:\Users\plugexpert\AppData\Roaming\Renoise\V3.0.0\Scripts\Tools\com.afta8.CdpInterface.xrnx\' failed to execute in one of its menu entry functions.

Please contact the author (afta8 | fathand@gmail.com ) for assistance...

main.lua:125: loop or previous error loading module 'definitions'
stack traceback:
[C]: in function 'require'
main.lua:125: in function 'show_dialog'
main.lua:389: in function <main.lua:386>


I have also marked of where your presets are in the definitions file also and I won't mess with them for now as you might want to change them given some of the new things I have added.


Cool!

Also added to this update is a cycle() function that returns number of cycles in a sample, use this in the same way srate() is being used but where you need the cycle numbers.. cyclecnt I think. And I added key pass through so you can play sounds when the dialog is focussed.


Nice dude, thnx :drummer:

edit;

installed the script again, and now the gui opens without error, maybe because I hadn't closed down Renoise?

Edited by Djeroek, 28 April 2014 - 04:44 PM.

  • 0

#25 afta8

afta8

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 565 posts
  • Gender:Male
  • Location:London

Posted 28 April 2014 - 05:48 PM

installed the script again, and now the gui opens without error, maybe because I hadn't closed down Renoise?


Possibly to do with the way it loads definitions, it shouldn't come up with that no sample error as it checks for that before it does anything else. Not sure why it came up again, but lets see how it goes.
  • 0