DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Discuss about Hardware diy and tweaks

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby Klaus » Tue Feb 18 2014 21:10

Hi all,

i want to share my experiences with DRC on Raspberry+HifiBerry DAC and volumio with you. And i hope for your hints...

First i get some filters withs DRCDesigner. http://www.alanjordan.org/DRCDesigner/D ... rHelp.html. My equipement: dell inspiron 6400 notebook (ubuntu-studio installed), edirol ua1-ex soundinterface, and a calibrated low-cost microphone. DRCDesigner is also available for windows.

Then, i try a lot with brutefir. With poor results. Whether with Jackd or the pipe-option in MPD was it possible for me to get a good sound. Many terrible distorsions et. al.

Then i found folve. https://github.com/hzeller/folve. "Folve is a FUSE filesystem that convolves audio files on-the-fly."

Connect via ssh to volumio

ssh volumio@volumio

On volumio i make

Code: Select all
sudo apt-get update
sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev  libfuse-dev libmicrohttpd-dev binutils g++ gcc make git


then

Code: Select all
git clone https://github.com/hzeller/folve

cd folve

make
sudo make install


Great, no errors!

I put my jconvoler-filters, created with DRCDesigner, in the folve-directory. I have to name the filters as shown on the folve-site (https://github.com/hzeller/folve).

Users and groups, an epic-theme for me. When i was starting folve as user volumio, mpd could not read the files. So i add mpd to fuse-group, and change some rights. I think, there are maybe better ways, please take a look at my questions at the end of this posting.

Code: Select all
sudo usermod -aG fuse mpd
chmod 777 -R /home/volumio/folve/

( comment: some errors by "chmod 666")

and reboot

After reboot:

Code: Select all
mkdir /run/shm/folve
chmod 777 /run/shm/folve


At this point MPD can start folve:

Code: Select all
cd folve/


Code: Select all
sudo -u mpd ./folve -C filter -p 17322 -f /mnt/NAS/Flac /run/shm/folve


[Comments:
"-C filter" give the direction where my filters are located
"-p 17322" Port to run the HTTP status server on
"/mnt/NAS/Flac" is the direction, where my flacs are mounted
you can find more options on the folve website or in the readme file]

with the option "-f" you can see a print on the console like this:

folve[2951]: Version 2012-12-09 (commit=eda44dc) started (with fuse=2.9; sndfile=libsndfile-1.0.25).
folve[2951]: Serving '/mnt/NAS/Flac' on mount point '/run/shm/folve'
folve[2951]: HTTP status server on port 17322; refresh=10
folve[2951]: Switching config directory to 'filter'

Updating the mpd-database and the "folve-files" appears in ramplay and are ready to play!
Amazing, great sound! No pops, glitches or distorsions.

The filters can be switched by webbrowser. adress is "volumio:17322"

Finally, i wrote a simple bash-script to create the mount-direction in /run/shm/ and start folve at boot. rc.local was reset after reboot. I edit /var/www/_OS_SETTINGS/etc/rc.local instead. Now it works.

Greetings

Klaus


edit:

no overclocking, cpu 30-50%, temp: 44,9°, KiB Mem: 496948 total, 417344 used, 79604 free, 14568 buffers
2014-02-18-223401_1024x600_scrot.png
2014-02-18-223401_1024x600_scrot.png (122.35 KiB) Viewed 14332 times
User avatar
Klaus
Sunday DIYer
Sunday DIYer
 
Posts: 43
Joined: Tue Jan 21 2014 10:38

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Also successful tested with Volumio 1.2

Postby Klaus » Sun Mar 30 2014 10:24

2014-03-30-122055_1024x600_scrot.png
2014-03-30-122055_1024x600_scrot.png (69.79 KiB) Viewed 13951 times
2014-03-30-121705_1024x600_scrot.png
2014-03-30-121705_1024x600_scrot.png (80.23 KiB) Viewed 13951 times
User avatar
Klaus
Sunday DIYer
Sunday DIYer
 
Posts: 43
Joined: Tue Jan 21 2014 10:38


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby flaviod » Fri Jun 13 2014 11:37

Very interesting also for me, is possible to play also mp3 and Web radio or only flac?

Inviato dal mio Nexus 4 utilizzando Tapatalk
Random avatar
flaviod
Sunday DIYer
Sunday DIYer
 
Posts: 16
Joined: Sun May 18 2014 23:17


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby balbuze » Sat Jun 14 2014 15:48

Hi !
I'm very interested too. That is true that the room is often the neglected part of HIFI because it could be expansive, difficult, non waf ;) etc to modify it. And I like the idea of doing correction directly from our favourite Hifi player ! So I start looking for a good mic usable to do measurement. Of course some ref are given but It's expansive (mic 59€ + power supply 25€ + cable ..) for a one shot use... But I found this mic : http://www.amazon.com/Dayton-Audio-iMM- ... B00ADR2B84 or in France http://www.audiophonics.fr/dayton-imm6- ... -8194.html. It's rather cheap I think.
Do you think it is usable to do measurement with DRC ? I need a cable (2m) to link my computer to the mic.
Thanks for your advice
@flaviod : I read somwhere that mp3 files are not supported but ogg and flac are.
User avatar
balbuze
Moderator
 
Posts: 1614
Joined: Thu May 08 2014 08:42
Location: Isère France


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby balbuze » Sun Jun 15 2014 11:54

hello !
I tried to install folve according to Klaus's instructions but in my fresh 1.4 install I've got the the following error when I enter
Code: Select all
sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev  libfuse-dev libmicrohttpd-dev binutils g++ gcc make git

I get :
Code: Select all
pi@volumio:~$ sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev  libfuse-dev libmicrohttpd-dev binutils g++ gcc make git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsndfile1-dev' instead of 'libsndfile-dev'
binutils is already the newest version.
libsndfile1-dev is already the newest version.
make is already the newest version.
libflac-dev is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 g++ : Depends: g++-4.6 (>= 4.4.7-1~) but it is not going to be installed
       Depends: gcc-4.6 (>= 4.4.7-1~) but it is not going to be installed
 gcc : Depends: gcc-4.6 (>= 4.4.7-1~) but it is not going to be installed
 libzita-convolver-dev : Depends: libfftw3-dev (>= 3.1.2-3.1) but it is not going to be installed
                         Depends: libzita-convolver3 (= 3.1.0-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What I have to do for this problem ?
Thanks you
User avatar
balbuze
Moderator
 
Posts: 1614
Joined: Thu May 08 2014 08:42
Location: Isère France


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby flaviod » Sun Jun 15 2014 21:39

For now I don't try to apply drc to Volumio but try with computers (drc designer and foobar with correct plug-in) :very impressed! Last time I changed my bookshelf loudspeaker Jmlab db09 with tower B&W P6 that do me big problem of insertion on room, with speak at 1,5 my from wall sound is amazing (but in center of room no good for live), in the same place of old speakers are broken sounds, too near to wall and furniture. With drc chain (for now I used mic of my laptop) change all, voice now are good and bass are now immersive. Very impressed, drc is future of hi fi sound (also if cheap)

Inviato dal mio Nexus 4 utilizzando Tapatalk
Random avatar
flaviod
Sunday DIYer
Sunday DIYer
 
Posts: 16
Joined: Sun May 18 2014 23:17


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby balbuze » Tue Jun 17 2014 18:49

Hi!
ok I really need help. How do I manage to install gcc (and other packages I need for folve) in Volumio 1.4 ? I try to change sources of package to Jessy but it failed and it kills Volumio (no more ssh) and I have to re-install the system.
Please help ! ;) ;)
User avatar
balbuze
Moderator
 
Posts: 1614
Joined: Thu May 08 2014 08:42
Location: Isère France


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby flaviod » Wed Jun 18 2014 15:55

Yesterday I try on Volumio 1.2 and work fine, maybe is a good idea downgrade to version 1.2?

Inviato dal mio Nexus 4 utilizzando Tapatalk
Random avatar
flaviod
Sunday DIYer
Sunday DIYer
 
Posts: 16
Joined: Sun May 18 2014 23:17


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby balbuze » Wed Jun 18 2014 18:14

@flaviod
ok I will test with 1.2. But I'd really like to do it with the last version.
In fact I did the way like written http://volumio.readthedocs.org/en/lates ... ngmpd.html execpt that I did : sudo apt-get update and sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev libfuse-dev libmicrohttpd-dev binutils g++ gcc make git
and I get :
Code: Select all
sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev  libfuse-dev libmicrohttpd-dev binutils g++ gcc make git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsndfile1-dev' instead of 'libsndfile-dev'
The following extra packages will be installed:
  cpp cpp-4.9 fuse g++-4.9 gcc-4.9 gcc-4.9-base git-man libasan1 libatomic1
  libcloog-isl4 liberror-perl libfftw3-bin libfftw3-dev libfftw3-double3
  libfftw3-single3 libfuse2 libgcc-4.9-dev libgcc1 libgcrypt11 libgcrypt11-dev
  libgmp10 libgomp1 libisl10 libmicrohttpd10 libmpc3 libmpfr4 libselinux1
  libselinux1-dev libsepol1 libsepol1-dev libsndfile1 libstdc++-4.9-dev
  libstdc++6 libubsan0 libzita-convolver3 rsync
Suggested packages:
  binutils-doc cpp-doc gcc-4.9-locales gcc-4.9-doc libstdc++6-4.9-dbg
  gcc-multilib manpages-dev automake1.9 libtool flex bison gdb gcc-doc
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan1-dbg
  liblsan0-dbg libtsan0-dbg libubsan0-dbg libvtv0-dbg libcilkrts5-dbg
  libquadmath-dbg binutils-gold git-daemon-run git-daemon-sysvinit git-doc
  git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn
  libfftw3-doc rng-tools libgcrypt11-doc libstdc++-4.9-doc make-doc
The following NEW packages will be installed:
  binutils cpp cpp-4.9 g++ g++-4.9 gcc gcc-4.9 gcc-4.9-base git git-man
  libasan1 libatomic1 libcloog-isl4 liberror-perl libfftw3-bin libfftw3-dev
  libfftw3-double3 libfftw3-single3 libfuse-dev libgcc-4.9-dev libgmp10
  libgomp1 libisl10 libmicrohttpd-dev libmicrohttpd10 libmpc3 libmpfr4
  libselinux1-dev libsepol1-dev libstdc++-4.9-dev libubsan0
  libzita-convolver-dev libzita-convolver3 rsync
The following packages will be upgraded:
  fuse libflac-dev libfuse2 libgcc1 libgcrypt11 libgcrypt11-dev libselinux1
  libsepol1 libsndfile1 libsndfile1-dev libstdc++6 make
12 upgraded, 34 newly installed, 0 to remove and 446 not upgraded.
Need to get 30.0 MB of archives.
After this operation, 95.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  gcc-4.9-base libgcc1 libstdc++6 libselinux1 libsepol1 libgcrypt11-dev
  libgcrypt11 libasan1 libatomic1 libgmp10 libisl10 libcloog-isl4 libgomp1
  libfftw3-double3 libfftw3-single3 fuse libfuse2 libmicrohttpd10 libmpfr4
  libflac-dev libsndfile1-dev libsndfile1 libubsan0 libzita-convolver3 libmpc3
  binutils cpp-4.9 cpp libgcc-4.9-dev gcc-4.9 gcc libstdc++-4.9-dev g++-4.9
  g++ liberror-perl git-man git libfftw3-bin libfftw3-dev libsepol1-dev
  libselinux1-dev libfuse-dev libmicrohttpd-dev libzita-convolver-dev make
  rsync
Install these packages without verification [y/N]? y
Get:1 http://http.debian.net/debian/ jessie/main gcc-4.9-base armhf 4.9.0-6 [156 kB]
Get:2 http://http.debian.net/debian/ jessie/main libgcc1 armhf 1:4.9.0-6 [40.1 kB]
Get:3 http://http.debian.net/debian/ jessie/main libstdc++6 armhf 4.9.0-6 [241 kB]
Get:4 http://http.debian.net/debian/ jessie/main libselinux1 armhf 2.3-1 [80.2 kB]
Get:5 http://http.debian.net/debian/ jessie/main libsepol1 armhf 2.3-1 [114 kB]
Get:6 http://http.debian.net/debian/ jessie/main libgcrypt11-dev armhf 1.5.3-4 [281 kB]
Get:7 http://http.debian.net/debian/ jessie/main libgcrypt11 armhf 1.5.3-4 [242 kB]
Get:8 http://http.debian.net/debian/ jessie/main libasan1 armhf 4.9.0-6 [168 kB]
Get:9 http://http.debian.net/debian/ jessie/main libatomic1 armhf 4.9.0-6 [6,062 B]
Get:10 http://http.debian.net/debian/ jessie/main libgmp10 armhf 2:6.0.0+dfsg-4 [203 kB]
Get:11 http://http.debian.net/debian/ jessie/main libisl10 armhf 0.12.2-1 [334 kB]
Get:12 http://http.debian.net/debian/ jessie/main libcloog-isl4 armhf 0.18.2-1 [49.0 kB]
Get:13 http://http.debian.net/debian/ jessie/main libgomp1 armhf 4.9.0-6 [33.9 kB]
Get:14 http://http.debian.net/debian/ jessie/main libfftw3-double3 armhf 3.3.4-1 [431 kB]
Get:15 http://http.debian.net/debian/ jessie/main libfftw3-single3 armhf 3.3.4-1 [698 kB]
Get:16 http://http.debian.net/debian/ jessie/main fuse armhf 2.9.3-10 [68.2 kB]
Get:17 http://http.debian.net/debian/ jessie/main libfuse2 armhf 2.9.3-10 [122 kB]
Get:18 http://http.debian.net/debian/ jessie/main libmicrohttpd10 armhf 0.9.33-1 [55.8 kB]
Get:19 http://http.debian.net/debian/ jessie/main libmpfr4 armhf 3.1.2-1 [503 kB]
Get:20 http://http.debian.net/debian/ jessie/main libflac-dev armhf 1.3.0-2 [125 kB]
Get:21 http://http.debian.net/debian/ jessie/main libsndfile1-dev armhf 1.0.25-9 [717 kB]
Get:22 http://http.debian.net/debian/ jessie/main libsndfile1 armhf 1.0.25-9 [207 kB]
Get:23 http://http.debian.net/debian/ jessie/main libubsan0 armhf 4.9.0-6 [69.4 kB]
Get:24 http://http.debian.net/debian/ jessie/main libzita-convolver3 armhf 3.1.0-4 [15.6 kB]
Get:25 http://http.debian.net/debian/ jessie/main libmpc3 armhf 1.0.1-1 [35.6 kB]
Get:26 http://http.debian.net/debian/ jessie/main binutils armhf 2.24.51.20140604-3 [3,141 kB]
Get:27 http://http.debian.net/debian/ jessie/main cpp-4.9 armhf 4.9.0-6 [4,203 kB]
Get:28 http://http.debian.net/debian/ jessie/main cpp armhf 4:4.9.0-3 [16.9 kB]
Get:29 http://http.debian.net/debian/ jessie/main libgcc-4.9-dev armhf 4.9.0-6 [351 kB]
Get:30 http://http.debian.net/debian/ jessie/main gcc-4.9 armhf 4.9.0-6 [4,399 kB]
Get:31 http://http.debian.net/debian/ jessie/main gcc armhf 4:4.9.0-3 [5,058 B]
Get:32 http://http.debian.net/debian/ jessie/main libstdc++-4.9-dev armhf 4.9.0-6 [1,132 kB]
Get:33 http://http.debian.net/debian/ jessie/main g++-4.9 armhf 4.9.0-6 [5,452 kB]
Get:34 http://http.debian.net/debian/ jessie/main g++ armhf 4:4.9.0-3 [1,506 B]
Get:35 http://http.debian.net/debian/ jessie/main liberror-perl all 0.17-1.1 [22.4 kB]
Get:36 http://http.debian.net/debian/ jessie/main git-man all 1:2.0.0-1 [1,254 kB]
Get:37 http://http.debian.net/debian/ jessie/main git armhf 1:2.0.0-1 [2,624 kB]
Get:38 http://http.debian.net/debian/ jessie/main libfftw3-bin armhf 3.3.4-1 [41.7 kB]
Get:39 http://http.debian.net/debian/ jessie/main libfftw3-dev armhf 3.3.4-1 [1,128 kB]
Get:40 http://http.debian.net/debian/ jessie/main libsepol1-dev armhf 2.3-1 [156 kB]
Get:41 http://http.debian.net/debian/ jessie/main libselinux1-dev armhf 2.3-1 [149 kB]
Get:42 http://http.debian.net/debian/ jessie/main libfuse-dev armhf 2.9.3-10 [140 kB]
Get:43 http://http.debian.net/debian/ jessie/main libmicrohttpd-dev armhf 0.9.33-1 [165 kB]
Get:44 http://http.debian.net/debian/ jessie/main libzita-convolver-dev armhf 3.1.0-4 [9,030 B]
Get:45 http://http.debian.net/debian/ jessie/main make armhf 4.0-8 [334 kB]   
Get:46 http://http.debian.net/debian/ jessie/main rsync armhf 3.1.0-3 [324 kB]
Fetched 30.0 MB in 2min 50s (176 kB/s)                                         
Reading changelogs... Done
apt-listchanges: Mailing root: apt-listchanges: news for volumio
Extracting templates from packages: 100%
Selecting previously unselected package gcc-4.9-base:armhf.
(Reading database ... 34174 files and directories currently installed.)
Unpacking gcc-4.9-base:armhf (from .../gcc-4.9-base_4.9.0-6_armhf.deb) ...
Setting up gcc-4.9-base:armhf (4.9.0-6) ...
(Reading database ... 34181 files and directories currently installed.)
Preparing to replace libgcc1:armhf 1:4.8.2-16 (using .../libgcc1_1%3a4.9.0-6_armhf.deb) ...
Unpacking replacement libgcc1:armhf ...
dpkg: error while cleaning up:
 subprocess rm cleanup was killed by signal (Illegal instruction)
Setting up libgcc1:armhf (1:4.9.0-6) ...
dpkg: error processing /var/cache/apt/archives/libstdc++6_4.9.0-6_armhf.deb (--unpack):
 subprocess rm cleanup was killed by signal (Illegal instruction)
Errors were encountered while processing:
 /var/cache/apt/archives/libstdc++6_4.9.0-6_armhf.deb
Illegal instruction
Illegal instruction
sh: 1: [: !=: unexpected operator
W: Duplicate sources.list entry http://http.debian.net/debian/ jessie/main armhf Packages (/var/lib/apt/lists/http.debian.net_debian_dists_jessie_main_binary-armhf_Packages)
W: Duplicate sources.list entry http://http.debian.net/debian/ jessie/non-free armhf Packages (/var/lib/apt/lists/http.debian.net_debian_dists_jessie_non-free_binary-armhf_Packages)
W: You may want to run apt-get update to correct these problems
E: Sub-process /usr/bin/dpkg returned an error code (1)
You have mail in /var/mail/pi
pi@volumio:~$ ls
Illegal instruction

And now most of command (but not all) retruns "illegal instruction"
I cannot ssh to volumio.
I have to re-install the system :?
Any suggestions ?
User avatar
balbuze
Moderator
 
Posts: 1614
Joined: Thu May 08 2014 08:42
Location: Isère France


Re: DSP with Raspberry, HifiBerry and Volumio; DRC + folve

Postby balbuze » Sat Jun 28 2014 13:38

ok now it works !
I want to give some precision to help installation and use.

- on raspberry add these line in your /etc/apt/sources.list
[code]deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free r$
deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi

[/code]
and then type [code]sudo apt-get update[/code]
and [code]sudo apt-get install libsndfile-dev libflac-dev libzita-convolver-dev libfuse-dev libmicrohttpd-dev binutils g++ gcc make git[/code]
and follow the Klaus's post to finish installation.

-on your computeur, if you use linux and want to generate filter with DRCDesigner :
(I did it with Ubuntu 14.04)
install DRCDesigner : [url]http://www.alanjordan.org/DRCDesigner/DRCDesigner.tar.gz[/url]
install drc (sudo apt-get install drc)
install sox (sudo apt-get install sox)
and you need java installed.
Once it is done, in a term go to the DRCDesigner directory and type java -jar DRCDesginer.
Now you can launch a record and generate your filters.
Once it is done, create where you want a directory called myroom (for instance) in wich you create several directories called with the same name than filter (erb, soft, normal,strong etc).
go to the directory /DRCDesigner/ConvolverFilters and copy each wav file in the corresponding directory you just created.
go to the directory /DRCDesigner/JConvolverConfigs and copy each wav file in the corresponding directory you just created
now you have to rename files in each directory. For insance jconvolverERB44100.conf becomes filter-441OO.conf (of course you have to adpat the name exemple is given for 44100Hz sample).
I had to remove the first line of each .conf file (a path in a form /cd /home/toto/DRCDesigner/ConvolverFilter).

Now you can copy the whole directory (myroom) to you raspberry in the folve directory.
And to launch folve "sudo -u mpd ./folve -C myroom -p 17322 -f /mnt/mypath"
If no error, go to you web broswer and type volumio.local:17322.
you 'll see your filters
In an other tab open volumio.local, update your libray and go in ramplay. You should see a folve directory from wich you'll play you music (flac).
in the volumio.local:17322 tab you'll see your playing music and you'll can select the filter you want. You have to stop / restart playing to take effect of your choice.
I had to modify the gain to 0.4 instead of 1 in each .conf file so that avoiding clipping.

Voila ! Hope it will help.
Please let me know if I wrote wrong / incomplete things or want more details ;)
User avatar
balbuze
Moderator
 
Posts: 1614
Joined: Thu May 08 2014 08:42
Location: Isère France

Next

Return to Diy and Tweaks

Who is online

Users browsing this forum: No registered users and 6 guests