Task 2 week 3: the GUI updates immediately!
Got the pitch detector running as a thread. Found out how to update the GUI from that thread. So now I actually get real time feedback as I sing from the GUI. It's pretty cool! The main problem now from a user's standpoint may be that the thing is too fast. When I take a breath or when my voice quavers so does the image. Do I want to be updated quite that fast on what I am doing? I think it might be more pleasing to see some continuity. It might be nicer to have a metronome that you can sing to. The frequencies yielded by the pitch detector during the time between two beats can be combined to say whether you were on target or not. It would also be nice to see a frequency history that accumulates over time, to sort of watch yourself sing (or play the violin or whatever).
It took 3 weeks to figure out how to update the GUI from another thread, working on it about an hour a day. To do it again would only take a couple of minutes.
This all goes to show once again that what we are doing right now isn't writing a program so much as learning how to program. I learned about threads. I learned about Swing and about the NetBeans IDE for writing Swing GUIs. It may be that from a global economic standpoint we are wasting time. Plenty of people know how to do all of these things right? Why not have one of them build the program and have us focus on the things that we do well? But it's neat to learn this stuff. And fun. And I think that we will eventually get where we want to go as long as we stick with it.
Anyway, there is a lot to learn and this could be a long term project. But for now it is time to celebrate: we have a working pitch detector that updates the user in real time on what their voice is doing. Cool!
1 Comments:
Congratulations. And I agree - it's more fun to watch you learn to program this on your own than it would be for you to just have someone else doing it all.
Post a Comment
<< Home