Jump to content


Photo

Entering a chord via lua script

chord lua

  • Please log in to reply
2 replies to this topic

#1 rangarajan

rangarajan

    Member

  • Normal Members
  • PipPip
  • 13 posts

Posted 19 January 2015 - 10:51

Hi,

I am new to renoise and loving the scripting capability.

 

I want to write a script that inserts multiple note values at a given line, in a track. I executed the following statements (one by one) at the Lua terminal:

 

 nc1 = renoise.song().patterns[1].tracks[1].lines[1].note_columns[1]

 nc1.note_value = 60

 nc2 = renoise.song().patterns[1].tracks[1].lines[1].note_columns[2] 

 nc2.note_value = 62 

 

I am able to see the first note in the pattern editor, but not the second one. What is the correct snippet to enter multiple note values for a given line?

 

Regards,

Rangarajan



#2 danoise

danoise

    Probably More God or Borg Than Human Member

  • Renoise Team
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 6979 posts
  • Gender:Male
  • Location:Berlin
  • Interests:wildlife + urban trekking

Posted 19 January 2015 - 13:31

I am able to see the first note

 

That is exactly the problem. You can't see the note, but it's actually there. 

 

After running the script, try going into the pattern editor and hit SHIFT+CTRL+Right arrow 

(Increase Number of Columns in keyboard shortcuts) - you should see the D-5 note in the second column. 

 

In Lua you would simply execute this statement to do the same thing

renoise.song().tracks[].visible_note_columns = [some value]

Tracking with Stuff. API wishlist | Soundcloud


#3 rangarajan

rangarajan

    Member

  • Normal Members
  • PipPip
  • 13 posts

Posted 19 January 2015 - 14:03

Thanks a ton! That works.

 

Regards,

Rangarajan







Also tagged with one or more of these keywords: chord, lua