I have been trying to write a computer program which generates music according to the rules of counterpoint.

This is my second attempt.

Please critique.

First_Species_Counterpoint - example 2.mp3

First_Species_Counterpoint - example 2.pdf

You need to be a member of Composers' Forum to add comments!

Join Composers' Forum

Email me when people reply –

Replies

  • Hi James -

    Which line is the cantus firmus? Is the computer generating both lines? Neither line is an example of a well written cantus firmus. Maybe you should start with a known cantus firmus from Fux and let the computer generate the counterpoint?

    Octave leaps aren't good, unisons aren't good, repeated notes aren't good.  They may not violate the rules but what is your goal here, to write something that is musical in the style of Fux and Palestrina or just to follow a list of prescribed rules? Fux counterpoint is an educational process, not a mathematical exercise, it teaches artistic judgement which is why composition software now tends to rely on AI and deep learning rather than a fixed set of rules.

  • A computer program which generates counterpoint is, I guess, nearly impossible. There are simply too many possibilities in making a counterpoint melody and one cannot predict beforehand which ones are musically acceptable. 

    Perhaps another way of dealing with your effort is making a computer program which doesn't generate anything but only detects errors in counterpoint writing. Such a program would only require the classic rules of counterpoint being implemented in composition software. This would result in getting an error message as soon as one transgresses one of these rules. Which is more logical, because nearly all the counterpoint rules have the character of prohibitions — and thus of negative rules — not of prescriptions or positive rules. The few positive rules that are sometimes mentioned are just thumb rules which cannot be described by any strict protocol.

    However, there's a caveat here too, which is that sometimes even "errors" are acceptable. Even Mozart sometimes has parallel fifths, for example. The rules of counterpoint in fact never got completely fixed, and our modern concept of a counterpoint rule book only applies to classical music between about 1600 and 1900. 

  • PS.,

    For first species counterpoint specifically, there seems to exist a generator already on the web, at Tonesavvy: https://tonesavvy.com/music-practice-exercise/241/first-species-cou... 

    Geert ter Horst said:

    A computer program which generates counterpoint is, I guess, nearly impossible. There are simply too many possibilities in making a counterpoint melody and one cannot predict beforehand which ones are musically acceptable. 

    Perhaps another way of dealing with your effort is making a computer program which doesn't generate anything but only detects errors in counterpoint writing. Such a program would only require the classic rules of counterpoint being implemented in composition software. This would result in getting an error message as soon as one transgresses one of these rules. Which is more logical, because nearly all the counterpoint rules have the character of prohibitions — and thus of negative rules — not of prescriptions or positive rules. The few positive rules that are sometimes mentioned are just thumb rules which cannot be described by any strict protocol.

    However, there's a caveat here too, which is that sometimes even "errors" are acceptable. Even Mozart sometimes has parallel fifths, for example. The rules of counterpoint in fact never got completely fixed, and our modern concept of a counterpoint rule book only applies to classical music between about 1600 and 1900. 

    ToneSavvy Music Theory | Free for closed schools
    If your school is closed due to the coronavirus, we want to help. New premium ToneSavvy accounts are free while your school is closed.
This reply was deleted.