(Solved) Shuffle phrase ??

I want to change the shuffle value of a phrase from 0 to 100% via scripting, I have read the manual and appears this code, I,ve tried to write the correct sintax, but no exit. Any help to make a function like this one:

function shuffle()
renoise.song().instruments[].phrase.shuffle_amount [1]
end

Is this correct ??

– Shuffle groove amount for a phrase.

– 0.0 = no shuffle (off), 1.0 = full shuffle

renoise.song().instruments[].phrase.shuffle_amount

-> [number, 0-1]

0.0 to 1.0

The current documentation is incorrect (Renoise 3.1.1):

renoise.song().instruments[].phrase.shuffle_amount

error 1: " phrase", define :phrase(index)

error 2: " shuffle_amount" not exist

Use:

  1. print(renoise.song().instruments[1].phrases[1].shuffle)
  2. print(renoise.song():instrument(1):phrase(1).shuffle)
  3. print(renoise.song().selected_instrument**:phrase(1).shuffle**)
  4. print(renoise.song(). selected_phrase.shuffle )

Remember that the phrase must exist…

Danoise report?

The current documentation is incorrect (Renoise 3.1.1):

renoise.song().instruments.phrase.shuffle_amount

error 1: " phrase", define :phrase(index)

error 2: " shuffle_amount" not exist

Use:

  1. print(renoise.song().instruments[1].phrases[1].shuffle)
  2. print(renoise.song().selected_instrument**:phrase(1).shuffle**)
  3. print(renoise.song(). selected_phrase.shuffle )

Remember that the phrase must exist…

Danoise report?

cool, i’ll snipe that into the github (shuffle_amount → shuffle correction for documentation)

so anyway, i created an instrument, and a phrase, and was able to set this

renoise.song().selected_phrase.shuffle=1

and am seeing

7960 Screen Shot 2018-02-10 at 7.50.41.png

so it does works.

Thanks a lot RaĂşl and ESARUOHO.?

1 Like

cool, i’ll snipe that into the github (shuffle_amount → shuffle correction for documentation)

so anyway, i created an instrument, and a phrase, and was able to set this

renoise.song().selected_phrase.shuffle=1

and am seeing

attachicon.gifScreen Shot 2018-02-10 at 7.50.41.png

so it does works.

@esaruoho.I have seen that you (or Danoise) have corrected the documentation, but it is still wrong…

+renoise.song().instruments.phrase.shuffle

The concrete line should be like this:

renoise.song().instruments[].phrases[].shuffle

There are also a couple of lines that would be well included in the documentation. If I tell you, could they be added?I see that you are a contributor to the documentation…

There are also a couple of lines that would be well included in the documentation. If I tell you, could they be added?I see that you are a contributor to the documentation…

Hi Raul, I have contributed some fixes with typos and corrections, but that is it. anyone whose changes + contributions are merged into the main document, is considered a contributor. I’m not affiliated with Renoise at all. Just some guy finding typos and then correcting them, or in this case, tweaking some of them a bit.

+renoise.song().instruments.phrase.shuffle

The concrete line should be like this:

renoise.song().instruments[].phrases[].shuffle

created another PR, checkhttps://github.com/renoise/xrnx/pull/134/files

created another PR

Thanks, merged

Great initiative btw. - the scripting documentation is invaluable, also for us “veterans” wink.png

Thanks, merged

Great initiative btw. - the scripting documentation is invaluable, also for us “veterans” wink.png

Well, up until a week or a few weeks ago i had no idea that the documentation could just be updated with PRs :slight_smile:

I’m a bit more familiar with github this year as opposed to in 2011 or so, so a bit easier to just put in some typo changes etc.

@esaruoho and @danoise. Thanks! :slight_smile: