0

Please help me in debugging this code for Pset03 Music, no errors but the output of frequency function is same for all notes. I was unable to get the mistake

https://pastebin.com/qNNAQYiQ

0

Well, for your duration function you have lots of conditions i.e (avoid it). you should find a formula for it rather than checking what is the denominator and numerator. and by the way the fraction[2] is a character which you want to compare with integer.

2
  • but the problem here is with frequency function, sorry it didn't mentioned it
    – Asrst
    Jan 7 '18 at 16:55
  • I've been wracking my brain on a formula that will fit. Could you supply some questions to get me to expand my thinking so that I might look at the problem differently? Jan 20 '18 at 5:33
0

Your problem most likely lies on the line 122. Your variable N is tripping up the calculation, so try feeding the equation a float instead of an int. I had exactly the same issue and such a change fixed it in my case. Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .