I need your help or others, please post your ecasound command line that sets the input as Loopback and output to a hw Soundcard.
I can't make the Loopback to send sound to my hardware card. I am using VLC configured to send Audio to the loopback card.
For input I use the "alsahw" input specifier (not sure what it's really called in ecasound). In the operating system, at the command line, I run aplay -l (that's a lower case "el" not a capitol "I"), which lists the system audio cards and devices. You should see the loopback card show up there at least once - on my systems it shows up twice, each as a separate device. This makes for some experimenting, because in both VLC and ecasound you have two options. IIRC I choose the first one in VLC and then my ecasound input specifier is:
Code:
-i:alsahw,2,1,0
If I understand it correctly, you can think of an analogy of the loopback as a row of physical "pipes". One end of each pipe is assigned device 0 and the other end of the pipe is assigned device 1, while each pipe also gets an ID starting with the number 0. I think what VLC sees is the two ends (device 0 and device 1) of the first pipe (subdevice 0) in this row of pipes (card 2 on my system). So if you use the first listing in VLC you are putting audio into device 0 and you then need to get it out of the "pipe" at the other end, e.g. device 1.
Note that, at least on my systems, the way the snd-aloop device is added to the OS (via /etc/modules) it is ALWAYS the last device in the list. This means if you decide to add more devices (e.g. another USB soundcard) the loopback's card number will increase by 1.
For output from ecasound directly to a device, I use:
Code:
-o:alsa,front:DAC
Code:
[mode_name]:CARD=[card_name],DEV=[device_number]
So, check your audio devices using aplay as I have shown above and then try to implement alsahw and alsa for input and output. Please post again about the result of your efforts.
Thank you!
It works, with " -i:alsahw,x,y "
Where x and y are listed for Loopback when i run "aplay -l"
It works, with " -i:alsahw,x,y "
Where x and y are listed for Loopback when i run "aplay -l"
Hello Charlie, here it is: 🙂
last evening i had 3Way XO working.
PC is a Asus ION330 minipc, 1GHz Atom processor, 2GB RAM, running Ubuntu with desktop interface, sound coming out a Asus U7 USB soundcard.
Initial review: The sound is a different than using a Windows solution (SXQ SXQ XO and EQ). With SXQ i had a ringing that i could not make disappear. Also in bass region, the same LR4 crossover sound different to me (cross point 200Hz).
The pops and clicks that i had in Win are now gone. This is a major problem for me, as my tweeters are directly connected to the outputs of the power amp. In Ubuntu, when i browse my NAS, sometimes the sound stops (i have 1TB of music in one folder.. i have to re-arrange it, split in more folders), but it does not pop or click on resume, so all is good.
VLC is making some problems, i need to read about it, it keeps changing my output device from Loopback to USB soundcard or PC's internal soundcard, when i change track in playlist.
Other than this, for people with no Linux experience like me, it should take few hours (8 in my case) to set this crossover environment to work.
Have a nice day! 🙂
last evening i had 3Way XO working.
PC is a Asus ION330 minipc, 1GHz Atom processor, 2GB RAM, running Ubuntu with desktop interface, sound coming out a Asus U7 USB soundcard.
Initial review: The sound is a different than using a Windows solution (SXQ SXQ XO and EQ). With SXQ i had a ringing that i could not make disappear. Also in bass region, the same LR4 crossover sound different to me (cross point 200Hz).
The pops and clicks that i had in Win are now gone. This is a major problem for me, as my tweeters are directly connected to the outputs of the power amp. In Ubuntu, when i browse my NAS, sometimes the sound stops (i have 1TB of music in one folder.. i have to re-arrange it, split in more folders), but it does not pop or click on resume, so all is good.
VLC is making some problems, i need to read about it, it keeps changing my output device from Loopback to USB soundcard or PC's internal soundcard, when i change track in playlist.
Other than this, for people with no Linux experience like me, it should take few hours (8 in my case) to set this crossover environment to work.
Have a nice day! 🙂
Hello Charlie, here it is: 🙂
last evening i had 3Way XO working.
PC is a Asus ION330 minipc, 1GHz Atom processor, 2GB RAM, running Ubuntu with desktop interface, sound coming out a Asus U7 USB soundcard.
Initial review: The sound is a different than using a Windows solution (SXQ SXQ XO and EQ). With SXQ i had a ringing that i could not make disappear. Also in bass region, the same LR4 crossover sound different to me (cross point 200Hz).
The pops and clicks that i had in Win are now gone. This is a major problem for me, as my tweeters are directly connected to the outputs of the power amp. In Ubuntu, when i browse my NAS, sometimes the sound stops (i have 1TB of music in one folder.. i have to re-arrange it, split in more folders), but it does not pop or click on resume, so all is good.
VLC is making some problems, i need to read about it, it keeps changing my output device from Loopback to USB soundcard or PC's internal soundcard, when i change track in playlist.
Other than this, for people with no Linux experience like me, it should take few hours (8 in my case) to set this crossover environment to work.
Have a nice day! 🙂
Great, thanks for posting your experience with everything.
VLC has "default" settings for most everything. If you open VLC to listen to something and manually select "Loopback" as the play device and then close that instance of VLC or let the OS open another one (e.g. you click on a file or link that is associated with VLC) it will revert to these default settings.
The way you make the defaults do what you want is via the menu Tools > Preferences. I like to immediately switch to "Show Settings: ALL" which is done at the very bottom by clicking the radio button.
To set the loopback as the default output, show all settings and then go to Audio > Output Modules in the left pane of the settings window. You should see a single dropdown dialog box at the right. Set this to ALSA. Now expand the Output Modules section (click on the + or arrow just to the left of that menu item in the list at left). Click on ALSA and in that page choose "Loopback" as the output device.
One other thing that everyone should set as default is, under AUDIO, that the "Secret Rabbit Code" resampler is used. Also, expand "SRC Resampler" under Audio and choose "Sinc function (best quality)" as the resampler type.
Once you have set your Preferences VLC will open each time with those options set. This should fix your problem.
Thanks for the info!
I think earlier in the thread you wrote how you set scripts to run at start-up.
I need to add them before setting VLC i guess.
I need to run:
sudo modprobe snd-aloop
LADSPA_PATH=/usr/local/lib/ladspa:/usr/lib/ladspa
and then the ecasound settings.
If i don't have this 2 lines run, i don't see the Loopdevice and LADSPA plugins fail when called in the ecasound command.
I think earlier in the thread you wrote how you set scripts to run at start-up.
I need to add them before setting VLC i guess.
I need to run:
sudo modprobe snd-aloop
LADSPA_PATH=/usr/local/lib/ladspa:/usr/lib/ladspa
and then the ecasound settings.
If i don't have this 2 lines run, i don't see the Loopdevice and LADSPA plugins fail when called in the ecasound command.
Thanks for the info!
I think earlier in the thread you wrote how you set scripts to run at start-up.
I need to add them before setting VLC i guess.
I need to run:
sudo modprobe snd-aloop
LADSPA_PATH=/usr/local/lib/ladspa:/usr/lib/ladspa
and then the ecasound settings.
If i don't have this 2 lines run, i don't see the Loopdevice and LADSPA plugins fail when called in the ecasound command.
Follow these steps:
I use the nano editor. Type "sudo nano /etc/modules" and add this line at the end:
Code:
snd-aloop
Next up, add the following lines to the (hidden) .profile file that resides in your home directory. Again use the nano editor to open the file for editing: "sudo nano ~/.profile". Add these lines:
Code:
export LADSPA_PATH=/usr/local/lib/ladspa:/usr/lib/ladspa
modprobe snd-aloop
Restart the Raspberry Pi using:
Code:
sudo reboot
After bootup has completed you can check that the path variable has been set by running in a terminal window:
Code:
echo $LADSPA_PATH
Code:
aplay -l
That should do it. If not, let me know.
It works very well! Thank you.
I will add all this info to a .txt that i wrote with all steps from clean Ubuntu install until now so future viewers can make all the steps in no time. I will put it here later, when all is ready.
Another question:
Is there any way to switch between ecasound settings?
The way i do it now, I ctrl+c in terminal to stop ecasound, paste the new command and hit enter.
I need a quicker way, if there is one, to switch between configurations. To adjust delay by ear and XO points. Less time is better.
I will add all this info to a .txt that i wrote with all steps from clean Ubuntu install until now so future viewers can make all the steps in no time. I will put it here later, when all is ready.
Another question:
Is there any way to switch between ecasound settings?
The way i do it now, I ctrl+c in terminal to stop ecasound, paste the new command and hit enter.
I need a quicker way, if there is one, to switch between configurations. To adjust delay by ear and XO points. Less time is better.
Is there any way to switch between ecasound settings? The way i do it now, I ctrl+c in terminal to stop ecasound, paste the new command and hit enter. I need a quicker way, if there is one, to switch between configurations. To adjust delay by ear and XO points. Less time is better.
There is a version of ecasound that has an "interactive mode". It's called ecasound-iam. Google that and you will get a few links to man pages, etc. I believe it is installed along with the ecasound package, but I have never used it so I am not sure if it can change the LADSPA plugin settings. I have a faint recollection that I looked into ecasound-iam and found that it can not change the plugin parameters. This may be why I never used it.
Another approach would be to write a script that first kills ecasound (sudo killall -9 ecasound) and then re-starts it. If you configure ecasound to get the command strings from ecp files instead of having everything on a single command line you can open and modify the ecp file while ecasound is running, save the file, and then run your "restart" macro to re-load the command string from the ecp file. You should be able to leave the editor open the whole time, so that you can change a parameter, listen to the change, and then keep updating/tweaking as you would like.
Is there any way to switch between ecasound settings?
I have been playing around with some of the interactive settings, and it works, but a bit clunky.
You start up the interactive mode by adding -c to the ecasound command.
You can then issue commands such as
Start music: t
Stop: s
To play with different cross-over settings in real time, you can modify the Chain Operators (the ladspa plugin) by the following commands:
a). List chain operator status: cop-status
Make note of the index number, and parameters of the filter you want to change. Here's an example output of the 3rd filter in my test ecasound string
Code:
3. Active Crossover Designer LADSPA filters version 1.02: [1] ACD Filter
... Type 26.000, [2] Filter polarity; 1=normal, -1=reverse 1.000, [3]
... Filter Gain in dB -3.000, [4] Filter Pole Frequency in Hertz 220.000,
... [5] Filter Pole Q 4.000, [6] Filter Zero Frequency in Hertz 1.000, [7]
... Filter Zero Q 1.000
b) Change one parameter: cop-set chainop_id,param_id,value
So in the example above, it would look like cop-set 3,4,300
See here for more details:
ecasound-iam
Another very useful way is to save your ecasound chainsetup commands in *.ecs files. The easiest way to create one is to enter interactive mode (-c) with all the parameters you want, and then save the whole chainsetup by the following command: cs-save-as filename.ecs
Once you have exit out of the interactive mode, you can then edit/copy the files in your favourite text editor (I use nano) to create different test set-ups.
You can then call the file by the following command: ecasound -s ~/filename.ecs
Much easier than having to copy and paste everything. Note that the ladspa filters are listed with the ID, so the ACD filters are referenced by -eli:5221,....
I have been playing around with some of the interactive settings, and it works, but a bit clunky.
You start up the interactive mode by adding -c to the ecasound command.
You can then issue commands such as
Start music: t
Stop: s
To play with different cross-over settings in real time, you can modify the Chain Operators (the ladspa plugin) by the following commands:
a). List chain operator status: cop-status
Make note of the index number, and parameters of the filter you want to change. Here's an example output of the 3rd filter in my test ecasound string
Code:3. Active Crossover Designer LADSPA filters version 1.02: [1] ACD Filter ... Type 26.000, [2] Filter polarity; 1=normal, -1=reverse 1.000, [3] ... Filter Gain in dB -3.000, [4] Filter Pole Frequency in Hertz 220.000, ... [5] Filter Pole Q 4.000, [6] Filter Zero Frequency in Hertz 1.000, [7] ... Filter Zero Q 1.000
b) Change one parameter: cop-set chainop_id,param_id,value
So in the example above, it would look like cop-set 3,4,300
See here for more details:
ecasound-iam
Another very useful way is to save your ecasound chainsetup commands in *.ecs files. The easiest way to create one is to enter interactive mode (-c) with all the parameters you want, and then save the whole chainsetup by the following command: cs-save-as filename.ecs
Once you have exit out of the interactive mode, you can then edit/copy the files in your favourite text editor (I use nano) to create different test set-ups.
You can then call the file by the following command: ecasound -s ~/filename.ecs
Much easier than having to copy and paste everything. Note that the ladspa filters are listed with the ID, so the ACD filters are referenced by -eli:5221,....
Thanks for posting that. Very interesting. I had looked into ecasound-iam before and I thought it could not adjust plugin parameters...
Also, while you can call plugins by ID (e.g. the ID for ACDf is 5221 as you discovered) you can convert these to call-by-name, e.g. -el:ACDf,... if you prefer that.
FYI I have started to rollout a new version of the Active Crossover Designer (ACD-L) that can output the LADSPA filter text strings that you would use in ecasound, either on the command line or in ecp files. ACD-L uses measurements on the loudspeaker as the basis for designing the crossover. This helps to break the "listen and tweak" infinite loop!
I have released the part of the ACD-L tools for doing on-axis design. It also has some new multi-axis modeling features, and those should be available in a few weeks time.
You can find ACD-L by clicking on the ACD link on my software page:
Charlie's Audio Pages: software
I have released the part of the ACD-L tools for doing on-axis design. It also has some new multi-axis modeling features, and those should be available in a few weeks time.
You can find ACD-L by clicking on the ACD link on my software page:
Charlie's Audio Pages: software
Thanks for posting that. Very interesting. I had looked into ecasound-iam before and I thought it could not adjust plugin parameters...
Also, while you can call plugins by ID (e.g. the ID for ACDf is 5221 as you discovered) you can convert these to call-by-name, e.g. -el:ACDf,... if you prefer that.
There are other neat things that can be done with the interactive commands - another thing I have also used is to load multiple input files and attached them to separate audiochains. It's then possible to flip back and forth between different songs for testing. But, it's probably easier to just restart 🙂
If someone has the right programming skills (I don't 🙁 ), it should be possible to create a user-interface to control the interactive commands easier. I believe it's even possible to control ecasound directly from excel using VBA with the help of putty or plink.
Re callout of -el:ACDf: The interesting thing is that this is the command that I used, but when saving the chainsetup it changes it automatically to the id.
I do have one question: Is there any difference in the actual math between the ACD filters and the ones created by R. Taylor?
Thanks again for making this possible!!
No - math is math. Perhaps you mean is the code - how we go about calculating the filter output - different? The answer to that is a definite yes - the approach I took to calculating the filters in ACDf is significantly different than Richard Taylor's approach, but should be slightly faster for the same type of filter.I do have one question: Is there any difference in the actual math between the ACD filters and the ones created by R. Taylor?
Sorry for the confusing question: I was referring to the actual filter transfer functions themselves, and if there is anything in the code implementation that would result in different output results (frequency,phase) or if the result is always identical.
I read through your technical manual, which is great, and I'm just trying to learn and understand a bit more.Thanks for answering all my questions!
I read through your technical manual, which is great, and I'm just trying to learn and understand a bit more.Thanks for answering all my questions!
Sorry for the confusing question: I was referring to the actual filter transfer functions themselves, and if there is anything in the code implementation that would result in different output results (frequency,phase) or if the result is always identical.
I read through your technical manual, which is great, and I'm just trying to learn and understand a bit more.Thanks for answering all my questions!
OK, I see what you are asking. For instance if you have a crossover developed with Richard's plugins and you switch to mine, will everything stay the same. (correct me if I am wrong!)
There is a short and a long answer. The short answer is yes, or very likely. I can't say for certain because I have never tried to directly compare the outputs. The long answer is that there really are only a couple of filter types that could be different. The first and second order highpass and lowpass filters are pretty cut and dry, and this is an example of my statement "the math is the math". There really is only one way to formulate them, so those should definitely be the same. On the other hand, filters like shelving filters or EQ can sometimes have slightly different formulations. For instance with various pro-sound DSP units like the Behringer DCX2496 and the DBX [forget the model name] equivalent and/or others like them, I think that the EQ bands and shelving have slightly different shapes and breakpoints because the way the "Q" value or shelf limits are defined.
Hi Charlie,
in one of your earlier posts in this thread, you mentioned that you would be interested in seeing implementation of the LADSPA plugins via ALSA. Here is an asound.conf configuration file for a two-way stereo crossover for your perusal:
Since I am a totally new to Linux, the file is admittedly rather hackish, e.g., I had to duplicate the channels at the very beginning instead of figuring out how to output all four channels from the filter stage, but the ALSA documentation is not the best.
As you can ascertain, I have re-used the channels 0 and 1 as an input to both filters, so there does not seem to be any issue of using the filters in a chain. That would be my next step, unless your filters could be used instead of RT's. Is there anything that would prevent this?
Thank you for the inspiration.
Kindest regards,
M
P.S. If anybody knowledgeable of ALSA would suggest any improvements, I would appreciate it.
M
in one of your earlier posts in this thread, you mentioned that you would be interested in seeing implementation of the LADSPA plugins via ALSA. Here is an asound.conf configuration file for a two-way stereo crossover for your perusal:
Code:
pcm.!default {
type plug
slave.pcm "surround40"
slave.channels 4
route_policy duplicate
type plug
slave.pcm "crossover"
}
ctl.!default {
type hw
card Audigy2
}
pcm.crossover {
type ladspa
slave.pcm "playback"
path "/usr/local/lib/ladspa"
channels 4
plugins
{
0 {
label RTlr4hipass
policy none
input.bindings.0 "Input"
output.bindings.2 "Output"
input { controls [ 200 ] }
}
1 {
label RTlr4lowpass
policy none
input.bindings.0 "Input"
output.bindings.0 "Output"
input { controls [200] }
}
2 {
label RTlr4hipass
policy none
input.bindings.1 "Input"
output.bindings.3 "Output"
input { controls [200] }
}
3 {
label RTlr4lowpass
policy none
input.bindings.1 "Input"
output.bindings.1 "Output"
input { controls [200] }
}
}
}
pcm.playback {
type plug
slave.pcm "surround40:Audigy2"
}
As you can ascertain, I have re-used the channels 0 and 1 as an input to both filters, so there does not seem to be any issue of using the filters in a chain. That would be my next step, unless your filters could be used instead of RT's. Is there anything that would prevent this?
Thank you for the inspiration.
Kindest regards,
M
P.S. If anybody knowledgeable of ALSA would suggest any improvements, I would appreciate it.
M
Complete working alsa config for the ladspa filter supporting all sample rates without resampling has been worked out a while ago in this thread http://www.diyaudio.com/forums/twisted-pear/277564-ladspa-filters-digital-crossovers-bbb.html
I believe user francolargo reported that my LADSPA plugins (e.g. ACDf) did not work via the ALSA interface but the ones from Richard Taylor (e.g. RTlr4lowpass) seem to work fine. I don't think it was ever figured out why this was.
I still prefer using ecasound, so I am not really bothering to look into this, but if anyone does please post about it here.
I still prefer using ecasound, so I am not really bothering to look into this, but if anyone does please post about it here.
Pavle,
neither configuration file in post 2 nor the one in post 74 worked for me. Specifically, the sound card is not outputting channels other than 0 and 1. I have read something along the lines that all cards based on 10k1 processor, like my AUDIGY2 zs, are not "true multi-channel" but "present the channels as plurality of stereo channels."
Kindest regards,
M
Complete working alsa config for the ladspa filter supporting all sample rates without resampling has been worked out a while ago in this thread http://www.diyaudio.com/forums/twisted-pear/277564-ladspa-filters-digital-crossovers-bbb.html
neither configuration file in post 2 nor the one in post 74 worked for me. Specifically, the sound card is not outputting channels other than 0 and 1. I have read something along the lines that all cards based on 10k1 processor, like my AUDIGY2 zs, are not "true multi-channel" but "present the channels as plurality of stereo channels."
Kindest regards,
M
- Home
- Source & Line
- PC Based
- LADSPA plugin programming for Linux audio crossovers