Skip to content

Proof of Concept (PoC)

Compare
Choose a tag to compare
@litan litan released this 10 Sep 03:20
· 83 commits to main since this release

Instructions to get going

First, make sure that you have the latest version of Kojo installed (Version: 2.9.23 r4 - at the time of this writing). Then, follow the steps outlined below.

Install kojo-music

  • Go into the directory ~/.kojo/.
  • See if there is an extension directory in there. If there isn't, create it.
  • Download kojo-music.zip from the link at the bottom of this page.
  • Unzip it under ~/.kojo/extension/. This should create a directory called ~/.kojo/extension/kojo-music with a bunch of stuff (including four jar files) inside it.
  • At this point, kojo-music is installed!
  • If Kojo is already running, you need to restart it for kojo-music to get picked up.

Run the music workbench

  • Now start up Kojo.
  • The Kojo output pane should mention that 4 additional jars are available under ~/.kojo/extension/kojo-music/.
  • Download kojo-music-samples.zip from the link at the bottom of this page, and unzip it somewhere - let's say under ~/work. This will create a directory called ~/work/kojo-music-samples.
  • From within Kojo, do a File -> Open, go into ~/work/kojo-music-samples/, and open workbench.kojo.
  • Run the workbench.kojo script that you just opened by clicking on the Kojo Run button.
  • In the UI that shows up in the Drawing Canvas, click on the Update soundfont button that's located on the bottom left (to make richer sounds available in the Java virtual machine on which Kojo runs).
  • Make sure from the text that shows up in the Output Pane that the above step has completed successfully.
  • Restart Kojo.
  • Once again, from within Kojo, do a File -> Open, go into ~/work/kojo-music-samples, and open workbench.kojo.
  • Run the workbench.kojo script that you just opened by clicking on the Kojo Run button.
  • In the UI that shows up in the Drawing Canvas, click on the Srv Up button that's located on the bottom left. This will start the Music Server.
  • Now click on the Load button, go into ~/work/kojo-music-samples/workbench-scores, and load tune2.score.
  • Click on the Play button in the Drawing Canvas.
  • Enjoy the music! (And see how the music is defined in the Workbench UI).
  • Click on the Stop button in the Drawing Canvas to stop the music.

Run some samples

  • Do a File -> Open, go into ~/work/kojo-music-samples/examples, and open score2.kojo.
  • Run the score2.kojo script that you just opened by clicking on the Kojo Run button.
  • Listen to the simple music that is played, and look at how the code in score2.kojo generates this music.
  • Open and run the other files in ~/work/kojo-music-samples/examples as desired.