Theo Verelst Diary Page

Thu Mar 29 16:43:17 2001

I've decided after good example to write some diary pages with toughts and events.

Oh, in case anybody fails to understand, I'd like to remind them that these pages are copyrighted, and that everything found here may not be redistributed in any other way then over this direct link without my prior consent. That includes family, christianity, and other cheats. The simple reason is that it may well be that some people have been ill informed because they've spread illegal 'copies' of my materials even with modifications. Apart from my moral judgement, that is illegal, and will be treated as such by me. Make as many references to these pages as you like, make hardcopies, but only of the whole page, including the html-references, and without changing a iota or tittel...

And if not? I won't hesitate to use legal means to correct wrong that may be done otherwise. And I am serious. I usually am. I'm not sure I could get 'attempt to grave emotional assault' out of it, but infrigement on copyright rules is serious enough. And Jesus called upon us to respect the authorities of state, so christians would of course never do such a thing. Lying, imagine that.

Previous Diary Entries

Thu Mar 29 16:43:11 2001

I'm not sure today I'll get to the screendumps, but I'll want to write some about audio. maybe it shouldn't be on a diary page, but I'll look at more and more layers of wave laboratory menus later.

Compression: steaming audio tapes?

Compression in audio terms means making soft passages louder and/or loud passages in music or other source materials softer. In the days of CD's, such concept has different practical impact, because the dynamic range of a CD and most CD players is such that there is not that much need anymore to carry soft passages over the noise level and his in the tape to prevent them from getting lost in it.

Mainly, consider a cassette recorder, lets take one I had as a kid as an example. Press the record button, and either in the built in or some hooked up microphone yell a few words. Now step awar from it, and whisper some soft spoken lines. Press stop, rewind, and listen back. Many will know what has just happened, first, we'll hear a click and some decaying sounds of having pressed the record buttons when we play back, evidently followed by a loud and maybe partially distorted yell, again followed by silence and coming to the foreground soft spoken sentence, maybe after a second, maybe after two.

What we've just heard is a compressor at work. First, it adjusted an electronic volume control to a low setting while recording the microphone input to tape, then it started opening that same control to make sure the softer passage would also be heard at normal listening level of the tape. WIthout the AVC (automatic volume control) either the first yells would have been very distorted, because it would be far to loud for the tape to handled, or the soft passages would be recorded so soft that the tape noise would make it impossible to hear them back, not even after adjusting the volume during playback, they would have been drowned in tape noise.

The problem of using such a handy little piece of electronics is multifold, mainly, it of course cannot predict what the required volume setting is, so it just makes everything loud enough or soft enough. That makes all the dynamics disappear, because the soft passages will be recorded at roughly the same level as the loud ones, and of course fast adjustments needed to capture soft sounds after a real loud passages it won't make, because then the dymanics would be lost in normal material even worse: it might 'pump' at every kick of the bass drum for instance, so a few seconds response or averaging time are desirable.

Reaching a deeper audio application wise understanding requires some more knowledge about recording and sound reinforcement techniques and skills. Mainly, the idea of making a good recording is that we capture as much dynamics as we want or think we can handle with the equipment, and preventing distortion by recording too loud. Most cassette or reel to reel based recording equipment have some headroom above lets say their 'zero dB' VU meter reading, that means if there is such a VU meter, which definately wasn't so on my first (philips) avc fitted cassette recorder, one may record a signal a little bit in the 'red' section of the meter maybe a few dB, maybe 5 or ten, and on some professional equipment there may be such a headroom of 10 or 15 dB, but not more, or the recording will be of degraded quality because of tape distortion. That sounds like an ede added to the sound, up to complete grunginess and ugglyness of the recording, or when there is only mild overdriving of the tape, the high end becomes a but unclear or edgy, and at signal peaks the signal sounds smeared closed, unbreathing, depending on the type of equipment, tape, recorded signal, and amount of overdrive.

A solo guitar would maybe even benefit from more tape distortion, which could be even extreme, if one isn't affraid to break the preamplifier or the VU meter mechanism, but that;s just about the only case where such distortion is realy adequate and desirable, in all other cases it is a clear sign of uncarefull or unprofessional recording techique.

To be sure that such distortion doesn't mess up the bands wonderfull cymbal crashes' sparklingness, one may decide to go carefull, and record way under the maximum tape level, lets say at -15 dB or so , that is safe enough. Every 6 dB on the VU meter is a double signal strength so -18 dB for instance is 1/2 * 1/2 * 1/2 is one eight'st of the maximum signal intensity, which is like turning the volume knob a quite noticable amount left.

The resulting recording would than at least not be distorted, which is good, and on professional or quality enough equipment, the result may be quite bearable, but in general the result is that when the recording is played back, there is noise audioble in it. Any magnetic tape has a certain basic 'hiss' level, which is simply always there. And if that is under whisper level, it gets by unnoticed, but when it is at levels where one may mistake it for the ocean behind the music being played, it is annoying, and pretty hard to filter out when it is there.

The trick is therefore to record just loud enough to not get a distorted recording, so that the fixed noise level is relatively low, and therefore the noise is not disturbing during playback. During soft passages of for instance an symphonic orchestra recording, we may decide to limit the materials dynamic range a bit by sliding the record volume up a bit, so that the soft passages are relatively less soft, so that also there the tape noise doesn't become intrusive or annoying when the recordingis played back.

When we do not make the volume in those passages softer when the tape is played back by turning back the volume control on the playback amplifier system, those soft passages are in fact relatively too loud, and it may be audible that the volume setting during record has changed, because the audience noises and other backgroud noises may be more audible, which is easily interpreted and understood by the ears.

When playing a record, or even worse a tape in a car, such may well be desirable, otherwise we might not be able to enjoy those soft passages much anyhow. On a good hifi system, this may not be so, then the space and rest of a soft passage may well be appreciated at indeed low sound levels, in contrast with louder passages.

In this situation, it could still be beneficial to have raised the recording level of those soft passages, because then at least when we turn the volume back at playback, we also reduce the noise in those passages, which may well be needed. Such a scheme can also be implemented by electronics, which is called companding, as in compression followed by expanding, and when done right, the resulting recordings can exhibit a high dynamic range, and a low perceivable noise level.

The well know Dolby Noise Reduction system is an example where electronics turn the volume up during recording, and back down again during playback to reduce noise. The most popular Dolby B only for frequencies above about 5 kHz (guess from memory, could be 2 or 3), and with a mild maximum correction. Dolby C starts working from frequencies of about 1 kHz and higher, and can turn the volume knob for that part of the spectrum up and down for at least about 20 dB, which makes the effective dynamic range, about 20 dB larger, which is good enough to record a CD on a good enough cassette.

The dynamic range is lets say the difference in sound level between the softest passage that just starts to drown in noise, and the loudest signal that can just pass by undistorted. There are various other dolby type of (band) companding noise reduction systems, such as multiband (4) DbA and full band Dolby X, which simply compresses and expands the whole audio spectrum of signals. Only Dplby A I haven't worked with myself, of the others I'm quite aware of the idiosyncrasies and uses.

Now suppose we have just a compressor, that is a device that makes soft sounds louder, is that any fun, too? Of course, the cassette recorder wouldn't be half as good without it, but thats lets say for domestic or journalistic (dictation) use. But what about other uses?

There are many amplified instruments, including human voice, that may well be recorded or amplified with compression effects. For a guitar, one may imagine that an instrument with a tone that dies away quickly can be given a more sustained sound by making an electronic compressor open the electronic volume know when a note or chord starts to die away. That makes for a fuller, longer lasting, more even sound impression, which can be quite desirable, both live and on record.

For many uses, the unevenness of the human voice volume is not very desirable, so there too we may make for instance weaker high or very low notes sound evenly loud by using a compressor.

Another type of compression is called limiting, which is making sure that sounds higher than a certain level are compressed considerable, to limit the effective dynamic range. For a sound system amplifying a drum set for instance, one may want to make sure that a real loud cymbal crash or tom hit will not blow up some speakers or leave the audience half deaf, so one may let a limiter hit in at for instance 110 dB (absolute sound level) , so the pain limit is not or hardly reached even with peaks in the material.

Guitarists, both bass and other ones, may use a compressor effect before the distortion effect in the signal chain, to make the sound to that distortion or 'screamer' or maybe an 'octaver' or other effects that make the sound more harsh, heavy or otherwise distored more even, so that sucha unit can be easier played with with notes with lightly varying volume.

Now what's with the electronics and nowadays digital circuits and compressors? In fact, the perfect compressor is kind of hard to make, and even to define. When one starts with a signal, and ends with another one that is compress, in fact one wants to turn the volume know in between, but the questionis when, how far, and how. As human being, we may do the soft passage correction in an orchestral recording for instance by smoothly moving some instrument channel mixer sliders during a musical pause, between levels we know about, and undo the correction just before we know a loud passage will start.

That may sound natural enough, but electronics and not even computers cannot know where one may want the adjustments to take place, so they mainly measure the signal and correct according to the lets say average signal strength measured. When a loud passage starts after a soft one, quick response is required, which may be set on the front panel of the compressor, and when it is desired that the compressor responds fast the other way around as well, it may be adjusted to also quickly open the volume when the signal is weak.

Just like with the cassette recorder, that may lead to undiserable effects for instance at the beginning of a recording.

With a computer things are different. First, the dynamic range of a computer systems analog to digital converter almost always is hard-limited by the maximum input level on one hand, and at least by the sampling resolution on the other end. Recording above the maximum input level inevitable leads to very distorted recordings, because the AD converter just has a hard maximum signal level, and not a softer saturation level like magnetic tape, and if one is unlucky, such circuit may even realy mess up when driven over its absolute maximum input level.

Most modern ones have 16 bits resolution, which in principle gives a maximum dynamic range of 2pow(16) or 16*6 dB equals about over 90 dBs, which should be fine just like CD's, though this isn't the whole picture. When we're into quality, maybe audiophile recording, the dynamic range idea should include not just the number of bits, but also what happens when signals get smaller, and wether the rest of the electronics, and even the digital signal processing, is up to the theoretical picture.

As a simple example, when the soundcard used to make recordings with has a pre-amplifier which is noisier that -90 dB (relative), the recorded signal will be noiser than would be possible theoretically with 16 bits, which is not at all a theoretical possibility.

Essentially worse is that small signals, when digitised suffer from what is called quantisation noise, which is the result of the discrete number of quantisation levels used to represent a contimuously changing signal. Lets say we have a signal at -50 dB of the maximum recording level of a 16 bit analog to digital converter (lets say on soundblaster), like a soft orchestral passage, then the effective number of bits left to represent it is about 8, which may introduce distortion of about half a percent, which is considarable. Alternatively, the quantisation error may be regarded as (correlated) noise, which is then audible at -40dB which is quite audible.

Every little noise in the input may end up in noise in the last bit, sort of like wobling between the two numbers coming out of the AD converter, so one may also have a actual digital noise at -90 dB or so in the computer with no or silent input signal, depending a bit on the circuit. When the analog to digital converter is driven such that the noise in a low noise input ampifier circuit is smaller than half a bit, and the zero level is between two quantisation levels, the result may be silence for no signal. Otherwise, one bit of noise level equivalent is inevitable, also with no input signal.

When one uses a digital compressor effect program, at least one can never get better then the signal converterted into the computer, so the limits set by the AD converter cannot be exceeded. That means that when a signal is recorded too weak, it will always suffer from quantisation distortion and noise as introduced by the AD converter, no matter what program is available, so certain compression jobs cannot be done effectively in software as well as in electronics.

When a signal overdrives an ad converter, the distortion introduced is considerable, and the signal is largely irrecoverable, so a limiter before a AD converter is not bad practice.

Practically speaking, one may want to digitall control a compressor/limiter, or use a very high resolution AD converter before digital signal path compression is implemented, such as with 20 or 24 bits, that could make sense enough.

The advantage of the latter would be that the computer may first do the recording, and that once the whole recording is sitting on harddisc we may let ourselves or some program decide on adjusting volumes in that recording, with enough accuracy to not introduce much extra distortion or noise.

We may let an analyser program part decide on loud an soft passages and 'know beforehand' how to adjust them.

Also the other problem with compression may be resolved better this way, assuming we can come up wth good enough analog to digital conversion, and amplifier and other circuitry with matching quality, which is not easy at all at 24 bits. That problem is how to determine the effective volume of an audio signal accurately and reliably. Standard electronics approach would be to rectify and average the signal, but that leads to the questions of how to deal with signal peaks, and how make the averaging filter respond such as desired. For instance if we average for a signal of 30 Herz, a very low note, the averaging time must be in the order of 1/30 second to cover the wavelenght in such a signal, if we take a 10 kHz signal, such time may be as small as 0.1 milli second, and a signal peak of a triangle (which I've used for the purpose of audio testing compressor/expander circuits of my own) may contain such frequencies with peaks who as a whole last shorter than 1/30 second.

This problem to some extend can be solved by making the attack response of the level detector circuit much faster than the decay section, that is at leat the averaging time could be such that a signal of 30 Hz will not be given different compression level inside the signal, while the attack portion of the triangle will be measured correctly still.

The decay portion of the triangle will receive no decreasing compression in this approach, which means the amplitude of a peak is always captured, but the signal coming from the amplitude measurement does not necessarily represent the instantaneous volume quickly for signals covering the whole audio spectrum.

I've made rectifier and enveloping circuits that would make this approach into at leats a near perfect limiting compressor circuit, apart from the phase accuracy of the leading output pulse and the inherent distortion of the VCA circuits used as volume control units, which are both quite high end considerations, relevant, but lets say of the level of (real) top audio equipment, and possibly higher.

Loud music and cars

I just thought about the song, browsing over some walkman radio channels, after I fixed a wire it works again. Driver seat, pick cadilac and saturday night at the cadilac club are songs I played with bands covering the car subject, of which the latter I find by far the most appealing, though the title refers to also a sort of nice song. Another one I hummed today would be a queen song, I'm not sure it is well known, just like the Bob Berg song, 'in love with my car', which at least makes a clear subject statement, as often. Probably worth a lyrics quote.

There are various points I guess raising the subject, it just occured to me, so I guess I'll write some car stuff. I had two, in fact, for a little while even simulaneously, which was fun.

I had this quite old Renault 5 from someone I knew, and when I got my contract at university, I decided it had done enough mileage and needed replacement, so I bought an Audi 100, not too fancy version, though I think the wheels weren't standard, the interiour quite velours padded (mainly grayish), but no open roof airco, electrical doors and windows, that stuff. Major but: it was (is?) vehicle kind of course that won ralleys because it was well designed, and it did have the 5 cylinder engine (2 liters), servo steering (and hydrolic servo braking and hydrolic clutch), major blowers of course, all that stuff.

And all things such vehicles have to make them worth the $5k or so I spent to obtain a 6 year old one. Pointless interiour, various collision injury prevention provisions, feul injection (and a pretty lame liquid gass addition), big tires and the suspension system to make them brake and retain grip quite above average, quality enough parts, such as an exhoust pipe lasting about a lifetime, except maybe one part, making repairs not only scraping rust and trying to keep bolts in one piece, and of course galvanised parts to make rust after ten years or so without exageration quite completely absent, except with some quite probably unoriginal irrelevant plate work.

The engine was rated at about 115 horsepower which is at least enough not to be slow with a 1300+ KG car, and at least should make it fun enough to make it move fast or on mountain roads. Fast officially of course only in germany, and maybe some other 'abroads', .. Limited to little over 180 on the counter, with room to spare, I just didn't like to have to replace the engine at some point, like I (successfully) did with the small renault, so I restrained myself. Approaching 190 things start to fly by considerably fast anyhow, and feul consumption unproportionally, too, though there were no signs of anything realy extreme or out of control, all smooth and not too loud, and completely responsive, break and steering wise.

Is that fun? Sure, quite fun in fact, though one may argue what the point is of seeking a high cruising speed that sort of seems to do justice to the road and engine properties, while still having acceptable fuel consumption rates, which would be between 140 and 160 or so. Playing with the little over half as powered renault in third gear gives similar effects, except the destination isn't reached as quickly, so I'm not sure exactly what the objective point is, but it is sort of an atractive feeling when those quite smooth and well desinged 5 pistons smoothly accomodate 140 or so, humming at about the right level (could be less, though mainly the airflow and tire noise is the main noise factor for most speeds), leaving plenty power to be set back in one's chair when needed or wanted.

Apart from the environment, and maybe risc of accidents, though I never had one over speeds of maybe 30, k/h that is, and never with any injuries at all involved for anyone), there is nothing against liking such idea, I guess it has to do with the dynamics of the whole car, the engine properties, and evidently the freedom and possibility to reach just about any destination within about a thousand kilometer radius comfortably. Quite comfortably, in fact. Like stepping out not tired much after such a distance, at times even after half a day work, which is not easy to equal.

I'm not sure what the special properties of the chassis and suspension system are, but I'm sure the control system modeling and strength and rigidness are special enough to notice. I guess a heavier engine would be more desirable, and costly and maintenance intensive, which I had to do myself, mainly, though when realy put to the test this engine did is share of pulling when operated outside quite and average gear use, and with good use of the injections responsiveness. The 0 to 100 figures I could make easily enough at least, without realy pushing it, which were not sportwagen figures, but doing 150 or in third gear and full throthle when well, and rarely, done made the machine accelerate pretty much still, quite much in fact.

The use of such power I limited to occasions not including doubling the average speed asking competitive situation, being aware of my wrenching investments, but its nice when there is reserve, though that, too, I guess is of hard to qualify quality in life. When I needed breaking and in lesser sense acceleration power during some seriously dangerous, not by me, 'autobahn' situations, smootly and safely shifting in between a few trucks in the right lane with little space in between coming from 160 or (legal) speed because some near insane person decided to suddenly form a road block, it was there, and I'm not sure how many other cars I would have liked to test for that type of manouverability and braking power when needed, without loosing steering power or the solid state of the questionlessly red hot braking plates. Nothing special happened, and even if the trucks would have had to have breaked and lessered the distance, I could have resumed a safe lane. Now I went after the a* who pulled the stunt.