Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Nov 2014, 16:38
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Advanced audio issues
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Sun 12 Jul 2009, 03:53    Post_subject:  Advanced audio issues  

The audio player application, Aqualung, is currently being discussed on the Developer Blog, especially relating to its advanced audio features. So I thought I would open a forum thread on this subject.

1. Why?
Some users come to this subject with a desire to output audio from one application to another, for advanced audio production or audio manipulation during playback.

Other users (like me) are just interested in high quality audio output to either an advanced sound card, or external D/A converter.
In these cases, audio quality is generally related to the audio player application being able to process the audio file in its native sample rate, then pass it to the ALSA audio driver in the same state.
It's even possible to configure ALSA, via the optional /etc/asound.conf file, to bypass all additional processing (such as mixing, and gain control) so that the digital audio signal is bit-perfect from start to end.

2. High resolution audio
The current industry standard digital audio standard for which you can obtain music digitally remains, generally, the same CD-audio specification that was set 26 years ago: 16bit/44.1kHz.
Audiophiles are eagerly awaiting the music industry's shift to commercially available file downloads, which will be available in higher specifications such as 96kHz and 192kHz. These are already available now, but only from a limited range of sources (and music choices).
So in these cases audiophiles want an audio player application which will handle the higher sample rates and bit depths, and pass the signal to ALSA without any sample rate conversion.
Obviously, you must have an audio card which can deal with higher sample rates.

3. Upsampling
It's possible to upsample CD-spec audio files to, say, 192kHz before doing the D-to-A conversion, which can achieve (arguably) a superior sound.
As with many things in the hifi world, the result is more likely due to the technical level of implementation involved, rather than a cut-and-dry fact.
ie. a high quality oversampling D/A converter will certainly outperform an average quality non-oversampling D/A converter ... but will it outperform a top quality non-oversampling unit? This is a contentious subject, and there's some fancy mathematics and theory involved. I steer away from offering an opinion.
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Sun 12 Jul 2009, 03:58    Post_subject:  

So to Aqualung.
Thanks to forum member happypuppy for raising the subject of compiling Aqualung with LADSPA and JACK enabled.

LADSPA from http://www.ladspa.org/
is for audio filters at the input stage. It probably deserves its own forum thread.

JACK from http://jackaudio.org/
is for passing audio data between different applications (and drivers?). JACK also probably deserves its own forum thread, but after some testing I can definitely say that JACK is not needed for Aqualung to play 192kHz audio files.
I can play a 24bit/192kHz wav file by launching Aqualung like this -
Code:
aqualung -o alsa -r 192000 -d plughw:0,0

Note the "plughw" parameter at the end. This specifies the sound card hardware ... but "hw:0,0" won't work. I think that "plughw" is an ALSA configuration option which bypasses certain processing functions of the ALSA driver. If any ALSA experts want to explain that further, please do so.

Obviously my sound card (Envy24HT-S based) is capable of 24bit/192kHz. I know there's no samplerate conversion involved, because for this test I compiled Aqualung with libsamplerate disabled.
To double-check, I can play the same audio file with aplay, like this -
Code:
aplay MYHIRESTEST.wav

and this is reported at the commandline
Code:
Playing WAVE 'MYHIRESTEST.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo

thus confirming that a 192kHz audio signal is being presented to the ALSA driver, and since I can hear it, my sound card can obviously handle this signal.

Upsampling/downsampling with Aqualung.
If you compile Aqualung with libsamplerate enabled,
from http://www.mega-nerd.com/SRC/
Aqualung will upsample or downsample your audio files to match its output samplerate, which is fixed.
Aqualung's default output samplerate seems to be 44.1kHz. To set it to anything different you need to launch Aqualung as I explained above.
Back to top
View user's profile Send_private_message 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 12 Jul 2009, 05:25    Post_subject:  

Hi

The way I see it, the average user has no use for any of this by default, but if the size is contained to a min, then why the heck not Smile
Like I somewhat mentioned on Barry's blog, that dougal compiled it really small in 2006, and well if all you need to save people from recompiling to add support is a 26kbpet or 52kb extracted, then why not have jack as a option and maybe the full server in the repo?
dougals jacks spec's for his package was this
JACK-0.101.1-lib.pup (libJACK) dotpup size: 26k extracted: 52k
plus the other 2 would be
liblrdf-0.4.0-base.pup dotpup size: 17k extracted: 30k
raptor-1.4.9-base.pup dotpup size: 103k extracted: 248k
about about 146kb extra to have professional sound support. Why not.
ttuuxxx

dougals link
http://www.murga-linux.com/puppy/viewtopic.php?t=12870

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Sun 12 Jul 2009, 06:21    Post_subject:  

Mmm, well my compilation of JACK ver 0.116.2 is noticeably larger -
200KB compressed, 600KB uncompressed.
That's with all executables and libs stripped.
Back to top
View user's profile Send_private_message 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 12 Jul 2009, 06:47    Post_subject:  

tempestuous wrote:
Mmm, well my compilation of JACK ver 0.116.2 is noticeably larger -
200KB compressed, 600KB uncompressed.
That's with all executables and libs stripped.

I just did the same, with the version that dougal used and the pet was 114kb pet and 328 extracted, That's with all executables and libs stripped. Almost 1/2 the size, lucky I found the sources Smile I can't see why we couldn't use that one, I don't think the bins are actually need for playing with audio player, probably just the libs like Dougal had, and its still compiles the lib as /usr/lib/libjack.so.0.0.23 56kb
Here's the sources Smile
jack-audio-connection-kit-0.101.1.tar.gz
Description 
gz

 Download 
Filename  jack-audio-connection-kit-0.101.1.tar.gz 
Filesize  707.62 KB 
Downloaded  313 Time(s) 

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Sun 12 Jul 2009, 07:36    Post_subject:  

ttuuxxx wrote:
I just did the same, with the version that dougal used
...
I can't see why we couldn't use that one

Well, that question should be answered by proper testing, preferably by forum members who have a good understanding of JACK, such as happypuppy.

And as Barry said on the Developer Blog, any supplementary packages such as JACK and LADSPA should be compiled in a Puppy416 development environment.

ttuuxxx wrote:
I don't think the bins are actually need for playing with audio player

The jackd executable is certainly needed. JACK won't work without it, and Aqualung will report -
Code:
JACK server not found
Back to top
View user's profile Send_private_message 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 12 Jul 2009, 07:40    Post_subject:  

yes I knew about compiling and how it should be in 416, thats just a given, and the reason why I didn't post my packages here, Also from past experience I did think the main jack bin was needed, but when you look at the old package you wouldn't think it was there.
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 12 Jul 2009, 08:01    Post_subject:  

Hey tempestuous
Ever hear about somaplayer when you compile it, its only 300kb pet and has some really unique features like streaming audio to shoutcast and others, I found the sources and write up at debian.
It only needed one tiny extra lib to work,call confuse.
Here's a link. http://packages.debian.org/sid/somaplayer
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send_private_message Visit_website 
panzerpuppy

Joined: 02 Oct 2007
Posts: 632

PostPosted: Sun 12 Jul 2009, 15:03    Post_subject:  

@tempestuous: There's a new post by happypuppy with some really interesting information about JACK:
http://www.puppylinux.com/blog/?viewDetailed=00882
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Tue 14 Jul 2009, 00:22    Post_subject:  

Yes, happypuppy's explantion of JACK is worth repeating here.
happypuppy wrote:
JACK is not another sound server like aRTs,esd or PulseAudio.
It's a specialised audio connection kit for professional audio recordists ,musicians and advanced users.

Some of the things you can do with JACK:
- Connect the output of one app to another for recording or further processing, connect multiple ins/outs between multiple apps, record from anything,...
- Connect the output of any app to any output of your soundcard, clone the sound and send it to multiple outputs (i.e. play the same thing from all 8 speakers),send different streams to different soundcard outputs and play them all at once.
- Ultra low latency operation (totally opposite from the other servers out there which add massive latency)
Reduces the audio latency of ALSA even further with advanced scheduling.
- Minimal overhead (very low CPU usage,unlike all other servers)
- On-demand operation (start it only when you need it.No need to run the server all the time)
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Tue 14 Jul 2009, 00:24    Post_subject:  

I just provided an Aqualung package with JACK and LADSPA support here
http://www.murga-linux.com/puppy/viewtopic.php?t=44537
Back to top
View user's profile Send_private_message 
tempestuous

Joined: 10 Jun 2005
Posts: 5285
Location: Australia

PostPosted: Wed 15 Jul 2009, 11:43    Post_subject:  

I have received several messages from hifi types who are decidedly disinterested in JACK. It's certainly a powerful tool, but apparently more relevant to things like multitrack audio/midi recording than to end-product playback. And the people who are using it seem to be running high end host computers with RealTime enabled Linux kernels. In fact the JACK daemon's preferred mode seems to be RealTime.

Applicable to hifi is more likely something like Brutfir
http://www.duffroomcorrection.com/wiki/Brutefir
for things like digital speaker crossover filtering, or digital room correction.

If you want to get serious about computer audio quality with Linux, go to this thread on the diyaudio.com forum:
"Linux Audio the way to go!?"
http://www.diyaudio.com/forums/showthread.php?s=&threadid=93315
Caution: you will frequently hear the term "digital jitter"!
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0840s ][ Queries: 12 (0.0039s) ][ GZIP on ]