Jump to content


Photo

[Fixed 2.8.1] Lua Api: Sample_Buffer.loop_Start & Sample_Buffer.lo


  • This topic is locked This topic is locked
1 reply to this topic

#1 mxb

mxb

    Big Super GrandMasta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 703 posts
  • Gender:Male

Posted 09 April 2012 - 15:37

Unless I'm doing something really stupid here, the error message is incorrect.

>>> oprint(renoise.song().selected_sample.sample_buffer.number_of_frames)
132300

>>> renoise.song().selected_sample.loop_end = 0
*** std::logic_error: 'invalid loop_end index '0'. valid values are (1 to 132301).'

>>> renoise.song().selected_sample.loop_end = 1
(works - sets to second sample position - gives 1 sample loop)

>>>renoise.song().selected_sample.loop_end = 132300  -- from sample_buffer.number_of_frames
(works - sets to last sample position)

>>> renoise.song().selected_sample.loop_end = 132301 -- from the error message
*** std::logic_error: 'invalid loop_end index '132301'. valid values are (1 to 132301).'

>>> renoise.song().selected_sample.loop_start = 1
(works - sets to first sample position)

>>> renoise.song().selected_sample.loop_start = 132300
(1st time - moves the loop_end marker but not loop_start, 2nd time - moves the loop_start marker;  Thus this needs to be called twice to ensure setting the loop start marker)

>>> renoise.song().selected_sample.loop_end = 132301
*** std::logic_error: 'invalid loop_start index '132301'. valid values are (1 to 132301).'

Is a footer a sweater for feet?

#2 vV

vV

    God's or Borg's Chief and Ruler of All Species

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 16855 posts
  • Gender:Male
  • Location:Netherlands

Posted 09 April 2012 - 21:42

Yeah, the error message indeed does not contain the correct calculated figure in the description, but the frames that you get returned are correct though.
Simply trust those and work with these. I thought this problem was already fixed, but i guess overlooked.
Vv....


cpu Intel Core i7-4820K @3.70GHz
chipset Intel X79 chipset
mem 32 Gb 2400Mhz
os Win 7 64-bit SP1, DirectX 11
audio ESI ESP1010e - > Driver rev:2.0.6.0
video nVidia Geforce GTX780 - > Driver rev:335.23


Renoise Official Manual