This is Example 10 from JFugue website (JFugue Examples) in Jython.
# JFugue 10. All That, in One Line of Code?
import sys
sys.path.append("C:/jfugue-5.0.7.jar")
'''
Try this. The main line of code even fits within
the 140-character limit of a tweet.
'''
from org.jfugue.player import Player
from org.jfugue.rhythm import Rhythm
from org.jfugue.theory import ChordProgression
cp = ChordProgression("I IV vi V").eachChordAs("$_i $_i Ri $_i")
r = Rhythm().addLayer("..X...X...X...XO")
Player().play(cp,r)
No comments:
Post a Comment