No prob, you're perfectly right : making package in Debian is actually more complicated than making pkgbuild scripts for Arch, even if we take some objective measurements about complexity, but of course Debian packages are more supposed to be simply used by lazy people like me than made, so clearly the "philosophy" is quite different. Don't worry, I think i was in a "bad day" !! I must say I don't make Debian packages most of the time. In fact I only do when the compiling process includes a way to build them easily (I'm clearly lazy).

And many thanks for the information about sid and squeeze packages, I was just making a second boot few days ago with Fedora because I was a bit disappointed at first try of this "squeeze" several months ago, but it seems that now, Debian developers thanks to them!) have integrated even newer versions of every softwares than in Fedora 13 ! A very good surprise. That means I will probably keep Debian for my next personal OS (that probably means also that the next stable version is on its way to be out soon). You know what it is, habbits ! Oh yes, I'm very happy ! I'm on Lenny for the moment and only compilation can be made on that version to get OSSV4.

No prob, you're perfectly right : making package in Debian is actually more complicated than making pkgbuild scripts for Arch, even if we take some objective measurements about complexity, but of course Debian packages are more supposed to be simply used by lazy people like me than made, so clearly the "philosophy" is quite different. Don't worry, I think i was in a "bad day" !! I must say I don't make Debian packages most of the time. In fact I only do when the compiling process includes a way to build them easily (I'm clearly lazy).

And many thanks for the information about sid and squeeze packages, I was just making a second boot few days ago with Fedora because I was a bit disappointed at first try of this "squeeze" several months ago, but it seems that now, Debian developers thanks to them!) have integrated even newer versions of every softwares than in Fedora 13 ! A very good surprise. That means I will probably keep Debian for my next personal OS (that probably means also that the next stable version is on its way to be out soon). You know what it is, habbits ! Oh yes, I'm very happy ! I'm on Lenny for the moment and only compilation can be made on that version to get OSSV4.

Thanks again, you're the man !

Hi plmegalo!

You see, technical information is of value. Of course, if you have a working system (Debian, or else), you may better use it as is (without radical reforms).If you want to study a new system (Arch, Gentoo, or else), you may better install it on another computer and learn it step by step (when you have time for this).

What is special about Arch is its philosophy. Arch is made simple for developers, and not for users. Therefore, ordinary users are invited to use developer tools and read Arch Wiki, if they want to have an "easy Arch".

There is an easy way to create a package for Arch.1. compile it as usual: configure, make2. edit PKGBUILD script, and reduce it to a few lines (it should contain "depends" and the like)3. run "makepkg --noextract", and you get a package.4. to install it, run: pacman -U [name-of-package]

In a word, there is an installation manual for those OSS4 packages (Debian/Ubuntu):

I prefer using aptitude to install packages, but as always you can use apt-get if you prefer. The packages you'll need are oss4-base and oss4-source; I also installed oss4-gtk which installs a GTK+ OSS mixer.

$ sudo aptitude install oss4-base oss4-source oss4-gtk

Step 2 - Build OSS4 kernel modules

The oss4-base package will install OSS4 itself, but not the kernel modules needed to interface with your sound card; these are found in source form in oss4-source. You need to use module-assistant program to build these modules (oss4-source depends on it, so it was installed in step 1). First, we need to install the packages module-assistant needs to function:

$ sudo module-assistant prepare

In Trisquel, module-assistant fails to create a symlink necessary for it to build the OSS4 modules; you can work around this by manually creating the symlink first:

Why do we need "extra precision"? Because "production quality" is not good enough to ensure the authenticity of sound. This might be proved with mathematical exactitude.

To clarify the point, I made some experiments with Petrov's "scientific resampler". Sergey delivered his exact resampler in the form of ALSA plugin (together with a magic configuration tool), and I gave it a try.

The results of the test were impressive. You have a complete illusion that you hear real instruments, not a digital ersatz. You can enjoy the magic flute of Hariprasad Chaurasia accompanied with genuine tabla and majestic pakhawaj, and you can easily forget that it is just a recording, a "digital substitute". It is as hypnotizing as a real performance, and it does produce a kind of hallucinogenic effect, you may even have visions and anything of the sort. This music is designed to provoke the so-called "uncontrolled ecstasy". If it does not work (in this sense), you have to fix your sound system.

OSS4 "production quality" does not produce any hallucinogenic effects, although it is very exact in relation to other well known resamplers. "Production quality" is, no doubt, a very good approximation to "nature", but it is not exact enough to produce authentic sound. Although you may not notice audible harmonic distortions with "production quality" enabled, authenticity goes missing, ambiance goes missing, and, in general, genuine music goes missing. Despite "brilliant accuracy", "production quality" is still quite unnatural, in the sense that it sounds rather "digital" than natural. This is because it is simply "production quality", without "extra precision". Scientific exactitude is missing, and, therefore, sound is somehow slightly distorted.

It might be stating the obvious, but the exact digital sound should be equivalent to genuine sound of musical instruments, otherwise, it is not exact by definition. The standard CD format is sufficient for authentic sound, and it was designed to be so, that is, in accord with the Nyquist–Shannon theorem http://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theoremWhat is more, you can get the exact digital sound on an ordinary computer, and processor load can be insignificant, a little bigger than that of OSS4 with "production quality". But this is because of ALSA. If Petrov's "scientific resampler" were correctly realized on OSS4, it would consume much less processor power than "production quality" (it might be unrealistic to expect such miracles to happen).

Petrov's "scientific resampler" seems to be an ideal solution for audiophiles, but it does not seem to be a practical solution for web conferencing, for ALSA is not suitable for the purpose. However, if you have Arch Linux, you can easily switch from OSS4 to ALSA and other way round. It is very simple indeed, execute a script and reboothttp://www.opensound.com/forum/viewtopic.php?f=3&t=3981

Playing technique involves extensive use of the fingers and palms in various configurations to create a wide variety of different sounds, reflected in the mnemonic syllables (bol). The heel of the hand is used to apply pressure or in a sliding motion on the larger drum so that the pitch is changed during the sound's decay.

To be fair, it is not a great pleasure to test Petrov's resampler with ALSA. Sometimes you even feel that it is already a kind of "sado-masochism" in terms of Erich Fromm http://en.wikipedia.org/wiki/Erich_Fromm

The problem is that ALSA tends to behave unpredictably, regardless of what is written in ~./asoundrc, especially for sample rates 96kHz and 192kHz with Intel HDA soundcards (e.g. ICH7). ALSA appears to be made "advanced" to such an extend that is already as unpredictable as that famous "strange attractor", a kind of "chaos theory", in other words http://en.wikipedia.org/wiki/Lorenz_attractor

It was explained that ALSA has a kind of low quality linear resampler inside, and it tends to resample everything with that evil resampler. It seems to be virtually impossible to disable that evil resampler, and, what is more, ALSA also tends to set wrong values for "buffer sizes", completely ignoring your ~./asoundrc. You can never predict the result (think of quasi-chaotic behaviour of a very complex financial market).

In short, you never know exactly what you actually hear with ALSA. Were those distortions caused by that evil linear resampler of ALSA, or the buffer sizes were already reset? Or it was something else?

It was already designed a special scientific test for ALSA. That magic test tells you not to use sample rates 96kHz and 192kHz with Intel HDA ICH7 soundcard. This simply means that there is not much to test. The sample rates 96kHz and 192kHz are not supported for ALSA for Intel HDA soundcards (perhaps, all of them). But they can be tested with OSS4 (!), at least, with those soundcards, which are supported by OSS4.

Sergey Petrov has already created a magic tool in the form of a standalone resampler/player for OSS4 (you can get a testing version directly from the author). I have already made some simple tests. Not surprisingly, with Petrov's standalone resampler/player and OSS4, "Tabla-Tabla Tarang" sounds much better, much more exact and natural than with ALSA and Petrov's resampler plugin.

-R Disable redirection to virtual mixer engines and sample rate/format conversions. Should not be used unless absolutely necessary.

You have to know exactly, of course, which formats (e.g. 48kHz 16bit) are supported by your soundcard, if you want to apply such a magic option. And you should be aware of the fact that "by default the application [i.e. ossplay] will try to determine the audio file's format and play audio based on the stored information about sample format, number of channels and sampling rate", see "man ossplay".

The option "-R" does disable resampling in a magic way. It does not change anything in the OSS4 virtual mixer; e.g., production quality remains enabled as before, "vmix0" is not disabled too, and sound quality seems to be exactly the same as if you disable vmix0 in the mixer. It is very convenient not to disable vmix0, because it allows other applications to play sound. In other words, the sound device remains available for all audio applications.

To clarify this fact, I made tests with the special audio file: 10Hz + 20kHz (44100Hz, 16bit) created with Audacity Nyquist tools.

WARNING: Such test files should only be played at a low volume level, even if you hear nothing special! It can be very harmful to equipment and/or your ears. It's strongly recommended to use very cheap (PC) speakers, otherwise you might really ruin your tweeters.

NOTE: For this particular VIA sound card, the difference is clearly obvious (for anybody) when the test file is played.

Yes! Petrov's exact resampler is much more exact than OSS4 "Production quality".It is now proved with mathematical exactitude. It is now an objective scientific truth.

"Production quality" does produce relatively strong harmonic distortions which are clearly audible with the test file. I did hear those distortions from the very beginning, and I was very intrigued to find out whether those distortions were caused by OSS4, or by the VIA soundcard itself, or by Ubuntu, or by something else. Now it is clear. Petrov's resampler/player does not produce such distortions, and the same soundcard is now playing genuine sound with OSS4.

The exact scientific test is easily reproducible.Requirements:1. Audacity (with which to create the test file)2. old VIA sound card VT8233/A/8235/8237 AC97 (or any other soundcard of comparable quality)3. Petrov's standalone resampler/player (it is now available for OSS4).

Intel ICH4 soundcard, for example, might not be optimal for the purpose.

As it was already mentioned, experiments were performed on a very old PC (of 2001).Processor load seemed to be insignificant (this, of course, should be tested more carefully). All these allow to presume that a kind of "exact audio player" (with Pertrov's resampler inside) might be a practical solution for "non-professional" soundcards which we have in ordinary computers. It is likely to work well on virtually all ordinary PCs, notebooks, and even netbooks with Arch Linux and OSS4 installed.

There are still many things to clarify. What puzzles me immensely is that incomprehensible "scientific knowledge" which Petrov's resampler/player prints on the terminal during resampling. I am very intrigued to find out what it really means.

Last edited by igorzwx on Thu Sep 16, 2010 2:12 pm, edited 1 time in total.

Hah, that's also why I use OSS with the production-quality settings.I once went to their irc channel because I heard some strong distortions with my audiofire 2 a/d. I was searching for the source and the first thing that came to mind was the fear that there might be some cheap kind of a resampler involved. I asked these people if that could be the case and developers were certainly around and answering, but they refused to tell me the details: it's really a simple linear one. One of them also told me that I shouldn't be hearing it, because the resampler wouldn't be bad at all. Until, I think the guy from xiph.org or so showed up and confirmed my fear... I think he also told me to that OSS has a better resampler, which is definitely true...

they seem to be measuring some kind of clock jitter, which is not wise if you don't have a good clock to compare with

Hi!

You may better discuss such esoteric matters with Sergey Petrov.I have no idea what "jitter" is, but it quite obvious that is should be equals to zero.And it is, in fact, equals to zero for 48kHz 32bit, for example:

Clock jitter is just what it sounds like, sometimes the clock runs faster and sometimes slower than it should.If I understood theory correctly it can raise the noise floor if it's too high.But to measure jitter you need a second clock to compare with, a better clock.That's why I agree that this specific measurement might be more of some kind of esoteric nature. I don't think it indicates an error, your output looks fine to me. But who knows...

hiro wrote:Clock jitter is just what it sounds like, sometimes the clock runs faster and sometimes slower than it should.If I understood theory correctly it can raise the noise floor if it's too high.But to measure jitter you need a second clock to compare with, a better clock.That's why I agree that this specific measurement might be more of some kind of esoteric nature. I don't think it indicates an error, your output looks fine to me. But who knows...

And by the way, jitter is never zero...

Actually, it does not matter what "jitter" is. You can safely name it how you want.Sergey gave me the resampler-plugin, and told me to run aplay, because, in this case, his resampler would print something incomprehensible on terminal. There would be a magic parameter named "jitter", it should be equal to zero.In fact, when that esoteric jitter is equal to zero, sound is perfect.

In a word, I have already constructed a kind of "Exact Audio Player" for OSS4, in the form of a simple script.It works in this way:

FLAC → SoX → Petrov's Exact Resampler → ossplay -R

APE → FFmpeg → Petrov's Exact Resampler → ossplay -R

Sound quality is fantastic.

Last edited by igorzwx on Fri Sep 17, 2010 9:51 pm, edited 1 time in total.

hiro wrote:Yeah, I did something compareable, I'm using libsamplerate for 44,1 to 48 kHz conversion and never had/heard any problems.

I tried it too, and we already discussed it here.

The Russian gurus told me that libsamplerate is not "scientific" enough for the purpose. It is, in fact, a very old algorithm from a very old handbook. It is exact in theory, but not in practice. It is exact "at infinity" which is not attainable in reality. Imagine an algorithm which is exact if and only if the "step" is infinitely small, and when the "step" is simply small (e.g. 0.0000001), you get a wrong result. Such phenomena are normally observed with non-linear differential equations, for example. Some very important non-linear structures (e.g. cyclones, or anti-cyclones, or hurricanes) might be missing in the "numerical solution". If you need a sample rate converter, you may better try SoX http://sox.sourceforge.net/sox.htmlIn SoX, they tend to use "dithering", or other esoteric techniques to remove strong distortions, but some important details (ambiance, overtones, and, genuine music as such) go missing.

It might be interesting, of course, to compare libsamplerate with Petrov's exact resampler.

Sound is played directly to the sound device through the help of "ossplay -R".You do not need, therefore, to disable resampling in OSS Mixer, but you have to know exactly which formats are supported by your soundcard.

hiro wrote:You are right that information theory has little to do with audio technology. But when you claim perfection I want to hear it first. I don't buy it and neither do I like Swiss Army knifes.I'm going to bed now, but when I can either confirm or refute this I will tell...

For humans, hearing is normally limited to frequencies between about 12 Hz and 20,000 Hz (20 kHz)[2], although these limits are not definite. The upper limit generally decreases with age. Other species have a different range of hearing.