Kojo – Version 010111 Released, Featuring Music and Mathworld Turtles

A new release of Kojo is out – just in time for the start of the new year!

This release features:

  • The Composition and playing of computer generated music. With this feature, users can compose and play music ranging from simple single note sounds to complex symphonies. The generated music can, amongst other things, be used as background music for stories and turtle sketches. A couple of examples of music related code are shown below:

Code that plays the A note with the sound of a Guitar:

playMusic(Melody("Guitar", "A"))

Code that first composes a musical score with multiple instruments and beats, and then plays it:

val score = MusicScore(
Melody("Acoustic_Grand", "C6q D#6q F6q G6q D#6q F6h Rq D#6q F6q G6q F6q C6q D#6h Rq"),
Melody("Pan_Flute", "X[Volume]=15000 Ri C6q D#6q F6q G6q D#6q F6h Ri Ri D#6q F6q G6q F6q C6q D#6h Ri"),
Melody("Guitar", "X[Volume]=12000 Rw D#4majw Rw C4minw"),
Rhythm("Acoustic_Bass_Drum", "q", "o.o.o.o.o.o.o.o."),
Rhythm("Hand_Clap", "q", ".^.^.^.^.^.^.^.^")
)

playMusic(score)

The Composing Music story (available from the Stories -> Learn menu item within Kojo) provides more information on this feature. Kojo’s Music support is based on the excellent JFugue library.

  • A turtle API for Mathworld, to simplify the creation of geometric figures within Mathworld. Here’s some sample code that demonstrates this feature:
Mw.clear()
Mw.hideAlgebraView()
Mw.hideAxes()

val t = Mw.turtle(5, 0)
t.showAngles()
t.showLengths()

t.beginPoly()
t.labelPosition("A")
t.left()
t.forward(3)
t.labelPosition("B")
t.right()
t.forward(4)
t.labelPosition("C")
t.endPoly()

The Mathworld Introduction story (available from the Stories -> Learn menu item within Kojo) provides more information on this feature.

As always, the new version is available on the Kojo Download Page.

Enjoy! And Happy New Year!

Advertisements
This entry was posted in News, Release. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s