Installing and Using JSyn on a Macintosh

SoftSynth.com | JSyn | documentation | examples | plugins | developers | support | events | contacts
by Phil Burk
(C) 1997-2000 All Rights Reserved

Link to JSyn Home Page

IMPORTANT - note that JSyn only runs on PowerPC based Macintoshes.

Installing the JSyn Developer Package

  1. Unstuff the JSyn SDK developer archive using StuffitExpander
  2. Open the "mac" folder.
  3. Double click on the "InstallJSynForMRJ" icon.
  4. You do NOT have to reboot.

Macintosh Specific Folders

mac/                = for macintosh specific files
    exampleApps/    = JBindery apps for the JSynExamples
    forCWPro/       = contains a project for use with CodeWarrior Pro
    forMRJ/         = contains JBinderyPrefs for use with MRJ
    JSynClasses.JAR = JSyn core classes
    JSynNative      = native 'C' extension
    InstallJSynForMRJ

Testing the Installation

If the installation worked, then you should now be able to run some JSyn example programs. Look in the folder "mac:exampleApps". Try clicking on any of the application icons, for example TJ_Wind. These are JSyn applications packaged using JBindery so that they can be launched like a normal application.  Experiment with them to see if you can make sound.

Compiling JSyn Programs

You can compile and execute JSyn programs using either Metrowerks CodeWarrior or the free MRJ from Apple. The instructions below tell you how to compile and run the example program "jsyn:usercode:TJ_Beep.java". When the program runs, just clock on the "Beep" button to hear random tones.

Using CodeWarrior

You can compile and execute JSyn programs using either Metrowerks CodeWarrior or the free Apple MRJ SDK.
  1. Use CodeWarrior Pro 5.0 or later version from MetroWerks.
  2. Open the folder called "mac:forCWPro".
  3. Double-click on the "JSynUserProject.mcp" icon.
  4. Select Make from the Project menu.
  5. Select Run from the Project Menu.
If you wish to compile and run other programs.
  1. Edit the target settings by selecting "JSynUserProgram Settings..." from the Edit menu.
  2. Select the "Java Target" setting.
  3. Change "mystuff.TJ_Beep" to whatever other class you want to test.
  4. Add your source by dragging it onto the project window.

Using MRJ

 You should download the "MRJ" which is the run-time Java Virtual Machine, and the "MRJ SDK" which has the Java compilers and other tools. You do not need the "MRJ Redistribution SDK".

Compiling with javac

Running TJ_Beep Using JBindery

JBindery runs your Java classes using the MRJ engine.
  1. Open the "mac:forMRJ" folder.
  2. Double-click on the "TJ_Beep" icon. The program should run.
To run other programs:
  1. Double-click on the file JBinderyUserPrefs in the "mac:forMRJ" folder.
  2. Click on the Command icon.
  3. Change "mystuff.TJ_Beep" to your new classname. The class name must include the package name so we prepend "mystuff.".
  4. Click on the ClassPath icon. You should see the the "classes" folder and "SoftSynthTools.jar".
  5. Click on "SaveSettings..."
  6. Disable the "SaveAsApplication" option.
  7. Save in "mac:usercode" as "JSynUserBinderyPrefs".
  8. Click on the "Run" button.
  9. After playing with your program, close the window or select "Quit" from the Apple Menu to quit the application.
  10. To rerun the application, just double-click on your UserBinderyPrefs and hit "RUN".
  11. You can also use the "SaveAsApplication" to make an application icon with a unique name that you can just double click like a regular application.
  12. For more information, read the "Using JBindery" documentation.

Running your Program from a Browser

  1. If you are using Netscape Navigator, the you will need to install the Netscape plugin first. For more stable operation, we recommend using Internet Explorer or iCab instead.
  2. Open the "jsyn:usercode" folder.
  3. Double-click on the "TJ_Beep.html" file.
  4. Your browser should launch and run the Java program as an Applet.
  5. Use this HTML file as a model for your own web site.