Code Monkey home page Code Monkey logo

alsaloudness's People

Contributors

artefact2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

alsaloudness's Issues

Hissing noise introduced, when using alsaloudness after equalization

I have setup a music server using mopidy, a raspberry 3B, and sending the audio to alsa. I used REW to make an equalization pipe in alsa, which works really well. After some testing I got alsaloudness installed and working. Using the asound.conf file attached here. It works really well except that there is a perceptible noise. I'm not a signal processing expert, but I was afraid that an FFT could do that.

I am passing the input throught the equalizer first. Could I have done something wrong? I'm more than happy to send sample sound recordings if that helps. Or even just a couple of pointers would be useful.

I never realized that I needed this to hear low volume music. And I really like it.
asound.conf.txt

Thanks

compiling on raspbian stretch

loudness_pcm.c:31:19: fatal error: fftw3.h: Aucun fichier ou dossier de ce type #include <fftw3.h> ^ compilation terminated.

compilation failed because it can't find the fournier transform library, which is installed (libfftw3-3 version 3.3.5-3)

is it compatible?

High CPU-Usage causing Cracks while playing

Hi,

I played around with your Plugin and I'm really happy with it! I'm running a raspberry pi3b with Squeezebox with an equalizer as Alsa-Plugin. On top of that there's your Loudness-Plugin optimizing the Sound specially for lower volumes.

Beeing able to adjust Attenuation instead of a "plain volume"-mixer allows a great sound at almost all volumes my amp/speakers allow. The only thing I'm struggeling with are some very loud crack's (almost like a shot) when playing Sound through the Loudness-Plugin. Seems to depend on the CPU-Usage the Plugin consumes. I played around with the amount of treads, window- and fft-size but that is changing the CPU-Usage within 43% and 48%: the crack's still come up.

Even if I set on the Plugin without the 2nd-Plugin "Equalizer" it doesn't change a lot.

This is the current configuration:
/etc/asound.conf

#ctl.!default {
#    type hw
#    card 0
#}
pcm.equal {
    type plug;
    slave.pcm plugequal;
}
ctl.equal {
   type equal;
   module "Eq10";
}

pcm.plugequal {
   type equal;
   module "Eq10";
   slave {
     pcm "plughw:0,0";
   }
   hint {show on;description "Equalizer for plughw:0,0"}
}


pcm_type.loudness {
    lib "/usr/local/lib/libasound_module_pcm_loudness.so"
}


# This defines the plugin's configuration.  See the README file for
# more information on the various parameters.

pcm.plugloudness {
    type loudness

    #threads 4
    #window 4096
    #fft 16384

    reference 82
    # Original: attenuation -20
    attenuation -36

    controls {

        install yes

        # prefix "My "
    }

    # Edit the line below to specify the card and device to play
    # through, if necessary.

    # Original: slave.pcm "plughw:0,0"
    slave.pcm "plugequal"
    #slave.pcm "plughw:0,0"
        hint {show on;description "Loudness-Plugin"}
}

# alsaloudness does all processing in floating point, so a plug PCM is
# necessary to handle the necessary conversion on both the input and
# output side.  (This is also the reason for specifying plughw above.)

pcm.loudness{
    type plug

    slave {
          pcm plugloudness
    }
}


#########################
# Standard-Ausgabe
#
#########################

pcm.!default {
    type plug
    slave.pcm "plugloudness"
}

Do you have any recommendations? Changing to a raspberry 4 brings better performance, but you didn't have that performance while developing that plugin one year ago...

Thanks a lot, Carsten

Attenuator vs amixer cset

Hi sir
What is the relationship between the amixer pcm volume control and the new attenuation control?
I use an analogue input to adjust the volume by amixer commands. If i want to use the loudness would i then need to adress the attenuation control instead and leave the pcm volume at fixed level?
I assume the attenuation is still hardware control as the amixer?

Best
Morten

Loudness usage via mpd

Hi,

I'm using Volumio and would like to use the alsaloudness plugin. To be honest I'm not that familiar with the ALSA stuff. So maybe I'm just missing something.

/etc/asound.conf

`pcm_type.loudness {
lib "/usr/lib/libasound_module_pcm_loudness.so"
}

pcm.plugloudness {
type loudness
reference 82
attenuation -20
controls {
install yes
}
slave.pcm "plughw:1,0"
}

pcm.loudness{
type plug
slave.pcm "plugloudness"
}
`

/etc/mpd.conf

[...] audio_output { type "alsa" name "alsa" device "plug:loudness" } [...]

Unfortunately I always get the error message "Failed to open ALSA device "plug:loudness": invalid argument.

Any help is appreciated!

Thanks, Martin

Clicks/skips in audio when changing attenuation

How to reproduce:

  • Play any sound through a loudness PCM.
  • While the sound is playing, open alsamixer and play with the attenuation setting. The effect is most present when switching from 0 to -1 dB of attenuation.

Might be solved by caching/pre-computing at run/compile-time every possible impulse instead of computing them on the fly, possentially causing xruns or messing with periods?

feature request: plugin version

This would be great to have in the monitoring bus of a DAW like ardour.
For that it would have to be a plugin, either LV2 or LADSPA.

Compiling on Raspberry Pi Zero ?

Compiling on Raspberry Pi Zero with armv6 (debian 11 bullseye) needs – as far as I understand – apparently make LIB32=yes, but then the cc throws this error message

cc: error: unrecognized command-line option ‘-m32’; did you mean ‘-mbe32’?

tiny core

Hello, i try to install alsaloudness on a picoreplayer, this is an tiny core linux. now i get the following error when i use the command make:
tc@garten:/alsaloudness-master$ make
cc -o libasound_module_pcm_loudness.so -shared -fPIC -DPIC -Wall -Wextra -Wpedantic -O3 -DNDEBUG loudness_pcm.c -lm -lasound -lfftw3f
loudness_pcm.c: In function 'configure_card_ctl':
loudness_pcm.c:809:13: warning: implicit declaration of function 'SNDRV_CTL_TLVD_DECLARE_DB_MINMAX'; did you mean 'SNDRV_CTL_TLVT_DB_MINMAX'? [-Wimplicit-function-declaration]
SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(tlv,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SNDRV_CTL_TLVT_DB_MINMAX
loudness_pcm.c:809:46: error: 'tlv' undeclared (first use in this function)
SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(tlv,
^~~
loudness_pcm.c:809:46: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:37: libasound_module_pcm_loudness.so] Error 1
tc@garten:
/alsaloudness-master$

im sorry, im new with linux, i dont know how to solve this problem.
thx for you help, wbr Roland

Loud clicks when pausing/unpausing playback

I suspect this is caused by some uncorrected DC offset?

Simple way to reproduce:

# produces loud clicks on start/stop
aplay -D plug:loudness -f S8 -r 8000 /dev/zero

# complete silence (as expected)
aplay -D plughw:0 -f S8 -r 8000 /dev/zero

I cannot reproduce the issue at more common samplerates (44.1/48/96/192k) so this issue is of modest importance.

I can not see if the loudness plugin is executed.

I introduce some debug print in the loundness code and I execute aplay command. but I doesn't see debug print on the command line. dat means that loundness plugin is not executed. please, could you tell me if this the right method to test your plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.