Need Tool for Pasting Hz Values for Automation

I need to paste values(in Hz) from a spreadsheet into automation for the old RingMod.

Also, if working with percentages, I need to know how to scale the percent for Hz.

I took a look at the xml for a basic project with automation, but couldn’t figure out how to modify the values to get what I needed.

I looked at the Tools catalog, but didn’t immediately see anything that would allow pasting automation values.

I’ve never worked with Lua before, but I’d be willing to give it a shot, developing the tool if someone can point in the right direction.

Before starting, it seems a little out of place to make a tool for “something old”, which is no longer in the latest version of Renoise…

There are two ways to automate, directly in the pattern editor in the effects column or in the automation editor.

Vvoois_renoise_dsp_ringmod.png

http://tutorials.renoise.com/wiki/File:Vvoois_renoise_dsp_ringmod.png

This seems to be the old RingMod. If you want to build a tool, it may involve using the old API, of the Renoise version with that RingMod. The current RingMod is different, supposedly with a different API.

That said, I suppose you want to vary the frequency of the oscillator along the sequence of a pattern. This implies knowing the number of lines of the pattern, since the resolution will be a variation of the value for each line. If you have 64 lines, you can only vary this value 64 times if you use the effect column of the pattern editor. Instead, you can handle more variations if you use the automation editor (many more points).

Then, there must be a relationship between the number of lines in the pattern (its length) and the groups of values in your Excel file. That is, you need to know exactly what you want to do.

Some notions. The Renoise API can extract data from XML files, but these documents must have a specific structure. LUA can extract data from entire lines within TXT text files. That is, you can create data banks, each line could be a table. In this way, it is possible to import the entire line (the table) through LUA to handle it by physical memory. To change banks, you just have to modify the route. The API allows you to change the path of a file. This would be the example of a TXT:

{300,250,400,500,600}
{560,640,304,976,035}
{345,768,698,904,534}

They are 3 lines, then you get 3 tables.

As a previous step, with the API you can load a specific DSP effect chain (the RingMod) in the selected track. Then load any point of this TXT (or XML) by previously importing it into memory (it would be equivalent to defining a temporary equality). Each point would be a value in Hz, and the conversion is very simple. You just have to meet the minimum and maximum limits (the valid range). All this could be done with a single shooting function.

In addition, it is possible to create a nice GUI where the values appear visually before entering them in the automation editor, or in the pattern editor in the effect column.

But going back to the beginning, you should know exactly what you want to achieve, and this would make more sense if the RingMod were the current one, not an old version.

This is the new version:

3.1_fx-modulation-ringmod.png

http://tutorials.renoise.com/wiki/File:3.1_fx-modulation-ringmod.png

If the old ring mod expressed the value as a frequency where the new uses notes, providing it is acurate, I assume you could use something like this so you can us the current ring mod: http://pages.mtu.edu/~suits/notefreqs.html

If the old ring mod expressed the value as a frequency where the new uses notes, providing it is acurate, I assume you could use something like this so you can us the current ring mod: http://pages.mtu.edu/~suits/notefreqs.html

If this is possible, I think it’s better to use the new RingMod. Regardless of all this, it seems that Artie’s need is to transfer data from a spreadsheet to the pattern editor or automation editor. I see it easier if you use the lines of a txt file. But it may be more practical to focus on a tool that is a constructor of automation banks (for the change of frequency or note). From the tool itself you would enter the data or you could import it from a txt, and then save it in an xml as a bank. So you can get it back quickly when you want. My Kangaroo X120 tool can save permanent banks. The concept is there, but it could be extrapolated to this new tool.

This would allow to easily create “automation loops” for the RingMod note change. It’s just an idea.

Write a lua routine that takes the following table of 5 random ‘hertz’ frequency values:

hz = {300.45, 12.15, 440.23, 810.67, 2543.12}

and produces in the automation of the old ring mod device frequency parameter these points:
autofreqs.png
That’s it. Simple? Took me awhile to figure it out.

Right - the goal is to create sequences/arpeggiate with specific calculated values. Not just 12 tone equal temperament but harmonic/subharmonic series, just intervals, etc.

I forgot to mention that I’d like to do this in the LFO Custom shape external editor so that I can trigger the sequence for performance.

Raul, I’ll take a look at yourKangarooX120 tool when I get home from work. Looks like fun!

[Not that this is important, but I thought I’d try a code block in this new forum format.]

A very tricky function, but to just quickly partially complete the original question about a function that maps Hz to a percentage %…I figured very roughly:

function hztopercent(hz)
  if hz >= 22050 then return 100 end
  local tmp = (((hz / 22050) + (1/19999)) / (1/19999))
  return (math.log10(tmp) / math.log10(20000)) * 100
end

(I suppose you can just divide the resulting number by 100 if you want it normalised between 0 and 1 for automation points etc…)

At least a code block seems to work…oh that’s nice it puts the function name in red :slight_smile: