RE/[jmsl] DimensionNameSpace and JMSL 103

jmsl at music.columbia.edu jmsl at music.columbia.edu
Thu Jul 15 08:06:49 EDT 2004


Hi James

I  like it that you leveraged off a working demo to solve your problem.  
But handleControlChange() is already public (it is a public method in 
the MidiListener interface) so I am not sure I understand what you 
really did?

Check cloneDataSetPitch() to see how I set the pitch in an existing 
array.  Otherwise...
double[] data = new 
double[myInstrument.getDimensionNameSpace().dimension()];
// alternatively if you know how many dimensions you have, double[] data 
= new double[7];
data[0] = someDuration;
data[1] = somePitch;
data[2] = someAmplitude;
data[3] = someHoldTime;
// data[4 .. dimension()-1] correspond to synth inputs unique to your 
synthnote like "rate", "feedback", "wiggle", "cutoff", etc


Nick Didkovsky


jmsl at music.columbia.edu wrote:

> Thanks for the replies on my Q's (Nick in both cases- good work fella).
>
> The procedure you outlined for extracting the jar (in thread JMSL103) 
> worked perfectly, thanks.
>
> I have had less success with the Instrument.update() part, I think 
> that I am failing to get the right pitch, hold, amp.. data into the 
> first four fields of the double[] so it is not updating right (is this 
> done in any of the example.java files- I would love to see how it is 
> done right). However I have found a workaround which, though a bit 
> dirty, seems to be working a treat. Subject to the approval of more 
> experienced users, I would recommend it to others.
>
> I have made JSynMIDIPlayer.handleControlChange(.....) method public so 
> that it can be called by my external class. Now, any changes that are 
> sent to the player via this method are reflected in the readout on the 
> GUI. This makes the system feel much more integrated.
>
> I know that making private classes public is a dishonourable business, 
> is what I'm doing here wrong? It seems to be working really well but I 
> can see that it might be running against the grain of the system- it 
> seems like a bit of a hack. Should I persist in trying to get 
> .update() to work or is this an acceptable way of doing things?
>
> Thanks,
>
> James
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today! 
> http://www.msn.co.uk/messenger
>
> _______________________________________________
> jmsl mailing list
> jmsl at music.columbia.edu
> http://music.columbia.edu/mailman/listinfo/jmsl



More information about the jmsl mailing list