To understand and protect the home planet was a part of NASA ' s mission statement . It had been used to justify research and funding decisions , but it was removed in 2006 to accommodate the Bush a d m i n i s t r a t i o n w o r k c e n t e r s c i e n c e a n d d e m o c r a c y p r o m o t i n g s c i e n t i f i c i n t e grityatnasaearthisremoved . html #. WDcirVwwEic . <| sep |> I ' m not up to date enough with Python to read your code and work out what it ' s doing and don ' t have time at the moment . But you may as well have a copy of my undergraduate dissertation , which generates music generatively , in what I think is a similar way to yours , except with chords , melodies and bassines that fit together . Bear in mind I wrote this in 2011 and I was much younger , so some of what I wrote is not accurate or good , so please don ' t hold me to it . Also because at the time I wanted to write it in Microsoft Word , and wanted to use a specific font , the PDF is not searchable . Sorry . I was younger then . ' s also written in Haskell which is a slightly esoteric pure functional ie lazy evaluation , no state , no variables , no specified evaluation order , unless you use monads or arrows programming language .