grz0zrg / fas

C Pixels-based graphical audio synthesizer implemented as a WebSocket server
https://www.fsynth.com
BSD 2-Clause "Simplified" License
131 stars 10 forks source link

Can't seem to start server #5

Closed konsumer closed 3 years ago

konsumer commented 3 years ago

Not sure what the issue is. I am on Pop!OS 20.10 (similar to ubuntu 20.10)

I have my portaudio routed through Jack, and generally either sort of audio works fine, in other apps. I tried with both runtimes and it quits.

Here is jack:

./fas.AppImage
Faust library path set to './faustlibraries'
loading Faust DSP from './faust/generators'
DSP code 0 'pulsewave.dsp' loaded.
loading Faust DSP from './faust/effects'
unique name `Fragment Audio Server-01' assigned

Jack: Using Jack (48000) with 2 output ports
Jack: Using Jack (48000) with 0 input ports
[2021/04/01 09:40:39:0375] NOTICE: Initial logging level 7
[2021/04/01 09:40:39:0375] NOTICE: Libwebsockets version: 2.2.2 julien@julien-desktop-
[2021/04/01 09:40:39:0375] NOTICE: IPV6 not compiled in
[2021/04/01 09:40:39:0375] NOTICE: libev support not compiled in
[2021/04/01 09:40:39:0375] NOTICE: libuv support not compiled in
[2021/04/01 09:40:39:0375] NOTICE:  Threads: 1 each 1024 fds
[2021/04/01 09:40:39:0375] NOTICE:  mem: platform fd map:  8192 bytes
[2021/04/01 09:40:39:0376] NOTICE: Creating Vhost 'default' port 3003, 1 protocols, IPv6 off
[2021/04/01 09:40:39:0376] ERR: ERROR on binding fd 21 to port 3003 (-1 98)
[2021/04/01 09:40:39:0376] ERR: init server failed
[2021/04/01 09:40:39:0376] ERR: Failed to create default vhost
lws_create_context failed.
lws related error occured.
[2021/04/01 09:40:39:0871] NOTICE: lws_context_destroy: ctx (nil)
Bye.

and here is portaudio:

./fas.AppImage 
Faust library path set to './faustlibraries'
loading Faust DSP from './faust/generators'
DSP code 0 'pulsewave.dsp' loaded.
loading Faust DSP from './faust/effects'
ALSA lib pcm_dsnoop.c:642:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1090:(snd_pcm_dmix_open) unable to open slave

PortAudio device 0 (0) - HDA Intel PCH: ALC892 Digital (hw:0,1)
==========
  max input channels : 0
  max output channels : 2
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 1 (0) - HDA Intel PCH: ALC892 Alt Analog (hw:0,2)
==========
  max input channels : 2
  max output channels : 0
  default low input latency : 0.005805
  default low output latency : -1.000000
  default high input latency : 0.034830
  default high output latency : -1.000000
  default sample rate : 44100.000000

PortAudio device 2 (0) - HDA ATI HDMI: 0 (hw:1,3)
==========
  max input channels : 0
  max output channels : 8
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 3 (0) - HDA ATI HDMI: 1 (hw:1,7)
==========
  max input channels : 0
  max output channels : 2
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 4 (0) - HDA ATI HDMI: 2 (hw:1,8)
==========
  max input channels : 0
  max output channels : 8
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 5 (0) - HDA ATI HDMI: 3 (hw:1,9)
==========
  max input channels : 0
  max output channels : 2
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 6 (0) - HDA ATI HDMI: 4 (hw:1,10)
==========
  max input channels : 0
  max output channels : 8
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 7 (0) - HDA ATI HDMI: 5 (hw:1,11)
==========
  max input channels : 0
  max output channels : 8
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 8 (0) - iec958
==========
  max input channels : 0
  max output channels : 2
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 9 (0) - spdif
==========
  max input channels : 0
  max output channels : 2
  default low input latency : -1.000000
  default low output latency : 0.005805
  default high input latency : -1.000000
  default high output latency : 0.034830
  default sample rate : 44100.000000

PortAudio device 10 (0) - jack
==========
  max input channels : 2
  max output channels : 2
  default low input latency : 0.021333
  default low output latency : 0.021333
  default high input latency : 0.021333
  default high output latency : 0.021333
  default sample rate : 48000.000000

PortAudio device 11 (0) - pulse
==========
  max input channels : 32
  max output channels : 32
  default low input latency : 0.008685
  default low output latency : 0.008685
  default high input latency : 0.034807
  default high output latency : 0.034807
  default sample rate : 44100.000000

PortAudio device 12 (0) - default
==========
  max input channels : 32
  max output channels : 32
  default low input latency : 0.008685
  default low output latency : 0.008685
  default high input latency : 0.034807
  default high output latency : 0.034807
  default sample rate : 44100.000000

PortAudio device 13 (2) - system
==========
  max input channels : 4
  max output channels : 2
  default low input latency : 0.021333
  default low output latency : 0.042667
  default high input latency : 0.021333
  default high output latency : 0.042667
  default sample rate : 48000.000000

PortAudio device 14 (2) - PulseAudio JACK Sink
==========
  max input channels : 2
  max output channels : 0
  default low input latency : 0.000000
  default low output latency : 0.000000
  default high input latency : 0.000000
  default high output latency : 0.000000
  default sample rate : 48000.000000

PortAudio device 15 (2) - PulseAudio JACK Source
==========
  max input channels : 0
  max output channels : 2
  default low input latency : 0.000000
  default low output latency : 0.000000
  default high input latency : 0.000000
  default high output latency : 0.000000
  default sample rate : 48000.000000

PortAudio device 16 (2) - Fragment Audio Server
==========
  max input channels : 2
  max output channels : 0
  default low input latency : 0.000000
  default low output latency : 0.000000
  default high input latency : 0.000000
  default high output latency : 0.000000
  default sample rate : 48000.000000

PortAudio: Using device 'default' (44100) with 2 output channels
PortAudio: Using device 'default' (44100) with 0 input channels
[2021/04/01 09:42:19:3529] NOTICE: Initial logging level 7
[2021/04/01 09:42:19:3529] NOTICE: Libwebsockets version: 2.2.2 julien@julien-desktop-
[2021/04/01 09:42:19:3529] NOTICE: IPV6 not compiled in
[2021/04/01 09:42:19:3529] NOTICE: libev support not compiled in
[2021/04/01 09:42:19:3529] NOTICE: libuv support not compiled in
[2021/04/01 09:42:19:3529] NOTICE:  Threads: 1 each 1024 fds
[2021/04/01 09:42:19:3529] NOTICE:  mem: platform fd map:  8192 bytes
[2021/04/01 09:42:19:3529] NOTICE: Creating Vhost 'default' port 3003, 1 protocols, IPv6 off
[2021/04/01 09:42:19:3529] ERR: ERROR on binding fd 28 to port 3003 (-1 98)
[2021/04/01 09:42:19:3530] ERR: init server failed
[2021/04/01 09:42:19:3530] ERR: Failed to create default vhost
lws_create_context failed.
lws related error occured.

This one stays open, but nothing connects to it.

konsumer commented 3 years ago

I killed all fas processes, then restarted the jack-based server and it stayed open and added itself to jack, but still not sure how to get sound output.

Faust library path set to './faustlibraries'
loading Faust DSP from './faust/generators'
DSP code 0 'pulsewave.dsp' loaded.
loading Faust DSP from './faust/effects'

Jack: Using Jack (48000) with 2 output ports
Jack: Using Jack (48000) with 0 input ports
[2021/04/01 09:46:51:2154] NOTICE: Initial logging level 7
[2021/04/01 09:46:51:2154] NOTICE: Libwebsockets version: 2.2.2 julien@julien-desktop-
[2021/04/01 09:46:51:2154] NOTICE: IPV6 not compiled in
[2021/04/01 09:46:51:2154] NOTICE: libev support not compiled in
[2021/04/01 09:46:51:2154] NOTICE: libuv support not compiled in
[2021/04/01 09:46:51:2154] NOTICE:  Threads: 1 each 1024 fds
[2021/04/01 09:46:51:2154] NOTICE:  mem: platform fd map:  8192 bytes
[2021/04/01 09:46:51:2154] NOTICE: Creating Vhost 'default' port 3003, 1 protocols, IPv6 off
[2021/04/01 09:46:51:2155] NOTICE:  Listening on port 3003
[2021/04/01 09:46:51:2155] NOTICE:  mem: per-conn:          536 bytes + protocol rx buf
[2021/04/01 09:46:51:2155] NOTICE:  canonical_hostname = konsumerbox
Fragment Synthesizer successfully started and listening on 127.0.0.1:3003.
Connection successfully established from localhost (127.0.0.1).

Screenshot from 2021-04-01 09-47-58

grz0zrg commented 3 years ago

You may have started the audio server by running the AppImage directly so the server was already started but staying in background. This a known issue (maybe it should be specified on the homepage ?), as of yet i don't know how a terminal can be spawned when running the AppImage directly so the server must be started in a terminal to get any feedback.

The routing look fine, did you tried to slice the canvas (right click on the canvas then click on [+] icon and unpause) ?

Note : just pushed a small update fixing post release issues with FM, this can be found on the homepage

konsumer commented 3 years ago

You may have started the audio server by running the AppImage directly so the server was already started but staying in background.

I think you are right. The jack server seems to reliably start now, and I can connect it to stuff in graph.

The routing look fine, did you tried to slice the canvas (right click on the canvas then click on [+] icon and unpause) ?

I did. It's all very new to me, so I may be some other really basic "getting started" kind of step, but I tried a few of the examples, and hit the pause button to start transport, and it doesn't seem to output any sound. Here is an example I am connected to, right now.

Seems like it's working, as I get this in console:

Connection successfully established from localhost (127.0.0.1).

I just don't hear any sound. Is MIDI mandatory?

konsumer commented 3 years ago

With a MIDI keyboard connected (and enabled), and patch set to "additive midi" example, I do get visual output when I hit keys, just no audio.

Peek 2021-04-01 10-33

grz0zrg commented 3 years ago

The canvas data must be captured by slicing the canvas, try to right click on the canvas (where visuals are shown) and click on the appearing [+] icon, this should add a vertical bar which will capture the data. MIDI is not mandatory.

konsumer commented 3 years ago

That was the missing piece! I hear sounds with most of the examples, now. Thanks!

konsumer commented 3 years ago

I made a quick youtube video of my first run, to help others: https://youtu.be/PfsjM_f9NfQ

I dunno if it's useful for anyone else, but feel free to use it, if you like.

I'm going to close the issue. Thanks for your help!