Jump to content


Photo

Change song position per midi (like pressing F9,F10,F11,F12)


  • Please log in to reply
3 replies to this topic

#1 j(b++)

j(b++)

    Member

  • Normal Members
  • PipPip
  • 12 posts
  • Gender:Male
  • Location:Hannover, Germany

Posted 08 April 2018 - 14:24

Hi Renoise-Forum!!

 

The attached script "MidiCtrldSeqTransp.lua" (copied together from sample scripts) is changing the song position pointer, but in an unpredictable way and producing glitches. Maybe "renoise.song().transport:start_at(<line position>) is not the right method in my use case?

 

I figured out that the the actual line of the playback position could be read out by

print(renoise.song().transport.playback_pos.line)

That works perfectly fine for me.

This property is declared in Renoise.Song.API.lua as playback position from line 516 to 520.

-- Playback position.
renoise.song().transport.playback_pos
  -> [renoise.SongPos object]
renoise.song().transport.playback_pos_beats
  -> [number, 0-song_end_beats

Because it's not explicitly declared as read-only (in contrast to other properties) I assume that it could be also set to a specific value.

Unfortunately I can't figure out how to do that. Could anyone support me in that?

Help would also be very appriciated, if I am trying to control the song position via MIDI in the completely wrong manner.

 

Thanks in advance!!

Attached Files



#2 Conner_Bw

Conner_Bw

    Probably More God or Borg Than Human Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7143 posts
  • Gender:Male
  • Location:Montreal, Quebec, Canada

Posted 08 April 2018 - 15:31

> Because it's not explicitly declared as read-only (in contrast to other properties) I assume that it could be also set to a specific value.
> Unfortunately I can't figure out how to do that. Could anyone support me in that?
 
Are you trying to set it as a number?  It wants SongPos. Ie.
 
local new_pos
new_pos = song.transport.playback_pos
new_pos.line = 13
song.transport.playback_pos = new_pos
 
Look at this script's code for more info:

  • j(b++) likes this

cpu Lenovo X220, Intel i7-2640M @ 2.80GHz ×4 os Windows 10 / Ubuntu 16.04 LTS
My Homepage » : My Renoise Tools » : Normalize Your Sig » : MBC Archives »


#3 Neurogami

Neurogami

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 690 posts
  • Gender:Male
  • Location:Scottsdale AZ
  • Interests:Art, music, technology

Posted 08 April 2018 - 16:56

There may be some useful code in my OSC Jumper tool: https://github.com/N....OscJumper.xrnx



#4 j(b++)

j(b++)

    Member

  • Normal Members
  • PipPip
  • 12 posts
  • Gender:Male
  • Location:Hannover, Germany

Posted 08 April 2018 - 22:53

I could see respective fix my error based on your answers :)

Thanks a lot for your support guys!