LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color to Music Note Mapping

For my senior year project, I wished to create a Visual Aid for hearing impaired where in every music note is mapped with its corresponding color in the sonochromatic scale. I acquired sound from guitar and keyboard and with every note that I play, the corresponding color is being displayed. However, I also want the note to be displayed in the text box. Can someone help me with that?

 

Also, on a scale of 1-10, how useful is this aid for the hearing impaired.Suggestions are welcome 🙂

 

Thanks in Advance

 

 

Download All
0 Kudos
Message 1 of 3
(3,185 Views)

I don't know about the usefulness of all this, but since this is a LabVIEW forum, let's focus on the code.

 

Here are a few suggestions:

  • You only need to read the file once, and not 20x per second. All the file IO and pre-processing belongs before the loop.
  • There is absolutely no reason to use matrix datatypes. All can be done directly on the 2D array. There is no need to take the subarray first.
  • Get rid of the race condition and delete the local variable. You can branch the wire going to the frequency indicator.
  • Instead of detecting multiple tone and picking the second using index array, just use "extract single tone" maybe.
  • It makes no sense to constantly adjust the scale range. It would seem more interesting to keep the range fixed and adjust the needle instead.
  • Can the frequency ever be negative? Why are you taking the absolute value in several places?
  • R, G, and B should be U8, so why are you reading the array as U64, go to a DBL matrix, then convert to I32? Read the file as string, then use spreadsheet string to array to create a U8 array from the first three columns  and a 1D string array from the last column. (all before the loop, of course)
  • You only using three elements, so why are you getting four?
  • There is probably no urgent need for formula and expression nodes.
  • It would be cleaner to strip the path than using that ..\ syntax which will potentially break on other OS types.
  • Never scale things with the front panel size. Everything messes up if you resize the panel. Decide on a fixed size.
  • you probably don't need 5seconds worth of data for each shot
  • ...
Message 2 of 3
(3,169 Views)
Thanks . Will work on the suggestions
0 Kudos
Message 3 of 3
(3,165 Views)