New audio codec in development

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
A new audio codec is being developed by the infamous, one and only keantoken! I will call it the Slew-Sampled Audio Codec. I am planning for it to be open source, if it is worth messing with. I have attached a PDF file which should briefly explain my plans as well as be an interesting insight into the art of critical thinking if indeed my ideas are valid.

Any input is appreciated, as well as humorous play if the topic is maintained.

If my use of the phrase "slew rate" is kind of strange, forgive me that I have not a better word to use.

happy reading!

:cheers:
 

Attachments

  • the slew-sampled audio codec by anthony tuttle.zip
    16.8 KB · Views: 62
Okay, maybe its not as amazing an idea as I first thought it was.

Please disregard any questionable information relating to Fourier because what I wrote is just what I got from everything I heard about him on DIYAudio. Most of it I had to assume. :xeye:

Okay, just so I won't have to sit here and explain why I posted this without thinking as much as I usually do, I'll just come out and ask the inevitable underlying question - What is you opinion on my idea?

I have another snazzy idea, but I want feedback on this one first. Opinions?

Any ideas or opinions greatly appreciated!

-keantoken
 
Originally posted by ssmith
quote:
Originally posted by keantoken

Any ideas or opinions greatly appreciated!

Way above my head. I looked at the post thinking, wow, a new FLAC, APE..... is it lossless? Lossy...

So I downloaded the pdf, and got something about squares and sines.... and...
quote:

Let this be a lesson to the reader about the potential of any determined
person regardless of intellect.

Yes, it is supposed to be lossless.
About that last part, I thought it was neat that I could write all that down with out using a textbook or calculator. I thought it was interesting that all this could be figured out just by logic.

Geek,

I like the idea of lossless audio, but there is only so much you can do to keep from blowing up your harddrive with no loss in quality. I thought OGG was cool until I came across FLAC. Now I will try and use it for everything.

I got a 38000 samplerate @ 16b WAV of the MegaMan X5 Staffroll (Yes, I play MegaMan...) And despite the low samplerate and 16b quality, (and it's 35Mb of disk space :D ) it's the best music I've ever heard - The quality is astounding and the composition is ten times as good! I converted it to FLAC and I can't really tell a difference (maybe less full sound?).

What's up with the APE thing anyway? My uncle thinks that's kind of a lame name... I don't really care anyways though, somewhat because of the abstract name and more because I am already content with what I have.

I would post my second idea, but it seems extremely simple and I wouldn't be surprised if it's already been done... But it does seem to have a lot of potential.

-keantoken
 
Hi Keantoken,

Ahhhh, 35MB is nothing nowadays :D

Imagine if you could get one of those Apple "thumbdrives" to work with your gadget? That'd be cool!

keantoken said:
What's up with the APE thing anyway?

http://www.monkeysaudio.com/

A lot of the lossless Usenet groups use .ape and the creator's fairly easy to work with :)

Speaking of which, I wonder if they got the bugs out of the Linux binaries yet :confused:
 
Hmmm...

Sounds interesting enough to be worth checking out.

About Linux, I used to use it until I got Win2k and shortly after I got an Nvidia GeForce FX 5500 (128 RAM) and discovered it's incompatibility with Kubuntu. So I haven't been using it because nobody has shown me a way to set the right drivers at installation time. I would be using it if it weren't for that. Wonder if they fixed it in 6.10?

You think you got problems with bugs... The bugs aren't as bad as the directory names and stuff. I can never locate my programs! Nor do I know where to put all my files. I guess that's my fault, however, because I couldn't really spent much time getting used to the linux life.

- keantoken
 
Well,

That was an unanticipated question!
I just spontaneously had this idea somehow and wrote a PDF about it.
I have often thought that if you could capture subtle but meaningful information about data such as sound, you could just record that information and it would be sufficient to reproduce the whole data when necessary. The slew rate would translate all factors of a wave when subjected to the proper algorithms, and wouldn't take up as much space as the actual original waveform. Therefore, it is a logical way to store information. It is not necessarily compression, but just a smaller way to record audio. However, using the Sinusoidal Method could be somewhat hard to encode...

If I eventually get some more programming experience in C or C++ I might decide to go ahead and try it.

Anyways, What are the harmonics involved in making square waves and triangle waves? I'm going to have to simulate this on my graphing calculator... :D


-keantoken
 
I'd like to interject something here....... Whats the point of audio compression formats for anything other than portable devices with limited storage?

The reason these formats ever evolved in the first place was to save valuable storage space. I think we have hit a point where cost vs. size no longer necessitates this need.

You can buy a 400gb hard drives on ebay for $100. Thats enough room for over 500 full length CD's without any compression. ;)
 
Anonymous,

Audio compression is for someone like me, who only has 18GB total in space and doesn't want to have to devote his whole computer to music! And if you can save space, why not? It may be different with you, but I don't have $100 for me or my family to spare.

Does anyone know of any good general open source project forums? I could probably get some good answers there.

- keantoken
 
keantoken said:
Anonymous,

Audio compression is for someone like me, who only has 18GB total in space and doesn't want to have to devote his whole computer to music! And if you can save space, why not? It may be different with you, but I don't have $100 for me or my family to spare.

Does anyone know of any good general open source project forums? I could probably get some good answers there.

- keantoken

keantoken, I understand your exception to my statement. I did not mean to imply that there are no use for these formats.

I think a lot of people out there concerned with the quality of their stored music CAN afford larger storage devices. I was simply bringing up the fact that for those people technology has passed a size vs. cost barrier that no longer requires one to search for the perfect lossless format.
 
Thank you for being apologetic, however I was by no means trying to sound like I did. I am ridden with a horrible social skills that show even in my writing, so no need for apology. ;)

I do favor the quality of my music, as well as my photos - That is why I never use JPEG! Instead, there is something way better - PNG! Lossless? You bet! Look at this link: this picture is a 4096x4096 PNG that includes all of the colors in the 24 bit spectrum. Only 58 Kb? This isn't a bluff!

http://www.3-t.com/pub/png/img_png/16million-pschmidt.png

Unfortunately, not many image editing programs take full advantage over PNG's filtering compression capabilities....

Here is the official PNG home site:

http://www.libpng.org/pub/png/

- keantoken
 
Okay, to maintain the topic (hehe... I forgot my own dictum!), I have been working on my equations all day in school. These are my ideas for my codec:

1: Have adjustable average samplerate. Quality vs. compression - maybe not lossless... :bawling: . However, it could have two modes - lossless and lossy; when the lowest samplerate is above or equal to the input samplerate, and when the average samplerate is at or below the input samplerate.

2: The equations involved could be manipulated to form a lowpass filter to filter out high harmonics, using the nonlinearity property of the sinusoidal Method of Processing, as described in the PDF

Not an especially long list, but I think more will be added later.

Here are my first ideas for the equations:

Variables:

A=value of current sample | S=input samplerate
B=value of previous sample | N=nominal output samplerate

Equation:

(A) (C)
sin (((abs (A)/abs (B))/S)*1.570796327)

Definitions of the equation numbers:

1.570796327=pi/2

Info:

abs (A)/abs (B) (A) produces the slew rate, and /S (B) turns it into a number from 0-1, then *1.570796327 (C) translates it into a number between 0-1.570796327 which is the desired range since sin (1.570796327)=1. The peak of the sine wave is at the point of maximum slew rate because here, the output of the codec needs to level out - which filters higher frequencies to increase compression.

Problems:

1: The abs (A)/ abs (B) thing was used to keep numbers positive so that the output of the whole equation is positive, making it easier to implement in a program. What happens if A is negative while B is positive? This means that the input crossed zero between the times when the samples were taken.

2: It is true that the output of this equation is zero when a 20,001Hz sine wave is give to the input, but if it goes over that, then the output will begin to fall again because of the nature of a sine wave. This would cause weird problems when ultrasonic (>20KHz) waves were give to the input. To fix this, there would have to be a limit that causes the result of the equation in parentheses to never go over 1.570796327. This would have to be implemented in the code.

If you need something clarified, which you probably will, because I am not used to explaining complex things, just ask and I will do my best to answer your question in an understandable manner. I do not want this discussion to stop!

- keantoken
 
keantoken


You are way above me in maths and in advanced ideas.
Are you a professor or so?
:D :D

If I recall you are quite young.
I guess you are #1 in mathematical in your classroom.
Maybe even best in your school .... ?

This does not necessary mean
you are able to accomplish a good diy audio system.
At least not better than our experienced practical builders can.
But sure, it can help a bit.
You will learn more quickly, when having a bright intellect.
;)

Regards
lineup
 
Thanks, lineup!


I may be considered intelligent, but as you said, I still have quite a ways to go.

I am not necessarily the best in my classroom or school, but my edge is my knowledge about math. I got interested in trigonometry when I first saw what sin (x) would do on a graphing calculator, and then I wondered what this motion was used for. Then my math teacher last year let me look through her trig book and I discovered the relationship between circles and sine. I also gained a lot of it just sitting somewhere and programming my graph calc, trying to make programs that would figure out resonant frequency, and rotate shapes and tons of other stuff. This is also where I got interested in programming. If I had a mathematical question to ask, I would make a program in my calc to figure it out!

I am not the fastest in my class to figure things out, but I can draw out equations and identify patterns better than anyone in my school that I know. I have to try not to get a big head, though, since this can cause you to stop learning because you think you know it all when there is much more to know.

About the equation, I believe for problem #2 I can use something like this:

sin (abs(abs (A)/abs (B))

Also:

If anyone has heard of Winamp, which I am sure lots have, I believe that I could use it as a testing host. I could program my input and output plugins with the Winamp API. All I need, from what I read, is some knowledge of the C programming language. I know a little, but I am going to try and learn as much as possible over this weekend do that I can get started right away!

-keantoken
 
sinus cosine circle and audio

sinus and cosinus
can be very useful in audio calculations

because the most commonly used audio waves
for testing amplifiers and components and amplifiers and circuits
are sinus and square waves

sinus is based on the formula for a circle
Circle perimeter = 2 x PI x Circle radius

we so often see use of the value PI (3.14) and 2 x PI (6.28) in audio
The other value often used is square root of 2 (= 1.414)

Often these two values are combined in several ways:
1.414 and 3.14 (and the associated values of 0.707 and 6.28)

For example the -3dB frequency of a simple RC filter
f = 1/ ( 2 x PI x R x C )


I haven't bothered to memorize more than maybe 3-5 important formulas for audio.
U = R x I (ohm's law)
and the above RC formula
will cover most any math we need to setup a good amplifier.

Scientific pocket Calculators and Simulators can do the rest, for anyone,
without the need for any knowledge in maths.

--------------------------------------------------------


About learning.

It is not those quickest and most brightest
that always become the most skilled, or even professors, in the end.
For best learning you need motivation and desire to learn something.

When you are really interested in something, you will learn.

Talent is good, but motivation and drive is better!


lineup
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.