A note on GP usage: when generating a sequence in GP, you can use the write command (instead of print) to output to a file. This, however, is often slow, since it requires opening the file for every term of the sequence.
Alternatively, you can have GP print all the terms of your sequence to the terminal window, and then "select all"-copy-paste into a text editor. This is probably the most straight-forward method. (Something this doesn't work: either there is a limit on the number of lines the terminal "remembers", or there are so many lines it overloads either the terminal or your "clipboard". If you run into problems with this method, try the method below.)
Another
method is to use the tee command (in any unix-like environment, like Terminal on a Mac) and call gp like this:
gp 2>&1 | tee output.txtThis will start gp, but now all output will be echoed to the file output.txt. Then, you can do something like
for(i=1,10^6,if(isprime(i),print(i)))in GP to spit out all primes under 106 to the screen, for example. Then quit gp, and open output.txt in a text editor and you will see all the primes there. Remove any extraneous lines, save, and you'll be ready to feed it to the list-to-sound code.