Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
The word "How?" springs to mind at this point.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.

user:
pass:
register,


                                                                                   

vector-mapped waveforms

a lossless storage format for synthesized music
  (+3, -1)
(+3, -1)
  [vote for,
against]

Digitizing waveforms causes a loss of data -- you never know if there's an extra wiggle in between two bit values.

However, a vector map can provide infinite resolution of shapes. Examples of vector-map technologies include Flash and Illustrator.

If you're synthesizing music*, you can be certain about the wiggliness of your output waves. In this case, you can store them in vector-mapped format. These provide infinite resolution.

The problem comes when you go to play them. The computer has to render the data into a bitmap for the soundcard to play, and the soundcard has a set resolution.

However, as sound card technology improves, it can digitize the vector mapped waveforms at higher and higher resolutions. So, this is a way of future-proofing playback of your synthesized music.

* Synthesizing, as in, on the computer, not recording. Recording is still a problem.

lawpoop, Oct 21 2003

A nice page on Fourier Series http://www.jhu.edu/~signals/fourier2/
Includes listening to waveforms as well... [RayfordSteele, Oct 04 2004, last modified Oct 05 2004]

[link]






       The problem you will hit is the technology of your recording device. How do you record in a higher resolution than "digital" (which reveals a problem in your logic - the assumption that you can't just sample more frequently)?   

       I say you skip vector and just create an equation of the entire wave, for an exact solution.
Worldgineer, Oct 21 2003
  

       // However, a vector map can provide infinite resolution of shapes //   

       Um, not quite. You see, for well defined shapes like circles, lines, and ellipses, you can simply say, "draw an ellipse at (X, Y) with major radius A, minor radius B and rotated by K." But with a waveform, you'd have to define the waveform first. Which leads to a chicken and egg problem.   

       [Worldgineer]'s suggestion is as close as you'll get to perfect reproduction. In reality (if you don't already know the equation of the waveform), this could be implemented by using some transform (eg. Fourier) which yields a data set which is easier to manage than the original. Of course, there's data loss involved there, too - the idea of the transform is to minimise it.   

       Sorry for all the jargon, too. :P
Detly, Oct 21 2003
  

       [detly] Read it again. This isn't for recording; this is for synthesized music.   

       But, you're on the right track; remember that sine waves are one of those well-defined shapes.
lawpoop, Oct 21 2003
  

       Quick and dirty lesson on synthesized music: it's all sine waves added together. Real simple.
lawpoop, Oct 21 2003
  

       Advanced lesson for vector-mapping synthesized music: since you can define sine waves with infinite resolution, you can define your synthesized music with infinite resolution. Just don't add your sine waves together.
lawpoop, Oct 21 2003
  

       You could control analog synthesizers, which rebuild the music each time you play it with no actual waveforms stored on the PC. But that's different -- and baked, too.   

       So, have a specialized analog sound card. It has magnetic coils, with electrical signals like a phono cartridge produces. The vector waveforms smoothly pull that electronic "needle" to play your sound perfectly. The card has a built-in vector reading system (or whatever, to receive and save analog).   

       Many vector graphic shapes (like you see in Flash) can develop flat spots and protrusion "artifacts" when re-sized, as the computer tries to hold the shape together. But bezier curves, and ellipses, remain smooth, since each is a mathematical formula.   

       There are more shapes than "sine waves" in sound. Square waves, sawtooth waves, and more. They're all something like re-shaped sine waves, perhaps.
Amos Kito, Oct 21 2003
  

       [half] did you ever take geometry? Well, if you have the formula for a circle, you can figure out any point on that circle. Vector maps store only the data for the shape. ( Like "draw an ellipse at (X, Y) with major radius A, minor radius B and rotated by K," from detly's example).   

       To define a circle, all you need is the center and the radius. You can know anything else about the circle from only those two thing. So, if your monitor only goes to a certain resolution, you can say "figure out 50 points on this circle", and then the computer draws it. If you have a nicer monitor, you can then say "figure out 1000 points on this circle" and the computer draws a smoother circle. If you had infinite time and computer power, you could figure out *all* the points on the circle. Of course, you can't afford that.   

       In the case of the sine wave, you only need to data points to represent the wave: the frequency and the amplitude (did I get that right?). Synthesized music is just one sine wave after another added together. So, if you just store each sucessive sine wave in a simple log format, you have an output of infinite resolution.
lawpoop, Oct 21 2003
  

       [lawpoop] - In that case, what you're saying is equivalent to storing the Continuous* or Discrete Fourier Transform of your synthesised waveform. Which is nothing new.
--
*Of course, if it were continuous, there would still be resolution problems, but I don't think that's in your problem domain (so to speak).
Detly, Oct 21 2003
  

       [Amos] you're right. Those sawtooth, etc waves are just a bunch of sine waves.
lawpoop, Oct 21 2003
  

       [detly] Do you know if anyone's used this to store output from a music synthesizer program? That would be a new application, if not.
lawpoop, Oct 21 2003
  

       I don't know if they have - so the application might be new - but I doubt that it's *never* been done.
Detly, Oct 21 2003
  

       [Amos] Are your 'specialized sounds cards' already baked? If not, you should post them!
lawpoop, Oct 21 2003
  

       [detly] Um... okay.   

       So, does that count as baked, or what?
lawpoop, Oct 21 2003
  

       //you should post them//   

       There's even more.
I've decided to post "The Needle Wiggler", which lets you play a modern CD through an old phonograph. That analog sound card would be almost the opposite approach -- analog output, rather than input. Throw your idea into the mix, and it comes full circle: "Pure" sound in & out, and you can play it on your turntable for that authentic feel.
Amos Kito, Oct 22 2003
  

       If we were to combine our forces, we would be unstoppable!
lawpoop, Oct 22 2003
  

       Needle wiggler? as in a device that attaches over top of or in place of a needle cartridge, which is in fact a tiny self-contained CD read head with a pair of transducers to actuate the needle? Pure genius. Add in a tiny wireless transmitter to control the speed of the turntable, and you're all set. (only problem I can see is that a CD typically spins much faster than an LP. Solve that, and you're all set!)
Freefall, Oct 22 2003
  

       Then you could really scratch CDs!   

       I mean, in the turntablist-sense.
lawpoop, Oct 22 2003
  

       Analog sound cards almost certainly exist (or once did). But if they receive analog waveforms, unless you can also store it as analog, you might as well use a digital card. The card would need built-in processing power to at least produce mathematical formulas, so the computer can save them, then rebuild the audio again when played.   

       (OK, I'm rude to be discussing my idea here in your idea. I'll post The Needle Wiggler separately. Then you can remove any unrelated annotations as you wish.)
Amos Kito, Oct 22 2003
  

       Man, I am not here to clean up after you.
lawpoop, Oct 22 2003
  

       //So, this is a way of future-proofing playback of your synthesized music.// I think if you press "save" in your synthesizing program it will do exactly what you describe.   

       Oh, and a vector consists of only magnitude and direction. I think that's why we misunderstood your idea.
Worldgineer, Oct 22 2003
  

       [worldengineer] So when you're done saving your file, how do you play them back? All of these programs render to some bitmap format.
lawpoop, Oct 22 2003
  

       Render it to the quality of your audio card. Seems silly to do otherwise. As soundcards improve you still have your original saved file.
Worldgineer, Oct 22 2003
  

       [worlengineer] You've basically summarized what I've proposed, except:   

       I say render it on the fly for the sound card. That way, you don't have to go digging for the lost source file when we all get shiny new 32-bit sound cards. And, you can send it to your friend who has a better sound card then you, and they automatically hear it in better resolution.
lawpoop, Oct 22 2003
  

       [o] Read the annotation that has the advanced lesson for vector-mapping synthesized music.   

       Note that all synthesized music is is a collection of sine wave. In wave files, these sine waves are all added together, and then bitmapped, which causes data loss.   

       But, since a sine wave can be completely defined with a simple equation, you can store a log of sine waves, each with infinite resolution.What you have at that point is your complete song, which can be rendered at arbitrary resolution. When you are ready, then, add together and bitmap. I recommend only doing that when you are sending data to the sound card.
lawpoop, Oct 22 2003
  

       If I remember correctly, you can only approximate a square wave or similar discontinuous waveforms with a Fourier series. The edge peaks never quite go away.
RayfordSteele, Oct 22 2003
  

       [o] I'm proposing A. Would B work?   

       Do you mean XOR?
lawpoop, Oct 22 2003
  

       It was working when I put it up!
lawpoop, Oct 22 2003
  

       For the mathematically lost: a Fourier transform uses the theory that any continuous (preferrably periodic) function can be approximated with as much accuracy as you wish by adding a series of sine waves with different frequencies and amplitudes together. For any curve you can draw that follows the rules for a function, and you know something about the equation for it, you can virtually duplicate it as the summation of sines.   

       The theory is immensely useful in dealing with higher order math, like differential equations, where approximate solutions are easier than solving the problem. The accuracy is simply determined by how many terms you choose to include.
RayfordSteele, Oct 22 2003
  

       I'm still lost.
lawpoop, Oct 22 2003
  

       It requires math a bit more advanced than geometry to understand.
half, Oct 22 2003
  

       Try a couple of years of Trig, Calculus and Signal Processing classes. :P   

       I was going to add these comments to my anno above, but was cut off :   

       Note 1 : To define a sine wave, you need frequency/period, amplitude, *and* phase.   

       Note 2 : Sawtooth/square waves, etc, can indeed be represented as combinations of sine waves, but this involves infinite series. You can choose your accuracy, though.
Detly, Oct 22 2003
  

       "a couple of years of Trig, Calculus and Signal Processing classes"
Yup, that'd just about do it.
half, Oct 22 2003
  

       There's probably a digital way to model a square or saw-tooth wave that would reduce the number of terms and simplify the processing horsepower needed.   

       Something else I found. [link]
RayfordSteele, Oct 23 2003
  

       So...
samples are currently defined as an array of values which correspond to a time series of speaker-head positions (as I understand it - and maybe I'm wrong.)
  

       But you want to replace that array with an array of waveforms. So as previously indicated each waveform will need frequency, amplitude and phase information. When added together you can work out the speaker head position as a function of time, with 'infinite' resolution.
But you won't get infinitely many waveforms to choose from, because each one will have to be stored (presumably digitally). So although you can reproduce any sound defined to potentially perfect quality, you can't define most sounds perfectly. Sure, you can increase the set of describable sounds by increasing the storage requirements, but you won't get infinite resolution without infinite waveforms.
  

       Plus, you need to load in all the data before you can start playing the sound, you can't just start off playing it and stream in the rest as you go along.
Loris, Oct 23 2003
  

       Isn't this like ADPCM?   

       google for Don Lancaster Magic Sinewaves.   

       He generates the waveforms he makes with less than 1000 bits.
mr2560, Oct 23 2003
  

       I'm going to skip the years of classes and go right to the dumb questions:   

       Don't waveforms like triangular and sawtooth waves *not* exist in nature (as far as sound waves travelling through material)? When your synthesizer spits them out, aren't the speakers putting out something more like the fourier approximations of those waves, i.e. something much curvier?
lawpoop, Oct 23 2003
  

       Ok, sawtooth wave exists in nature. But, does it come out of speakers?
lawpoop, Oct 24 2003
  

       Servo speakers can make them as long as they don't have infinite slope like the square waves do.
mr2560, Oct 24 2003
  

       I mean, are they *really* *really* diagonal, or, if you look at the waveform really closely, it is curvy?
lawpoop, Oct 24 2003
  

       // Servo speakers can make them //   

       But are the peaks and troughs instantaneous reversals? I believe the concept of inertia still applies to servo speakers.
notexactly, Sep 29 2019
  
      
[annotate]
  


 

back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle