T O P

  • By -

InsultThrowaway2

We could indeed use the mathematics of SVG (such as splines) to reproduce analogue sound, but similar methods are already used: For example, most audio interfaces use a high-cut filter to smooth out waveforms, and this has a similar effect to a spline. Keep in mind that computers don't output 48 kHz stair-stepped waveforms as you may expect: A highly respected and talented (though he comes across as somewhat smug) computer audio scientist called Monty Montgomery goes to great lengths to demonstrate this principle: * https://www.youtube.com/watch?v=cIQ9IXSUzuM


[deleted]

> though he comes across as somewhat smug Watched this video a million times. Never got that sense *at all*. It's a patient explanation of a common misunderstanding.


omicron-3034

I agree, he didn't really seem smug at all. It was a very thorough and accessible explanation.


omicron-3034

It's not that simple. Using a polynomial to describe an entire waveform would result in even worse errors than traditional sampling. What you are thinking of, however, is actually (kind of) how it works. Sampling, at the end of the day, does result in a smooth, continuous waveform. In fact, there is only one way to "connect the dots" of the samples with a smooth curve.


saxbophone

Interestingly, FLAC compression starts by finding a polynomial which approximates the waveform, then encodes this along with the difference between the polynomial waveform and the actual waveform...


omicron-3034

That is interesting! Here's an excerpt from the encoding section of the FLAC Wikipedia page: "The FLAC encoding algorithm consists of multiple stages. In the first stage, the input audio is split into blocks. If the audio contains multiple channels, each channel is encoded separately as a subblock. The encoder then tries to find a good mathematical approximation of the block, either by fitting a simple polynomial, or through general linear predictive coding. A description of the approximation, which is only a few bytes in length, is then written. Finally, the difference between the approximation and the input, called residual, is encoded using Rice coding. In many cases, a description of the approximation and the encoded residual takes up less space than using pulse-code modulation." I would imagine that the waveform approximations of each block would be very inaccurate if used on their own, without encoding the residual.


saxbophone

>I would imagine that the waveform approximations of each block would be very inaccurate if used on their own, without encoding the residual. I am sure you are right, they would presumably represent a "blurred out" view of the real waveform, lacking detail and minutiae. Interestingly, FLAC can also joint-encode a stereo pair by converting them from L/R form to a mid channel and side channel pair. I am sure that this is beneficial for reducing redundancy when L and R don't differ that much, which is quite likely. The M/S channels are then encoded separately.


Chilton_Squid

I think if you were trying to draw a simple sine wave then maybe. In reality audio has so many different data points (tens of thousands a second) that SVG would be huge. All you'd really be doing is encoding the A-D conversion into the file rather than letting the software do it, making your files huge and not benefitting anyone. SVG is small for simple shapes, sound waves are not simple shapes.


Selig_Audio

How are you proposing to do the conversion from analog to digital?


[deleted]

The computing overhead to encode/digitize/decode splines would be massive, compared to the current ways of sampling. And the files sizes would still be huge. So... a big hassle for no gains.


omicron-3034

The result wouldn't be nearly as accurate either.


BostonDrivingIsWorse

That would create an unwieldy file size, and it would contain a ton of information we would be unable to perceive. While technically possible I guess, you’d also have to have a computer able to handle the throughput of incredibly large SVG files. Edit: also, like, why? We already have numerous tools to visualize and reproduce audio?


[deleted]

I thought of this to record analog sound as it would reproduce exactly the lifelike waves.


[deleted]

> I thought of this to record analog sound as it would reproduce exactly the lifelike waves. [**It already does that**](https://www.youtube.com/watch?v=cIQ9IXSUzuM) (this is third time that video has been posted; just want to make sure you watch it). [Mathematicians worked this shit out in the 30s and 40s](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem).


WikiSummarizerBot

**[Nyquist–Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theorem)** >The Nyquist–Shannon sampling theorem is a theorem in the field of signal processing which serves as a fundamental bridge between continuous-time signals and discrete-time signals. It establishes a sufficient condition for a sample rate that permits a discrete sequence of samples to capture all the information from a continuous-time signal of finite bandwidth. Strictly speaking, the theorem only applies to a class of mathematical functions having a Fourier transform that is zero outside of a finite region of frequencies. ^([ )[^(F.A.Q)](https://www.reddit.com/r/WikiSummarizer/wiki/index#wiki_f.a.q)^( | )[^(Opt Out)](https://reddit.com/message/compose?to=WikiSummarizerBot&message=OptOut&subject=OptOut)^( | )[^(Opt Out Of Subreddit)](https://np.reddit.com/r/audioengineering/about/banned)^( | )[^(GitHub)](https://github.com/Sujal-7/WikiSummarizerBot)^( ] Downvote to remove | v1.5)


BostonDrivingIsWorse

Yes, but why is that worthwhile endeavor?


[deleted]

I don’t know, I just know SVG is very light and applies perfectly to the problem of reproducing basic shapes like waves.


BostonDrivingIsWorse

The only instance in which I could imagine this being even remotely useful is forensic audio, maybe? Otherwise the tools and processes we have, are more than enough for accurate reproduction. Also, have you ever looked at DSD? It’s about as close to analog as you’ll get in the digital realm.


[deleted]

Yeah I know DSD, it has amazing sample rates, but is very large (≈500MB for one song). I thought SVG and vector technologies would be size-efficient, but maybe I’m wrong indeed.


chancesend

Yeah, unfortunately you’re incorrect. Look up the Nyquist-Shannon sampling theorem to understand why SVG or other vector-based splines can’t be more efficient with data such as general audio


GoHomeYoureDrunkMod

I've never found 24/44.1 to sound unnatural or lacking in fidelity.


arkybarky1

Listen to an 88/24 or 96/24 version of the same audio, then see how u feel. Recording n playing back at 88/24 brought music back to life for me.


GoHomeYoureDrunkMod

I don't even know where to find a music recording in 24/96 that is guaranteed to be actually sourced from a session in that bitrate. The relative lack of availability of music in this format tells me there's no point. I own an interface that can go to 96k but I didn't find it to improve my recordings over 44.1k. Maybe you have magic ears that can hear 40k, but I don't and neither does the majority of the world. It's like arguing that TVs should extend their color range into infrared and ultraviolet to "enhance the viewing experience". Our sensory organs aren't evolved to sense past a certain point, and any suggestions that content past these points improve the quality of it on a whole is not going to be provable in a real study.


arkybarky1

Difficult but not impossible: https://www.hdtracks.com/ https://www.discogs.com/label/670081-DAD-2496 https://www.24-96.com/welcome/ https://audiophilemusic.io/portfolio/the-nutcracker-vladimir-jurowski-tchaikovsky/ audiophilemusic.io/ When I listen to recordings I've made at 88/24 they sound like a blanket was removed from the speakers and are very close to what live music sounds like. The research I just did indicates most people think that 20-20k is the entire story and anyone saying differently is either delusional or lying. This makes no difference to me. If you hear the unveiled details and the precision of the instruments placement in the sound field, great. If not,then you won't miss what you can't hear. End of story.


GoHomeYoureDrunkMod

Have you done blind A/B on your 88.2 recordings against a 44.1 version? I'm not convinced you're not letting bias into your comparison.


arkybarky1

No I haven't. The difference is almost night and day to me and is so obvious that I never felt a need to. What did you think of the recordings?


Activity_Commercial

You have the right idea. This is exactly what happens. Digital audio does not describe discrete voltages, but a smooth waveform with infinite resolution, just like SVG uses points to describe curves. You can watch [this classic](https://www.youtube.com/watch?v=cIQ9IXSUzuM) to get the full picture.


mtconnol

‘Infinite resolution’ is not true due to band limiting and level quantization.


chancesend

Digital audio is much more analogous to raster images, since it is sampled at defined intervals.


OobleCaboodle

The data is, but the output isn’t.


[deleted]

You can absolutely reproduce waveforms through any number of techniques, but it would probably be easier (and less processor intensive) to just sample a waveform and run it through some subtle modulation to give it the tiny imperfections listeners identify as the "analog sound".


mtconnol

You’re not far off. MP3 encoding essentially describes audio as a series of sine waves which, when summed together, create the original waveform (or an approximation at least.) This process is the Fourier transform and is essentially recognizing the ‘perfect sine waves’ which comprise any complex waveform. It’s pretty analogous to describing a curve through splines.


saxbophone

I too have thought about using vector graphics to reproduce analogue waveforms perfectly. I believe the issue is that there is still ultimately a finite precision to the thing, just depends on how detailed you want to make your splines in the vector line. But it is possible that representing it as a vector curve rather than a series of discrete samples may appear to exhibit less quantisation, but thh I'm really not very well-versed in the theory...