sonic-pi-tool icon indicating copy to clipboard operation
sonic-pi-tool copied to clipboard

Thread name not displayed in logs

Open MartinDelille opened this issue 3 years ago • 2 comments

Given the following code from the tutorial, the thread name should be displayed in the logs:

in_thread(name: :bass) do
  loop do
    use_synth :prophet
    play chord(:e2, :m7).choose, release: 0.6
    sleep 0.5
  end
end

in_thread(name: :drums) do
  loop do
    sample :elec_snare
    sleep 1
  end
endCopy

Unfortunately I cannot see it:

$ sonic-pi-tool logs
[Run 1, Time 19.5]
 â”” synth :prophet, {note: 50.0, release: 0.6}

[Run 1, Time 20.0]
 â”” sample "/Applications/Sonic Pi.app/Contents/Resources/etc/samples",
           "elec_snare.flac"

[Run 1, Time 20.0]
 â”” synth :prophet, {note: 43.0, release: 0.6}

[Run 1, Time 20.5]
 â”” synth :prophet, {note: 50.0, release: 0.6}
...

If I run the same code in Sonic Pi, the thread name is well displayed:

=> Starting run 0

=> Loaded sample "/Applications/Sonic Pi.app/Contents/Resources/etc/samples/elec_snare.flac"

{run: 0, time: 0.0}
 └─ sample "/Applications/Sonic Pi.app/Contents/Resources/etc/samples",
             "elec_snare.flac"
 
{run: 0, time: 0.0, thread: :bass}
 └─ synth :prophet, {note: 50.0, release: 0.6}
 
{run: 0, time: 0.5, thread: :bass}
 └─ synth :prophet, {note: 40.0, release: 0.6}
 
{run: 0, time: 1.0, thread: :bass}
 └─ synth :prophet, {note: 47.0, release: 0.6}
...

MartinDelille avatar Feb 15 '21 09:02 MartinDelille

Hello! A PR for this would be accepted, though I am curious about what version of Sonic Pi you are using. I was under the impression that the new security meant that Sonic Pi Tool no longer worked.

lpil avatar Feb 15 '21 10:02 lpil

3.3.1 on MacOS 10.15

MartinDelille avatar Feb 15 '21 11:02 MartinDelille