Hello everyone!
I was wondering if the following suggestion might be possible: I would like to be able to output time stamps (triggered by certain effects) from my Renoise songs.
By time stamp I mean how long the song has been playing from the beginning of the song.
For example:
If I place a predefined effect values (could be something like FFFF in the effect column) in my tracks, the tool would pick these positions and would output the time stamps (perhaps combined with track number).
So the ideal output from finished tool would look something like this:
// track number -- time stamps for each track containing predefined sync-effects
[track1][0.344][2.254][6.254][7.224][12.444] ...
[track4][0.566][6.254][7.254][9.254][12.254] ...
...
It would be cool if this could be outputted as a text file, but as I have noticed, Renoise’s scripting terminal could serve the purpose as well.
I was planning to use this data to sync my computer programs (demos mostly). I could be planning the syncing for x amount of tracks while composing the music in Renoise, then I could just feed my program with this data.
This would allow syncing multiple objects with little effort. For example, I could set one object to follow hihat’s syncs and one object to follow snare’s syncs.
I figured it might be possible with Renoise’s lua functions like:
-- Iterate over all note/effect_ columns in the song.
renoise.song().pattern_iterator:effect_columns_in_song(boolean visible_only)
-> [iterator with pos, column (renoise.EffectColumn object)]
Though, if possible, capturing the effects with time stamps while playing the song in Renoise (realtime, I suppose) might be more painless solution?
I managed to output some data from my song’s effect column with:
pos = 0
line = 0
for pos, column in renoise.song().pattern_iterator:effect_columns_in_song(false) do print("Pos:", pos," Column:", column) end
This is what I get as output from song that has 1 track + master. Track 1 has these effects from the start of the effect column: FFFF, XX00, FFFF, XX00
Pos: table: 000000000BE02B70 Column: FFFF
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: XX00
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: FFFF
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: 0000
Pos: table: 000000000BE02B70 Column: XXFF
It might be worth mentioning that I am fairly new to lua programming, not to mention Renoise’s scripting functionality, so any help, tips and ideas are very welcome!