The Wire software and documentation is Copyright 2000-2008 by SoftSynth.com,
All Rights Reserved
Wire Tutorial - Exporting and Importing Java Classes
Once you have a patch that you like, you may want to use it in other
JSyn programs besides Wire. Wire allows you to export the patch as Java
source code and compile it.
|Note that the Export feature is only available to registered JSyn developers.
It is disabled in the demo version. Click here
to learn about registering your JSyn SDK.
Exporting Java Source for a Circuit
Load a predefined patch by selecting "Patch from File..." from the Add
menu. Load the "DrumWoodFMTest.xml" patch file.
Double click the patch module to edit the tester.
Click on PlayKeys button and play the ASCII keyboard to hear the drum.
Double click the patch module to edit the drum patch.
Select "Export and Java Source..." from the File menu.
Save the file as DrumWoodFM.java in one of your source directories.
Open the source file in your test editor and notice the package name on
the first line.
Compile the exported Java source file using your Java compiler.
Importing a Compiled Circuit
Wire can import SynthCircuit or SynthNote classes. It will automatically
create Wire jacks for the SynthPorts on the circuit. This feature is supported
in the demo version.
Previous | Top
Go to the DrumWoodFMTest patch and delete the drum patch.
Make sure that the class you want to import is in the CLASSPATH.
Select "Circuit by Name..." from the Add menu.
Type in a class name, for example "patches.DrumWoodFM" without the quotes.
Upper and Lower case is important because it is a Java class name and Java
Hit OK. A "circuit" module should appear with the same jacks as the original
Connect the drum to the lineOut and use the PlayKeys button to play the
drum using the ASCII keyboard.
Double click on the circuit and notice that it does not open an editor.
This is because it is a compiled class, not an editable patch.