KoDream's Improv Generator
The Idea:
Formal languges can be used to make music. A formal language is a language which every sentence can be generated from a set of rules. Each of these lines was a rule, the symbol "->" is pronounced "goes to", and the vertical bar is "or",
S -> verse bridge break chorus break verse
verse -> A B C B A | A B C B A
bridge -> thump thump thump thump
break -> dri ri ri ri ri ri ri ri ri ri ri ri lllll
ri -> ro | ti
chorus -> la la hey
Given the rules above a possible sentence is:
A B C B A thump thump thump thump dri ti ro ti ti ro ro ti ro ti ro ro ro lllll la la hey dri ti ro ro ro ro ti ti ti ti ro ro ro lllll A B C A B
With Improv each of the above symbols would correspond to a number that will be used to control a machine's parameter, and the sentences are generated randomly. This is a type of grammar called an acyclic definite clause grammar, so no cycles(such as S->S you have been warned).
Install:
To install place the .dll in your buzz generators directory. Place the sample grammar in your buzz directory.
Using:
To use the sample grammar. Open buzz, create a new generator, such as M3 or voidlead, then connect the new machine to master. Create an improv machine, in the improv's pattern editor create a pattern with a trigger value of 1 somewhere in it, play the pattern in the sequencer. Now in the machine view, right click on improv, then select Assign Machine Edit Grammar.
This should bring up a pop up window. In the pop up window to load a grammar file from the buzz directory, type its name in the "file:" edit box and click load. To save it to the file name in that edit box click save. Now from the machine combo box select the machine which you wish to generate a melody/rhythm for. Then click assign. Click OK, then play the melody.
Creating your own rules, first select a rule in the rule combo box. The rule "S" will always be the first rule used to produce a sentence. Now type a string of symbols in the production edit box, then click add production. The production will appear in the possible productions for the selected rule. If the symbols have not been defined they will appear in semantics list with an integer next to them. If the symbols have already been defined as rules, they will not apear on the right.
Any unseen symbol is intially assumed to be max int which corresponds to a Note Off or a rest if you will. To change this select the note in the semantics list, and in the note box underneath, type an integer value. Then click update note.
Deleteing a production on the right will delete itself, and any symbols which are not referenced by another rule in the tree of possible sentences.
Credits:
This machine would not be possible withou the code provided by BTDSys and CyanWerks.
Contact:
robin@cdoc.net, for bug reports and suggestions. As always save early and save often.
Enjoy!
KoDream