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

No Sound #491

Open
iacore opened this issue Oct 20, 2023 · 6 comments
Open

No Sound #491

iacore opened this issue Oct 20, 2023 · 6 comments

Comments

@iacore
Copy link

iacore commented Oct 20, 2023

🐞 Bug report 🐞

Description

alda play has no sound. No new audio source in Pulseaudio.

Steps to Reproduce

  1. alda -v2 play -c "piano: c12 e g > c4"

Does the problem happen consistently?
Yes

Expected Behavior

It should make some sound, at least.

Actual Behavior

alda doctor says everything is fine.

Environment

Operating system and version: Linux

Alda version:

$ alda version
alda 2.2.5
$ alda-player info
alda-player 2.2.5
log path: /home/user/.cache/alda/logs

Health check:

$ alda doctor
(all ok)

Logs:

qqw INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/players...
qqw INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/repl-servers...
qqw INFO  2023-10-20 06:09:28 Main.run:77 - Starting receiver, listening on port 37537...
fgx INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/players...
qqw INFO  2023-10-20 06:09:28 MidiEngine.<init>:276 - Initializing MIDI sequencer...
fgx INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/repl-servers...
qqw INFO  2023-10-20 06:09:28 MidiEngine.<init>:281 - Initializing MIDI synthesizer...
fgx INFO  2023-10-20 06:09:28 Main.run:77 - Starting receiver, listening on port 45865...
zbx INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/players...
zbx INFO  2023-10-20 06:09:28 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/repl-servers...
zbx INFO  2023-10-20 06:09:28 Main.run:77 - Starting receiver, listening on port 40081...
fgx INFO  2023-10-20 06:09:28 MidiEngine.<init>:276 - Initializing MIDI sequencer...
fgx INFO  2023-10-20 06:09:28 MidiEngine.<init>:281 - Initializing MIDI synthesizer...
zbx INFO  2023-10-20 06:09:28 MidiEngine.<init>:276 - Initializing MIDI sequencer...
zbx INFO  2023-10-20 06:09:28 MidiEngine.<init>:281 - Initializing MIDI synthesizer...
qqw INFO  2023-10-20 06:09:31 Main.run:90 - Starting player...
fgx INFO  2023-10-20 06:09:31 Main.run:90 - Starting player...
zbx INFO  2023-10-20 06:09:31 Main.run:90 - Starting player...
qqw INFO  2023-10-20 06:09:42 Main.invoke:95 - Stopping receiver...
qqw INFO  2023-10-20 06:09:42 Main.invoke:97 - Stopping player...
xnu INFO  2023-10-20 06:12:20 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/players...
xnu INFO  2023-10-20 06:12:20 StateManager.cleanUpStaleStateFiles:72 - Cleaning up stale files in /home/user/.cache/alda/state/repl-servers...
xnu INFO  2023-10-20 06:12:20 Main.run:77 - Starting receiver, listening on port 38459...
xnu INFO  2023-10-20 06:12:20 MidiEngine.<init>:276 - Initializing MIDI sequencer...
xnu INFO  2023-10-20 06:12:20 MidiEngine.<init>:281 - Initializing MIDI synthesizer...
xnu INFO  2023-10-20 06:12:22 Main.run:90 - Starting player...
@iacore iacore added the bug label Oct 20, 2023
@daveyarwood
Copy link
Member

Hi @iacore , thanks for reporting this. Unfortunately, I don't have any strong theories about what might be the cause of the issue. Everything in the logs you posted looks normal, and the alda doctor checks passing would suggest that it's not an issue with the player processes starting or the MIDI system failing to start, etc.

My best guess is that this is some kind of Pulseaudio-related issue. Just as a point of reference, I have been using Alda for years with no issues on my Ubuntu laptops (16.04, 20.04, 22.04) with Pulseaudio.

Out of curiosity, what Linux distro are you using?

@daveyarwood
Copy link
Member

daveyarwood commented Oct 21, 2023

And as a sanity check: is audio working for you, in general? For example, can you hear YouTube videos?

@iacore
Copy link
Author

iacore commented Oct 21, 2023

My Linux distro is Artix.

Every other application has sound.

I found a workaround to the problem

alda-player run -p 27278
ALDA_DISABLE_SPAWNING=yes alda -v 2 play -p 27278 -c 'piano: c e g'

@daveyarwood
Copy link
Member

Very interesting! So it seems like maybe sound isn't being produced when the processes are spawned in the background, but it works when the process is running in the foreground 🤔

@iacore
Copy link
Author

iacore commented Oct 22, 2023

Now the workaround doesn't work...

@UlyssesZh
Copy link
Contributor

Same symptom. Using foreground alda-player does not fix this either. Distro is NixOS 24.05.

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

No branches or pull requests

3 participants