To do exactly what I describe below you will need:
Pick an integer sequence for which you can generate many terms. (How many? At a sampling rate of 44100 samples per second, you'll need all the terms up to 44100k to generate sound k seconds in length.)
For the sake of illustration, suppose we choose the Ulam numbers.
For the Ulam numbers, this file begins like this:
1 2 3 4 6 8 11 13 16
and here is the whole file.
The standard is to create a list with all terms less than 106. This will result in a sound file that is 22.675 seconds long.
If you are running listToSound.py on the command line, you should use it like this:
> python listToSoundPlus.py < ulam10^6.txt
This directs your operating system to run Python with the script listToSoundPlus.py using ulam10^6.txt as input.
(If this doesn't work, try using listToSoundPlusAsk.py instead. Run this with the command
> python listToSoundPlusAsk.pyand you will be asked to enter the input file name (e.g., ulam10^6.txt)).
NOTE: For the above to work, you will need the module soundfile installed. If you run the script without soundfile, Python will complain. To install soundfile from the command line try
> pip install soundfileIf that fails, try
sudo pip install soundfile
This will request password, to all pip superuser privileges, which may be necessary to, for example, create directories.
When the script runs successfully, the output will be a file called output.wav.
In addition, the script will print information about the sequence. Specifically, it will count how many terms of the sequence fall into each residue class mod 2 through 12. Also, how many terms are less than each power of 10 and the density up to each power of ten is printed.
Open the file in Audacity and listen.