SGTL5000: Influence setting lineOutLevel() the output signal level?

Status
Not open for further replies.

C0d3man

Well-known member
SGTL5000: Does setting lineOutLevel() influence the output signal level?

Hi @ll,

I have the problem that my audio code currently produces a low-level signal. Yes: I can try to multiply the signal before sending out. But how about the lineOutLevel()-method for the SGTL5000? Normal value is 29 for 1.29V p-p. If I set this to 13 (=3.16V p-p)? Would this act like an amplifier (of course, perhaps with more noise)?

Regards, Holger
 
Last edited:
Yes, you can do that, but better to get the volume levels right in code - to maximise the number of bits available, and therefore noise and distortion.

The Headphone output also has a maximum gain of 12dB (Av = 4).

Otherwise there's the Mixer and Amp objects that can provide gain. Just patch them (AudioConnections) into your signal chain.
 
Yes, you can do that, but better to get the volume levels right in code - to maximise the number of bits available, and therefore noise and distortion.

The Headphone output also has a maximum gain of 12dB (Av = 4).

Otherwise there's the Mixer and Amp objects that can provide gain. Just patch them (AudioConnections) into your signal chain.

I have found out that I am probably beoeating a compressor in some way. It's a pity that there is no finished object in the audio library for this yet.

Thanks, Holger
 
A compressor would be a worthy addition to the audio library.

I have working code for a soft/hard limiting compressor if you would like a place to start. The existing project uses a gain cell to compress analog audio directly, rather than processing a buffer of samples, but the core code should directly apply.

Richard
 
Hi Richard,

A compressor would be a worthy addition to the audio library.

I have working code for a soft/hard limiting compressor if you would like a place to start. The existing project uses a gain cell to compress analog audio directly, rather than processing a buffer of samples, but the core code should directly apply.

Richard

That sounds very interesting. I'd like to try that. I have already built some "effects" in the design of the audio library (chorus, mono-stereo-panning, stereo-mono). Would you also put the code under GPL3?

Regards, Holger
 
Hi Holger, I don't want to hijack your thread but could I ask about you stereo > mono effect - are you just summing the channels like the mixer or something else? thank Paul

PS I agree a compressor object would be very useful - I been looking at this Reason JSFX compressor here and thinking about converting it for the audio lib.
 
Hi Paul,

Hi Holger, I don't want to hijack your thread but could I ask about you stereo > mono effect - are you just summing the channels like the mixer or something else? thank Paul

PS I agree a compressor object would be very useful - I been looking at this Reason JSFX compressor here and thinking about converting it for the audio lib.

Thanks for the link to the different compression variants. Looks interesting. Perhaps this can help to write such an effect. I scanned the forum for already existing code and found some projects. Maybe just testing them before writing a new one?

My stereo2mono effect is a simple mixer for two inputs. Code can be found here:
effect_stereo_mono.h
effect_stereo_mono.cpp

Regards, Holger
 
Status
Not open for further replies.
Back
Top