org.jfugue.examples
Class CrabCanon
java.lang.Object
|
+--org.jfugue.examples.CrabCanon
- public class CrabCanon
- extends java.lang.Object
This class plays Johann Sebastian Bach's "Crab Canon". This is an interesting song
in which there are two voices, and each voice mirrors the other. If the first voice
is playing D A F E, the other voice is playing E F A D.
This example illustrates how to use a PatternTransformer - specifically, the
ReversePatternTransformer, which is supplied in JFugue.jar. The notes for one voice
are entered, then that pattern is duplicated and transformed. Finally, the two patterns
are added together into one pattern, which plays Bach's "Crab Canon".
To compile: javac -classpath directory-and-filename-of-jfugue.jar CrabCanon.java
To execute: java -classpath directory-and-filename-of-jfugue.jar org.jfugue.examples.CrabCanon
(note: Depending on your version of Java, you may have to use "-cp" instead of "-classpath" when executing)
- Version:
- 2.0
- Author:
- David Koelle
- See Also:
PatternTransformer
,
ReversePatternTransformer
Method Summary |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CrabCanon
public CrabCanon()
main
public static void main(java.lang.String[] args)