Skip to content

Example of using Csound and python for a markov model composition using ctcsound library.

Notifications You must be signed in to change notification settings

dsobek/ctcsound-Example

 
 

Repository files navigation

ctcsound Example

This repository provides examples of how to use the ctcsound library in python, in order to use Csound with python.

How to use this file

See ctcsound_example.py for an example of how to use the ctcsound library. Csound instruments and the score are written as strings (with normal Csound syntax) and then passed to the perform function.

Markov Model

For an example of a Markov chain in music composition, see music_markov.py. This file contains 4 instruments, a simple tone, a "drum", a piano, and a thunder sound. For the tone and piano, the markov model is used to generate notes and the duration matrices are used to generate each duration. For the drum, only the duration matrix is used. For the thunder, the thunder sound is simply placed 4 times randomly in the entire duration.

Probability matrices are from this repository. The repository contains probability matrices based on input pop songs.

About

Example of using Csound and python for a markov model composition using ctcsound library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%