Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread name not displayed in logs #37

Open
MartinDelille opened this issue Feb 15, 2021 · 2 comments
Open

Thread name not displayed in logs #37

MartinDelille opened this issue Feb 15, 2021 · 2 comments

Comments

@MartinDelille
Copy link
Contributor

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}
...
@lpil
Copy link
Owner

lpil commented Feb 15, 2021

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.

@MartinDelille
Copy link
Contributor Author

3.3.1 on MacOS 10.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants