Questions tagged [frequency]

The tag has no usage guidance.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
51 views

CS50 Pset 3 Music errors - please help! :(

I really don't know what I am doing wrong. I think I've mad a mistake in frequency. Check50 says: :( note C3 has frequency 131 expected "131", not "220" :( note Bb5 has frequency 932 ...
0
votes
0answers
25 views

Pset3---My programme is not compiling

I am not being able to understand the correct usage of get_base_frequency. Please help! Thankyou
0
votes
1answer
72 views

Calculate n (semitones) for frequency in pset3

I'm having a bit of a hard time trying to calculate the value of n(the number of semitones from A4). I'm currently using the following formula: if (octave > A4_OCTAVE) { n = (octave - ...
0
votes
1answer
278 views

pset3 music frequency question

I am working on pset3 music frequency. I struggled with finding a pattern of frequencies for different notes, so instead, i created two arrays one with all possible note (C,D,E,F,G,A,B) and another ...
0
votes
1answer
79 views

Writing the .wav file fails with command-line notes

I have verified that my frequency(note) function returns the correct frequency as an int. However, when I attempt to write out using the "command-line note entry" testing scenario described (and yes ...
0
votes
3answers
138 views

cs50 music only frequency of A notes returned

could you please help. I just don´t understand why only A notes are calculated. Please see code below. Many thanks for your help in advance. //Program to calculate note frequency ...
0
votes
0answers
117 views

pset3 frequency: adjusting semitones

My code for Frequency is working well in the 4th Octave as well as any A note, but after that I am getting values all over. I used Debug50 to follow the math, and I've boiled it down to the adjustment ...
0
votes
1answer
565 views

Pset3 Music frequency returns all 440

My frequency function returns all 440. Been researching and trying possible solutions (turn ints to floats, round, power, etc) but still does it. What am I doing wrong? Thank you! int frequency(...
0
votes
1answer
218 views

My music program: frequency returning zeros

// Calculates frequency (in Hz) of a note int frequency(string note) { int n,r,a; double oct, z; float x = 0.0; float y = 0.0; char t; t=0; a = 0;r = 0; n = strlen (note)...