From: <chr...@we...> - 2009-08-06 06:02:53
|
Hello all, I have started to write a synth driver for the Yamaha SY85 workstation. Please review the code. I also created an issue on the sourceforge patch tracker with the same patch. Chris http://codereview.appspot.com/105044 |
From: Christopher A. <chr...@we...> - 2009-08-07 12:44:04
|
Hi Peter, hi all, first of all, many thanks for taking the time to look at my code and answering. Given the quietness of this list over the past months I wasn't sure whether to expect any answer at all! Peter Geirnaert schrieb: > I've been trying to keep my focus so i could review your code, but > unfortunately got too often distracted. > What I can say now is your style looks very clean Thx. I admit that I am a little bit of a coding style fanatic. I do a lot of programming in Python where a clean coding style is considered an essential part of the culture. Btw, this is my first bigger piece of Java code except some fumbling around with RoboCode. > and I think the "this." can be left away in your singleDriver > <http://codereview.appspot.com/105044/diff/1/5?context=25&column_width=80> > at lines 48 to 59 and 75. You are probably right. I created most of my code by copying from other drivers, most notably the Yamaha TG100 and TG33 and the Kawai K4 drivers, so I just copied the way it was done there. I'll check out if it still works when I remove those occurrences of "this.". > PS: What do you think about the wiki <http://jsynthlib.wikispaces.com> > I've been working on lately ? I had a look at it, but my first impression was, that there isn't that much more information than in the JSynthLib programming guide. I may be totally mistaken, I just didn't look at it very long. I was able to learn what I needed to know for patching together the Single Driver from the programming guide and looking at the source code of the other drivers and the API docs. But when I start writing the Bank driver and eventually a Patch Editor, I'll probably need more documentation and I'll surely look at your wiki again. One thing that got me a bit puzzled at first is: what are the different make targets and which ones do you use for the different system (Win, OS X, Unix) and how do you run your development copy of JSynthLib? The programming manual mentioned running JSynthLib with a "2" argument to enable debugging, but that didn't seem to work for me. I think it would be great to have a quick start guide for developers on every of the three major platforms, that just gives the exact steps to compile and run a SVN checkout. > PPS: Codereview looks like a great tool, and how did you create the > issue on sourceforge ? > I'd like to add links to information about these subjects on my wiki too. You just need a sourceforge account (which I already had) and then go to "Tracker" on the JSynthLib project page and then go to "Patches" and click on "Add new", add a summary and description and upload your diff. For the Codereview tool, you need a Google account, and then you can upload your diffs in different ways. I used the provided "upload.py" Python script, which you run from your JSynthLib SVN working dir. It will create a diff of your changes and upload them to codereview, automatically selecting the right repository. You can then add a description and then use the "Publish+Mail Comments" function to send a mail requesting for code review, like I did to the mailing list. Chris |
From: Peter G. <pet...@gm...> - 2009-08-08 14:12:12
|
On Fri, Aug 7, 2009 at 12:18 PM, Christopher Arndt <chr...@we...>wrote: > Hi Peter, hi all, > > first of all, many thanks for taking the time to look at my code and > answering. Given the quietness of this list over the past months I > wasn't sure whether to expect any answer at all! > JSynthLib is still alive :) It doesn't make much noise so today I created a Facebook group :D http://www.facebook.com/group.php?gid=232655115011 I hope that's legal ... > Peter Geirnaert schrieb: > > I've been trying to keep my focus so i could review your code, but > > unfortunately got too often distracted. > > What I can say now is your style looks very clean > > Thx. I admit that I am a little bit of a coding style fanatic. I do a > lot of programming in Python where a clean coding style is considered an > essential part of the culture. In JSynthLib's culture, it's an essential part too, and now your code is a great example. Well, that's what I think, but I'm just a newbie trying to get a grip on programming and contributing code to an open-source project, so I might overlook any mistakes you made. > Btw, this is my first bigger piece of > Java code except some fumbling around with RoboCode. Are you using Eclipse (or another IDE) or do you write your code in a text-editor ? I'm asking this because I also don't have any experience writing Java source, and learning how to use Eclipse doesn't go very easy for me. It makes looking up examples from the other drivers easier and the Javadoc is helpful etc. I'm just not sure about building the GUI part with Eclipse so I installed Netbeans too. For writing website source, I prefer a text-editor. > [snip] > > > PS: What do you think about the wiki <http://jsynthlib.wikispaces.com> > > I've been working on lately ? > > I had a look at it, but my first impression was, that there isn't that > much more information than in the JSynthLib programming guide. I may be > totally mistaken, I just didn't look at it very long. I was able to > learn what I needed to know for patching together the Single Driver from > the programming guide and looking at the source code of the other > drivers and the API docs. But when I start writing the Bank driver and > eventually a Patch Editor, I'll probably need more documentation and > I'll surely look at your wiki again. > > One thing that got me a bit puzzled at first is: what are the different > make targets and which ones do you use for the different system (Win, OS > X, Unix) and how do you run your development copy of JSynthLib? The > programming manual mentioned running JSynthLib with a "2" argument to > enable debugging, but that didn't seem to work for me. I read this in the programmer's guide: Important: Once you've extracted the .jar file and made changes to the resultant files, you must launch JSynthLib using; # On Windows use semicolon (;) instead of colon (:). java -classpath '.:groovy.jar' JSynthLib -D 3 instead of java -jar JSynthLib.jar. Otherwise you just run the old .jar file and none of your alterations get used. The command line option '-D 3' gives you various debug messages from ErrorMsg class. The messages help you. > I think it would > be great to have a quick start guide for developers on every of the > three major platforms, that just gives the exact steps to compile and > run a SVN checkout. That's the reason why I started that wiki, so you can describe the exact steps that are working to compile on your platform. That way , the information is immediately there for newcomers and nobody has to wait for the developers to update the programmer's guide. Just start a new page and if it's finished, you can also send it to the SourceForge project for inclusion in the Programmer's Guide. > > PPS: Codereview looks like a great tool, and how did you create the > > issue on sourceforge ? > > I'd like to add links to information about these subjects on my wiki too. > > You just need a sourceforge account (which I already had) and then go to > "Tracker" on the JSynthLib project page and then go to "Patches" and > click on "Add new", add a summary and description and upload your diff. > > For the Codereview tool, you need a Google account, and then you can > upload your diffs in different ways. I used the provided "upload.py" > Python script, which you run from your JSynthLib SVN working dir. It > will create a diff of your changes and upload them to codereview, > automatically selecting the right repository. You can then add a > description and then use the "Publish+Mail Comments" function to send a > mail requesting for code review, like I did to the mailing list. Thanks, I used this description on the wiki<http://jsynthlib.wikispaces.com/contribute>;-) Cheers! Peter |
From: Michael H. <kor...@ya...> - 2009-08-24 01:21:12
|
Hi JSynthLib ppl, I am working on a new device driver and have been partially successful but am stumped on a problem. I am hoping that someone could help me out. I have attached the two files that have been developed so far. They are the KorgHAWK800Device.java and KorgHAWK800SingleDriver.java files. When I run the resulting generated JSynthLib jar, I can select the Korg HAWK-800 device, open a new scene or library and then create a "New Patch". I can also copy and paste that blank patch around. For some reason, when I start JSynthLib I get the following error/warning and I don't understand why. Z:\WGVX7K~S>java -jar JSynthLib.jar java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:687) at core.DevicesConfig.createDevice(DevicesConfig.java:332) at core.AppConfig.addDevice(AppConfig.java:349) at core.AppConfig.loadPrefs(AppConfig.java:68) at core.PatchEdit.<init>(PatchEdit.java:40) at JSynthLib.main(JSynthLib.java:33) But the real problem begins when I attempt a "Get" patch. I am able to select the device, patch and bank (and with MIDI monitor running) I can see the correct MIDI sysex commands going to the synth and I can see the synth responding back. However, after "getting" the patch, the "Paste" button does not seem to paste any patch data into the selected (highlighted) patch in the library or scene windows. Is there anything anyone can suggest that I am doing wrong? Any help would be very, very appreciated. Mike. |
From: Daniel R. <dr....@co...> - 2009-08-08 17:48:05
|
Hello all: About a year ago I started with JSynth and then ended up giving up and creating my product as a standalone Java app ( www.confusionists.com/handsonic). Now I've given up on hardware entirely, so I'm out of the JSynth game completely. Which is not really relevant :) (BTW, the product receives tons of downloads and I've even made enough to buy a few pizzas in the last year.) Regarding the Java question, I just wanted to plug Netbeans (I have no connection with Sun): Eclipse is wonderful and mature for Java, but Netbeans is perhaps even nicer. I also use it for RoR and PHP (basically everything that is not .Net). It might be nice for Python, too. The instructions for java remain the same as for Eclipse (below). Best of luck, Daniel On Sat, Aug 8, 2009 at 4:11 PM, Peter Geirnaert wrote: > On Fri, Aug 7, 2009 at 12:18 PM, Christopher Arndt wrote: > > > Hi Peter, hi all, > > > > first of all, many thanks for taking the time to look at my code and > > answering. Given the quietness of this list over the past months I > > wasn't sure whether to expect any answer at all! > > > JSynthLib is still alive :) It doesn't make much noise so today I created a > Facebook group :D > http://www.facebook.com/group.php?gid=232655115011 I hope that's legal ... > > > > Peter Geirnaert schrieb: > > > I've been trying to keep my focus so i could review your code, but > > > unfortunately got too often distracted. > > > What I can say now is your style looks very clean > > > > Thx. I admit that I am a little bit of a coding style fanatic. I do a > > lot of programming in Python where a clean coding style is considered an > > essential part of the culture. > > In JSynthLib's culture, it's an essential part too, and now your code is a > great example. > Well, that's what I think, but I'm just a newbie trying to get a grip on > programming and contributing code to an open-source project, so I might > overlook any mistakes you made. > > > > Btw, this is my first bigger piece of > > Java code except some fumbling around with RoboCode. > > Are you using Eclipse (or another IDE) or do you write your code in a > text-editor ? > I'm asking this because I also don't have any experience writing Java > source, and learning how to use Eclipse doesn't go very easy for me. It > makes looking up examples from the other drivers easier and the Javadoc is > helpful etc. I'm just not sure about building the GUI part with Eclipse so > I > installed Netbeans too. For writing website source, I prefer a text-editor. > > > > > [snip] > > > > > PS: What do you think about the wiki <http://jsynthlib.wikispaces.com> > > > I've been working on lately ? > > > > I had a look at it, but my first impression was, that there isn't that > > much more information than in the JSynthLib programming guide. I may be > > totally mistaken, I just didn't look at it very long. I was able to > > learn what I needed to know for patching together the Single Driver from > > the programming guide and looking at the source code of the other > > drivers and the API docs. But when I start writing the Bank driver and > > eventually a Patch Editor, I'll probably need more documentation and > > I'll surely look at your wiki again. > > > > One thing that got me a bit puzzled at first is: what are the different > > make targets and which ones do you use for the different system (Win, OS > > X, Unix) and how do you run your development copy of JSynthLib? The > > programming manual mentioned running JSynthLib with a "2" argument to > > enable debugging, but that didn't seem to work for me. > > I read this in the programmer's guide: > > Important: Once you've extracted the .jar file and made changes to the > resultant files, you must launch JSynthLib using; > > # On Windows use semicolon (;) instead of colon (:). > java -classpath '.:groovy.jar' JSynthLib -D 3 > > instead of java -jar JSynthLib.jar. Otherwise you just run the old .jar > file > and none of your alterations get used. The command line option '-D 3' gives > you various debug messages from ErrorMsg class. The messages help you. > > > > > I think it would > > be great to have a quick start guide for developers on every of the > > three major platforms, that just gives the exact steps to compile and > > run a SVN checkout. > > That's the reason why I started that wiki, so you can describe the exact > steps > that are working to compile on your platform. That way , the information is > immediately there for newcomers and nobody has to wait for the developers > to > update the programmer's guide. > Just start a new page and if it's finished, you can also send it to the > SourceForge project for inclusion in the Programmer's Guide. > > > > > PPS: Codereview looks like a great tool, and how did you create the > > > issue on sourceforge ? > > > I'd like to add links to information about these subjects on my wiki > too. > > > > You just need a sourceforge account (which I already had) and then go to > > "Tracker" on the JSynthLib project page and then go to "Patches" and > > click on "Add new", add a summary and description and upload your diff. > > > > For the Codereview tool, you need a Google account, and then you can > > upload your diffs in different ways. I used the provided "upload.py" > > Python script, which you run from your JSynthLib SVN working dir. It > > will create a diff of your changes and upload them to codereview, > > automatically selecting the right repository. You can then add a > > description and then use the "Publish+Mail Comments" function to send a > > mail requesting for code review, like I did to the mailing list. > > Thanks, I used this description on the > wiki<http://jsynthlib.wikispaces.com/contribute>;-) > > Cheers! > Peter > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Jsynthlib-devel mailing list > Jsy...@li... > https://lists.sourceforge.net/lists/listinfo/jsynthlib-devel > |
From: Peter G. <pet...@gm...> - 2009-08-09 15:50:34
|
Hi On Sat, Aug 8, 2009 at 5:25 PM, Daniel Rosenstark < dr....@co...> wrote: > Hello all: > > About a year ago I started with JSynth and then ended up giving up and > creating my product as a standalone Java app ( > www.confusionists.com/handsonic). Now I've given up on hardware entirely, > so > I'm out of the JSynth game completely. Which is not really relevant :) > (BTW, > the product receives tons of downloads and I've even made enough to buy a > few pizzas in the last year.) Good luck and 'bon apetit' ;-) Regarding the Java question, I just wanted to plug Netbeans[snip] I see the Netbeans (6.0.1) GUI builder is using private void initComponents() { ... } to initialize forms. That's probably not a good idea, to start using the Netbeans way of building a GUI for a JSynthLib driver. Also, I couldn't find the Widgets provided by JSynthLib, only DKnob seemed available, to import in the 'palette'<http://wiki.netbeans.org/FaqFormUsingCustomComponent>. Some tools for building the GUI in an IDE would be handy imho. For now, I'm just using Gimp <http://www.gimp.org> and it's layers to sketch a lay-out <http://spd-11.wikispaces.com/file/view/PatchEditorGUI-3.png> for my Roland SPD-11 driver. A .zip containing .png pics of the components made available by JSynthLib would be easy to get started quick (using photoshop or gimp). I don't know if I should start a JSynthLib topic on java-forums<http://www.java-forums.org/>or sun-java-forums <http://forums.sun.com/> or ask my questions here, actually, after finishing my driver project, I can imagine I wouldn't go looking again for answers to questions posted on this list. But Java lovers (or how should I call them) on a java forum might do some research for newbies simply out of interest for Java code. > > Best of luck, > Daniel > Again, good luck to you too, I hope your few pizzas will taste very good. Peter |
From: Daniel R. <dr....@co...> - 2009-08-09 16:36:49
|
Hi Peter, Thanks for the bon appetit! I'm in Italy, so free pizza is even better :) I do NOT use (nor believe in, but I could be convinced) any Swing designers. I wrote all of my Swing code by hand, using the designer in JBuilder (still out there somewhere) to figure out how to do certain things layout-wise. I don't know the state-of-the-art regarding Swing designers (nor have I ever looked at Netbeans for anything but straight code/refactoring/SVN), but my opinion from what I've seen is that it's hard going. Real code always causes designers to break. (Irrelevant but noteworthy: .Net winforms designer in VS2005 or 2008 is great, and can handle your code moving forward). Out of curiosity: what is wrong with the initComponent? It's probably called by the constructor, and if not, you can always make it public... That said, if I were to do any Java projects right now, I would take a serious look at whether the UI could be done with QT or something. *Not sure if that would jive with the Swing stuff that JSynth is already using.* Best, Daniel On Sun, Aug 9, 2009 at 5:50 PM, Peter Geirnaert <pet...@gm...>wrote: > Hi > > On Sat, Aug 8, 2009 at 5:25 PM, Daniel Rosenstark < > dr....@co...> wrote: > >> Hello all: > > >> >> About a year ago I started with JSynth and then ended up giving up and >> creating my product as a standalone Java app ( >> www.confusionists.com/handsonic). Now I've given up on hardware entirely, >> so >> I'm out of the JSynth game completely. Which is not really relevant :) >> (BTW, >> the product receives tons of downloads and I've even made enough to buy a >> few pizzas in the last year.) > > > Good luck and 'bon apetit' ;-) > > Regarding the Java question, I just wanted to plug Netbeans[snip] > > > > I see the Netbeans (6.0.1) GUI builder is using private void > initComponents() { ... } > to initialize forms. > That's probably not a good idea, to start using the Netbeans way of > building a GUI for a JSynthLib driver. > Also, I couldn't find the Widgets provided by JSynthLib, only DKnob seemed > available, > to import in the 'palette'<http://wiki.netbeans.org/FaqFormUsingCustomComponent>. > Some tools for building the GUI in an IDE would be handy imho. > For now, I'm just using Gimp <http://www.gimp.org> and it's layers to sketch > a lay-out <http://spd-11.wikispaces.com/file/view/PatchEditorGUI-3.png>for my Roland SPD-11 driver. > A .zip containing .png pics of the components made available by JSynthLib > would be easy to get started quick (using photoshop or gimp). > > I don't know if I should start a JSynthLib topic on java-forums<http://www.java-forums.org/>or > sun-java-forums <http://forums.sun.com/> or ask my questions here, > actually, after finishing my driver project, I can imagine I wouldn't go > looking again for answers to questions posted on this list. But Java lovers > (or how should I call them) on a java forum might do some research for > newbies simply out of interest for Java code. > > > >> >> Best of luck, >> Daniel >> > > Again, good luck to you too, I hope your few pizzas will taste very good. > Peter > > |
From: Peter G. <pet...@gm...> - 2009-08-09 20:46:25
|
Hi Daniel, all ... > I do NOT use (nor believe in, but I could be convinced) any Swing > designers. > I wrote all of my Swing code by hand, using the designer in JBuilder (still > out there somewhere) to figure out how to do certain things layout-wise. I too believe after some study work, it must be possible for a coder to write by hand. After all, you had to write library support first, so you have to be able to write UI code by hand. > I don't know the state-of-the-art regarding Swing designers (nor have I > ever > looked at Netbeans for anything but straight code/refactoring/SVN), but my > opinion from what I've seen is that it's hard going. Real code always > causes > designers to break. So what would it do to musicians ? Anyway, if someone wants to get his hands dirty on System Exclusive, there must be some coders-spirit already. Just make a switch from design-mode to code-mode in the little grey cells ... > (Irrelevant but noteworthy: .Net winforms designer in > VS2005 or 2008 is great, and can handle your code moving forward). How do you mean "can handle your code forward" ? Do you mean like JSynthLib is "stuck" in an old way of coding software ? > Out of curiosity: what is wrong with the initComponent? It's probably > called > by the constructor, and if not, you can always make it public... Hm, thanks for the tip, I'll investigate it because I didn't know why it would be wrong. I simply didn't see it used in other editors, and jumped to conclusions ... (I still have to test my first patchEditor) > That said, if I were to do any Java projects right now, I would take a > serious look at whether the UI could be done with QT or something. *Not > sure > if that would jive with the Swing stuff that JSynth is already using.* Well, that looks interesting, I found this project on Sourceforge: QtJava <http://sourceforge.net/projects/qtjava/> but it's like no longer supported or developed. I guess I'm having enough extra work already 'blogging' about writing a driver, it's probably best if I just do it the traditional JSynthLib way. BTW, I have some troubles opening the preferences window in JSynthLib, but I'll write about that under another subject title, tomorrow, maybe ... Happy summertime ;-) Peter |
From: Daniel R. <dr....@co...> - 2009-08-09 22:11:18
|
> Link for QT would be > > http://www.qtsoftware.com/products/appdev/programming-language-support > > but it's true that the QT effort for Java looks quite dead or dy ing. > > Anyway, regarding your questions: > > > On Sun, Aug 9, 2009 at 10:45 PM, Peter Geirnaert < > pet...@gm...> wrote: > >> Hi Daniel, all ... >> >> >>> I do NOT use (nor believe in, but I could be convinced) any Swing >>> designers. >>> I wrote all of my Swing code by hand, using the designer in JBuilder >>> (still >>> out there somewhere) to figure out how to do certain things layout-wise. >> >> >> I too believe after some study work, it must be possible for a coder to >> write by hand. >> After all, you had to write library support first, so you have to be able >> to write UI code by hand. >> >> >>> I don't know the state-of-the-art regarding Swing designers (nor have I >>> ever >>> looked at Netbeans for anything but straight code/refactoring/SVN), but >>> my >>> opinion from what I've seen is that it's hard going. Real code always >>> causes >>> designers to break. >> >> >> So what would it do to musicians ? Anyway, if someone wants to get his >> hands dirty on System Exclusive, there must be some coders-spirit already. >> Just make a switch from design-mode to code-mode in the little grey cells >> ... >> > > Yes, but this is unfortunate: UI work is mostly repetitive and > pattern-based. One of the main problems with Swing is always the layouts. Of > course, there are tons of articles and books on that. Also, you'll have to > learn the Adapter/Adaptee structure for firing methods from controls. It's > simple, but it's a structure that needs to be copied (learned). > >> >> >>> (Irrelevant but noteworthy: .Net winforms designer in >>> VS2005 or 2008 is great, and can handle your code moving forward). >> >> >> How do you mean "can handle your code forward" ? >> Do you mean like JSynthLib is "stuck" in an old way of coding software ? >> >> > > No, sorry, I was referring to Java IDEs. JSynthlib looked fine to me. > > >> >> Out of curiosity: what is wrong with the initComponent? It's probably >>> called >>> by the constructor, and if not, you can always make it public... >> >> >> Hm, thanks for the tip, I'll investigate it because I didn't know why it >> would be wrong. >> I simply didn't see it used in other editors, and jumped to conclusions >> ... >> (I still have to test my first patchEditor) >> > > Yeah, if I remember correctly, you always put your stuff in an init method > (arbitrary name) because it has to be called after the form has been created > (or some event like that: this is all standard stuff to be copied). > > >> >> >>> That said, if I were to do any Java projects right now, I would take a >>> serious look at whether the UI could be done with QT or something. *Not >>> sure >>> if that would jive with the Swing stuff that JSynth is already using.* >> >> >> Well, that looks interesting, I found this project on Sourceforge: >> QtJava <http://sourceforge.net/projects/qtjava/> but it's like no longer >> supported or developed. >> >> I guess I'm having enough extra work already 'blogging' about writing a >> driver, >> it's probably best if I just do it the traditional JSynthLib way. >> >> BTW, I have some troubles opening the preferences window in JSynthLib, but >> I'll write about that under another subject title, tomorrow, maybe ... >> >> Happy summertime ;-) >> Peter >> > > Cool, enjoy and good luck. > |