CP1 music generator generates a 2-voice counterpoint by searching for a combination of notes which has minimum rule violations penalty. First cantus firmus is generated using CF1 algorithm, consisting of whole notes without pauses inside. Then second voice is generated above or below cantus firmus. This second voice can be generated in any of 5 standard counterpoint species. This generator can create counterpoint only in time signature 4/4. Example of generation results in each species:
Cantus firmus ("fixed song") is a pre-existing melody forming the basis of a polyphonic composition. It is also used to write counterpoint exercises by superimposing additional voices above or below it.
The rules that are used for cantus firmus and counterpoint generation can be enabled or disabled by user. For generating and correction of cantus firmus mainly Cantus and Melody rule groups are used. For generating and correction of 2-voice counterpoint Melody, Harmony and Rhythm rule groups are used. By default the rules are tuned to generating a vocal cantus firmus starting and ending with a tonic note; and vocal counterpoint starting with a tonic chord and ending with an authentic cadence.
Key generator input parameters:
Due to the nature of algorithm and large number of rules used, generating long counterpoint can take long. Time needed to generate counterpiont increases with the length of counterpiont, but it is not a static value, because number of operations to generate counterpoint of same length differs due to randomization. This means that longer counterpoint can sometimes take less time to generate and sometimes more. If time needed to generate cantus exceeds some limit (1 to 10 minutes, depending on server settings), task will be aborted and counterpoint will contain mistakes. This is not always bad, sometimes you can like results with mistakes. You can restart task until you get result without mistakes.
Cantus firmus generation of 40 notes usually takes no more than 10 seconds. Generation of a second voice starts after generation of cantus. It has more rules and more complex algorithm, which results in a slower generation compared to cantus generation. Species 3 and species 5 are slowest (counterpoint with 11 measures usually generates during 1 minute). Species 2 and 4 are faster (counterpoint with 25 measures usually generates during 1 minute). Species 1 is fasters (counterpiont with 40 measures usually generates during 1 minute).
In expert mode user can also change other parameters in text configuration:
By default generation time is limited only by server (1 to 10 minutes, depending on server settings). When using SWA algorithm, generation is done by first creating a random melody and then fixing mistakes that are found in it. User can limit generation time to get melody with some mistakes still not corrected. This can lead to some experimental results. Mistakes, that were not corrected, can be seen in PDF file.
Other parameters in config should be changed only if you know what you are doing.
Same as in CF1 cantus firmus generation algorithm
|Generation takes long||Try decreasing length of cantus or revert rules to their default settings. If you changed t_cnt in config, reset it to 1.|
|Generation fails with error||First try to restart the processing. If this does not help, try to unroll your latest changes, which could result in the error. In Expert mode on the Config tab you will find history of all your changes under the Save button. Pay attention that due to complex generation algorithms, some combinations of rules severities can result in unexpected behaviour. Try to set rules severities back to their default values or create new generation task. If you applied any changes previously, you will find default values in "Rule changes" box under the rules tree on the Settings tab. Also, keep in mind that trying to generate too long cantus can result in mistakes in melody due to timeout. Try decreasing length of cantus.|
If you cannot find solution to your problem, please create support request (menu Support)
See playback section.
Generating counterpoint first requires running CF1 cantus firmus generation algorithm.
On the second step, counterpoint is generated. Generating counterpoint supports two methods: Strict Appending Scan (SAS) and Sliding Windows Approximation (SWA). SAS method is not optimal for counterpoint, and usually should not be used. Instead, SWA algorithm is used by default. If for some reason you want to choose SAS, you can select algorithm by editing method parameter in config (method=sas or method=swa).
In CP1 counterpoint generation algorithm each note is split into a series of tied micronotes of same length. This allows algorithm to build any rhythm. If adjacent notes have the same pitch, they are considered to be parts of the same note. The length of a micronote is equal to the minimum allowed note length in species:
Please see descriptions of SAS and SWA methods in CF1 cantus generation algorithm.
Evaluation of harmonic rules requires harmony in each measure to be detected. Harmony detection is implemented this way: