EYESY on RasPi4 w/ Pisound (step-by-step guide)

Hello again!

I’ve uploaded a small video for you to see where I’m at:

(sorry for the grunt mid-vid, was clearing my throat, sounds weird)

Also, an image:

Background melody is the audio going into the raspberry pi and back out again via a ugreen USB soundcard on the pi.

Really appreciate any help,

Thank you and best regards,
Francisco

So yeah - you’re getting errors.

In the image you posted - look at the bottom pane of the window. This shows some errors with alsaaudio. I think it’s because you don’t have a default audio device defined. I’m not sure how that is setup on pisound.

EDIT:

on a regular Raspi I would setup the default audio card with the following:

create asound.conf

sudo nano /etc/asound.conf

then add

pcm.!default  {
  type hw card 0
}
ctl.!default {
  type hw card 0
}

save and reboot

1 Like

Yes, this is the way, you have to also figure out what is the Pisound’s card number, you can do so by running aplay -l, usually it’s 1 or 2, 0 is usually the built-in audio (analog & HDMI).

1 Like

Thank you so much for taking the time to help out!

I have a very busy day today, hopefully tomorrow I will have time to try it out. I’ll make sure to let you – and anyone interested who’s reading this – know if it worked.

Best regards and happy holidays!

Francisco

Trying to install Eyesy on a RPi 3 with Pisound hat.
Followed the installation walkthrough but now I hit a wall after

git clone https://github.com/okyeron/EYESY_OS_for_RasPi.git Eyesy
cd Eyesy
./deploy.sh

the script stops with

+ sudo apt install -y python-pygame python-liblo python-alsaaudio python-pip libffi-dev nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-pygame is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package python-liblo is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-pip

E: Package 'python-pygame' has no installation candidate
E: Package 'python-liblo' has no installation candidate
E: Unable to locate package python-alsaaudio
E: Package 'python-pip' has no installation candidate

Do you have any hints?

Regards,
Tobias.

Hello again,

So I followed the instructions you and @Giedrius provided and got the same error with the asound.conf settings on 0 + 0 and 1 + 1. However, on 2 + 2 something was different, it seemed like it was going to start but then failed, with the following message when launching a Python ‘script’ in the EYESY editor:

connected to websocket server
Started Python Pygame Video Engine.
pygame 1.9.4.post1
Hello from the pygame community. Contribute - pygame wiki
starting…
[‘main.py’]
pygame version 1.9.4.post1
opening frame buffer…
opened screen at: (1280, 720)
Fatal Python error: (pygame parachute) Segmentation Fault
eyesy-python.service: Main process exited, code=killed, status=6/ABRT
eyesy-python.service: Failed with result ‘signal’.

I feel I’m close… any idea what could be the issue this time?

Best regards and a happy new year to everyone (not expecting an answer right away, eheh)

Cheers,
Francisco

What does aplay -l tell you?

or better yet - what does arecord -L return?

EDIT:
Additional thought - what sound card/device are you using?

In my testing just now, if do not have a valid input/capture device, then python is going to error as it did initially for you. Note - a bare Pi does not have an audio capture device - only output.

I’ll see if i can add some better error checking for the audio devices and debug output.

1 Like

What image are you starting from? Seems like there might be a python incompatibility?

I’ve got a patchbox install that is Linux patchbox 5.4.72-v7+ and everything seems to install normally.

use uname -a to get that kernel info.

FWIW - I’m just now tweaking a branch of the EYESY repo specifically for patchbox. The original repo assumes a bunch of filepaths for the pi user which don’t exist on patchbox installs.

If you have patchbox - you could add git checkout patchbox to the commands just before the deploy script to try this branch.

NOTE - in testing, you may need to disable pulseaudio in the patchbox config - under patchbox modules → pulse audio off.

Also - you may need to change line 43 in /Eyesy/engines/python/sound.py to 44100 if thats what your soundcard uses. Although I think you can leave it at 48000 for patchbox.

2 Likes

I followed the step-by-step guide and used the newest raspberry pi os lite image.

uname -a gives me
Linux raspberrypi 5.10.63-v7+ #1488 SMP Thu Nov 18 16:14:44 GMT 2021 armv7l GNU/Linux

Should I restart from scratch with a diiferent os image or would it be easy to fix incompatibilties by installing missing dependencies (for a noob I am)?

Hey!

I’m using a UGreen USB soundcard with input and output:

I’m doing all this on a Raspberry Pi, not a Pisound. I can try to run the aplay command and see what it gives me later today or within next few days for sure.

Thank you!

I will try to do some testing - I don’t think I have an install that new at the moment.

python --version might be helpful. I’m guessing the default might now be python3

Using a Buster image instead might work.

Hello, me again… :grimacing:

I ran aplay -l:

** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 2: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Thanks!

great - so Card 2 is the one you want

what’s arecord -L look like?

1 Like

Ran arecord -L This is what I got:

null
    Discard all samples (playback) or generate zero samples (capture)
default
output
input
sysdefault:CARD=Device
    USB Audio Device, USB Audio
    Default Audio Device
front:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    Front speakers
surround21:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    Direct sample mixing device
dsnoop:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    Direct sample snooping device
hw:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    Direct hardware device without any conversions
plughw:CARD=Device,DEV=0
    USB Audio Device, USB Audio
    Hardware device with all software conversions

BTW, should I run these commands with audio going in? This command and the previous (aplay -l) I didn’t have any audio going in.

Thanks!

Thanks. I basically got eyesy up and running by starting with the buster image.

1 Like

I used the 05/28/2021 Buster Image mentioned by okyeron above with my Pi 4B, PiSound, and TouchOSC. I followed the instructions and it works! Thank you! Sometimes the ‘trigger’ functionality or the input level meter doesn’t seem to be working - but a reboot corrects it. So far so good…

Would love to know if anyone has had success using the most recent Patchbox OS 11/23/20 image.

1 Like

Hello again everyone!

Still can’t figure this one out… can anyone figure out what else I need to do?

I shared the “arecord -L” as okyreon suggested but can’t decipher it by myself :grimacing:

Thank you very much and best regards!
Francisco

Hello, sorry to bother you again @okyeron:sweat:

Hoping to find out if I should still try making this work or give up…

I did run arecord -L as you suggested and yhis is what I got:

null
Discard all samples (playback) or generate zero samples (capture)
default
output
input
sysdefault:CARD=Device
USB Audio Device, USB Audio
Default Audio Device
front:CARD=Device,DEV=0
USB Audio Device, USB Audio
Front speakers
surround21:CARD=Device,DEV=0
USB Audio Device, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
USB Audio Device, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
USB Audio Device, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
USB Audio Device, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
USB Audio Device, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
USB Audio Device, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
USB Audio Device, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Device,DEV=0
USB Audio Device, USB Audio
Direct sample mixing device
dsnoop:CARD=Device,DEV=0
USB Audio Device, USB Audio
Direct sample snooping device
hw:CARD=Device,DEV=0
USB Audio Device, USB Audio
Direct hardware device without any conversions
plughw:CARD=Device,DEV=0
USB Audio Device, USB Audio
Hardware device with all software conversions

Is there a chance I can get this to work?

Best regards!
Francisco

Not really sure. I did some testing and then forgot whatever I might’ve learned.

It’s possible PulseAudio is installed and is being recognized as the default device no matter what. In my previous experiments I removed PulseAudio from the system to avoid problems.

which might be:

sudo apt-get remove pulseaudio
sudo apt autoremove
sudo /etc/init.d/alsa-utils reset
sudo reboot
1 Like

Hello and thanks again,

Tried it, got this:

“Started Python Pygame Video Engine.
pygame 1.9.4.post1
Hello from the pygame community. Contribute - pygame wiki
starting…
[‘main.py’]
pygame version 1.9.4.post1
opening frame buffer…
opened screen at: (1280, 720)
Fatal Python error: (pygame parachute) Segmentation Fault
eyesy-python.service: Main process exited, code=killed, status=6/ABRT
eyesy-python.service: Failed with result ‘signal’.”

I think it’s a no-go. A bummer but I’ll repurpose the Raspberry for something else. Thank you very much for the support and willingness to help out, really appreciate it!

Best regards,
Francisco