From jmsl at music.columbia.edu Wed Sep 2 22:50:04 2009 From: jmsl at music.columbia.edu (Java Music Specification Language) Date: Wed, 02 Sep 2009 22:50:04 -0400 Subject: [jmsl] Docs for findClosestSampleIndex In-Reply-To: References: Message-ID: <4A9F2EDC.1050802@mail.rockefeller.edu> Hello Edward Suppose you have a sample of a piano playing middle C (which is pitch 60), and another sample of a piano playing D# (pitch 63). Let's say that to save memory, you did not sample C# or D natural (sampling in minor thirds is a fairly typical technique), and instead transpose C up a half step to get C#, and transpose D# down a half step to get D. This instrument class looks at the available samples and the pitches they are assigned to, and for a given pitch, looks up the sample that is closest to that pitch (ie the one that would need to be transposed the least). Does this make sense? Best Nick Java Music Specification Language wrote: > Hello, > I'm trying to figure out what > com.softsynth.jmsl,jsyn.SimpleSamplePlayingInstrumentWithLoops.findClosestSampleIndex(double > arg0) does . . . I can't find it in the JMSL Docs as a method in that class. > > Thanks! > > Edward > From jmsl at music.columbia.edu Wed Sep 2 22:56:40 2009 From: jmsl at music.columbia.edu (Java Music Specification Language) Date: Wed, 02 Sep 2009 22:56:40 -0400 Subject: [jmsl] Docs for findClosestSampleIndex In-Reply-To: References: Message-ID: <4A9F3068.4080501@mail.rockefeller.edu> The docs should read: /** * @param noteIndex, * desired noteindex. May or may not have a sample there. * @return closest index with an actual sample associated with it */ protected int findClosestSampleIndex(double noteIndex) ...I see it is indeed missing from the docs. I will check the prefs on my JavaDoc and see if it is suppressing generating docs for protected methods Thanks for pointing this out! Nick Java Music Specification Language wrote: > Hello, > I'm trying to figure out what > com.softsynth.jmsl,jsyn.SimpleSamplePlayingInstrumentWithLoops.findClosestSampleIndex(double > arg0) does . . . I can't find it in the JMSL Docs as a method in that class. > > Thanks! > > Edward > From jmsl at music.columbia.edu Sun Sep 6 11:51:53 2009 From: jmsl at music.columbia.edu (Java Music Specification Language) Date: Sun, 6 Sep 2009 11:51:53 -0400 Subject: [jmsl] Docs for findClosestSampleIndex In-Reply-To: <4A9F3068.4080501@mail.rockefeller.edu> References: <4A9F3068.4080501@mail.rockefeller.edu> Message-ID: Nick, Thanks for the reply. I presume that if addSamplePitch or loadSamplePitch has not previously been called on an instance of the SimpleSamplePlayingInstrumentWithLoops, then findClosestSampleIndex will return -1? Best, Edward On Wed, Sep 2, 2009 at 10:56 PM, Java Music Specification Language < jmsl at music.columbia.edu> wrote: > The docs should read: > > /** > * @param noteIndex, > * desired noteindex. May or may not have a sample there. > * @return closest index with an actual sample associated with it > */ > protected int findClosestSampleIndex(double noteIndex) > > ...I see it is indeed missing from the docs. I will check the prefs on > my JavaDoc and see if it is suppressing generating docs for protected > methods > > Thanks for pointing this out! > Nick > > Java Music Specification Language wrote: > > Hello, > > I'm trying to figure out what > > > com.softsynth.jmsl,jsyn.SimpleSamplePlayingInstrumentWithLoops.findClosestSampleIndex(double > > arg0) does . . . I can't find it in the JMSL Docs as a method in that > class. > > > > Thanks! > > > > Edward > > > _______________________________________________ > jmsl mailing list > jmsl at music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl > -- Edward Childs +1 802 794-3589 (Best: Google Voice) +1 802 765 4542 (Vermont Home) +1 802 738 2271 (Cell) +1 802 280 6151 (Concepts NREC) +1 508 955 9051 (Massachusetts Home) +1 802 296 2325 (Fax: Send Cover Page Marked Edward Childs) http://blog.edwardchilds.com From jmsl at music.columbia.edu Tue Sep 29 14:37:53 2009 From: jmsl at music.columbia.edu (Java Music Specification Language) Date: Tue, 29 Sep 2009 14:37:53 -0400 Subject: [jmsl] track.firstNoteAfterTime() Message-ID: <4EB6E306-B0C8-4CF7-A2B2-D97D168C4F11@nyu.edu> This isn't a bug per se, but I noticed that track's firstNoteAfterTime() method doesn't always give the expected answer when comparing two tracks. (example below) For example, if I calculate the startTime of the second to last note in the first staff and then ask staff 2, track 1 to return the first note after time x, it will return the last note, rather than the note before it. It will return the same time for the 4th and 2nd notes of the first and second staves respectively. My assumption is that it has to do with floating-point math issues (probably exacerbated by the tuplets), and when I added a small offset (-0.001) it seemed to produce the expected result. thanks, Peter McCulloch -------------- next part --------------