From jmsl at music.columbia.edu Mon Sep 8 17:44:14 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Mon Sep 8 17:44:33 2008 Subject: [jmsl] ScorePainter problem Message-ID: Hi all, I'm trying to test a new ScorePainter, and I can't get it to install. When I run it I get: ScorePainter: class com.softsynth.jmsl.score.ScorePainter Here's a demonstration of the problem. Am I missing something in the rendering sequence for a score? thanks, Peter McCulloch package com.petermcculloch.megalo.graphics; import java.awt.Graphics; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import com.didkovsky.portview.swing.ViewFactorySwing; import com.softsynth.jmsl.JMSL; import com.softsynth.jmsl.score.Score; import com.softsynth.jmsl.score.ScoreCanvasSwing; import com.softsynth.jmsl.score.ScorePainter; public class ScorePainterMegalo extends ScorePainter { Score score; public ScorePainterMegalo(Score score) { super(score); this.score = score; } @Override public void render(Graphics g, double playTime, boolean b) { super.render(g, playTime, b); System.out.println("Called render..."); } public static void main(String args[]) { JFrame frame = new JFrame(); JMSL.setViewFactory(new ViewFactorySwing()); // Score.useSharedCanvas(false); Score score = new Score(2, 700, 700); score.addMeasures(10, 3, 4); score.setCurrentMeasureNumber(0); score.setCurrentStaffNumber(0); score.setCurrentTrackNumber(0); score.addNote(1., 60., 1., 1.); ScorePainterMegalo painter = new ScorePainterMegalo(score); ScoreCanvasSwing canvas = null; // if true, blank canvas, but same scorepainter. If false, score canvas and same scorepainter boolean createNew = false; if (createNew) { canvas = new ScoreCanvasSwing(500, 500); score.setScoreCanvas(canvas); canvas.setScorePainter(painter); score.getScoreCanvas().setScorePainter(painter); } else { score.getScoreCanvas().setScorePainter(painter); canvas = (ScoreCanvasSwing) score.getScoreCanvas(); } frame.add(((ScoreCanvasSwing) canvas).getComponent()); frame.addWindowStateListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { JMSL.closeMusicDevices(); System.exit(0); } }); frame.pack(); score.ownCanvas(); frame.setVisible(true); System.out.println("ScorePainter:\t" + score.getScorePainter().getClass().toString()); } } From jmsl at music.columbia.edu Mon Sep 8 20:47:21 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Mon Sep 8 20:47:36 2008 Subject: [jmsl] ScorePainter problem In-Reply-To: References: Message-ID: <48C5C799.6040708@mail.rockefeller.edu> Hi Peter Thanks for the working code example. It helps me troubleshoot and reveals problems quickly. Couple of things. ScorePainter already has a Score class variable, so you do not want to re-declare that in the subclass. But since you are providing your own ScorePainter (something that was not anticipated in the original API), the score needs to be handed a reference to it as well, since Score is not creating its own. Ugly, sorry. So I paste a complete working example below. BUT it will not work until you get a new prerelease which makes score.setScorePainter() public. That's coming your way soon Thanks Nick Didkovsky package com.petermcculloch.megalo.graphics; import java.awt.Graphics; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import com.didkovsky.portview.swing.ViewFactorySwing; import com.softsynth.jmsl.JMSL; import com.softsynth.jmsl.score.*; public class ScorePainterMegalo extends ScorePainter { // Score score; no! superclass already has score class variable public ScorePainterMegalo(Score score) { super(score); score.setScorePainter(this); // !!! ugly but necessary // this.score = score; no! superclass already has score class variable } // @Override public void render(Graphics g, double playTime, boolean b) { super.render(g, playTime, b); g.drawLine(0, 0, 200, 200); System.out.println("Called render..."); } public static void main(String args[]) { JFrame frame = new JFrame(); JMSL.setViewFactory(new ViewFactorySwing()); Score.useSharedCanvas(false); // !!! ScoreCanvas canvas = new ScoreCanvasFactory().createScoreCanvas(500, 500); Score score = new Score(2, 700, 700, "Megalo Sabado", canvas); ScorePainterMegalo painter = new ScorePainterMegalo(score); score.addMeasures(10, 3, 4); score.setCurrentMeasureNumber(0); score.setCurrentStaffNumber(0); score.setCurrentTrackNumber(0); score.addNote(1., 60., 1., 1.); frame.add(((ScoreCanvasSwing) canvas).getComponent()); frame.addWindowStateListener(new WindowAdapter() { // @Override public void windowClosed(WindowEvent e) { JMSL.closeMusicDevices(); System.exit(0); } }); frame.pack(); score.ownCanvas(); frame.setVisible(true); System.out.println("ScorePainter:\t" + score.getScorePainter().getClass().toString()); } } jmsl@music.columbia.edu wrote: > > Hi all, > > I'm trying to test a new ScorePainter, and I can't get it to install. > When I run it I get: > ScorePainter: class com.softsynth.jmsl.score.ScorePainter > > > Here's a demonstration of the problem. Am I missing something in the > rendering sequence for a score? > > thanks, > Peter McCulloch > > package com.petermcculloch.megalo.graphics; > > import java.awt.Graphics; > import java.awt.event.WindowAdapter; > import java.awt.event.WindowEvent; > > import javax.swing.JFrame; > > import com.didkovsky.portview.swing.ViewFactorySwing; > import com.softsynth.jmsl.JMSL; > import com.softsynth.jmsl.score.Score; > import com.softsynth.jmsl.score.ScoreCanvasSwing; > import com.softsynth.jmsl.score.ScorePainter; > > public class ScorePainterMegalo extends ScorePainter { > > Score score; > > public ScorePainterMegalo(Score score) { > super(score); > this.score = score; > } > > @Override > public void render(Graphics g, double playTime, boolean b) { > super.render(g, playTime, b); > System.out.println("Called render..."); > } > > public static void main(String args[]) { > > JFrame frame = new JFrame(); > > JMSL.setViewFactory(new ViewFactorySwing()); > > // Score.useSharedCanvas(false); > > Score score = new Score(2, 700, 700); > > score.addMeasures(10, 3, 4); > > score.setCurrentMeasureNumber(0); > score.setCurrentStaffNumber(0); > score.setCurrentTrackNumber(0); > score.addNote(1., 60., 1., 1.); > > ScorePainterMegalo painter = new ScorePainterMegalo(score); > > ScoreCanvasSwing canvas = null; > > > // if true, blank canvas, but same scorepainter. If false, > score canvas and same scorepainter > boolean createNew = false; > > if (createNew) { > canvas = new ScoreCanvasSwing(500, 500); > > score.setScoreCanvas(canvas); > canvas.setScorePainter(painter); > score.getScoreCanvas().setScorePainter(painter); > } else { > > score.getScoreCanvas().setScorePainter(painter); > > canvas = (ScoreCanvasSwing) score.getScoreCanvas(); > > } > > frame.add(((ScoreCanvasSwing) canvas).getComponent()); > > frame.addWindowStateListener(new WindowAdapter() { > @Override > public void windowClosed(WindowEvent e) { > JMSL.closeMusicDevices(); > System.exit(0); > } > }); > > frame.pack(); > > score.ownCanvas(); > > frame.setVisible(true); > > System.out.println("ScorePainter:\t" + > score.getScorePainter().getClass().toString()); > > } > > } > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Mon Sep 8 23:12:35 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Mon Sep 8 23:12:56 2008 Subject: [jmsl] ScorePainter problem In-Reply-To: <48C5C799.6040708@mail.rockefeller.edu> References: <48C5C799.6040708@mail.rockefeller.edu> Message-ID: <15C828B2-F58D-4E5A-A270-EEFC5B439243@gmail.com> Great. Thanks, Nick! Peter McCulloch From jmsl at music.columbia.edu Fri Sep 12 17:41:22 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Fri Sep 12 17:41:32 2008 Subject: [jmsl] Max instrument dimension names Message-ID: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> Hi All, I can't figure out how I'm supposed to set my Max Instrument's dimension names?? I have a custom namespace for the basic MusicShape I'm using, and I obviously need Max to understand that namespace, and use its formatting. But I can't see any direct way to other than SetDimensionNameSpace(), which appears to only take an existing DimensionNameSpace... If I could take that from my MusicShape directly, I'd be fine, but MusicShape only has a dimensionNames() method, not a "getDimensionNameSpace()" method... Needless to say, I'm confused. J. From jmsl at music.columbia.edu Sat Sep 13 11:01:40 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 11:01:59 2008 Subject: [jmsl] Java update "broke" my JMSL/JSyn piece Message-ID: <48CBD5D4.7010507@mail.rockefeller.edu> A JMSL/JSyn user asked me this question off-list: ... my computer got a java update any way I was using the software just fine a few days ago and today it gives me this message after I load a JMSL score that uses JSyn Error: com.softsynth.jsyn.SynthException:Jsyn error: Could not access JSyn synthesis engine. - JSyn not properly installed, or web page is not calling smart_embed_jsyn.js!, 0x0=0, 0x0=0 The solution is to reinstall the JSyn plug-in at http://www.softsynth.com/jsyn/plugins/ Thanks Nick D From jmsl at music.columbia.edu Sat Sep 13 11:13:54 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 11:14:02 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> Message-ID: <519B2A74-93AB-4F84-B177-2DC83EC1E109@rubato-music.com> bump... Is it not possible to set the dimensionNameSpace for the MaxInstrument? Any help very much appreciated. J. On 12-Sep-08, at 2:41 PM, jmsl@music.columbia.edu wrote: > Hi All, > > I can't figure out how I'm supposed to set my Max Instrument's > dimension names?? I have a custom namespace for the basic MusicShape > I'm using, and I obviously need Max to understand that namespace, > and use its formatting. But I can't see any direct way to other than > SetDimensionNameSpace(), which appears to only take an existing > DimensionNameSpace... If I could take that from my MusicShape > directly, I'd be fine, but MusicShape only has a dimensionNames() > method, not a "getDimensionNameSpace()" method... > > Needless to say, I'm confused. > > J. > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 12:16:07 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 12:16:27 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> Message-ID: <48CBE747.1040508@mail.rockefeller.edu> Hello J Yes you can add custom dimensions to MaxInstruments, try this: myMaxInstrument.getDimensionNamespace().setDimensionName(5, "wiggle"); myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); myMaxInstrument.getDimensionNamespace().setDefault(5, 0); Remember to leave dimension 4 as it is alrteady defined in MaxDimensionNameSpace ("eventflag")... so you should only add custom dimensions from 5 on up Thanks Nick Didkovsky jmsl@music.columbia.edu wrote: > Hi All, > > I can't figure out how I'm supposed to set my Max Instrument's > dimension names?? I have a custom namespace for the basic MusicShape > I'm using, and I obviously need Max to understand that namespace, and > use its formatting. But I can't see any direct way to other than > SetDimensionNameSpace(), which appears to only take an existing > DimensionNameSpace... If I could take that from my MusicShape > directly, I'd be fine, but MusicShape only has a dimensionNames() > method, not a "getDimensionNameSpace()" method... > > Needless to say, I'm confused. > > J. > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 12:19:16 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 12:19:27 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <48CBE747.1040508@mail.rockefeller.edu> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> Message-ID: <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> Aaah, thanks so much Nick. I was starting to lose my mind! I'm assuming then that I can just add my custom dimensions from 5+, then let the built-in translator figure out the name->index mapping... Yes? J. On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: > Hello J > > Yes you can add custom dimensions to MaxInstruments, try this: > > myMaxInstrument.getDimensionNamespace().setDimensionName(5, "wiggle"); > myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); > myMaxInstrument.getDimensionNamespace().setDefault(5, 0); > Remember to leave dimension 4 as it is alrteady defined in > MaxDimensionNameSpace ("eventflag")... so you should only add custom > dimensions from 5 on up > > Thanks > Nick Didkovsky > > jmsl@music.columbia.edu wrote: >> Hi All, >> >> I can't figure out how I'm supposed to set my Max Instrument's >> dimension names?? I have a custom namespace for the basic >> MusicShape I'm using, and I obviously need Max to understand that >> namespace, and use its formatting. But I can't see any direct way >> to other than SetDimensionNameSpace(), which appears to only take >> an existing DimensionNameSpace... If I could take that from my >> MusicShape directly, I'd be fine, but MusicShape only has a >> dimensionNames() method, not a "getDimensionNameSpace()" method... >> >> Needless to say, I'm confused. >> >> J. >> >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 12:48:29 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 12:48:49 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> Message-ID: <48CBEEDD.1050402@mail.rockefeller.edu> Hi J If you play your MaxInstrument with a MusicShape then MusicShape will do the translation element by element, right before it calls instrument.play() The instrument itself does not do any translating; by the time it has its play() method called, all it gets is a timestamp and an array of double[]. So translating is the responsibility of whoever calls ins.play() Follow-up questions welcome! Nick jmsl@music.columbia.edu wrote: > Aaah, thanks so much Nick. I was starting to lose my mind! > > I'm assuming then that I can just add my custom dimensions from 5+, > then let the built-in translator figure out the name->index mapping... > Yes? > > J. > > > On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: > >> Hello J >> >> Yes you can add custom dimensions to MaxInstruments, try this: >> >> myMaxInstrument.getDimensionNamespace().setDimensionName(5, "wiggle"); >> myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); >> myMaxInstrument.getDimensionNamespace().setDefault(5, 0); >> Remember to leave dimension 4 as it is alrteady defined in >> MaxDimensionNameSpace ("eventflag")... so you should only add custom >> dimensions from 5 on up >> >> Thanks >> Nick Didkovsky >> >> jmsl@music.columbia.edu wrote: >>> Hi All, >>> >>> I can't figure out how I'm supposed to set my Max Instrument's >>> dimension names?? I have a custom namespace for the basic MusicShape >>> I'm using, and I obviously need Max to understand that namespace, >>> and use its formatting. But I can't see any direct way to other than >>> SetDimensionNameSpace(), which appears to only take an existing >>> DimensionNameSpace... If I could take that from my MusicShape >>> directly, I'd be fine, but MusicShape only has a dimensionNames() >>> method, not a "getDimensionNameSpace()" method... >>> >>> Needless to say, I'm confused. >>> >>> J. >>> >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 15:55:11 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 15:55:25 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <48CBEEDD.1050402@mail.rockefeller.edu> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> <48CBEEDD.1050402@mail.rockefeller.edu> Message-ID: <93B517BE-EFCA-4042-A4EA-E490235EC373@rubato-music.com> Okay, Nick. That's great. I've almost got it working as expected. I'll be in touch if I have any further questions. cheers, J. On 13-Sep-08, at 9:48 AM, jmsl@music.columbia.edu wrote: > Hi J > > If you play your MaxInstrument with a MusicShape then MusicShape > will do the translation element by element, right before it calls > instrument.play() > The instrument itself does not do any translating; by the time it > has its play() method called, all it gets is a timestamp and an > array of double[]. > So translating is the responsibility of whoever calls ins.play() > > Follow-up questions welcome! > Nick > > jmsl@music.columbia.edu wrote: >> Aaah, thanks so much Nick. I was starting to lose my mind! >> >> I'm assuming then that I can just add my custom dimensions from 5+, >> then let the built-in translator figure out the name->index >> mapping... Yes? >> >> J. >> >> >> On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: >> >>> Hello J >>> >>> Yes you can add custom dimensions to MaxInstruments, try this: >>> >>> myMaxInstrument.getDimensionNamespace().setDimensionName(5, >>> "wiggle"); >>> myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); >>> myMaxInstrument.getDimensionNamespace().setDefault(5, 0); >>> Remember to leave dimension 4 as it is alrteady defined in >>> MaxDimensionNameSpace ("eventflag")... so you should only add >>> custom dimensions from 5 on up >>> >>> Thanks >>> Nick Didkovsky >>> >>> jmsl@music.columbia.edu wrote: >>>> Hi All, >>>> >>>> I can't figure out how I'm supposed to set my Max Instrument's >>>> dimension names?? I have a custom namespace for the basic >>>> MusicShape I'm using, and I obviously need Max to understand that >>>> namespace, and use its formatting. But I can't see any direct way >>>> to other than SetDimensionNameSpace(), which appears to only take >>>> an existing DimensionNameSpace... If I could take that from my >>>> MusicShape directly, I'd be fine, but MusicShape only has a >>>> dimensionNames() method, not a "getDimensionNameSpace()" method... >>>> >>>> Needless to say, I'm confused. >>>> >>>> J. >>>> >>>> _______________________________________________ >>>> jmsl mailing list >>>> jmsl@music.columbia.edu >>>> http://music.columbia.edu/mailman/listinfo/jmsl >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 17:05:03 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 17:05:14 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <48CBEEDD.1050402@mail.rockefeller.edu> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> <48CBEEDD.1050402@mail.rockefeller.edu> Message-ID: <7709E56C-7596-4A05-BCAC-7CAE2984B5AC@rubato-music.com> hmmm... Weird problem. I decided it would be simplest to just align my MusicShape's dimensions with the MaxInstrument's dimensions, adding on a few extras for specific purposes. So, my dimensions seem to be in agreement. The only thing that's not working properly is that playback seems to be switching Hold for Duration - i.e., it's packing my notes right up against one another, ignoring any spaces/rests. That is, if I put single sixteenth notes on each of 4 quarter-note downbeats, I get a run of sixteenths, rather than a run of 4 quarter-notes, with sixteenth-note "holds"... I know this is probably not possible to diagnose without seeing the code, but I thought I'd ask, just in case there's some obvious misunderstanding that would result in this behaviour. thanks, J. On 13-Sep-08, at 9:48 AM, jmsl@music.columbia.edu wrote: > Hi J > > If you play your MaxInstrument with a MusicShape then MusicShape > will do the translation element by element, right before it calls > instrument.play() > The instrument itself does not do any translating; by the time it > has its play() method called, all it gets is a timestamp and an > array of double[]. > So translating is the responsibility of whoever calls ins.play() > > Follow-up questions welcome! > Nick > > jmsl@music.columbia.edu wrote: >> Aaah, thanks so much Nick. I was starting to lose my mind! >> >> I'm assuming then that I can just add my custom dimensions from 5+, >> then let the built-in translator figure out the name->index >> mapping... Yes? >> >> J. >> >> >> On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: >> >>> Hello J >>> >>> Yes you can add custom dimensions to MaxInstruments, try this: >>> >>> myMaxInstrument.getDimensionNamespace().setDimensionName(5, >>> "wiggle"); >>> myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); >>> myMaxInstrument.getDimensionNamespace().setDefault(5, 0); >>> Remember to leave dimension 4 as it is alrteady defined in >>> MaxDimensionNameSpace ("eventflag")... so you should only add >>> custom dimensions from 5 on up >>> >>> Thanks >>> Nick Didkovsky >>> >>> jmsl@music.columbia.edu wrote: >>>> Hi All, >>>> >>>> I can't figure out how I'm supposed to set my Max Instrument's >>>> dimension names?? I have a custom namespace for the basic >>>> MusicShape I'm using, and I obviously need Max to understand that >>>> namespace, and use its formatting. But I can't see any direct way >>>> to other than SetDimensionNameSpace(), which appears to only take >>>> an existing DimensionNameSpace... If I could take that from my >>>> MusicShape directly, I'd be fine, but MusicShape only has a >>>> dimensionNames() method, not a "getDimensionNameSpace()" method... >>>> >>>> Needless to say, I'm confused. >>>> >>>> J. >>>> >>>> _______________________________________________ >>>> jmsl mailing list >>>> jmsl@music.columbia.edu >>>> http://music.columbia.edu/mailman/listinfo/jmsl >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 18:13:57 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 18:14:10 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: <7709E56C-7596-4A05-BCAC-7CAE2984B5AC@rubato-music.com> References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> <48CBEEDD.1050402@mail.rockefeller.edu> <7709E56C-7596-4A05-BCAC-7CAE2984B5AC@rubato-music.com> Message-ID: Okay, I figured out what was up... I had assumed that MusicShape.get() would return a *reference* to the double[], but it appears to return a deep copy. So, I was making alterations (duration, in particular) to the copy as notes were being entered, and then playing back the original. To quote the infinitely wise Homer: "Doh!" I have to admit, it seems a little un-Java-like, to me, for MusicShape.get() to return copies, not references. I can see it being handy, in some cases, but it's a little counter-intuitive, imho. I guess this is so Interpreters can mess around with the double[] without altering the original held by the MusicShape, but it might be more Java-like if the Interpreter made the copy, rather than the MusicShape. Just a thought... I'm sure there are plenty of good reasons for doing it the way it's done, but it might be good to make this behaviour more obvious in the docs. (Or maybe I'm way off on my diagnosis of what solved my problem, and MusicShape.get() does return a reference to the double[]...???) Anyway, problem solved! J. On 13-Sep-08, at 2:05 PM, jmsl@music.columbia.edu wrote: > hmmm... Weird problem. I decided it would be simplest to just align > my MusicShape's dimensions with the MaxInstrument's dimensions, > adding on a few extras for specific purposes. So, my dimensions seem > to be in agreement. The only thing that's not working properly is > that playback seems to be switching Hold for Duration - i.e., it's > packing my notes right up against one another, ignoring any spaces/ > rests. That is, if I put single sixteenth notes on each of 4 quarter- > note downbeats, I get a run of sixteenths, rather than a run of 4 > quarter-notes, with sixteenth-note "holds"... > > I know this is probably not possible to diagnose without seeing the > code, but I thought I'd ask, just in case there's some obvious > misunderstanding that would result in this behaviour. > > thanks, > > J. > > > On 13-Sep-08, at 9:48 AM, jmsl@music.columbia.edu wrote: > >> Hi J >> >> If you play your MaxInstrument with a MusicShape then MusicShape >> will do the translation element by element, right before it calls >> instrument.play() >> The instrument itself does not do any translating; by the time it >> has its play() method called, all it gets is a timestamp and an >> array of double[]. >> So translating is the responsibility of whoever calls ins.play() >> >> Follow-up questions welcome! >> Nick >> >> jmsl@music.columbia.edu wrote: >>> Aaah, thanks so much Nick. I was starting to lose my mind! >>> >>> I'm assuming then that I can just add my custom dimensions from >>> 5+, then let the built-in translator figure out the name->index >>> mapping... Yes? >>> >>> J. >>> >>> >>> On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: >>> >>>> Hello J >>>> >>>> Yes you can add custom dimensions to MaxInstruments, try this: >>>> >>>> myMaxInstrument.getDimensionNamespace().setDimensionName(5, >>>> "wiggle"); >>>> myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); >>>> myMaxInstrument.getDimensionNamespace().setDefault(5, 0); >>>> Remember to leave dimension 4 as it is alrteady defined in >>>> MaxDimensionNameSpace ("eventflag")... so you should only add >>>> custom dimensions from 5 on up >>>> >>>> Thanks >>>> Nick Didkovsky >>>> >>>> jmsl@music.columbia.edu wrote: >>>>> Hi All, >>>>> >>>>> I can't figure out how I'm supposed to set my Max Instrument's >>>>> dimension names?? I have a custom namespace for the basic >>>>> MusicShape I'm using, and I obviously need Max to understand >>>>> that namespace, and use its formatting. But I can't see any >>>>> direct way to other than SetDimensionNameSpace(), which appears >>>>> to only take an existing DimensionNameSpace... If I could take >>>>> that from my MusicShape directly, I'd be fine, but MusicShape >>>>> only has a dimensionNames() method, not a >>>>> "getDimensionNameSpace()" method... >>>>> >>>>> Needless to say, I'm confused. >>>>> >>>>> J. >>>>> >>>>> _______________________________________________ >>>>> jmsl mailing list >>>>> jmsl@music.columbia.edu >>>>> http://music.columbia.edu/mailman/listinfo/jmsl >>>> _______________________________________________ >>>> jmsl mailing list >>>> jmsl@music.columbia.edu >>>> http://music.columbia.edu/mailman/listinfo/jmsl >>> >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 13 18:24:57 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 13 18:25:19 2008 Subject: [jmsl] Max instrument dimension names In-Reply-To: References: <2E3CEB24-FA02-4389-ADB9-A52327CE553B@rubato-music.com> <48CBE747.1040508@mail.rockefeller.edu> <1BAE7716-43BD-46D0-AEDB-F57AF9C04C13@rubato-music.com> <48CBEEDD.1050402@mail.rockefeller.edu> <7709E56C-7596-4A05-BCAC-7CAE2984B5AC@rubato-music.com> Message-ID: <48CC3DB9.3010300@mail.rockefeller.edu> Hi J You are right, get() returns a copy of the double[]. Sorry for the confusion. I think there's good arguments on both sides of the issue of returning a reference or a copy... Use public void set(double value, int e, int d) to change the data in the MusicShape itself. Thanks Nick jmsl@music.columbia.edu wrote: > Okay, I figured out what was up... > > I had assumed that MusicShape.get() would return a *reference* to the > double[], but it appears to return a deep copy. So, I was making > alterations (duration, in particular) to the copy as notes were being > entered, and then playing back the original. To quote the infinitely > wise Homer: "Doh!" > > I have to admit, it seems a little un-Java-like, to me, for > MusicShape.get() to return copies, not references. I can see it being > handy, in some cases, but it's a little counter-intuitive, imho. I > guess this is so Interpreters can mess around with the double[] > without altering the original held by the MusicShape, but it might be > more Java-like if the Interpreter made the copy, rather than the > MusicShape. Just a thought... I'm sure there are plenty of good > reasons for doing it the way it's done, but it might be good to make > this behaviour more obvious in the docs. > > (Or maybe I'm way off on my diagnosis of what solved my problem, and > MusicShape.get() does return a reference to the double[]...???) > > Anyway, problem solved! > > J. > > > On 13-Sep-08, at 2:05 PM, jmsl@music.columbia.edu wrote: > >> hmmm... Weird problem. I decided it would be simplest to just align >> my MusicShape's dimensions with the MaxInstrument's dimensions, >> adding on a few extras for specific purposes. So, my dimensions seem >> to be in agreement. The only thing that's not working properly is >> that playback seems to be switching Hold for Duration - i.e., it's >> packing my notes right up against one another, ignoring any >> spaces/rests. That is, if I put single sixteenth notes on each of 4 >> quarter-note downbeats, I get a run of sixteenths, rather than a run >> of 4 quarter-notes, with sixteenth-note "holds"... >> >> I know this is probably not possible to diagnose without seeing the >> code, but I thought I'd ask, just in case there's some obvious >> misunderstanding that would result in this behaviour. >> >> thanks, >> >> J. >> >> >> On 13-Sep-08, at 9:48 AM, jmsl@music.columbia.edu wrote: >> >>> Hi J >>> >>> If you play your MaxInstrument with a MusicShape then MusicShape >>> will do the translation element by element, right before it calls >>> instrument.play() >>> The instrument itself does not do any translating; by the time it >>> has its play() method called, all it gets is a timestamp and an >>> array of double[]. >>> So translating is the responsibility of whoever calls ins.play() >>> >>> Follow-up questions welcome! >>> Nick >>> >>> jmsl@music.columbia.edu wrote: >>>> Aaah, thanks so much Nick. I was starting to lose my mind! >>>> >>>> I'm assuming then that I can just add my custom dimensions from 5+, >>>> then let the built-in translator figure out the name->index >>>> mapping... Yes? >>>> >>>> J. >>>> >>>> >>>> On 13-Sep-08, at 9:16 AM, jmsl@music.columbia.edu wrote: >>>> >>>>> Hello J >>>>> >>>>> Yes you can add custom dimensions to MaxInstruments, try this: >>>>> >>>>> myMaxInstrument.getDimensionNamespace().setDimensionName(5, >>>>> "wiggle"); >>>>> myMaxInstrument.getDimensionNamespace().setLimits(5, 0, 3); >>>>> myMaxInstrument.getDimensionNamespace().setDefault(5, 0); >>>>> Remember to leave dimension 4 as it is alrteady defined in >>>>> MaxDimensionNameSpace ("eventflag")... so you should only add >>>>> custom dimensions from 5 on up >>>>> >>>>> Thanks >>>>> Nick Didkovsky >>>>> >>>>> jmsl@music.columbia.edu wrote: >>>>>> Hi All, >>>>>> >>>>>> I can't figure out how I'm supposed to set my Max Instrument's >>>>>> dimension names?? I have a custom namespace for the basic >>>>>> MusicShape I'm using, and I obviously need Max to understand that >>>>>> namespace, and use its formatting. But I can't see any direct way >>>>>> to other than SetDimensionNameSpace(), which appears to only take >>>>>> an existing DimensionNameSpace... If I could take that from my >>>>>> MusicShape directly, I'd be fine, but MusicShape only has a >>>>>> dimensionNames() method, not a "getDimensionNameSpace()" method... >>>>>> >>>>>> Needless to say, I'm confused. >>>>>> >>>>>> J. >>>>>> >>>>>> _______________________________________________ >>>>>> jmsl mailing list >>>>>> jmsl@music.columbia.edu >>>>>> http://music.columbia.edu/mailman/listinfo/jmsl >>>>> _______________________________________________ >>>>> jmsl mailing list >>>>> jmsl@music.columbia.edu >>>>> http://music.columbia.edu/mailman/listinfo/jmsl >>>> >>>> _______________________________________________ >>>> jmsl mailing list >>>> jmsl@music.columbia.edu >>>> http://music.columbia.edu/mailman/listinfo/jmsl >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Mon Sep 15 18:16:06 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Mon Sep 15 18:16:25 2008 Subject: [jmsl] Feature request: EditManager: findClosestNote: radiusFactor Message-ID: <04C3A180-A20D-4D73-AEC4-DECE6F8C94E8@nyu.edu> I was wondering if it's possible to provide getters and setters for the defaultRadiusFactor field in EditManager. It would be nice to be able to customize the sensitivity of the selection mechanism. It can be tricky to place the cursor between shorter notes and this would make it easier without having to zoom in. For certain tasks, like inserting midi notes from the keyboard into the score, it's helpful to have a cursor rather than having a note selected. (for example, selecting the note and then playing might replace the pitches at the note, whereas the cursor is better for indicating insertion) thanks, Peter McCulloch From jmsl at music.columbia.edu Thu Sep 18 11:56:39 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Thu Sep 18 11:56:49 2008 Subject: [jmsl] MaxScore questions Message-ID: <48D27A37.3050301@mail.rockefeller.edu> I have some questions concerning Max Score 1. what do the numbers 0.5 and 0.8 in "addNote" after Dur and pitch mean? example: "addNote 1 60. 0.5 0.8" 2. how is it possible to add notes to the 2nd or 3rd staff? 3. Is it possible to add chords as a list or do I have to to do it with adding a note and then addInterval? 4. in Max 5 I can only see 5 staffs. If I have more they are not visible - also no way to scroll. Is there a document with all the possible messages ? It would be great if you can help me. best, Frank From jmsl at music.columbia.edu Thu Sep 18 12:33:15 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Thu Sep 18 12:33:28 2008 Subject: [jmsl] MaxScore questions In-Reply-To: <48D27A37.3050301@mail.rockefeller.edu> References: <48D27A37.3050301@mail.rockefeller.edu> Message-ID: <48D282CB.7030403@mail.rockefeller.edu> Hi Frank I'll get to these questions as soon as I can, but meanwhile you can download the pdf documentation at http://www.algomusic.com/maxscore/index.html (see the link at the bottom "MaxScore Manual in PDF format") We kept the manual outside the installer because I want to be able to update it on an arbitrary schedule without having to rebuild an installation. Sorry for the confusion! Best Nick Didkovsky jmsl@music.columbia.edu wrote: > I have some questions concerning Max Score > > 1. what do the numbers 0.5 and 0.8 in "addNote" after Dur and pitch mean? > example: "addNote 1 60. 0.5 0.8" > > 2. how is it possible to add notes to the 2nd or 3rd staff? > > 3. Is it possible to add chords as a list or do I have to to do it with > adding a note and then addInterval? > > 4. in Max 5 I can only see 5 staffs. If I have more they are not > visible - > also no way to scroll. > > Is there a document with all the possible messages ? > > It would be great if you can help me. > > best, > > Frank > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Fri Sep 19 09:51:07 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Fri Sep 19 09:51:19 2008 Subject: [jmsl] MaxScore questions In-Reply-To: <48D27A37.3050301@mail.rockefeller.edu> References: <48D27A37.3050301@mail.rockefeller.edu> Message-ID: <9F2006D0-6BCA-4052-A697-3AB74C23DF19@hfmt-hamburg.de> Hello Frank, Let me give you answer to your questions. *************************************************** Phone: +49-40-428482-763 (w) +49-40-23517610 (h) +49-172-787-4214 (m) +49-40-428482-770 (f) e-mail: georg.hajdu@hfmt-hamburg.de e-mail: georghajdu@mac.com http://www.georghajdu.de/index.html http://www.quintet.net/ http://mmm.hfmt-hamburg.de **************************************************** On Sep 18, 2008, at 5:56 PM, jmsl@music.columbia.edu wrote: > I have some questions concerning Max Score > > 1. what do the numbers 0.5 and 0.8 in "addNote" after Dur and pitch > mean? > example: "addNote 1 60. 0.5 0.8" 0.5 means 0.5 amplitude. This is like MIDI velocity but instead of a integer number between 0 127, you're supposed to use the floating point range between 0. and 1. (You can also enter MIDI velocity values if you prefer, but in any case your synth will have to know how to interpret the data). 0.8 refers to hold time. This is the time that a note actually sounds (in this case 80% of the value defined by duration). For example, a tenuto over a quarter note shortens the duration of the note to approximately 60%, therefore the hold time would be 0.6. This way, you can easily have control over musical expression. > > > 2. how is it possible to add notes to the 2nd or 3rd staff? Click on the staff/measure to which you want to add notes and send the setCurrentMeasureStaffToSelectedMeasureStaff message to MaxScore. Now the music should appear at the correct location. > > > 3. Is it possible to add chords as a list or do I have to to do it > with > adding a note and then addInterval? There is no message for this, but it's so easy to create a little subpatch in Max that would take care of this. Isn't it neat to have both worlds (JMSL and Max)? Please let me know if you need some coaching. > > > 4. in Max 5 I can only see 5 staffs. If I have more they are not > visible - > also no way to scroll. When you create a score with the newScore message, make sure you make the window large enough by entering reasonable dimensions (the second (width) and third (height) numbers of the newScore message). If the window size is larger than your screen size, you can use the scroll bars that appears on the right and bottom sides.) You still can change the score size ex post facto with the setScoreSize message. > > > Is there a document with all the possible messages ? > > > It would be great if you can help me. Have you studied all the subpatches of the MaxScore help file? You should get some mileage out of that. Regards, Georg > > best, > > Frank > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 20 15:16:36 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 20 15:16:48 2008 Subject: [jmsl] absolute scheduling Message-ID: <57AA84DE-71EA-48CF-B3AB-527AC698B3E8@rubato-music.com> I'm trying to use jmsl to build a sequencing back-end for a composition app, but I'm having some real problems. I've based my design around ParallelCollection and MusicShape objects, but I'm having some troubles with the "duration" paradigm for scheduling events in MusicShape. Specifically, I want to have "tracks" with "events" at absolute, locked, locations in time. The problem I'm having is that, in a track with 4 events (for example), when I delete event 2, the MusicShape moves events 3 and 4 back in time, by virtue of the way the duration parameter works. I don't want that... If I remove an event, I just want to remove that event itself, without affecting any of the surrounding events. I could recalculate the durations, but that seems way over the top, to me... It seems like this should be easy, but for some reason I can't wrap my head around how this would best be done. I would be enormously appreciative if somebody could just quickly describe the kind of data/object structure I'd best use for this sort of sequencer design. I feel like it must still be a ParallelCollection, but I'm really not clear about how to populate it... At this point, my design uses a set of double[] arrays that represent my discrete events, and these events have a dimension for "metricPosition", which is an absolute location, in beats, for the event. Any help very much appreciated. J. From jmsl at music.columbia.edu Sat Sep 20 15:24:12 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 20 15:24:41 2008 Subject: [jmsl] absolute scheduling In-Reply-To: <57AA84DE-71EA-48CF-B3AB-527AC698B3E8@rubato-music.com> References: <57AA84DE-71EA-48CF-B3AB-527AC698B3E8@rubato-music.com> Message-ID: <48D54DDC.4070604@mail.rockefeller.edu> Hi J You are right. MusicShapes do not use absolute timestamps for scheduling. If you remove one element, the MusicShape's remaining elements jump forward in time. You might rewrite your "delete" to set the amp or the picth to 0 to maintain duration but keep it silent. But cooler might be to redesign your model of a Track as a ParallelCollection of MusicJobs, each responsible for a single "note". Each MusicJob's startDelay would correspond to the absolute time since the beginning of the Track. Then you could add and delete MusicJobs without changing the overall sequence. You'd have to override repeat() to do something like: getInstrument().play(playTime, 1, myData); How's that sound? Thanks Nick Didkovsky jmsl@music.columbia.edu wrote: > I'm trying to use jmsl to build a sequencing back-end for a > composition app, but I'm having some real problems. I've based my > design around ParallelCollection and MusicShape objects, but I'm > having some troubles with the "duration" paradigm for scheduling > events in MusicShape. Specifically, I want to have "tracks" with > "events" at absolute, locked, locations in time. The problem I'm > having is that, in a track with 4 events (for example), when I delete > event 2, the MusicShape moves events 3 and 4 back in time, by virtue > of the way the duration parameter works. I don't want that... If I > remove an event, I just want to remove that event itself, without > affecting any of the surrounding events. I could recalculate the > durations, but that seems way over the top, to me... > It seems like this should be easy, but for some reason I can't wrap my > head around how this would best be done. > > I would be enormously appreciative if somebody could just quickly > describe the kind of data/object structure I'd best use for this sort > of sequencer design. I feel like it must still be a > ParallelCollection, but I'm really not clear about how to populate > it... At this point, my design uses a set of double[] arrays that > represent my discrete events, and these events have a dimension for > "metricPosition", which is an absolute location, in beats, for the event. > > Any help very much appreciated. > > J. > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 20 15:55:34 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 20 15:55:49 2008 Subject: [jmsl] absolute scheduling In-Reply-To: <48D54DDC.4070604@mail.rockefeller.edu> Message-ID: <001701c91b5a$d8c203d0$0300000a@bluto> If you delete an event in the stream, how about replacing it with a placeholder with a duration? A "rest"? You're not really deleting time, you're just saying "don't play a note for this amount of time", which is a sort of musical event. So: keep the ParallelCollection, use a special constant (like -1) for note that indicates rest, and bob's your uncle. --rbt > -----Original Message----- > From: jmsl-bounces@music.columbia.edu > [mailto:jmsl-bounces@music.columbia.edu]On Behalf Of > jmsl@music.columbia.edu > Sent: Saturday, September 20, 2008 12:24 PM > To: jmsl@music.columbia.edu > Subject: Re: [jmsl] absolute scheduling > > > Hi J > > You are right. MusicShapes do not use absolute timestamps for > scheduling. If you remove one element, the MusicShape's remaining > elements jump forward in time. You might rewrite your "delete" to set > the amp or the picth to 0 to maintain duration but keep it silent. > > But cooler might be to redesign your model of a Track as a > ParallelCollection of MusicJobs, each responsible for a > single "note". > Each MusicJob's startDelay would correspond to the absolute > time since > the beginning of the Track. Then you could add and delete MusicJobs > without changing the overall sequence. You'd have to override > repeat() > to do something like: > getInstrument().play(playTime, 1, myData); > > How's that sound? > > Thanks > Nick Didkovsky > > > > jmsl@music.columbia.edu wrote: > > I'm trying to use jmsl to build a sequencing back-end for a > > composition app, but I'm having some real problems. I've based my > > design around ParallelCollection and MusicShape objects, but I'm > > having some troubles with the "duration" paradigm for scheduling > > events in MusicShape. Specifically, I want to have "tracks" with > > "events" at absolute, locked, locations in time. The problem I'm > > having is that, in a track with 4 events (for example), > when I delete > > event 2, the MusicShape moves events 3 and 4 back in time, > by virtue > > of the way the duration parameter works. I don't want that... If I > > remove an event, I just want to remove that event itself, without > > affecting any of the surrounding events. I could recalculate the > > durations, but that seems way over the top, to me... > > It seems like this should be easy, but for some reason I > can't wrap my > > head around how this would best be done. > > > > I would be enormously appreciative if somebody could just quickly > > describe the kind of data/object structure I'd best use for > this sort > > of sequencer design. I feel like it must still be a > > ParallelCollection, but I'm really not clear about how to populate > > it... At this point, my design uses a set of double[] arrays that > > represent my discrete events, and these events have a dimension for > > "metricPosition", which is an absolute location, in beats, > for the event. > > > > Any help very much appreciated. > > > > J. > > > > _______________________________________________ > > jmsl mailing list > > jmsl@music.columbia.edu > > http://music.columbia.edu/mailman/listinfo/jmsl > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 20 17:09:03 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 20 17:09:16 2008 Subject: [jmsl] absolute scheduling In-Reply-To: <001701c91b5a$d8c203d0$0300000a@bluto> References: <001701c91b5a$d8c203d0$0300000a@bluto> Message-ID: <7DD75C44-D068-4F89-955E-492B8622B554@rubato-music.com> Hmm... nice ideas both... On 20-Sep-08, at 12:55 PM, jmsl@music.columbia.edu wrote: > If you delete an event in the stream, how about replacing it with a > placeholder with a duration? A "rest"? You're not really deleting > time, > you're just saying "don't play a note for this amount of time", > which is a > sort of musical event. So: keep the ParallelCollection, use a special > constant (like -1) for note that indicates rest, and bob's your uncle. > The problem with the "rest" idea is that the event won't necessarily be a rest, since a previous note might be sustaining underneath it. More importantly, the removed event would no longer have a visible notation in my score (which is actually in a Cocoa app), which could get to be a bit of a nightmare. > --rbt > >> -----Original Message----- >> From: jmsl-bounces@music.columbia.edu >> [mailto:jmsl-bounces@music.columbia.edu]On Behalf Of >> jmsl@music.columbia.edu >> Sent: Saturday, September 20, 2008 12:24 PM >> To: jmsl@music.columbia.edu >> Subject: Re: [jmsl] absolute scheduling >> >> >> Hi J >> >> You are right. MusicShapes do not use absolute timestamps for >> scheduling. If you remove one element, the MusicShape's remaining >> elements jump forward in time. You might rewrite your "delete" to set >> the amp or the picth to 0 to maintain duration but keep it silent. >> >> But cooler might be to redesign your model of a Track as a >> ParallelCollection of MusicJobs, each responsible for a >> single "note". >> Each MusicJob's startDelay would correspond to the absolute >> time since >> the beginning of the Track. Then you could add and delete MusicJobs >> without changing the overall sequence. You'd have to override >> repeat() >> to do something like: >> getInstrument().play(playTime, 1, myData); Yes, I think this is the way to go, and it's what I kind of had in mind, since I was already using the ParallelCollection for my playback... But, as stupid as it sounds, I'm a little lost as to how to express the event itself in a MusicJob. From your description above, it looks like the Instrument's play() method is what takes the double[] array I was previously adding to my MusicShapes. Is that correct? Thanks for the help! J. >> >> >> How's that sound? >> >> Thanks >> Nick Didkovsky >> >> >> >> jmsl@music.columbia.edu wrote: >>> I'm trying to use jmsl to build a sequencing back-end for a >>> composition app, but I'm having some real problems. I've based my >>> design around ParallelCollection and MusicShape objects, but I'm >>> having some troubles with the "duration" paradigm for scheduling >>> events in MusicShape. Specifically, I want to have "tracks" with >>> "events" at absolute, locked, locations in time. The problem I'm >>> having is that, in a track with 4 events (for example), >> when I delete >>> event 2, the MusicShape moves events 3 and 4 back in time, >> by virtue >>> of the way the duration parameter works. I don't want that... If I >>> remove an event, I just want to remove that event itself, without >>> affecting any of the surrounding events. I could recalculate the >>> durations, but that seems way over the top, to me... >>> It seems like this should be easy, but for some reason I >> can't wrap my >>> head around how this would best be done. >>> >>> I would be enormously appreciative if somebody could just quickly >>> describe the kind of data/object structure I'd best use for >> this sort >>> of sequencer design. I feel like it must still be a >>> ParallelCollection, but I'm really not clear about how to populate >>> it... At this point, my design uses a set of double[] arrays that >>> represent my discrete events, and these events have a dimension for >>> "metricPosition", which is an absolute location, in beats, >> for the event. >>> >>> Any help very much appreciated. >>> >>> J. >>> >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 20 20:28:30 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 20 20:29:00 2008 Subject: [jmsl] absolute scheduling In-Reply-To: <7DD75C44-D068-4F89-955E-492B8622B554@rubato-music.com> References: <001701c91b5a$d8c203d0$0300000a@bluto> <7DD75C44-D068-4F89-955E-492B8622B554@rubato-music.com> Message-ID: <48D5952E.70704@mail.rockefeller.edu> That's what I meant with "You might rewrite your "delete" to set the amp or the pitch to 0 to maintain duration but keep it silent. " But Robert did a better job of explaining it than I did. Thanks Nick jmsl@music.columbia.edu wrote: > Hmm... nice ideas both... > > On 20-Sep-08, at 12:55 PM, jmsl@music.columbia.edu wrote: > >> If you delete an event in the stream, how about replacing it with a >> placeholder with a duration? A "rest"? You're not really deleting >> time, >> you're just saying "don't play a note for this amount of time", which >> is a >> sort of musical event. So: keep the ParallelCollection, use a special >> constant (like -1) for note that indicates rest, and bob's your uncle. >> > > The problem with the "rest" idea is that the event won't necessarily > be a rest, since a previous note might be sustaining underneath it. > More importantly, the removed event would no longer have a visible > notation in my score (which is actually in a Cocoa app), which could > get to be a bit of a nightmare. > > >> --rbt >> >>> -----Original Message----- >>> From: jmsl-bounces@music.columbia.edu >>> [mailto:jmsl-bounces@music.columbia.edu]On Behalf Of >>> jmsl@music.columbia.edu >>> Sent: Saturday, September 20, 2008 12:24 PM >>> To: jmsl@music.columbia.edu >>> Subject: Re: [jmsl] absolute scheduling >>> >>> >>> Hi J >>> >>> You are right. MusicShapes do not use absolute timestamps for >>> scheduling. If you remove one element, the MusicShape's remaining >>> elements jump forward in time. You might rewrite your "delete" to set >>> the amp or the picth to 0 to maintain duration but keep it silent. >>> >>> But cooler might be to redesign your model of a Track as a >>> ParallelCollection of MusicJobs, each responsible for a >>> single "note". >>> Each MusicJob's startDelay would correspond to the absolute >>> time since >>> the beginning of the Track. Then you could add and delete MusicJobs >>> without changing the overall sequence. You'd have to override >>> repeat() >>> to do something like: >>> getInstrument().play(playTime, 1, myData); > > Yes, I think this is the way to go, and it's what I kind of had in > mind, since I was already using the ParallelCollection for my > playback... But, as stupid as it sounds, I'm a little lost as to how > to express the event itself in a MusicJob. From your description > above, it looks like the Instrument's play() method is what takes the > double[] array I was previously adding to my MusicShapes. Is that > correct? > > Thanks for the help! > > J. > > >>> >>> >>> How's that sound? >>> >>> Thanks >>> Nick Didkovsky >>> >>> >>> >>> jmsl@music.columbia.edu wrote: >>>> I'm trying to use jmsl to build a sequencing back-end for a >>>> composition app, but I'm having some real problems. I've based my >>>> design around ParallelCollection and MusicShape objects, but I'm >>>> having some troubles with the "duration" paradigm for scheduling >>>> events in MusicShape. Specifically, I want to have "tracks" with >>>> "events" at absolute, locked, locations in time. The problem I'm >>>> having is that, in a track with 4 events (for example), >>> when I delete >>>> event 2, the MusicShape moves events 3 and 4 back in time, >>> by virtue >>>> of the way the duration parameter works. I don't want that... If I >>>> remove an event, I just want to remove that event itself, without >>>> affecting any of the surrounding events. I could recalculate the >>>> durations, but that seems way over the top, to me... >>>> It seems like this should be easy, but for some reason I >>> can't wrap my >>>> head around how this would best be done. >>>> >>>> I would be enormously appreciative if somebody could just quickly >>>> describe the kind of data/object structure I'd best use for >>> this sort >>>> of sequencer design. I feel like it must still be a >>>> ParallelCollection, but I'm really not clear about how to populate >>>> it... At this point, my design uses a set of double[] arrays that >>>> represent my discrete events, and these events have a dimension for >>>> "metricPosition", which is an absolute location, in beats, >>> for the event. >>>> >>>> Any help very much appreciated. >>>> >>>> J. >>>> >>>> _______________________________________________ >>>> jmsl mailing list >>>> jmsl@music.columbia.edu >>>> http://music.columbia.edu/mailman/listinfo/jmsl >>> _______________________________________________ >>> jmsl mailing list >>> jmsl@music.columbia.edu >>> http://music.columbia.edu/mailman/listinfo/jmsl >> >> _______________________________________________ >> jmsl mailing list >> jmsl@music.columbia.edu >> http://music.columbia.edu/mailman/listinfo/jmsl > > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Wed Sep 24 07:13:58 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Wed Sep 24 07:14:11 2008 Subject: [jmsl] MaxScore questions In-Reply-To: <9F2006D0-6BCA-4052-A697-3AB74C23DF19@hfmt-hamburg.de> Message-ID: Dear Georg, thanks for all the answers. one more question about staffs: >> >> >> 2. how is it possible to add notes to the 2nd or 3rd staff? > > Click on the staff/measure to which you want to add notes and send the > setCurrentMeasureStaffToSelectedMeasureStaff message to MaxScore. Now > the music should appear at the correct location. how can I select a staff without using the mouse. For instance, I have two pitches and want to make one note in staff 1 with pitch 1 and the second note in staff two with pitch 2. Then I want to add notes to both staffs with another pitch pair. how can I do this? best, frank From jmsl at music.columbia.edu Wed Sep 24 07:43:33 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Wed Sep 24 07:43:45 2008 Subject: [jmsl] MaxScore questions ->found it In-Reply-To: <9F2006D0-6BCA-4052-A697-3AB74C23DF19@hfmt-hamburg.de> Message-ID: Hello again, found it: -> setCurrentStaff so no answer needed anymore >> >> >> 2. how is it possible to add notes to the 2nd or 3rd staff? > > Click on the staff/measure to which you want to add notes and send the > setCurrentMeasureStaffToSelectedMeasureStaff message to MaxScore. Now > the music should appear at the correct location. how can I select a staff without using the mouse. For instance, I have two pitches and want to make one note in staff 1 with pitch 1 and the second note in staff two with pitch 2. Then I want to add notes to both staffs with another pitch pair. how can I do this? best, frank From jmsl at music.columbia.edu Sat Sep 27 14:06:34 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 27 14:06:51 2008 Subject: [jmsl] UserBeans for Track? Message-ID: Revisiting my database code recently, and I noticed that there isn't a get/setUserBeans() method for track. Is there a particular reason for this, and is it possible to add this for Track? thanks, Peter McCulloch From jmsl at music.columbia.edu Sat Sep 27 14:56:35 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 27 14:56:55 2008 Subject: [jmsl] UserBeans for Track? In-Reply-To: References: Message-ID: <48DE81E3.2020103@mail.rockefeller.edu> Hello Peter Perhaps just an oversight, but easy to add. I'll send you a prerelease when it's tested! Thanks Nick D jmsl@music.columbia.edu wrote: > Revisiting my database code recently, and I noticed that there isn't a > get/setUserBeans() method for track. Is there a particular reason for > this, and is it possible to add this for Track? > > thanks, > Peter McCulloch > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl From jmsl at music.columbia.edu Sat Sep 27 15:25:25 2008 From: jmsl at music.columbia.edu (jmsl@music.columbia.edu) Date: Sat Sep 27 15:25:46 2008 Subject: [jmsl] UserBeans for Track? In-Reply-To: References: Message-ID: <48DE88A5.1020904@mail.rockefeller.edu> Hi Peter I've added userbeans to Track. You (and anyone else interested) can grab a prerelease at http://www.algomusic.com/prerelease/ A summary of changes since the last official release is listed below (I see you've all over these recent changes!) Thanks Nick 06/14/08 ScoreEditPanel now offers x, bb, 1/4#, 1/4b menu items. Also, entering C or F with b selected spells pitch enharmonically now. Entering E or B with # selected spells pitch enharmonically now. Changes were made in NoteFactory. Thanks Peter McCullough 06/22/08 The following Score fields and their getters and setters, were changed from static to local. Thanks Peter McCullough showInstrumentNames showTempo showStaffNumbers showMeasureNumbers showSectionBrackets showTimeSignatures showClefs 06/29/08 Removed static Staff.set/getActiveTrackindex(). When using GUI like ScoreFrame, active track is determined by EditManager by get()ting its value from ScoreEditPanel. When you are using API, use score.set/getActiveTrackNumber(), like in jmsltestsuite.TwoTracksPerStaff for example. This way multiple score editors can maintain their own active track instead of setting one global static Staff field. Note that ScoreCanvasAdapter no longer reacts to EditStateChanged (it used to set Staff.activetrackindex). For Peter McCullough; glad to clean this up. Note that selecting the track in ScoreEditPanel does NOT change the score's active track index! It simply provides the track index for operations managed by EditManager (ie UI interactions) 07/12/08 BUG FIX: If a Note's UserBean cannot be instantiated when Score is loaded (for example if the userbean class is not in the classpath), noteXMLLoader mistakenly added NULL to Note's user beans, which resulted in not being able to save score any more (null pointer exception killed the save). Note NoteXMLLoader does not add NULL to user beans, which is correct behavior. IMPORTANT: saving this score will result in a score stripped of the references to thge original user beans so be careful. Scenario: user creates UserBeanX on one machine, creates a score with it and saves the score. This score contains references to UserBeanX class. Now load the score on a different machine without UserBeanX on it, and none of these beans will load. Save the score on this machine and there will be no references to UserBeanX any more. 07/12/08 Feature: new NoteOrnament abstract class. Define your own drawing ornament for a note. Add it to a note with addUserBean. Saves and loads back with the score. NoteOrnaments are scanned and loaded as plug-ins. Show up in Note menu of ScoreFrame. Wrapped in notePropertiesTransform so they are un/redoable. See jmsltestsuite.NoteOrnamentTest and jmsltestsuite.DrippyNoteOrnament and jmsltestsuite.SquigglyNoteOrnament To test plug-ins, compile Drippy and Squiggly and copy their .class files to a "jmsltestsuite" subdirectory of jmsl_plugins 09/06/08 Score.setScorePainter() is now a public method (for Peter McCullough). Warning this will probably disappear soon. 09/27/08 Track has user beans now, thanks Peter McCullough jmsl@music.columbia.edu wrote: > Revisiting my database code recently, and I noticed that there isn't a > get/setUserBeans() method for track. Is there a particular reason for > this, and is it possible to add this for Track? > > thanks, > Peter McCulloch > _______________________________________________ > jmsl mailing list > jmsl@music.columbia.edu > http://music.columbia.edu/mailman/listinfo/jmsl