sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.76k stars 921 forks source link

SP 2.12.0-dev: Restarting Live Loop #1586

Closed mbutz closed 6 years ago

mbutz commented 7 years ago

Hi,

running this (test) code a weird thing happens:

live_loop :ll1 do
  #stop
  sleep 1
  play :c4
  sleep 1
end

live_loop :ll2 do
  #stop
  play :g4
  sleep 2
end
  1. if I uncomment the stop in one of the live loops --as expected-- it will stop running
  2. if I comment this stop again, the live loop will not start again (or: it will not produce any sound)

Is this due to the developement state or could it be some issue with my personal installation?

As indicated in the title, I am running SP 2.12.0-dev on Linux Mint 18.1 downloaded a few days ago.

samaaron commented 7 years ago

Just to be clear, are you hitting Run after commenting/uncommenting the stop?

mbutz commented 7 years ago

Yes;) I did.

It is actually even more weird... I will try to summarize what I just did:

  1. uncomment both stops; hit run; silence; comment both stops; hit run; both loops run.
  2. uncomment both stops; hit run; silence; comment stop/ll1; hit run; ll1 is running; comment stop/ll2; hit run; only ll1 is running, ll2 no sound.
  3. uncomment stop ll1, no sound (note: stop/ll2 is still commented, ll2 should run); hit run; silence; comment stop/ll1; hit run; now both are running (!sic) i. e. ll2 has also began to run again.
samaaron commented 7 years ago

Is this reproducible every time? Or so you see different results through time?

mbutz commented 7 years ago

No, seems to be the regular behaviour. I can switch loops, meaning, I can stop one or the other, it will not come back to live. But as soon as I leave the stop commented and then stop/unstop the other, both will run again.

mbutz commented 7 years ago

Update: If I am testing with three loops the former procedure does not do the trick. If I gradually stop two of them I only can't bring them back to live stop/unstopping the remaining one. The only way to revive the two dead ones is to stop/unstop all of them.

rbnpi commented 7 years ago

Tried here on latest 2.12 dev Seems to work OK. can stop them and then restart with any combination of the stops commented out and behaves as expected, although I think it may not settle down until the second pass through the loops. (used three loops)

samaaron commented 6 years ago

Closing this as this conversation appears to have been waned - hopefully because the issue is now resolved.

Please do re-open if there's still a problem :-)