Sample? into variable

Hey all, I want to start by saying I’ve looked around for this, google, this form, etc. I think my main problem is I don’t know exactly what I’m looking for. Also, I know the title is a little bland/odd.

Anyways, I’ve programmed for years, but I’m attempting something that has to deal with music files specifically now and I’ve never worked with audio in programming.

  1. What’s the shortest piece of information in an audio file that gets directly translated to sound? Is it a sample?
    -My further questions will assume it’s sample:

  2. All samples are initially numbers in some form or another before they are converted to sound, how do I access that specific number so I can use it within my code?

  3. What files inside Audacity source code deal with this portion? I’d love to read through it.

If you have any reading material dealing in this subject, please point me in that direction also.

I’m trying to write a program that will compare each second against every other second, ultimately finding the chorus (school project) so my first step is finding how to turn each piece/sample into a numerical value for comparison.

Thanks!!

If you are an advanced C+ programmer, this may be of interest: http://wiki.audacityteam.org/wiki/Proposal_Audio_Diff
If you are looking for something a lot more simple, perhaps you could develop something using Nyquist: http://audacityteam.org/help/nyquist

There is a simple Nyquist plug-in for reading individual audio samples here: http://forum.audacityteam.org/viewtopic.php?f=39&t=34365

Some good links for Nyquist programming:
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/devel/audacity-nyquist-en.htm
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/home.html
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-index.htm

Thanks for the links! Looks like Proposal Audio Diff is exactly what I was looking for :slight_smile: I’ll start reading