Amazing as it may seem, algorithmic methods for generating music go back at least as far as 1757 (see: Musikalisches Würfelspiel). But algorithmic methods for generating US ‘Country Music’ are far more recent.
Indeed, Jim Suruda and professor Norman Carver of the Department of Computer Science, Southern Illinois University, Carbondale IL, USA, are still in the process of refining the development of an Artificial-Intelligence-based software application called the ‘Automated Country Music Engine’ (ACME).


The software not only  :

• Generates melodies
• Adds chord accompaniment
• Writes MusicXML
• Reads existing MusicXML
• Extracts features from MusicXML
• Trains a neural network to rank songs

but it then also goes on to :
• Evaluate generated songs.

“If our project is successful, “ explain the developers, “ the top-rated songs the system generates should be of equal quality to those composed by a human expert.” To sum up:

“As the system becomes more mature, we intend to assemble a panel of human listeners to determine if their rankings of generated melodies agree with those of alternative evaluation architectures. We also intend to run the system for an extended period to see if the generator is able to produce a work of high quality. Although our work is at an early stage, we are encouraged that ACME might be able to recognize a musical gem inside a heap of low-scoring rubble.”

Details of ACME were presented at ICAI’11, The 2011 International Conference on Artificial Intelligence, and the paper can be read in full here : Towards an Automated Composer Of Popular Country Music.

BONUS:

Internet-based audio files of some of ACME’s output have recently been made available by researcher Jim Suruda. via SoundCloud.

Notes:

1) The music doesn’t immediately come-across as being particularly ‘Country’ – but if a musical arranger re-jigged the score for acoustic guitar, banjo, drums, bass, and pedal-steel, it might well do.

2) ACME doesn’t write lyrics as yet. But this site – by an astonishing co-incidence also called ACME -  does (reload page for new lyrics)