want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
drneon
Posts: 8
Joined: Sun Nov 15, 2020 2:40 pm
Operating System: GNU/Linux other

want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by drneon » Sun Nov 15, 2020 4:32 pm

I have a Raspberry Pi Zero W and I'd like to get Audacity working with mod-script-pipe activated. I know this hardware is incredibly slow for Audacity, but the combination does what I need it to do for now (play multiple wav files as part of a project and selectively mute/unmute individual tracks). For the project I'm building, I'd like the muting/unmuting to be done via a script, and so I'm hoping to use mod-script-pipe to do this. Installing Audacity from a package (Add/Remove software in the GUI, which pointed to an old version, 2.2.2-1+b1 for raspbian buster) seems to result in no modules being available, though the software does run. It looks like I need to build it from the source code to have this module available (if that's not the case, it'd be good to know a simpler way to do this), but I'm running into some trouble here (my Linux knowledge is a bit limited, but I have some programming experience and can follow directions...)

First, seems like the version of cmake installed was too old, but I was able to build and install a newer version, so I have cmake 3.18.4 installed now. I've tried following the directions at viewtopic.php?t=111755
but keep running into the following error when running make after cmake:

Code: Select all

cc: error: unrecognized argument in option ‘-mfpu=neon-vfpv4 -mcpu=cortex-a7’
cc: note: valid arguments to ‘-mfpu=’ are: auto crypto-neon-fp-armv8 fp-armv8 fpv4-sp-d16 fpv5-d16 fpv5-sp-d16 neon neon-fp-armv8 neon-fp16 neon-vfpv3 neon-vfpv4 vfp vfp3 vfpv2 vfpv3 vfpv3-d16 vfpv3-d16-fp16 vfpv3-fp16 vfpv3xd vfpv3xd-fp16 vfpv4 vfpv4-d16
make[2]: *** [cmake-proxies/libsoxr/CMakeFiles/libsoxr.dir/build.make:82: cmake-proxies/libsoxr/CMakeFiles/libsoxr.dir/__/__/lib-src/libsoxr/src/cr.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2048: cmake-proxies/libsoxr/CMakeFiles/libsoxr.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
I'm also not sure how to tell it to build the mod-script-pipe module during or after this process. Any help would be appreciated!

steve
Site Admin
Posts: 81359
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by steve » Sun Nov 15, 2020 5:11 pm

Firstly, Audacity does not officially support Raspberry Pi. It "may" work, but we have not tested on Raspberry Pi.

I think you might find Audacity 2.3.3 easier to build. I posted instructions for Debian here: viewtopic.php?f=19&t=107852
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

drneon
Posts: 8
Joined: Sun Nov 15, 2020 2:40 pm
Operating System: GNU/Linux other

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by drneon » Sun Nov 15, 2020 9:57 pm

Getting somewhere (with SSE disabled), but currently running into the following error:

Code: Select all

make[5]: Entering directory '/home/pi/Downloads/audacity/audacity/build/lib-src/libsndfile/src'
autogen --writable test_endswap.def
fserr 2: cannot stat test_endswap.def:  No such file or directory
make[5]: *** [Makefile:1051: test_endswap.c] Aborted

steve
Site Admin
Posts: 81359
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by steve » Sun Nov 15, 2020 11:03 pm

Do you have libsndfile and libsndfile-dev installed?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

drneon
Posts: 8
Joined: Sun Nov 15, 2020 2:40 pm
Operating System: GNU/Linux other

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by drneon » Sun Nov 15, 2020 11:22 pm

I have libsndfile1 and libsndfile1-dev

Code: Select all

[email protected]:~/Downloads $ apt list libsndfile1
Listing... Done
libsndfile1/stable,now 1.0.28-6 armhf [installed]
[email protected]:~/Downloads $ apt list libsndfile1-dev
Listing... Done
libsndfile1-dev/stable,now 1.0.28-6 armhf [installed]
If I try to install the versions without the 1 at the end, for libsndfile-dev it selects libsndfile1-dev instead, and for libsndfile it says unable to locate package libsndfile.

Code: Select all

[email protected]:~/Downloads $ sudo apt install libsndfile-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsndfile1-dev' instead of 'libsndfile-dev'
libsndfile1-dev is already the newest version (1.0.28-6).
The following packages were automatically installed and are no longer required:
  libflac++6v5 libportsmf0 libsuil-0-0 libvamp-hostsdk3v5
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:~/Downloads $ sudo apt install libsndfile
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libsndfile

steve
Site Admin
Posts: 81359
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by steve » Mon Nov 16, 2020 10:33 am

I think you're going to need help from someone that has successfully built Audacity on a Raspberry Pi. Is there perhaps a Raspberry Pi forum ?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

drneon
Posts: 8
Joined: Sun Nov 15, 2020 2:40 pm
Operating System: GNU/Linux other

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by drneon » Tue Nov 17, 2020 9:27 pm

I was able to get something built following adaptiman's procedure as outlined in
viewtopic.php?f=21&t=99329&start=30

drneon
Posts: 8
Joined: Sun Nov 15, 2020 2:40 pm
Operating System: GNU/Linux other

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by drneon » Mon Dec 14, 2020 2:00 pm

I ran sudo apt update and sudo apt upgrade to upgrade a few things on my system, and now Audacity crashes upon startup. It didn't do that before; I was able to successfully run the build and control it with mod-script-pipe. I've tried re-building it following the same instructions as before, but it will still crash upon startup. I renamed the .audacity-data directory, but that didn't help. I think it has something to do with a change in ALSA in the new Raspbian OS (https://www.raspberrypi.org/blog/new-ra ... mber-2020/ ), but I'm not sure about the specifics (being somewhat new to all of this). I can still get sound to play using other software (i.e. ecasound, using alsahw,1,0 as the output; this works with an inexpensive USB audio adapter that worked previously with Audacity as well).

The terminal output when I start Audacity is below:

Code: Select all

ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.front.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835_hdmi.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5036:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
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_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
running aplay -l yields the following:

Code: Select all

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

steve
Site Admin
Posts: 81359
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: want to get mod-script-pipe module working on Raspberry Pi, problems compiling

Post by steve » Mon Dec 14, 2020 6:54 pm

When using ALSA directly it is important to ensure that no other apps are using the audio device because ALSA is (almost always) a single client device. PulseAudio is intended to overcome that limitation by providing a multi-client audio interface for apps to use.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply