You're overwriting the song every time this callback is triggered. You should probably store each note to a field of your guidata struct to be able to write your sequence of notes to a wav file.
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.
You should also consider moving most of this code to a separate function. The only thing specific to this note is the frequency, so you should probably use a separate function that accepts the frequency and the handles struct as inputs. That will also allow you to change the path to which the file is written more easily.