r = 2 ** (1/12) start = float(input('Enter start frequency: ')) for i in range(5): print('%0.2f' % (start * (r ** i)), end= ' ') print()
=============
Please upvote, as i have given the exact answer as asked in question. Still in case of any issues in code, let me know in comments. Thanks!
4.16 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each...
Code in Coral please 2.17 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance (number of keys) from that key, and r is 2(1/12). Given an initial key frequency, output that frequency and the next 4 higher key frequencies. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}...
3.11 LAB: Musical note frequenciesOn a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance (number of keys) from that key, and r is 2(1/12). Given an initial key frequency, output that frequency and the next 4 higher key frequencies.Output each floating-point value with two digits after the decimal point, which can be achieved as follows:System.out.printf("%.2f", yourValue);Ex: If the input is:440.0(which is the A...
Write an M-file to produce a desired note, expressed in piano key number, for a given duration. Your M-file should be in the form of a function called key2note.m. Your function should have the following form: function xx = key2note(X, keynum, dur, fsamp) % KEY2NOTE Produce a sinusoidal waveform corresponding to a % given piano key number % % usage: xx = key2note (X, keynum, dur) % % xx = the output sinusoidal waveform % X = complex amplitude for...