A software module for generative composition producing monophonic phrases, organized into parts and influenced by probability sequences. "Tool" is stressed here because its aim is to be playable in a live context.
I've used it myself for idea generation and jamming while producing music.
Example usage (swift/command line):
func playFlutyMelody(output: MIDIOutput?) -> Void {
// Make a sheet
let aMinPent = Part(root: Note(69), scale: scales["pent-min"]!, length: 16)
let dMinPent = Part(root: Note(62), scale: scales["pent-min"]!, length: 16)
let cMajPent = Part(root: Note(60), scale: scales["pent-maj"]!, length: 16)
let fMajPent = Part(root: Note(53), scale: scales["pent-maj"]!, length: 16)
let sheetMelo = Sheet(parts: [aMinPent, dMinPent, cMajPent, fMajPent])
// Give it to the player
var player = Player(sheet: sheetMelo)
// Instruct the player
player.behavior.favoredNoteLength = .Eighth
player.behavior.noteOrRestProbabiltySeq = [0.5, 0.5]
let allowedRests: [Duration] = [.Eighth, .Quarter]
let allowedRestsProbs: [Probability] = [0.7, 0.3 ]
// Generate the melody
let melody = player.generateMelodyFromSheet(allowedRest: allowedRests,
restProbs: allowedRestsProbs)
// Play the melody
for event in melody.events {
sendWithRandomVelocity(melodyEvent: event, sendTo: output, tempo: 60)
}
}