Lua Script Tp Create New Songs, Patterns, Tracks

Hi,

I will be pleased to run a script in lua with the purpose to :

  • create a new song;
  • create a number of tracks into the song;
  • create patterns with different lengths (or modify the length of one pattern or get the length of one pattern).

Could you help me to do this ?

Thanks

Assuming you read the basic Lua stuff from lua.org.

All other stuff comes from the Renoise.Song.API.lua.
The functions are not chewed out for you, but they are described in that document (assuming you have that and read it).
You can also download one of the many tools on the tools site that does specific things with patterns and instruments and explore the Lua code inside those tools and fork out routines that you think you can use.

renoise.song().instruments:clear()
renoise.song().patterns:clear()

renoise.song():insert_track_at(index)

renoise.song().sequencer.insert_sequence_at(sequence_pos, pattern_index)
renoise.song().patterns.number_of_lines, _observable

Thanks a lot… Just what I was searching…