Problems With `renoise.song().tracks[1].mute_State`

Play a long sample on track 1.

Run this code in the terminal:

  
renoise.song().tracks[1].mute_state = renoise.Track.MUTE_STATE_OFF;   
renoise.song().tracks[1].mute_state = renoise.Track.MUTE_STATE_ACTIVE;  
  

Expected: Sample is cut / faded accordingly.
Actual: Nothing.

I need to trigger this type of “cut” for Grid Pie; scope style DJ’ing. Scope is not supposed to be “OFF” it’s just supposed to act as if I were to double click really really really fast.

If this related to you Mute Mode from the drop-down menu?

Off will only stop NEW notes from being triggered. To Mute currently playing samples you need it set to Mute.

No, it’s the same problem with renoise.Track.MUTE_STATE_MUTED

Well my tests from Terminal show it as working exactly the same as the Mute and Off modes work when clicking on the Scopes.

Mute - Instant silence no matter of any Effects (DSPs) and Envelopes set.

Off - Triggers a Note Off event, plays envelopes from the Sustain point onwards and effects (Reverb tails etc) still active.

Also remember you need to active Autoseek if you want the audio to come back when UnMuting, without it getting to a new note trigger.

Yay, we’ll need a dedicated function for this. The hackaround obviously does not always work…

I see now that your problem is running both of those commands straight after each other. As Renoise API runs on the GUI level only the latest one seems to have any effect. Looks like again you will need to use the Delay (OneShotIdle) to produce your slight pause inbetween commands but I haven’t quite managed to understand how to use that yet…

It works with OneShotIdleNotifier(), cheers!

  
rns.tracks[x].mute_state = renoise.Track.MUTE_STATE_OFF  
OneShotIdleNotifier(0, function() rns.tracks[x].mute_state = renoise.Track.MUTE_STATE_ACTIVE end)