Page 1 of 1

some math music programming

Posted: Thu Jul 04, 2013 5:51 pm
by ii
Hi! I'm working on a program to extract guitar tracks from an mp3 file..

ive come up with the psuedocode, but , im not that good at the math needed to actually solve the algorithm. if someone can help me. i'd really appreciate it.

this is what ive got so far

a = guitar
b = vocals
c = drums
d = bass

a+b+c+d=song

how can i solve for a?

Re: some math music programming

Posted: Thu Jul 04, 2013 6:41 pm
by sortie
You can exploit the properties of the addition operator. In particular, you can rewrite

a + b + c + d = song

to

a = song - b - c - d.

I'm assuming the song is your input, so you already know that. You might not know b and c and d, in which case there are infinite solutions (unless you know that b and c and d all belong to some finite set). We have now reduced the problem to finding b and c and d. You can find b and c and d in the same manner we just found a. You will then also likely find infinite solutions for b and c and d.

Seriously, though. You might want to look into the furier transform or some clever operations in the frequency domain, such as finding the frequencies in the input. If you say math is a problem, you really need to practice it and apply it, this is not a simple problem.

Re: some math music programming

Posted: Thu Jul 04, 2013 9:46 pm
by Nessphoro
First of all, your first post on an osdev forum is about music and math. Now, what that means is that you followed this chain of events:
  • 1. Hmm, I need help with this problem, let me do a query on Google.
    2. By the time your reach page 20+ you notice a result from this forum on "how do I submit a buffer of music to my sound blaster? Hope some math geeks can help me out with a fast algo!!!!11111one
    3. *Damn good forum, I think these guys know what they're talking about!*
    4. *Oh what is that at the top of the page. "The Place to Start for Operating System Developers." Lol, screw that*
    5. Create an account.
    6. Post a thread irrelevant to the site.
    7. ???
    8. Profit!!!
Peculiar, isn't it?

As for the problem (to stay on topic), your best bet would indeed be a FFT and you take the frequencies that correspond to the guitar. However, this is a very complex problem which involves a lot of digital signal processing.

Nevertheless, my final conclusion would be that you're either trolling, 12, or a combination of thereof.