[jmsl] (Pre-Release) JSynIns (wrong recipient)

jmsl at music.columbia.edu jmsl at music.columbia.edu
Sun Jul 25 13:14:41 EDT 2004


Nick,

Glad the other Daniels out there have done something useful, but I 
can't claim to have written the note or the code below. Good luck in 
locating the correct author.

Cheers,
(The wrong Daniel)



On Jul 25, 2004, at 11:32 AM, jmsl at music.columbia.edu wrote:

Hello Daniel

Thanks for posting a compelling reason to pass synth context to JMSL's 
JSynInsFromClassName (and related classes).  Providing this will be 
straightforward. Less obvious is how to abstract this in 
JSynMusicDevice and JSynMixer. I'll look at this when I am not away 
from my computer (out of town now).

Nick Didkovsky

-----Original Message-----
From:  jmsl at music.columbia.edu
Date:  7/25/04 1:54 am
To:  jmsl at music.columbia.edu
Subj:  [jmsl] (Pre-Release) JSynIns -> mutiple ChannelOuts

greetings,
working on a JSyn/JMSL program that sends output from an array of
SynthNotes subclasses to an array of ChannelOuts. Code is below but I
get the following error which I believe(?) is being caused by the fact
that JSynInsFromClassName use the global SynthContext by default rather
than the one I instantiate manually.. Is there a way to pass a
particular SynthContext to this class or is there some other option that
I'm missing..
thanks much!
-daniel

com.softsynth.jsyn.SynthException: JSyn error: Object not part
of CSynContext.  -  Output, 0x10006=65542, 0x1010000=16842752 at
com.softsynth.jsyn.SynthPort.connectUnits(SynthPort.java:173)

--------------- CODE ---------------------
       Synth.startEngine(0);
       (synthContext = new SynthContext()).initialize();
       int outDevID = AudioDevice.getDefaultOutputDeviceID();
       int numOutputChannels = 
AudioDevice.getMaxOutputChannels(outDevID);
       this.synthContext.start
         (0, Synth.DEFAULT_FRAME_RATE, Synth.NO_DEVICE, 0, outDevID,
numOutputChannels);

       JMSL.clock = new SynthClock();
       JMSL.clock.setAdvance(0.2);

       this.channelOuts = new ChannelOut[numOutputChannels];
       this.synths = new JSynInsFromClassName[numOutputChannels];

       for( int i=0; i<numOutputChannels; i++ )
       {
         // open a mono output to audio card for each channel
         synths[i] = new JSynInsFromClassName(1,
RingModBell.class.getName());
         channelOuts[i] = new ChannelOut(synthContext, i);

((SynthOutput)synths[i].getOutput()).connect(channelOuts[i].input);
//ERROR!!
         channelOuts[i].start();
       }
------------- END CODE -------------------

_______________________________________________
jmsl mailing list
jmsl at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/jmsl

_______________________________________________
jmsl mailing list
jmsl at music.columbia.edu
http://music.columbia.edu/mailman/listinfo/jmsl



More information about the jmsl mailing list