The error you get means that CamillaDSP can't open the coefficient file, either /tmp/1.dbl or /tmp/2.dbl (I'll improve the error to include the filename!)
Do the files really exist? Can you do "cat /tmp/1.dbl"?
You can put an absolute or relative path. As usual, a relative path should be relative to the path you are at when typing the camilladsp command. Most of the examples use the filters.txt coefficient file, that is also included in the root of the repo.
The syntax looks correct otherwise. The fact that it gets to the point where it tries to open the coefficient file means the syntax of the config file is correct. the checking is done in two stages. First the file is read and parsed. This catches any syntax errors. Then there is a series of checks of the actual values, so that number of channels match, coefficient files can be read etc, to make sure the config will work. But it does not check if the capture or playback devices can be opened, that isn't done until it the processing starts.
I recommend using an editor that supports syntax highlighting for yaml. Then you immediately see if there is a syntax error. I use VS Code, but others like Sublime, Atom, Notepad++ etc should work equally well (you may need a yaml plugin for some).
What errors do you get on the example config files? Also file not found? They all worked when I tried just now.
That's what happens when you code 8 hours straight (as main job) and then you want to try to setup a software, one of the .dbl files was moved and reading the error I thought that camilladsp was not finding the yml config file, not the fir file.
My bad, when I'm tired I'm sort of retarded. If you can edit the error message to be more specific like -> file "file name" not found
Apologies and thanks for your time, everything is working now
Oh yes I know this problem! Don't worry, we all do it!That's what happens when you code 8 hours straight (as main job) and then you want to try to setup a software, one of the .dbl files was moved and reading the error I thought that camilladsp was not finding the yml config file, not the fir file.
My bad, when I'm tired I'm sort of retarded. If you can edit the error message to be more specific like -> file "file name" not found
Apologies and thanks for your time, everything is working now
Anyway, the feedback is very useful for me. The error message you got isn't nearly as helpful as it should be. I worked on improving the errors yesterday evening (risky, I know 🙂) and this is how the same error will look in the next version:
Invalid filter 'fir'. Reason: Could not open coefficient file '/tmp/1.dbl'. Error: No such file or directory (os error 2)
Oh yes I know this problem! Don't worry, we all do it!
Anyway, the feedback is very useful for me. The error message you got isn't nearly as helpful as it should be. I worked on improving the errors yesterday evening (risky, I know 🙂) and this is how the same error will look in the next version:
Wonderful!
I know that managing all the errors and commenting the code is the most annoying part, but it's useful if something is not working.
I have a feature request!
As you might have noticed camilla is used often piped with SoX, and I'm one of those who use it in this way because with these two tools you have a complete "suite" to edit audio in any way you want (SoX can do fir convolution but I always had results not comparable to the ones accomplished using brutefir/camilla, might be placebo but I noticed a difference in quality)
The problem is: SoX in unmaintaned, and has some bugs. The most important is with using normalization. Yesterday evening I tried to convert and normalize a file, the RAM usage jumped to 8gb, without normalization only few MB. I tried to check the source code but the time I opened a *.c file and noticed that there wasn't a single comment to explain the code I immediatly closed it. Working on someone else code is already not a simple task, as a C++/Java/C# dev like me writing in C is an added step of difficulty and if the code isn't even properly commented can easily be a nightmare.
So the question is: since gain is already implemented in camilla, is it possible to add normalization?
Last edited:
The problem is: SoX in unmaintaned, and has some bugs.
SoX has a standard and well alive mailing list , you can report a bug to sox-devel SoX - Sound eXchange / List sox-devel Archives
How is the normalize function of SoX working? I checked quickly (so I could have gotten it wrong) and it looks like it simply searches for the peak value and then normalizes the whole file so the peak is at 0dB. Is that correct? If so it has to loop through the file twice, first once to find the peak value and then again to apply the gain. This won't work well in CamillaDSP since it can never know what happens more than up to one chunksize ahead.So the question is: since gain is already implemented in camilla, is it possible to add normalization?
If it's dynamic normalization like some kind of AGC then it's actually on my todo list already. I just need to make up my mind on how to implement this: use one channel as control for a filter processing another channel * Issue #23 * HEnquist/camilladsp * GitHub
How is the normalize function of SoX working? I checked quickly (so I could have gotten it wrong) and it looks like it simply searches for the peak value and then normalizes the whole file so the peak is at 0dB. Is that correct? If so it has to loop through the file twice, first once to find the peak value and then again to apply the gain. This won't work well in CamillaDSP since it can never know what happens more than up to one chunksize ahead.
If it's dynamic normalization like some kind of AGC then it's actually on my todo list already. I just need to make up my mind on how to implement this: use one channel as control for a filter processing another channel * Issue #23 * HEnquist/camilladsp * GitHub
Mmm that's true. I thought the problem having in mind a file audio processing, but if camilla receives the audio from a stream (from pipes) this can't be possible unless buffering the whole file, find the peak and reprocess it with a determined gain (which is what SoX does I guess, hence the abominable memory usage which now I understand where it comes from). Dynamic normalization won't maintain dynamics.
Ok it's pretty impossible to do, at least in an elegant way.
Thanks
Yes it would be possible, for the backends that support DSD. This excludes CPAL (CoreAudio+Wasapi) for example. It would be quite a lot of work. What is the use case and how would it benefit?Is it possible to incorporate a PCM->DSD coder in the (end of the) chain of a stream?
//
I would like to try a topology where the final wave recreation stage and amplification is made really close (10 cm) from the speaker driver. I'm envisioning a smaller generic HW unit of say 50W of high quality. Central control unit to do Volume/Delay/EQ/Filter/Attenuation in the PCM domain and then conversion before transport on (black, i.e. analog) optical fiber (i.e. not Toslink). Maybe a PWM signal would be better to directly feed a power bridge (class D amp).
It's in the brainstorming phase 🙂 but I would like to shorten the traditional analog path to a minimum. A 2-way stereo setup would require four of the generic HW boxes and four opto cables from the central.
//
It's in the brainstorming phase 🙂 but I would like to shorten the traditional analog path to a minimum. A 2-way stereo setup would require four of the generic HW boxes and four opto cables from the central.
//
Ok I see! That should keep you busy for some time 😀. I wouldn't worry about the live conversion to DSD yet, instead I would start by preparing a few DSD sound files to test with. This fork of sox could probably help with that: GitHub - mansr/sox: SoX, Swiss Army knife of sound processing
Then I have no idea on what gadget you need to output four channels as separate DSD bitstreams. An XMOS USB interface with custom firmware maybe..
Then I have no idea on what gadget you need to output four channels as separate DSD bitstreams. An XMOS USB interface with custom firmware maybe..
Hmm, I think I leave the DSD/PWM idea for the future and go for an intermediate solution with Toslink and D/A converters.
Do you think Camilla could adress all these 8 (4 x stereo) output Toslink streams on this RME unit?
RME Digiface USB – Thomann Sverige
//
Do you think Camilla could adress all these 8 (4 x stereo) output Toslink streams on this RME unit?
RME Digiface USB – Thomann Sverige
//
I haven't tried anything like that but I don't see any reasons why it wouldn't work.Hmm, I think I leave the DSD/PWM idea for the future and go for an intermediate solution with Toslink and D/A converters.
Do you think Camilla could adress all these 8 (4 x stereo) output Toslink streams on this RME unit?
RME Digiface USB – Thomann Sverige
//
The toslinks are most likely configured as 4 separate stereo outputs. That probably means you need to combine them into an Aggregate device: Combine multiple audio interfaces by creating an Aggregate Device - Apple Support
I'll try combining two stereo devices on my mac as soon as I have some time.
Reading the RME manual it refers to aggregation when using more than one Digiface so maybe using 1 shows up like a singel unit with more then 2 streams.
//
//
If CamillaDSP does not in it's linux flavor, then at least it's not a CamillaDSP issue: The Digiface USB device does not provide class compliant mode and probably never will. Therefore chances are very small that it will ever work under Linux.Hmm, I think I leave the DSD/PWM idea for the future and go for an intermediate solution with Toslink and D/A converters.
Do you think Camilla could adress all these 8 (4 x stereo) output Toslink streams on this RME unit?
RME Digiface USB – Thomann Sverige
//
Have a look at: is DigiFace USB Class Compliant? (Page 1) — FireWire & USB series — RME User Forum
lykkedk, will you be so kind and reveal the exact code changes to did to squeezelite?
Hey... A little late sry...
See post CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
Jesper.
Thank you Jesper! As a matter of fact I found the post today, while browsing through the thread. I plan to do something similar myself, and your code will be a good starting point. I will keep you informed if I settle for a different solution.
You opened my eyes for LMS and SqueezeLite, which I now have used for a couple of days. LMS/SqueezeLite is a keeper, especially since its possible to output the sample rate and change the settings for CamillaDSP and that the plugin for Tidal is quite ok.
Because squeezelite is released under the GPLv3 license, I think that the modified source code should either be available on GitHub - Lykkedk/SuperPlayer: Hacking software & scripts to play music, or that there should be a recipe for how to alter the original source code to come to the same result. Now the modified SqueezeLite is only available as a binary file.
You opened my eyes for LMS and SqueezeLite, which I now have used for a couple of days. LMS/SqueezeLite is a keeper, especially since its possible to output the sample rate and change the settings for CamillaDSP and that the plugin for Tidal is quite ok.
Because squeezelite is released under the GPLv3 license, I think that the modified source code should either be available on GitHub - Lykkedk/SuperPlayer: Hacking software & scripts to play music, or that there should be a recipe for how to alter the original source code to come to the same result. Now the modified SqueezeLite is only available as a binary file.
Last edited:
Yes maybe. The manual doesn't say much so you probably have to try it to know for sure.Reading the RME manual it refers to aggregation when using more than one Digiface so maybe using 1 shows up like a singel unit with more then 2 streams.
//
Since this requires a closed source driver only available on Win and Mac, I would not buy it myself. It seems to have a lot of advanced functionality and that's probably why it needs the special driver. Here I think something much simpler would work just fine.This one perhaps? miniDSP UDIO-8 - Multichannel USB to AES-EBU interfaceIf CamillaDSP does not in it's linux flavor, then at least it's not a CamillaDSP issue: The Digiface USB device does not provide class compliant mode and probably never will. Therefore chances are very small that it will ever work under Linux.
Have a look at: is DigiFace USB Class Compliant? (Page 1) — FireWire & USB series — RME User Forum
It doesn't have toslink so you would need a few coax-toslink adapters. It uses an xmos chip which should present itself as a standard 8-channel usb sound card. I'm using something similar in my system and that works great.
I agree! Jesper, could you pretty please with sugar on top just fork squeezelite to your own github account, make a new branch, and apply your changes there? It's not difficult, doesn't take long and would make it a lot easier for anyone who wants to use this 🙂Thank you Jesper! As a matter of fact I found the post today, while browsing through the thread. I plan to do something similar myself, and your code will be a good starting point. I will keep you informed if I settle for a different solution.
You opened my eyes for LMS and SqueezeLite, which I now have used for a couple of days. LMS/SqueezeLite is a keeper, especially since its possible to output the sample rate and change the settings for CamillaDSP and that the plugin for Tidal is quite ok.
Because squeezelite is released under the GPLv3 license, I think that the modified source code should either be available on GitHub - Lykkedk/SuperPlayer: Hacking software & scripts to play music, or that there should be a recipe for how to alter the original source code to come to the same result. Now the modified SqueezeLite is only available as a binary file.
For a PC with PCI (PCI-e with an adapter) an option may be the old SB Audigy 2ZS with 4 SPDIF outputs (i.e. 8ch) on its pinheader Creative Sound Blaster Audigy 2 ZS and X-Fi AD_EXT pinout diagram @ pinouts.ru . The output is probably TTL level, google provides details.
I have not tested it but IMO the alsa driver should work OK for 8ch 44.1/48kHz/24bit Matrix:Module-emu10k1 - AlsaProject . About 20EUR from ebay.
I have not tested it but IMO the alsa driver should work OK for 8ch 44.1/48kHz/24bit Matrix:Module-emu10k1 - AlsaProject . About 20EUR from ebay.
- Home
- Source & Line
- PC Based
- CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc