From jsyn at music.columbia.edu Fri Apr 3 16:41:44 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 16:41:54 2009 Subject: [jsyn] Jsyn & MidiShare drift Message-ID: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> Hi all, sorry if this has been answered before, but I can't figure out how to search the archive. I'm trying to get MidiShare and Jsyn to run in concert, and they're getting out of synch after a period of minutes. MidiShare seems to drift from the java system clock, which I correct for in schedulding midi events, but Jsyn also appears to drift in a similar but less comprehensible fashion. Any suggestions? Midishare delta (ms): 0.0 Jsyn delta (ms): 0.0 Midishare delta (ms): 0.0 Jsyn delta (ms): -21.677978515625 Midishare delta (ms): 0.0 Jsyn delta (ms): -43.35595703125 Midishare delta (ms): 0.0 Jsyn delta (ms): -18.593994140625 Midishare delta (ms): 0.0 Jsyn delta (ms): -40.272216796875 Midishare delta (ms): 0.0 Jsyn delta (ms): -15.51025390625 Midishare delta (ms): 0.0 Jsyn delta (ms): -37.188232421875 Midishare delta (ms): 0.0 Jsyn delta (ms): -12.42626953125 Midishare delta (ms): 0.0 Jsyn delta (ms): -34.104248046875 Midishare delta (ms): 0.0 Jsyn delta (ms): -9.34228515625 Midishare delta (ms): 0.0 Jsyn delta (ms): -31.0205078125 Midishare delta (ms): 0.0 Jsyn delta (ms): -6.258544921875 Midishare delta (ms): 0.0 Jsyn delta (ms): -27.9365234375 Midishare delta (ms): 0.0 Jsyn delta (ms): -3.174560546875 Midishare delta (ms): 0.0 Jsyn delta (ms): -24.8525390625 Midishare delta (ms): 0.0 Jsyn delta (ms): -0.090576171875 Midishare delta (ms): 0.0 Jsyn delta (ms): -21.768798828125 Midishare delta (ms): 0.0 Jsyn delta (ms): -43.44677734375 Midishare delta (ms): -1.0 Jsyn delta (ms): -18.684814453125 Midishare delta (ms): -1.0 Jsyn delta (ms): -40.36279296875 Midishare delta (ms): -1.0 Jsyn delta (ms): -15.600830078125 Midishare delta (ms): -1.0 Jsyn delta (ms): -37.27880859375 Midishare delta (ms): -1.0 Jsyn delta (ms): -12.51708984375 Midishare delta (ms): -1.0 Jsyn delta (ms): -34.195068359375 Midishare delta (ms): -1.0 Jsyn delta (ms): -9.43310546875 Midishare delta (ms): -1.0 Jsyn delta (ms): -31.111083984375 Midishare delta (ms): -1.0 Jsyn delta (ms): -6.34912109375 Midishare delta (ms): -1.0 Jsyn delta (ms): -28.027099609375 Midishare delta (ms): -1.0 Jsyn delta (ms): -3.265380859375 Midishare delta (ms): -1.0 Jsyn delta (ms): -24.943359375 Midishare delta (ms): -1.0 Jsyn delta (ms): -46.621337890625 Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 Midishare delta (ms): -1.0 Jsyn delta (ms): -40.45361328125 Midishare delta (ms): -2.0 Jsyn delta (ms): -15.691650390625 Midishare delta (ms): -2.0 Jsyn delta (ms): -37.36962890625 Midishare delta (ms): -2.0 Jsyn delta (ms): -12.607666015625 ... Midishare delta (ms): -30.0 Jsyn delta (ms): -50.956787109375 Midishare delta (ms): -30.0 Jsyn delta (ms): -72.635009765625 Midishare delta (ms): -30.0 Jsyn delta (ms): -47.873046875 Midishare delta (ms): -30.0 Jsyn delta (ms): -69.551025390625 Midishare delta (ms): -30.0 Jsyn delta (ms): -91.22900390625 Midishare delta (ms): -30.0 Jsyn delta (ms): -66.467041015625 Midishare delta (ms): -30.0 Jsyn delta (ms): -87.14501953125 Midishare delta (ms): -30.0 Jsyn delta (ms): -62.38330078125 Midishare delta (ms): -31.0 Jsyn delta (ms): -84.061279296875 Midishare delta (ms): -31.0 Jsyn delta (ms): -59.29931640625 Midishare delta (ms): -31.0 Jsyn delta (ms): -80.977294921875 Midishare delta (ms): -31.0 Jsyn delta (ms): -56.21533203125 Midishare delta (ms): -31.0 Jsyn delta (ms): -77.893310546875 Midishare delta (ms): -31.0 Jsyn delta (ms): -53.131591796875 Thanks, Frank From jsyn at music.columbia.edu Fri Apr 3 17:01:26 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 17:01:36 2009 Subject: [jsyn] Jsyn & MidiShare drift In-Reply-To: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> References: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> Message-ID: <49D67926.4060007@mail.rockefeller.edu> Both MidiShare and JSyn will fire off timestamped events very accurately. I suspect the scheduler that is responsible for posting these JSyn and Midi events is drifting. How are you scheduling these events? For example, a loop that does a thread sleep, wakes up, and posts an event will drift after only a few loops. Instead, you have to keep track of a mathematically pure timestamp and use that to post your JSyn and MidiShare events. Thanks Nick jsyn@music.columbia.edu wrote: > Hi all, sorry if this has been answered before, but I can't figure out how > to search the archive. > > I'm trying to get MidiShare and Jsyn to run in concert, and they're getting > out of synch after a period of minutes. MidiShare seems to drift from the > java system clock, which I correct for in schedulding midi events, but Jsyn > also appears to drift in a similar but less comprehensible fashion. Any > suggestions? > > Midishare delta (ms): 0.0 Jsyn delta (ms): 0.0 > Midishare delta (ms): 0.0 Jsyn delta (ms): -21.677978515625 > Midishare delta (ms): 0.0 Jsyn delta (ms): -43.35595703125 > Midishare delta (ms): 0.0 Jsyn delta (ms): -18.593994140625 > Midishare delta (ms): 0.0 Jsyn delta (ms): -40.272216796875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -15.51025390625 > Midishare delta (ms): 0.0 Jsyn delta (ms): -37.188232421875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -12.42626953125 > Midishare delta (ms): 0.0 Jsyn delta (ms): -34.104248046875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -9.34228515625 > Midishare delta (ms): 0.0 Jsyn delta (ms): -31.0205078125 > Midishare delta (ms): 0.0 Jsyn delta (ms): -6.258544921875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -27.9365234375 > Midishare delta (ms): 0.0 Jsyn delta (ms): -3.174560546875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -24.8525390625 > Midishare delta (ms): 0.0 Jsyn delta (ms): -0.090576171875 > Midishare delta (ms): 0.0 Jsyn delta (ms): -21.768798828125 > Midishare delta (ms): 0.0 Jsyn delta (ms): -43.44677734375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -18.684814453125 > Midishare delta (ms): -1.0 Jsyn delta (ms): -40.36279296875 > Midishare delta (ms): -1.0 Jsyn delta (ms): -15.600830078125 > Midishare delta (ms): -1.0 Jsyn delta (ms): -37.27880859375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -12.51708984375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -34.195068359375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -9.43310546875 > Midishare delta (ms): -1.0 Jsyn delta (ms): -31.111083984375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -6.34912109375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -28.027099609375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -3.265380859375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -24.943359375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -46.621337890625 > Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 > Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 > Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 > Midishare delta (ms): -1.0 Jsyn delta (ms): -40.45361328125 > Midishare delta (ms): -2.0 Jsyn delta (ms): -15.691650390625 > Midishare delta (ms): -2.0 Jsyn delta (ms): -37.36962890625 > Midishare delta (ms): -2.0 Jsyn delta (ms): -12.607666015625 > > ... > > Midishare delta (ms): -30.0 Jsyn delta (ms): -50.956787109375 > Midishare delta (ms): -30.0 Jsyn delta (ms): -72.635009765625 > Midishare delta (ms): -30.0 Jsyn delta (ms): -47.873046875 > Midishare delta (ms): -30.0 Jsyn delta (ms): -69.551025390625 > Midishare delta (ms): -30.0 Jsyn delta (ms): -91.22900390625 > Midishare delta (ms): -30.0 Jsyn delta (ms): -66.467041015625 > Midishare delta (ms): -30.0 Jsyn delta (ms): -87.14501953125 > Midishare delta (ms): -30.0 Jsyn delta (ms): -62.38330078125 > Midishare delta (ms): -31.0 Jsyn delta (ms): -84.061279296875 > Midishare delta (ms): -31.0 Jsyn delta (ms): -59.29931640625 > Midishare delta (ms): -31.0 Jsyn delta (ms): -80.977294921875 > Midishare delta (ms): -31.0 Jsyn delta (ms): -56.21533203125 > Midishare delta (ms): -31.0 Jsyn delta (ms): -77.893310546875 > Midishare delta (ms): -31.0 Jsyn delta (ms): -53.131591796875 > > Thanks, > Frank > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Fri Apr 3 17:27:01 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 17:27:11 2009 Subject: [jsyn] Jsyn & MidiShare drift In-Reply-To: <49D67926.4060007@mail.rockefeller.edu> References: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> <49D67926.4060007@mail.rockefeller.edu> Message-ID: <65e91f8f0904031427l1ee2dc88sa26034eb6554e470@mail.gmail.com> Been using absolute time since the beginning, and i'm scheduling a second in advance; the drift becomes audible only after a period of minutes. Is there a way to schedule Jsyn or MidiShare to print out its timing info at the C level? synchronized(this) { systemTime = System.currentTimeMillis(); jsynTick = Synth.getTickCount(); midiTime = Midi.GetTime(); } double jsynDelta = systemTime - jsynTick / tickRate; double midiDelta = systemTime - midiTime; double jsynDrift = jsynDelta - jsynStartDelta; double midiDrift = midiDelta - midiStartDelta; reader.samplePort.queue((int) Math.round(jsynStartTick + (loopCount * interval) * tickRate), clickSample); mPlayer.sendEventAtAbsoluteTime(onEvent, (int) Math.round(midiStartTime + loopCount * interval + midiDrift + MSOFFSET)); mPlayer.sendEventAtAbsoluteTime(offEvent, (int) Math.round(midiStartTime + loopCount * interval + midiDrift + MSEOFFSET + 200)); And that mPlayer function just calls Midi.SendAt(). thanks, Frank On Fri, Apr 3, 2009 at 2:01 PM, wrote: > Both MidiShare and JSyn will fire off timestamped events very accurately. > I suspect the scheduler that is responsible for posting these JSyn and Midi > events is drifting. > How are you scheduling these events? For example, a loop that does a > thread sleep, wakes up, and posts an event will drift after only a few > loops. Instead, you have to keep track of a mathematically pure timestamp > and use that to post your JSyn and MidiShare events. > Thanks > Nick > > > jsyn@music.columbia.edu wrote: > >> Hi all, sorry if this has been answered before, but I can't figure out >> how >> to search the archive. >> >> I'm trying to get MidiShare and Jsyn to run in concert, and they're >> getting >> out of synch after a period of minutes. MidiShare seems to drift from the >> java system clock, which I correct for in schedulding midi events, but >> Jsyn >> also appears to drift in a similar but less comprehensible fashion. Any >> suggestions? >> >> Midishare delta (ms): 0.0 Jsyn delta (ms): 0.0 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -21.677978515625 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -43.35595703125 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -18.593994140625 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -40.272216796875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -15.51025390625 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -37.188232421875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -12.42626953125 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -34.104248046875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -9.34228515625 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -31.0205078125 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -6.258544921875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -27.9365234375 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -3.174560546875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -24.8525390625 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -0.090576171875 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -21.768798828125 >> Midishare delta (ms): 0.0 Jsyn delta (ms): -43.44677734375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -18.684814453125 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -40.36279296875 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -15.600830078125 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -37.27880859375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -12.51708984375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -34.195068359375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -9.43310546875 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -31.111083984375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -6.34912109375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -28.027099609375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -3.265380859375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -24.943359375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -46.621337890625 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -40.45361328125 >> Midishare delta (ms): -2.0 Jsyn delta (ms): -15.691650390625 >> Midishare delta (ms): -2.0 Jsyn delta (ms): -37.36962890625 >> Midishare delta (ms): -2.0 Jsyn delta (ms): -12.607666015625 >> >> ... >> >> Midishare delta (ms): -30.0 Jsyn delta (ms): -50.956787109375 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -72.635009765625 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -47.873046875 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -69.551025390625 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -91.22900390625 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -66.467041015625 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -87.14501953125 >> Midishare delta (ms): -30.0 Jsyn delta (ms): -62.38330078125 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -84.061279296875 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -59.29931640625 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -80.977294921875 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -56.21533203125 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -77.893310546875 >> Midishare delta (ms): -31.0 Jsyn delta (ms): -53.131591796875 >> >> Thanks, >> Frank >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Fri Apr 3 18:14:22 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 18:14:34 2009 Subject: [jsyn] Jsyn & MidiShare drift In-Reply-To: <65e91f8f0904031427l1ee2dc88sa26034eb6554e470@mail.gmail.com> References: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> <49D67926.4060007@mail.rockefeller.edu> <65e91f8f0904031427l1ee2dc88sa26034eb6554e470@mail.gmail.com> Message-ID: <49D68A3E.5060701@softsynth.com> > I'm trying to get MidiShare and Jsyn to run in concert, and they're > getting out of synch after a period of minutes. MidiShare seems to > drift from the java system clock, which I correct for in schedulding > midi events, but Jsyn also appears to drift in a similar but less > comprehensible fashion. Any suggestions? Hello, I don't know what MIDIShare is using for its clock. But JSyn's timestamp clock uses the audio output frame count. So it is derived from the clock that drives the D/A converter on the audio card. The JSyn clock ticks once for every 64 audio frames. (That may change in the future. Use getFramesPerTick() to find the actual number.) If the audio frame rate is 44100 Hz then the JSyn tick clock runs at (44100/64) Hz. That is what Synth.getTickRate() should return. >> Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 >> Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 Note how the JSyn delta goes up and down. That is because the JSyn audio is calculated in bursts as the audio buffers are filled in the background. But because the timestamps based on the sample clock, audio output events for JSyn are accurately timed when you hear them. Synchronizing between multiple clocks is difficult. They are often based on multiple hardware clock sources that may not have accurate frequencies. They may also advance unevenly in relation to wall clock time as we see with JSyn. If you smooth out the JSyn jitters then you may find that JSyn and MIDIShare are drifting at about the same rate from the Java system clock. Phil Burk From jsyn at music.columbia.edu Fri Apr 3 18:28:47 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 18:28:57 2009 Subject: [jsyn] Jsyn & MidiShare drift In-Reply-To: <49D68A3E.5060701@softsynth.com> References: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> <49D67926.4060007@mail.rockefeller.edu> <65e91f8f0904031427l1ee2dc88sa26034eb6554e470@mail.gmail.com> <49D68A3E.5060701@softsynth.com> Message-ID: <65e91f8f0904031528j290eb0a4p10fcb6a5670a41ef@mail.gmail.com> Hi Phil, I tried the following code yesterday, and though it gets them in lockstep after an hour or so, it works inconsistently on the order of minutes. Is this the kind of thing you're suggesting? double jsynDrift = (systemTime - systemStartTime) - (jsynTick - jsynStartTick) / tickRate; aveJsynDrift = aveJsynDrift * .8 + jsynDrift * .2; Thanks, Frank On Fri, Apr 3, 2009 at 3:14 PM, wrote: > > I'm trying to get MidiShare and Jsyn to run in concert, and they're >> getting out of synch after a period of minutes. MidiShare seems to >> drift from the java system clock, which I correct for in schedulding >> midi events, but Jsyn also appears to drift in a similar but less >> comprehensible fashion. Any suggestions? >> > > Hello, > > I don't know what MIDIShare is using for its clock. But JSyn's timestamp > clock uses the audio output frame count. So it is derived from the clock > that drives the D/A converter on the audio card. > > The JSyn clock ticks once for every 64 audio frames. (That may change in > the future. Use getFramesPerTick() to find the actual number.) > > If the audio frame rate is 44100 Hz then the JSyn tick clock runs at > (44100/64) Hz. That is what Synth.getTickRate() should return. > > >> Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 > >> Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 > >> Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 > > Note how the JSyn delta goes up and down. That is because the JSyn audio > is calculated in bursts as the audio buffers are filled in the background. > But because the timestamps based on the sample clock, audio output events > for JSyn are accurately timed when you hear them. > > Synchronizing between multiple clocks is difficult. They are often based on > multiple hardware clock sources that may not have accurate frequencies. They > may also advance unevenly in relation to wall clock time as we see with > JSyn. If you smooth out the JSyn jitters then you may find that JSyn and > MIDIShare are drifting at about the same rate from the Java system clock. > > > Phil Burk > > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Fri Apr 3 18:53:09 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Fri Apr 3 18:53:26 2009 Subject: [jsyn] Jsyn & MidiShare drift In-Reply-To: <65e91f8f0904031528j290eb0a4p10fcb6a5670a41ef@mail.gmail.com> References: <65e91f8f0904031341g50cffb28i836e67c9af6957c6@mail.gmail.com> <49D67926.4060007@mail.rockefeller.edu> <65e91f8f0904031427l1ee2dc88sa26034eb6554e470@mail.gmail.com> <49D68A3E.5060701@softsynth.com> <65e91f8f0904031528j290eb0a4p10fcb6a5670a41ef@mail.gmail.com> Message-ID: <49D69355.3090105@softsynth.com> > I tried the following code yesterday, and though it gets them in lockstep > after an hour or so, it works inconsistently on the order of minutes. That suggests that they are actually not drifting and that what you are seeing is just measurement jitter because JSyn does its audio calculations in bursts. Also I would use a slower filter with coefficients like 0.98 and 0.02. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 --------------------------------------- jsyn@music.columbia.edu wrote: > Hi Phil, > > I tried the following code yesterday, and though it gets them in lockstep > after an hour or so, it works inconsistently on the order of minutes. Is > this the kind of thing you're suggesting? > > double jsynDrift = (systemTime - systemStartTime) - (jsynTick - > jsynStartTick) / tickRate; > aveJsynDrift = aveJsynDrift * .8 + jsynDrift * .2; > > Thanks, > Frank > > On Fri, Apr 3, 2009 at 3:14 PM, wrote: > >> I'm trying to get MidiShare and Jsyn to run in concert, and they're >>> getting out of synch after a period of minutes. MidiShare seems to >>> drift from the java system clock, which I correct for in schedulding >>> midi events, but Jsyn also appears to drift in a similar but less >>> comprehensible fashion. Any suggestions? >>> >> Hello, >> >> I don't know what MIDIShare is using for its clock. But JSyn's timestamp >> clock uses the audio output frame count. So it is derived from the clock >> that drives the D/A converter on the audio card. >> >> The JSyn clock ticks once for every 64 audio frames. (That may change in >> the future. Use getFramesPerTick() to find the actual number.) >> >> If the audio frame rate is 44100 Hz then the JSyn tick clock runs at >> (44100/64) Hz. That is what Synth.getTickRate() should return. >> >>>> Midishare delta (ms): -1.0 Jsyn delta (ms): -21.859375 >>>> Midishare delta (ms): -1.0 Jsyn delta (ms): -43.537353515625 >>>> Midishare delta (ms): -1.0 Jsyn delta (ms): -18.775390625 >> Note how the JSyn delta goes up and down. That is because the JSyn audio >> is calculated in bursts as the audio buffers are filled in the background. >> But because the timestamps based on the sample clock, audio output events >> for JSyn are accurately timed when you hear them. >> >> Synchronizing between multiple clocks is difficult. They are often based on >> multiple hardware clock sources that may not have accurate frequencies. They >> may also advance unevenly in relation to wall clock time as we see with >> JSyn. If you smooth out the JSyn jitters then you may find that JSyn and >> MIDIShare are drifting at about the same rate from the Java system clock. >> >> >> Phil Burk >> >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Wed Apr 8 04:33:14 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Wed Apr 8 04:33:25 2009 Subject: [jsyn] Doubt in JSYN!! Message-ID: Hi, I want to direct the output from a filter to a .wav file instead of lineout. Is this possible in JSyn??? If so can you please tell me how?? Thanks, Guru From jsyn at music.columbia.edu Wed Apr 8 11:38:04 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Wed Apr 8 11:38:18 2009 Subject: [jsyn] writing to a WAV file In-Reply-To: References: Message-ID: <49DCC4DC.5080209@softsynth.com> Hello, I renamed the subject line to help people browsing the mail archive. You can capture any signal to a WAV file using a StreamRecorder. See "examples/TJ_NonRealTime.java" for an example. That example runs in non-real-time but the WAV recorder will also work for real-time. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 --------------------------------------- jsyn@music.columbia.edu wrote: > Hi, > > I want to direct the output from a filter to a .wav file instead of > lineout. Is this possible in JSyn??? If so can you please tell me how?? > > > Thanks, > Guru > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Wed Apr 8 17:05:15 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Wed Apr 8 17:05:28 2009 Subject: [jsyn] writing to a WAV file In-Reply-To: <49DCC4DC.5080209@softsynth.com> References: <49DCC4DC.5080209@softsynth.com> Message-ID: Thank you so much for the quick reply , Phil. On Wed, Apr 8, 2009 at 8:38 AM, wrote: > Hello, > > I renamed the subject line to help people browsing the mail archive. > > You can capture any signal to a WAV file using a StreamRecorder. See > "examples/TJ_NonRealTime.java" for an example. That example runs in > non-real-time but the WAV recorder will also work for real-time. > > > Thank you, > Phil Burk > --------------------------------------- > SoftSynth, Audio Research and Development > http://www.softsynth.com/ > 75 Pleasant Lane, San Rafael, CA, 94901 USA > Office: +1-415-453-4320 > Mobile: +1-415-846-4370 > FAX: +1-415-373-4428 > --------------------------------------- > > > jsyn@music.columbia.edu wrote: > >> Hi, >> >> I want to direct the output from a filter to a .wav file instead of >> lineout. Is this possible in JSyn??? If so can you please tell me how?? >> >> >> Thanks, >> Guru >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> >> _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Thu Apr 9 03:02:53 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Thu Apr 9 03:03:01 2009 Subject: [jsyn] Removing silent frames!! Message-ID: Hi, I want to remove silent frames(frames with zero max. amplitude) from a sample. Is it possible using Jsyn?? If so can you please give me a suggestion. Thanks. From jsyn at music.columbia.edu Thu Apr 9 10:16:04 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Thu Apr 9 10:16:17 2009 Subject: [jsyn] writing to a WAV file In-Reply-To: <49DCC4DC.5080209@softsynth.com> References: <49DCC4DC.5080209@softsynth.com> Message-ID: <88ee4c991727c5260ac66c90afc1b840.squirrel@europa.cse.dmu.ac.uk> > Hello, > > I renamed the subject line to help people browsing the mail archive. > > You can capture any signal to a WAV file using a StreamRecorder. See > "examples/TJ_NonRealTime.java" for an example. That example runs in > non-real-time but the WAV recorder will also work for real-time. > > > Thank you, > Phil Burk Is this not available in the Linux version of JSyn? Cheers, Ross Clement From jsyn at music.columbia.edu Thu Apr 9 13:17:19 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Thu Apr 9 13:17:36 2009 Subject: [jsyn] Removing silent frames!! In-Reply-To: References: Message-ID: <49DE2D9F.8000901@softsynth.com> > I want to remove silent frames(frames with zero max. amplitude) from a > sample. Is it possible using Jsyn?? If so can you please give me a > suggestion. That sounds like something you would do to sound file. If so then look for libsndfile to read the sound file into memory and do the processing. If you actually want to process a JSyn SynthSample then read the data into a short[] array. Then copy the data into a new short[] array leaving behind any long sequence of zeros. Note that silence may be small non-zero numbers. Then make a new SynthSample from the processed array. Thank you, Phil Burk jsyn@music.columbia.edu wrote: > Hi, > > Thanks. > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Thu Apr 9 13:49:25 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Thu Apr 9 13:49:44 2009 Subject: [jsyn] writing to a WAV file In-Reply-To: <88ee4c991727c5260ac66c90afc1b840.squirrel@europa.cse.dmu.ac.uk> References: <49DCC4DC.5080209@softsynth.com> <88ee4c991727c5260ac66c90afc1b840.squirrel@europa.cse.dmu.ac.uk> Message-ID: <49DE3525.8040606@softsynth.com> It is available in the existing Linux version 14.2. But the Linux version has not been updated to the latest native code library 14.4. Phil Burk jsyn@music.columbia.edu wrote: >> Hello, >> >> I renamed the subject line to help people browsing the mail archive. >> >> You can capture any signal to a WAV file using a StreamRecorder. See >> "examples/TJ_NonRealTime.java" for an example. That example runs in >> non-real-time but the WAV recorder will also work for real-time. >> >> >> Thank you, >> Phil Burk > > Is this not available in the Linux version of JSyn? > > Cheers, > > Ross Clement > > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Thu Apr 9 17:28:11 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Thu Apr 9 17:28:20 2009 Subject: [jsyn] Removing silent frames!! In-Reply-To: <49DE2D9F.8000901@softsynth.com> References: <49DE2D9F.8000901@softsynth.com> Message-ID: Thank you very much!! On Thu, Apr 9, 2009 at 10:17 AM, wrote: > > > I want to remove silent frames(frames with zero max. amplitude) from a > > sample. Is it possible using Jsyn?? If so can you please give me a > > suggestion. > > That sounds like something you would do to sound file. If so then look for > libsndfile to read the sound file into memory and do the processing. > > If you actually want to process a JSyn SynthSample then read the data into > a short[] array. Then copy the data into a new short[] array leaving behind > any long sequence of zeros. Note that silence may be small non-zero numbers. > Then make a new SynthSample from the processed array. > > Thank you, > Phil Burk > > > jsyn@music.columbia.edu wrote: > >> Hi, >> >> Thanks. >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> >> _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Mon Apr 13 15:27:10 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 13 15:27:19 2009 Subject: [jsyn] scheduling samples far in advance Message-ID: <65e91f8f0904131227x4b57f6dcif3a2f8742afc0fc9@mail.gmail.com> Hello, thanks for your suggestions about MidiShare and Jsyn clocks. I have a quick question: Is the playback of a Jsyn sample guaranteed be tick-accurate if I schedule it as much as 30 seconds in advance? Thanks, Frank From jsyn at music.columbia.edu Mon Apr 13 16:12:30 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 13 16:12:58 2009 Subject: [jsyn] scheduling samples far in advance In-Reply-To: <65e91f8f0904131227x4b57f6dcif3a2f8742afc0fc9@mail.gmail.com> References: <65e91f8f0904131227x4b57f6dcif3a2f8742afc0fc9@mail.gmail.com> Message-ID: <49E39CAE.1050708@softsynth.com> Yes. The audio rendering thread pulls timestamped events from a queue as it synthesizes audio. So future events are placed very accurately in the audio stream. 30 seconds is nor problem. Just don't try to schedule more than 0x7FFFFFFF ticks in the future. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 --------------------------------------- jsyn@music.columbia.edu wrote: > Hello, thanks for your suggestions about MidiShare and Jsyn clocks. I have > a quick question: > > Is the playback of a Jsyn sample guaranteed be tick-accurate if I schedule > it as much as 30 seconds in advance? > > Thanks, > Frank > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Sat Apr 18 16:44:59 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sat Apr 18 16:45:26 2009 Subject: [jsyn] writing VST plugins in Java Message-ID: <49EA3BCB.5070906@softsynth.com> I just heard about a new development that may be of interest to JSyn developers. jVSTwRapper lets you write VST plugins in Java and use them with VST, AU and LADSPA hosts on multiple platforms. http://jvstwrapper.sourceforge.net/ So now you can write sound processing code in Java and use it with a sequencer or other commercial app. Apparently the performance is surprisingly close to 'C'. Phil Burk From jsyn at music.columbia.edu Mon Apr 20 19:07:28 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 19:07:41 2009 Subject: [jsyn] Installation error Message-ID: Hello, I ported my Jsyn code from windows to Linux. But I am getting Synth Exception: Jsyn error: Could not access Synth engine I have JDK installed and also downloaded necessary jars for linux. Am I missing anything here?? Thanks, Guru From jsyn at music.columbia.edu Mon Apr 20 19:38:31 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 19:38:45 2009 Subject: [jsyn] Installation error In-Reply-To: References: Message-ID: <49ED0777.40705@mail.rockefeller.edu> Did you install the JSyn native library? The jar is not enough. http://www.softsynth.com/jsyn/docs/host_linux.html Thanks Nick jsyn@music.columbia.edu wrote: > Hello, > > I ported my Jsyn code from windows to Linux. But I am getting Synth > Exception: Jsyn error: Could not access Synth engine > > I have JDK installed and also downloaded necessary jars for linux. Am I > missing anything here?? > > Thanks, > Guru > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Mon Apr 20 19:49:40 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 19:49:57 2009 Subject: [jsyn] Installation error In-Reply-To: <49ED0777.40705@mail.rockefeller.edu> References: <49ED0777.40705@mail.rockefeller.edu> Message-ID: Hi Nick, I downloaded the tar file. I ran the test_beep code. It worked. I am using Eclipse to build my Jsyn application. It is not working from there. I have added all required jars to the libraries. I am not seeing any link to download Jsyn native library specifically on linux. Am I missing something now?? Please help. Thanks, Guru On Mon, Apr 20, 2009 at 4:38 PM, wrote: > Did you install the JSyn native library? The jar is not enough. > http://www.softsynth.com/jsyn/docs/host_linux.html > Thanks > Nick > > > jsyn@music.columbia.edu wrote: > >> Hello, >> >> I ported my Jsyn code from windows to Linux. But I am getting Synth >> Exception: Jsyn error: Could not access Synth engine >> >> I have JDK installed and also downloaded necessary jars for linux. Am I >> missing anything here?? >> >> Thanks, >> Guru >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Mon Apr 20 20:01:30 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 20:01:40 2009 Subject: [jsyn] Installation error In-Reply-To: References: <49ED0777.40705@mail.rockefeller.edu> Message-ID: <49ED0CDA.4060807@softsynth.com> JSyn has a native component. Unfortunately we have only compiled the native library for Mac and Windows. Linux is not supported. This is why we are now focusing on writing a pure Java version of JSyn. It will work on essentially all platforms. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 --------------------------------------- jsyn@music.columbia.edu wrote: > Hi Nick, > > I downloaded the tar file. I ran the test_beep code. It worked. I am using > Eclipse to build my Jsyn application. It is not working from there. I have > added all required jars to the libraries. I am not seeing any link to > download Jsyn native library specifically on linux. Am I missing something > now?? Please help. > > Thanks, > Guru > From jsyn at music.columbia.edu Mon Apr 20 20:04:30 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 20:04:43 2009 Subject: [jsyn] Installation error In-Reply-To: References: <49ED0777.40705@mail.rockefeller.edu> Message-ID: <49ED0D8E.4090408@mail.rockefeller.edu> Hi Guru Check the Makefile in the usercode directory that runs the example I see... -Djava.library.path=$(JSYNLIBDIR) ... as an argument passed to java. That's how you can specify the location where libJSynV142.so is located. So you need to specify that in Eclipse. Sorry I don't have a Linux machine to try this, but I would try "Open Run Dialog" and then Arguments tab -> VM arguments enter -Djava.library.path=$(JSYNLIBDIR) ...substituting the real path to the lib directory in the JSyn sdk on your machine instead of $(JSYNLIBDIR) Good luck, Nick jsyn@music.columbia.edu wrote: > Hi Nick, > > I downloaded the tar file. I ran the test_beep code. It worked. I am using > Eclipse to build my Jsyn application. It is not working from there. I have > added all required jars to the libraries. I am not seeing any link to > download Jsyn native library specifically on linux. Am I missing something > now?? Please help. > > Thanks, > Guru > > On Mon, Apr 20, 2009 at 4:38 PM, wrote: > > >> Did you install the JSyn native library? The jar is not enough. >> http://www.softsynth.com/jsyn/docs/host_linux.html >> Thanks >> Nick >> >> >> jsyn@music.columbia.edu wrote: >> >> >>> Hello, >>> >>> I ported my Jsyn code from windows to Linux. But I am getting Synth >>> Exception: Jsyn error: Could not access Synth engine >>> >>> I have JDK installed and also downloaded necessary jars for linux. Am I >>> missing anything here?? >>> >>> Thanks, >>> Guru >>> _______________________________________________ >>> JSyn mailing list >>> JSyn@music.columbia.edu >>> To change digest mode or to make other administrative changes visit: >>> http://music.columbia.edu/mailman/listinfo/jsyn >>> >>> >>> >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Mon Apr 20 20:25:43 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 20:25:54 2009 Subject: [jsyn] Installation error In-Reply-To: <49ED0D8E.4090408@mail.rockefeller.edu> References: <49ED0777.40705@mail.rockefeller.edu> <49ED0D8E.4090408@mail.rockefeller.edu> Message-ID: <49ED1287.1020300@softsynth.com> I should clarify. JSyn V142 is supported on Linux. JSyn V144 is not. And Nick is right, "libJSynV142.so" is the key. Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 --------------------------------------- jsyn@music.columbia.edu wrote: > Hi Guru > > Check the Makefile in the usercode directory that runs the example > I see... > -Djava.library.path=$(JSYNLIBDIR) > ... as an argument passed to java. That's how you can specify the > location where libJSynV142.so is located. > > So you need to specify that in Eclipse. Sorry I don't have a Linux > machine to try this, but I would try "Open Run Dialog" and then > Arguments tab -> VM arguments enter -Djava.library.path=$(JSYNLIBDIR) > ...substituting the real path to the lib directory in the JSyn sdk on > your machine instead of $(JSYNLIBDIR) > > Good luck, > > Nick > > jsyn@music.columbia.edu wrote: >> Hi Nick, >> >> I downloaded the tar file. I ran the test_beep code. It worked. I am >> using >> Eclipse to build my Jsyn application. It is not working from there. I >> have >> added all required jars to the libraries. I am not seeing any link to >> download Jsyn native library specifically on linux. Am I missing >> something >> now?? Please help. >> >> Thanks, >> Guru >> >> On Mon, Apr 20, 2009 at 4:38 PM, wrote: >> >> >>> Did you install the JSyn native library? The jar is not enough. >>> http://www.softsynth.com/jsyn/docs/host_linux.html >>> Thanks >>> Nick >>> >>> >>> jsyn@music.columbia.edu wrote: >>> >>> >>>> Hello, >>>> >>>> I ported my Jsyn code from windows to Linux. But I am getting Synth >>>> Exception: Jsyn error: Could not access Synth engine >>>> >>>> I have JDK installed and also downloaded necessary jars for linux. Am I >>>> missing anything here?? >>>> >>>> Thanks, >>>> Guru >>>> _______________________________________________ >>>> JSyn mailing list >>>> JSyn@music.columbia.edu >>>> To change digest mode or to make other administrative changes visit: >>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>> >>>> >>>> >>> _______________________________________________ >>> JSyn mailing list >>> JSyn@music.columbia.edu >>> To change digest mode or to make other administrative changes visit: >>> http://music.columbia.edu/mailman/listinfo/jsyn >>> >>> >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > > From jsyn at music.columbia.edu Mon Apr 20 21:19:44 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 21:19:55 2009 Subject: [jsyn] Installation error In-Reply-To: <49ED1287.1020300@softsynth.com> References: <49ED0777.40705@mail.rockefeller.edu> <49ED0D8E.4090408@mail.rockefeller.edu> <49ED1287.1020300@softsynth.com> Message-ID: Thank you Nick and Phil. It worked great!!!!!!!! On Mon, Apr 20, 2009 at 5:25 PM, wrote: > I should clarify. JSyn V142 is supported on Linux. JSyn V144 is not. > > And Nick is right, "libJSynV142.so" is the key. > > Thank you, > Phil Burk > --------------------------------------- > SoftSynth, Audio Research and Development > http://www.softsynth.com/ > 75 Pleasant Lane, San Rafael, CA, 94901 USA > Office: +1-415-453-4320 > Mobile: +1-415-846-4370 > FAX: +1-415-373-4428 > --------------------------------------- > > > jsyn@music.columbia.edu wrote: > >> Hi Guru >> >> Check the Makefile in the usercode directory that runs the example >> I see... >> -Djava.library.path=$(JSYNLIBDIR) >> ... as an argument passed to java. That's how you can specify the location >> where libJSynV142.so is located. >> >> So you need to specify that in Eclipse. Sorry I don't have a Linux >> machine to try this, but I would try "Open Run Dialog" and then Arguments >> tab -> VM arguments enter -Djava.library.path=$(JSYNLIBDIR) >> ...substituting the real path to the lib directory in the JSyn sdk on your >> machine instead of $(JSYNLIBDIR) >> >> Good luck, >> >> Nick >> >> jsyn@music.columbia.edu wrote: >> >>> Hi Nick, >>> >>> I downloaded the tar file. I ran the test_beep code. It worked. I am >>> using >>> Eclipse to build my Jsyn application. It is not working from there. I >>> have >>> added all required jars to the libraries. I am not seeing any link to >>> download Jsyn native library specifically on linux. Am I missing >>> something >>> now?? Please help. >>> >>> Thanks, >>> Guru >>> >>> On Mon, Apr 20, 2009 at 4:38 PM, wrote: >>> >>> >>> >>>> Did you install the JSyn native library? The jar is not enough. >>>> http://www.softsynth.com/jsyn/docs/host_linux.html >>>> Thanks >>>> Nick >>>> >>>> >>>> jsyn@music.columbia.edu wrote: >>>> >>>> >>>> >>>>> Hello, >>>>> >>>>> I ported my Jsyn code from windows to Linux. But I am getting Synth >>>>> Exception: Jsyn error: Could not access Synth engine >>>>> >>>>> I have JDK installed and also downloaded necessary jars for linux. Am I >>>>> missing anything here?? >>>>> >>>>> Thanks, >>>>> Guru >>>>> _______________________________________________ >>>>> JSyn mailing list >>>>> JSyn@music.columbia.edu >>>>> To change digest mode or to make other administrative changes visit: >>>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> JSyn mailing list >>>> JSyn@music.columbia.edu >>>> To change digest mode or to make other administrative changes visit: >>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>> >>>> >>>> >>> _______________________________________________ >>> JSyn mailing list >>> JSyn@music.columbia.edu >>> To change digest mode or to make other administrative changes visit: >>> http://music.columbia.edu/mailman/listinfo/jsyn >>> >>> >> _______________________________________________ >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> >> _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Mon Apr 20 22:11:21 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Mon Apr 20 22:11:34 2009 Subject: [jsyn] Installation error In-Reply-To: References: <49ED0777.40705@mail.rockefeller.edu> <49ED0D8E.4090408@mail.rockefeller.edu> <49ED1287.1020300@softsynth.com> Message-ID: <49ED2B49.3070105@mail.rockefeller.edu> rt on! nick jsyn@music.columbia.edu wrote: > Thank you Nick and Phil. It worked great!!!!!!!! > > On Mon, Apr 20, 2009 at 5:25 PM, wrote: > > >> I should clarify. JSyn V142 is supported on Linux. JSyn V144 is not. >> >> And Nick is right, "libJSynV142.so" is the key. >> >> Thank you, >> Phil Burk >> --------------------------------------- >> SoftSynth, Audio Research and Development >> http://www.softsynth.com/ >> 75 Pleasant Lane, San Rafael, CA, 94901 USA >> Office: +1-415-453-4320 >> Mobile: +1-415-846-4370 >> FAX: +1-415-373-4428 >> --------------------------------------- >> >> >> jsyn@music.columbia.edu wrote: >> >> >>> Hi Guru >>> >>> Check the Makefile in the usercode directory that runs the example >>> I see... >>> -Djava.library.path=$(JSYNLIBDIR) >>> ... as an argument passed to java. That's how you can specify the location >>> where libJSynV142.so is located. >>> >>> So you need to specify that in Eclipse. Sorry I don't have a Linux >>> machine to try this, but I would try "Open Run Dialog" and then Arguments >>> tab -> VM arguments enter -Djava.library.path=$(JSYNLIBDIR) >>> ...substituting the real path to the lib directory in the JSyn sdk on your >>> machine instead of $(JSYNLIBDIR) >>> >>> Good luck, >>> >>> Nick >>> >>> jsyn@music.columbia.edu wrote: >>> >>> >>>> Hi Nick, >>>> >>>> I downloaded the tar file. I ran the test_beep code. It worked. I am >>>> using >>>> Eclipse to build my Jsyn application. It is not working from there. I >>>> have >>>> added all required jars to the libraries. I am not seeing any link to >>>> download Jsyn native library specifically on linux. Am I missing >>>> something >>>> now?? Please help. >>>> >>>> Thanks, >>>> Guru >>>> >>>> On Mon, Apr 20, 2009 at 4:38 PM, wrote: >>>> >>>> >>>> >>>> >>>>> Did you install the JSyn native library? The jar is not enough. >>>>> http://www.softsynth.com/jsyn/docs/host_linux.html >>>>> Thanks >>>>> Nick >>>>> >>>>> >>>>> jsyn@music.columbia.edu wrote: >>>>> >>>>> >>>>> >>>>> >>>>>> Hello, >>>>>> >>>>>> I ported my Jsyn code from windows to Linux. But I am getting Synth >>>>>> Exception: Jsyn error: Could not access Synth engine >>>>>> >>>>>> I have JDK installed and also downloaded necessary jars for linux. Am I >>>>>> missing anything here?? >>>>>> >>>>>> Thanks, >>>>>> Guru >>>>>> _______________________________________________ >>>>>> JSyn mailing list >>>>>> JSyn@music.columbia.edu >>>>>> To change digest mode or to make other administrative changes visit: >>>>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> JSyn mailing list >>>>> JSyn@music.columbia.edu >>>>> To change digest mode or to make other administrative changes visit: >>>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> JSyn mailing list >>>> JSyn@music.columbia.edu >>>> To change digest mode or to make other administrative changes visit: >>>> http://music.columbia.edu/mailman/listinfo/jsyn >>>> >>>> >>>> >>> _______________________________________________ >>> JSyn mailing list >>> JSyn@music.columbia.edu >>> To change digest mode or to make other administrative changes visit: >>> http://music.columbia.edu/mailman/listinfo/jsyn >>> >>> >>> _______________________________________________ >>> >> JSyn mailing list >> JSyn@music.columbia.edu >> To change digest mode or to make other administrative changes visit: >> http://music.columbia.edu/mailman/listinfo/jsyn >> >> > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Sun Apr 26 02:49:51 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sun Apr 26 02:50:20 2009 Subject: [jsyn] Variables in an Instrument Instance Message-ID: Hey Folks, This seems like a simple problem for someone who knows JSyn more than I, so I toss it up to you for your guidance. I am using JSYN in a JMSL applet, and have a function to create instances of instruments from a Synthnote I created in Wire, like so: private void initInstrument() { ins1 = new JSynInsFromClassName(8, MyPackage.MyAwesomeInstrument.class.getName()); ins2 = new JSynInsFromClassName(8, MyPackage.MyAwesomeInstrument.class.getName()); mixer.addInstrument(ins1); mixer.addInstrument(ins2); ...} *etc. etc. for other instrument instances from the same MyAwesomeInstrument* In the MyAwesomeInstrument class, I have an additional "public SynthVariable" called timbre that I would like to control from the applet. Wire automatically added it as... public class MyAwesomeInstrument extends SynthNote { public SynthInput timbre; ... but I am also trying SynthVariable because it's a variable - not a signal - that I'm putting in to this SynthNote. When Wire built it, It added a port for it as well, like so: addPort( timbre = mult2.inputB, "timbre" ); timbre.setup( 1.0, 1.5, 50.0 ); What I don't get is how, exactly, do I set the variable for timbre per each instance? I have tried these variants in the applet to no avail: ins1.timbre = 3; ins1.set(timbre, 2.0); ins2.set.timbre(2.0); ins2.timbre.set(2.0); I've been trying to find an example of this in the JSyn dev notes/tutorials and other online compositions, but to no avail yet. My apologies if these seems to be too rudimentary of a post for this forum. Thank you for your help! - Jen G. From jsyn at music.columbia.edu Sun Apr 26 10:06:28 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sun Apr 26 10:06:47 2009 Subject: [jsyn] Variables in an Instrument Instance In-Reply-To: References: Message-ID: <49F46A64.5010900@mail.rockefeller.edu> Hi Jen JSyn folks would not necessarily know this. JSynInsFromClassName is a JMSL Instrument class which supports playing JSyn synthnotes, not a JSyn class. It allocates SynthNotes as needed to achieve polyphony, but JSynInsFromClassName does not give you control over all synth inputs To control all synth inputs, use SynthNoteAllPortsInstrument. The data array you pass to its play() method has numbers corresponding to all the input ports. Please check out the tutorial "Controlling all input ports of a SynthNote" at http://www.algomusic.com/jmsl/tutorial/instoot10.html which explains it in more detail than I can here Thanks, Nick Didkovsky jsyn@music.columbia.edu wrote: > Hey Folks, > > This seems like a simple problem for someone who knows JSyn more than I, so > I toss it up to you for your guidance. I am using JSYN in a JMSL applet, > and have a function to create instances of instruments from a Synthnote I > created in Wire, like so: > > private void initInstrument() { > ins1 = new JSynInsFromClassName(8, > MyPackage.MyAwesomeInstrument.class.getName()); > ins2 = new JSynInsFromClassName(8, > MyPackage.MyAwesomeInstrument.class.getName()); > mixer.addInstrument(ins1); > mixer.addInstrument(ins2); > ...} *etc. etc. for other instrument instances from the same > MyAwesomeInstrument* > > In the MyAwesomeInstrument class, I have an additional "public > SynthVariable" called timbre that I would like to control from the applet. > Wire automatically added it as... > > public class MyAwesomeInstrument extends SynthNote > { > public SynthInput timbre; > > ... but I am also trying SynthVariable because it's a variable - not a > signal - that I'm putting in to this SynthNote. When Wire built it, It > added a port for it as well, like so: > > addPort( timbre = mult2.inputB, "timbre" ); > timbre.setup( 1.0, 1.5, 50.0 ); > > What I don't get is how, exactly, do I set the variable for timbre per each > instance? I have tried these variants in the applet to no avail: > ins1.timbre = 3; > ins1.set(timbre, 2.0); > ins2.set.timbre(2.0); > ins2.timbre.set(2.0); > > I've been trying to find an example of this in the JSyn dev notes/tutorials > and other online compositions, but to no avail yet. My apologies if these > seems to be too rudimentary of a post for this forum. Thank you for your > help! > > > - Jen G. > _______________________________________________ > JSyn mailing list > JSyn@music.columbia.edu > To change digest mode or to make other administrative changes visit: > http://music.columbia.edu/mailman/listinfo/jsyn > From jsyn at music.columbia.edu Sun Apr 26 12:44:27 2009 From: jsyn at music.columbia.edu (jsyn@music.columbia.edu) Date: Sun Apr 26 12:44:40 2009 Subject: [jsyn] Variables in an Instrument Instance In-Reply-To: <49F46A64.5010900@mail.rockefeller.edu> References: <49F46A64.5010900@mail.rockefeller.edu> Message-ID: <49F48F6B.7090701@softsynth.com> Nick gave an answer related to JMSL. This is a quick note specific to JSyn. A SynthInput is a port that you can connect a signal to. A multiplier is one example. The input is continually read by the unit generator. You can connect the output of a unit to a SynthInput. A SynthVariable is only read once when the unit starts executing. An example would be the initial phase of an oscillator. You cannot connect anything to a SynthVariable. So for mult.inputB you need a SynthInput. >> instance? I have tried these variants in the applet to no avail: >> ins1.timbre = 3; >> ins1.set(timbre, 2.0); >> ins2.set.timbre(2.0); >> ins2.timbre.set(2.0); The correct way to set it would be: ins2.timbre.set(2.0); The order is: object . member_object . method() Thank you, Phil Burk --------------------------------------- SoftSynth, Audio Research and Development http://www.softsynth.com/ 75 Pleasant Lane, San Rafael, CA, 94901 USA Office: +1-415-453-4320 Mobile: +1-415-846-4370 FAX: +1-415-373-4428 ---------------------------------------