From whence the SynthNote? You may get it any number of ways:
1) Use a pre-built SynthNote that ships with JSyn (like com.softsynth.jsyn.circuits.FilteredSawtoothBL)
2) Design a SynthNote in Wire (JSyn's graphical patch editor), then export and compile the Java source for that patch
3) Write one from scratch.
We'll start with #1 here, using com.softsynth.jsyn.circuits.FilteredSawtoothBL which ships with JSyn.
The easiest way to play JSyn with JMSL is to use JMSL's JSynInsFromClassName
which is in the package com.softsynth.jmsl.score.jsyn
JSynInsFromClassName's constructor takes the class name of a SynthNote and the maximum polyphony you want. It rolls this into a JMSL Instrument that plays the SynthNote.
JSynInsFromClassName will play its synthnote with a 4 dimensional DimensionNameSpace ( duration, pitch, amplitude, hold ). So a simple way to perform it is with a 4-dimensional MusicShape as shown in the applet below.
The most important code is shown here.
// play FilteredSawtoothBL with a max polyphony of 8 voices. ins = new JSynInsFromClassName(8, "com.softsynth.jsyn.circuits.FilteredSawtoothBL");
// connect the instrument to a JMSLMixerContainer
// hand the instrument to the MusicShape
myShape.setInstrument( ins );
See complete applet source here
|Previous||Tutorial Index||Tutorial Contents||Next|
(C) 1997 Phil Burk and Nick Didkovsky, All Rights Reserved JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom.