All steps in a song to CSV extractor tool

Hey everybody…
quick question, i wanna know something, from the viewpoint of somebody who does not have any idea where to start googling… nor am i that good at programming…

However, i would love to create a csv file from my renoise projects…
as in… i got 1024step song… turns into a 1024row csv with a few colums that contain played notes… if i be able to extract parameter information of that step, it be awesome…

any keywords, or wisedom, whatever i just dont know?

  1. Try select all in a pattern, copy, paste in notepad. Its xml.

  2. Change the extension of your saved project to .zip and unzip it. You will probably find more xml there.

Not bad idea,
but i want to repeat the process to much for handy-work…
I dont mind learning stuff/googling stuff etc… i am hopefully smart enough to get there eventually :smiley:
for argument sake… lets say i wanna do this process with every renoise song i ever made over the last X years type o amount… i wanna play with all those numbers

maybe this can help:

1 Like

Thank you…
i keep this in mind as a backup plan … it aint bad… but i have the feeling i be much happier with something that runs within renoise, and spits out a csv in a way i am not exactly sure of what i want… the tool will ensure the data be uniform etc…

So my question remains…
if i wanna learn lua/renoise scripting… just so i can read/extract this data straight from the renoise engine… i be happy critter with something i can actually use for other types o fun :smiley:

can somebody give me some keywords i can google? like what api call i need to get a note-on-a-step. and go through a song step by step…

Hope i wont confuse too much now. I’ve done the opposite, i.e. setting notes through lua. But, through the OSC interface.

Basically, open a udp socket to port 8000 locally and sending evaluate commands containing lua code.

Here is some examples from my c#-code, the commands is in lua anyway and they will probably work the other way around inside renoise. They will return the note for example instead of setting it…

Here’s some useful:
renoise.song().selected_line_index = xx // where xx is an integer
renoise.song().patterns[1].tracks[1].clear() // … you can surely guess this one
renoise.song().selected_line.note_columns[xx].note_value = yy // xx and yy is integers, sets note 0-120…
renoise.song().selected_line.note_columns[xx].instrument_value = yy //ints again… set instrument column to yy…
renoise.song().selected_line.note_columns[xx].volume_value = yy // xx and yy is integers again… set vol-column

there is a guide for the different lua objects, but you will learn more by dowloading existing lua plugins and unzip them.

Ah, thats another way of looking at it… thank you…
atleast stuff i can google :smiley:
and yes, its all confusing, but thats a good thing… i am sure sooner or later i can
unconfuse myself…
somewhere on the forum i found a post of dude playing with notes in a script.
i might be able to borrow bits of that…

once i found a way to extract exactly what i want… i can probably add it in some index
and write that index to a csv… that be the second part of the quest …

Just a very small noteworthy thing…
If you don’t need the data to be particularly granular, but just columns or lines, some of these could also potentially be handy when serializing:

tostring(line_object)
tostring(note_column_object)
tostring(effect_column_object)

I actually think I would use these and then split the string, instead of fetching each and every value inside objects. All that remains then is pattern/track iteration and file output.

Thank you, more google words…

Yes, you might be right :smiley: … the previous googlewords gave me some tomcat statement (or something simular sounding, its in my notes somewhere) … it promised nicely formatted data…

So your googlewords kinda brought me to the following pseudocode:

For each pattern in song
for each line in pattern
array = array +renoise.song().selected_line.note_columns[xx].note_value
next line

for each item in array
csv = csv + concat(item)
next item
next pattern

write csv

edit: it was concat :smiley: