Carey Brown wrote:Another thing in your code that is questionable is how you calculate the Color. The double passed in is presumably in the range of -1.0 to +1.0. So your formula (d + 1) / 2 will give you a range of 0.0 to 1.0 and that multiplied by 255 will give you 0 to 255. This is good because that is the valid range for rgb values. However you use multipliers of 355 and 380 for the other two rgb values which will probably overflow the 255 limit.
Where did you get this formula from?
Carey Brown wrote:The code you pointed at appears to create a simple graph of the audio left & right double values. Is that the kind of "Picture" you have in mind? Also, I'm not familiar with the libraries the instructor is using.
Carey Brown wrote:
Jon Fil wrote:The 4x4 is supposed to be a grid of pixels.
4x4 pixels would be barley visible on a screen. (?)
Carey Brown wrote:Your "requirements" are very vague. Your diagram shows a 4x4 grid, is that a grid of pixels or images? How would you use sound to compute the Color? I know what a picture is but I don't know what a "Picture" (class?) is. I assume the picture is supposed to change as the sound file is played. How do you sync the process of converting a section of the double array to a picture to move to the next position in the array in sync with the playback? Has your instructor shown you a working demo of an example of what they are looking for?
I'm afraid that without filling some more of the details you aren't likely to get many responses.
Mike Simmons wrote:
Jon Fil wrote:
Probably "no comments" - you didn't include any documentation on the method or explanation of what you were doing.