You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(11) |
Apr
(1) |
May
|
Jun
|
Jul
(5) |
Aug
(55) |
Sep
(27) |
Oct
(11) |
Nov
(19) |
Dec
(42) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(201) |
Feb
(38) |
Mar
(154) |
Apr
(91) |
May
(157) |
Jun
(42) |
Jul
(149) |
Aug
(179) |
Sep
(212) |
Oct
(92) |
Nov
(7) |
Dec
(22) |
2005 |
Jan
(144) |
Feb
(109) |
Mar
(125) |
Apr
(10) |
May
(18) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(12) |
Nov
|
Dec
|
2006 |
Jan
(3) |
Feb
(17) |
Mar
(19) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2007 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(25) |
Oct
(18) |
Nov
|
Dec
(2) |
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(70) |
Oct
(10) |
Nov
(7) |
Dec
(16) |
2012 |
Jan
(12) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(2) |
Dec
|
2014 |
Jan
(50) |
Feb
(34) |
Mar
(29) |
Apr
(11) |
May
(10) |
Jun
(6) |
Jul
(1) |
Aug
(2) |
Sep
(8) |
Oct
(39) |
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/OberheimMatrix In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/OberheimMatrix Modified Files: OberheimMatrix1000Device.java OberheimMatrix6Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: OberheimMatrix1000Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/OberheimMatrix/OberheimMatrix1000Device.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OberheimMatrix1000Device.java 22 Feb 2002 00:43:54 -0000 1.2 --- OberheimMatrix1000Device.java 7 Aug 2003 22:19:25 -0000 1.3 *************** *** 10,15 **** /** * ! * @author Administrator ! * @version */ public class OberheimMatrix1000Device extends Device --- 10,15 ---- /** * ! * @author ! * @version $Id$ */ public class OberheimMatrix1000Device extends Device *************** *** 24,28 **** synthName="Matrix 1000"; ! inquiryID="F07E**06021006000200*********F7"; addDriver ( new OberheimMatrixBankDriver ()); addDriver ( new OberheimMatrixSingleDriver ()); --- 24,28 ---- synthName="Matrix 1000"; ! inquiryID="F07E**06021006000200********F7"; addDriver ( new OberheimMatrixBankDriver ()); addDriver ( new OberheimMatrixSingleDriver ()); Index: OberheimMatrix6Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/OberheimMatrix/OberheimMatrix6Device.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OberheimMatrix6Device.java 22 Feb 2002 00:43:54 -0000 1.2 --- OberheimMatrix6Device.java 7 Aug 2003 22:19:25 -0000 1.3 *************** *** 11,15 **** * * @author Gerrit Gehnen ! * @version 0.1 */ public class OberheimMatrix6Device extends Device --- 11,15 ---- * * @author Gerrit Gehnen ! * @version $Id$ */ public class OberheimMatrix6Device extends Device *************** *** 22,26 **** modelName="Matrix 6/6R"; synthName="Matrix 6"; ! inquiryID="F07E**06021006000200*********F7"; infoText="JSynthLib supports all librarian and editing functions on both Matrix 6/6r Single Patches, but "+ "does not yet include support for manipulating banks of patches.\n"+ --- 22,26 ---- modelName="Matrix 6/6R"; synthName="Matrix 6"; ! inquiryID="F07E**06021006000200********F7"; infoText="JSynthLib supports all librarian and editing functions on both Matrix 6/6r Single Patches, but "+ "does not yet include support for manipulating banks of patches.\n"+ |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/KawaiK5000 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/KawaiK5000 Modified Files: KawaiK5000Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: KawaiK5000Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/KawaiK5000/KawaiK5000Device.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KawaiK5000Device.java 22 Feb 2002 00:43:54 -0000 1.2 --- KawaiK5000Device.java 7 Aug 2003 22:19:25 -0000 1.3 *************** *** 10,15 **** /** * ! * @author Administrator ! * @version */ public class KawaiK5000Device extends Device --- 10,15 ---- /** * ! * @author ! * @version $Id$ */ public class KawaiK5000Device extends Device *************** *** 22,26 **** modelName="K5000"; synthName="K5k"; ! inquiryID="F07E**06024000000A***********F7"; infoText="These Drivers should work with the Kawai K5000s, K5000r, and K5000w, though note that the 'B' bank PCM "+ "singles on the K5000w are not supported, only the additive type 'A' and 'D' bank type is supported. "+ --- 22,26 ---- modelName="K5000"; synthName="K5k"; ! inquiryID="F07E**06024000000A**********F7"; infoText="These Drivers should work with the Kawai K5000s, K5000r, and K5000w, though note that the 'B' bank PCM "+ "singles on the K5000w are not supported, only the additive type 'A' and 'D' bank type is supported. "+ |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/KorgER1 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/KorgER1 Modified Files: KorgER1Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: KorgER1Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/KorgER1/KorgER1Device.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KorgER1Device.java 2 Feb 2002 22:00:55 -0000 1.1 --- KorgER1Device.java 7 Aug 2003 22:19:25 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- /* + * * KorgER1Device.java * *************** *** 11,15 **** * * @author Gerrit Gehnen ! * @version 0.1 */ public class KorgER1Device extends Device --- 12,16 ---- * * @author Gerrit Gehnen ! * @version $Id$ */ public class KorgER1Device extends Device *************** *** 22,26 **** modelName="Electribe ER1"; synthName="ER1"; ! inquiryID="F07E**06024251***************F7"; addDriver (new KorgER1SingleDriver ()); --- 23,27 ---- modelName="Electribe ER1"; synthName="ER1"; ! inquiryID="F07E**06024251**************F7"; addDriver (new KorgER1SingleDriver ()); |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/NovationNova1 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/NovationNova1 Modified Files: NovationNova1Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: NovationNova1Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/NovationNova1/NovationNova1Device.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NovationNova1Device.java 2 Feb 2002 22:00:55 -0000 1.1 --- NovationNova1Device.java 7 Aug 2003 22:19:25 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- /* + * $Id$ * NovationNovaDevice.java * *************** *** 17,21 **** modelName="Nova1"; synthName="Nova1"; ! inquiryID="F07E**06020020290100210020000000*F7"; addDriver (new NovationNova1BankDriver ()); addDriver (new NovationNova1SingleDriver ()); --- 18,22 ---- modelName="Nova1"; synthName="Nova1"; ! inquiryID="F07E**06020020290100210020000000F7"; addDriver (new NovationNova1BankDriver ()); addDriver (new NovationNova1SingleDriver ()); |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/KawaiK4 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/KawaiK4 Modified Files: KawaiK4Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: KawaiK4Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/KawaiK4/KawaiK4Device.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KawaiK4Device.java 15 Oct 2002 21:14:38 -0000 1.1 --- KawaiK4Device.java 7 Aug 2003 22:19:25 -0000 1.2 *************** *** 16,20 **** /** Creates new K4Device */ public KawaiK4Device() { ! inquiryID="F07E**06024000000400000000000f7"; manufacturerName="Kawai"; modelName="K4/K4R"; --- 16,20 ---- /** Creates new K4Device */ public KawaiK4Device() { ! inquiryID="F07E**0602400000040000000000f7"; manufacturerName="Kawai"; modelName="K4/K4R"; |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/EnsoniqESQ1 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/EnsoniqESQ1 Modified Files: EnsoniqESQ1Device.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: EnsoniqESQ1Device.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/EnsoniqESQ1/EnsoniqESQ1Device.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EnsoniqESQ1Device.java 22 Feb 2002 00:43:54 -0000 1.2 --- EnsoniqESQ1Device.java 7 Aug 2003 22:19:25 -0000 1.3 *************** *** 11,15 **** * * @author Gerrit Gehnen ! * @version 0.1 */ public class EnsoniqESQ1Device extends Device --- 11,15 ---- * * @author Gerrit Gehnen ! * @version $Id$ */ public class EnsoniqESQ1Device extends Device *************** *** 26,30 **** "knows a way around this let me know. The other ESQ librarians I checked out had the same problem, so "+ "it may be impossible"; ! inquiryID="F07E**06020F0200*************F7"; addDriver (new EnsoniqESQ1BankDriver ()); addDriver (new EnsoniqESQ1SingleDriver ()); --- 26,30 ---- "knows a way around this let me know. The other ESQ librarians I checked out had the same problem, so "+ "it may be impossible"; ! inquiryID="F07E**06020F0200************F7"; addDriver (new EnsoniqESQ1BankDriver ()); addDriver (new EnsoniqESQ1SingleDriver ()); |
From: <ge...@us...> - 2003-08-07 22:19:28
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/EnsoniqVFX In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/EnsoniqVFX Modified Files: EnsoniqVFXDevice.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: EnsoniqVFXDevice.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/EnsoniqVFX/EnsoniqVFXDevice.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EnsoniqVFXDevice.java 30 Sep 2002 23:58:42 -0000 1.2 --- EnsoniqVFXDevice.java 7 Aug 2003 22:19:25 -0000 1.3 *************** *** 15,18 **** --- 15,19 ---- * @author Denis Queffeulou mailto:dqu...@fr... * @created 17 septembre 2002 + * @version $Id$ */ public class EnsoniqVFXDevice extends Device |
From: <ge...@us...> - 2003-08-07 22:19:27
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/EmuProteusMPS In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/EmuProteusMPS Modified Files: EmuProteusDevice.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: EmuProteusDevice.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/EmuProteusMPS/EmuProteusDevice.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EmuProteusDevice.java 22 Feb 2002 00:43:54 -0000 1.2 --- EmuProteusDevice.java 7 Aug 2003 22:19:24 -0000 1.3 *************** *** 10,15 **** /** * ! * @author Administrator ! * @version */ public class EmuProteusDevice extends Device --- 10,15 ---- /** * ! * @author ! * @version $Id$ */ public class EmuProteusDevice extends Device *************** *** 22,26 **** modelName="Proteus MPS"; synthName="MPS"; ! inquiryID="F07E**06021804040800*********F7"; infoText="This synthesizer lacks a MIDI addressable patch buffer. Therefore, when you send or play a patch "+ "from within JSynthLib, the patch at location 100 on the Proteus will be overwritten. JSynthLib "+ --- 22,26 ---- modelName="Proteus MPS"; synthName="MPS"; ! inquiryID="F07E**06021804040800********F7"; infoText="This synthesizer lacks a MIDI addressable patch buffer. Therefore, when you send or play a patch "+ "from within JSynthLib, the patch at location 100 on the Proteus will be overwritten. JSynthLib "+ |
From: <ge...@us...> - 2003-08-07 22:19:27
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/BossDR660 In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/synthdrivers/BossDR660 Modified Files: BossDR660Drumkit.new Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: BossDR660Drumkit.new =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/BossDR660/BossDR660Drumkit.new,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsC7ayag and /tmp/cvs2NlVto differ |
From: <ge...@us...> - 2003-08-07 22:19:27
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv19624/JSynthLib/core Modified Files: MidiScan.java Log Message: Fixed the bug in the MidiScanner. No "0" is added before the final 0xf7 byte. Index: MidiScan.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/MidiScan.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MidiScan.java 26 Oct 2002 21:11:33 -0000 1.5 --- MidiScan.java 7 Aug 2003 22:19:24 -0000 1.6 *************** *** 109,113 **** if (((answerData[0]&0xff)==0xf0)&&(answerData[1]==0x7e)&&(answerData[3]==6)&&(answerData[4]==2)) { // check, wether it is really an inquiry response for (int k=1;k<msgsize;k++) { ! if (answerData[k]<16) responseString.append("0"); responseString.append(Integer.toHexString(0xff&answerData[k])); } --- 109,113 ---- if (((answerData[0]&0xff)==0xf0)&&(answerData[1]==0x7e)&&(answerData[3]==6)&&(answerData[4]==2)) { // check, wether it is really an inquiry response for (int k=1;k<msgsize;k++) { ! if ((answerData[k]<16)&&(answerData[k]>=0)) responseString.append("0"); responseString.append(Integer.toHexString(0xff&answerData[k])); } |
From: <ge...@us...> - 2003-07-27 21:46:20
|
Update of /cvsroot/jsynthlib/JSynthLib In directory sc8-pr-cvs1:/tmp/cvs-serv25885/JSynthLib Modified Files: synthdrivers.properties Log Message: Removed the old and wrong "K4" entries. Index: synthdrivers.properties =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** synthdrivers.properties 25 Jul 2003 18:37:17 -0000 1.5 --- synthdrivers.properties 27 Jul 2003 21:46:17 -0000 1.6 *************** *** 3,7 **** deviceClass.PeaveyPC1600=synthdrivers.PeaveyPC1600.PeaveyPC1600Device inquriyID.YamahaDX7s=NONE - manufacturer.K4=Kawai inquriyID.YamahaTX81z=NONE deviceClass.RolandXV5080=synthdrivers.RolandXV5080.RolandXV5080Device --- 3,6 ---- *************** *** 72,78 **** deviceName.RolandXV5080=Roland XV5080 Driver inquriyID.YamahaTX802=NONE - inquriyID.K4=F07E**06024000000400000000000f7 deviceName.AlesisQS=Alesis QS7/QS8/QSR Driver - deviceName.K4=Kawai K4/K4R Driver deviceClass.NordLead=synthdrivers.NordLead.NordLeadDevice deviceName.OberheimMatrix6=Oberheim Matrix 6/6R Driver --- 71,75 ---- *************** *** 119,123 **** deviceClass.AlesisA6=synthdrivers.AlesisA6.AlesisA6Device manufacturer.CasioCZ1000=Casio - deviceClass.K4=synthdrivers.KawaiK4.K4Device deviceName.Generic=Generic Device Driver deviceName.YamahaFS1R=Yamaha FS1R --- 116,119 ---- |
From: <dqu...@us...> - 2003-07-26 07:25:13
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv29526 Modified Files: MacOSXMidiWrapper.java Log Message: Driver update for 10.2, ActionExecutor thread deletion Index: MacOSXMidiWrapper.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/MacOSXMidiWrapper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MacOSXMidiWrapper.java 30 Sep 2002 23:58:42 -0000 1.2 --- MacOSXMidiWrapper.java 25 Jul 2003 18:30:30 -0000 1.3 *************** *** 17,22 **** /** ! * Midi wrapper for MacOS X ! * @author Denis Queffeulou dqu...@fr... */ public class MacOSXMidiWrapper extends MidiWrapper --- 17,23 ---- /** ! * Midi wrapper for MacOS X.2 ! * This version is not X.1 compatible. Get the older version. ! * @author Denis Queffeulou mailto:dqu...@fr... */ public class MacOSXMidiWrapper extends MidiWrapper *************** *** 40,46 **** private Map mReceivedDataMap = new Hashtable(); - /** thread used to call CA api method */ - private ActionExecutor mActionExecutor; - /** when init done... */ private boolean mInitDone = false; --- 41,44 ---- *************** *** 48,57 **** private static boolean mLoadDone = false; - /** object to wait on until current sysex send completes */ - private Object mLockSysexSend = new Object(); - - /** sysex request counter */ - private int mSysexCount = 0; - /** MIDI paquet for channel messages , it seems important for handling the controller device data smoothy to create only one and reuse it --- 46,49 ---- *************** *** 64,72 **** public MacOSXMidiWrapper(int inport, int outport) throws Exception { ! // creates executor thread ! mActionExecutor = new ActionExecutor(); ! mActionExecutor.start(); ! // initialisation ! mActionExecutor.setAction(new Init(inport, outport)); } --- 56,76 ---- public MacOSXMidiWrapper(int inport, int outport) throws Exception { ! mClient = new MIDIClient(new CAFString("JSynthLib"), null); ! if (!mLoadDone) ! { ! loadDevicesNames(); ! mLoadDone = true; ! } ! mInputs = new MIDIInputPort[mNumInputs]; ! ! // device input ! mInputs[inport] = mClient.inputPortCreate(new CAFString(getInputDeviceName(inport)), new ReadProcImpl()); ! MIDIEndpoint oIn = MIDISetup.getSource(inport); ! mInputs[inport].connectSource(oIn); ! ! // device output ! mOutput = mClient.outputPortCreate(new CAFString(getInputDeviceName(outport))); ! ! mInitDone = true; } *************** *** 77,150 **** /** - * Initialization method (in a separate thread) - */ - class Init implements Runnable - { - private int mInportNumber; - private int mOutportNumber; - Init(int inport, int outport) - { - mInportNumber = inport; - mOutportNumber = outport; - } - public void run() - { - try - { - mClient = new MIDIClient(new CAFString("JSynthLib"), null); - if (!mLoadDone) - { - loadDevicesNames(); - mLoadDone = true; - } - mInputs = new MIDIInputPort[mNumInputs]; - - // device input - mInputs[mInportNumber] = mClient.inputPortCreate(new CAFString(getInputDeviceName(mInportNumber)), new ReadProcImpl()); - MIDIEndpoint oIn = MIDISetup.getSource(mInportNumber); - mInputs[mInportNumber].connectSource(oIn); - - // device output - mOutput = mClient.outputPortCreate(new CAFString(getInputDeviceName(mOutportNumber))); - - mInitDone = true; - } - catch(Exception cae) - { - cae.printStackTrace(); - } - } - } - - /** Init for input read proc. Puts MIDIInputPort in mInputs. */ ! class InputInit implements Runnable { ! private int mInportNumber; ! InputInit(int inport) ! { ! mInportNumber = inport; ! } ! public void run() ! { ! try ! { ! // controller device ! mInputs[mInportNumber] = mClient.inputPortCreate(new CAFString(getInputDeviceName(mInportNumber)), new ReadProcImpl()); ! MIDIEndpoint oInContr = MIDISetup.getSource(mInportNumber); ! mInputs[mInportNumber].connectSource(oInContr); ! } ! catch(Exception cae) ! { ! cae.printStackTrace(); ! } ! } } - - //FIXME: Never call this even though its public, I need to call it from prefsDialog - //to work around a JavaMIDI bug though. public void setInputDeviceNum (int port) throws Exception { --- 81,95 ---- /** Init for input read proc. Puts MIDIInputPort in mInputs. */ ! void inputInit(int inport) throws Exception { ! // controller device ! mInputs[inport] = mClient.inputPortCreate(new CAFString(getInputDeviceName(inport)), new ReadProcImpl()); ! MIDIEndpoint oInContr = MIDISetup.getSource(inport); ! mInputs[inport].connectSource(oInContr); } public void setInputDeviceNum (int port) throws Exception { *************** *** 175,245 **** else { ! synchronized(mLockSysexSend) ! { ! try { ! // wait until last sysex completes ! // System.out.println("mSysexCount = "+mSysexCount); ! while(mSysexCount > 0) ! { ! // System.out.println("wait for write"); ! mLockSysexSend.wait(10/*100*/); ! } ! mSysexCount++; ! mActionExecutor.setAction(new WriteLongMessage(port, sysex, length)); ! } ! catch(Exception e) { ! e.printStackTrace(); ! } ! } ! } ! } ! ! ! /** ! * Separate thread is due to bug in Java CoreAudio that throw a IllegalMonitorStateException ! */ ! class WriteLongMessage implements Runnable ! { ! private int mPort; ! private byte[] mSysex; ! private int mLength; ! ! /** ! Send sysex message ! */ ! WriteLongMessage(int aport,byte []asysex,int alength) ! { ! mPort = aport; ! mSysex = asysex; ! mLength = alength; ! } ! public void run() ! { ! try ! { ! // send sysex ! MIDIEndpoint oOut = MIDISetup.getDestination(mPort); // MIDIData oData = MIDIData.newMIDIPacketData(length); ! MIDIData oData = MIDIData.newMIDIRawData(mLength); ! ! /* la fonction a l'air de marcher mais l'objet cree ne doit pas etre correct ! oData.copyFromArray(4, mSysex, 0, mLength); */ ! int oTab[] = new int[mLength]; ! for (int i = 0; i < mLength; i++) ! { ! oTab[i] = (int)mSysex[i]; ! } ! oData.addRawData(oTab); ! MIDISysexSendRequest oSysex = new MIDISysexSendRequest(oOut, oData); ! oSysex.send(MacOSXMidiWrapper.this); ! } ! catch(Exception cae) { ! cae.printStackTrace(); } } } public void writeLongMessage (int port,byte []sysex)throws Exception { --- 120,143 ---- else { ! // send sysex ! MIDIEndpoint oOut = MIDISetup.getDestination(port); // MIDIData oData = MIDIData.newMIDIPacketData(length); ! MIDIData oData = MIDIData.newMIDIRawData(length); ! ! /* la fonction a l'air de marcher mais l'objet cree ne doit pas etre correct ! oData.copyFromArray(4, mSysex, 0, mLength); */ ! int oTab[] = new int[length]; ! for (int i = 0; i < length; i++) { ! oTab[i] = (int)sysex[i]; } + oData.addRawData(oTab); + MIDISysexSendRequest oSysex = new MIDISysexSendRequest(oOut, oData); + oSysex.send(MacOSXMidiWrapper.this); } } + public void writeLongMessage (int port,byte []sysex)throws Exception { *************** *** 250,296 **** public void writeShortMessage (int port, byte b1, byte b2) throws Exception { ! mActionExecutor.setAction(new WriteShortMessage(port, b1, b2, (byte)0)); } ! class WriteShortMessage implements Runnable { ! private int mPort; ! private int mData[] = new int[3]; ! WriteShortMessage (int port,byte b1, byte b2,byte b3) { ! mPort = port; ! mData[0] = (int)b1; ! mData[1] = (int)b2; ! mData[2] = (int)b3; } ! public void run() ! { ! try ! { ! if (mShortMessagePaquetList == null) ! { ! mShortMessagePaquetList = new MIDIPacketList(); ! } ! else ! { // reuse the paquet ! mShortMessagePaquetList.init(); ! } ! MIDIData oData = MIDIData.newMIDIChannelMessage(mData[0], mData[1], mData[2]); ! mShortMessagePaquetList.add(0, oData); ! MIDIEndpoint oOut = MIDISetup.getDestination(mPort); ! mOutput.send(oOut, mShortMessagePaquetList); ! } ! catch(Exception e) ! { ! e.printStackTrace(); ! } } } - public void writeShortMessage (int port,byte b1, byte b2,byte b3) throws Exception - { - // System.out.println("writeShortMessage port = "+port+" b1="+b1+" b2="+b2+" b3= "+b3); - mActionExecutor.setAction(new WriteShortMessage(port, b1, b2, b3)); - } public int getNumInputDevices () throws Exception --- 148,171 ---- public void writeShortMessage (int port, byte b1, byte b2) throws Exception { ! writeShortMessage(port, b1, b2, (byte)0); } ! public void writeShortMessage (int port,byte b1, byte b2,byte b3) throws Exception { ! // System.out.println("writeShortMessage port = "+port+" b1="+b1+" b2="+b2+" b3= "+b3); ! if (mShortMessagePaquetList == null) { ! mShortMessagePaquetList = new MIDIPacketList(); } ! else ! { // reuse the paquet ! mShortMessagePaquetList.init(); } + MIDIData oData = MIDIData.newMIDIChannelMessage(b1, b2, b3); + mShortMessagePaquetList.add(0, oData); + MIDIEndpoint oOut = MIDISetup.getDestination(port); + mOutput.send(oOut, mShortMessagePaquetList); } public int getNumInputDevices () throws Exception *************** *** 298,309 **** if (!mInitDone) { ! mActionExecutor.setAction(new Runnable() ! { public void run() { ! try { ! mNumInputs = MIDISetup.getNumberOfSources(); ! } catch(Exception e) { ! e.printStackTrace(); ! }} ! }); } return mNumInputs; --- 173,177 ---- if (!mInitDone) { ! mNumInputs = MIDISetup.getNumberOfSources(); } return mNumInputs; *************** *** 314,325 **** if (!mInitDone) { ! mActionExecutor.setAction(new Runnable() ! { public void run() { ! try { ! mNumInputs = MIDISetup.getNumberOfDestinations(); ! } catch(Exception e) { ! e.printStackTrace(); ! }} ! }); } return mNumOutputs; --- 182,186 ---- if (!mInitDone) { ! mNumInputs = MIDISetup.getNumberOfDestinations(); } return mNumOutputs; *************** *** 347,351 **** { // creates new input ! mActionExecutor.setAction(new InputInit(port)); } else --- 208,212 ---- { // creates new input ! inputInit(port); } else *************** *** 386,390 **** { // System.out.println("close"); - mActionExecutor.kill(); } --- 247,250 ---- *************** *** 392,434 **** Load devices names into static variables */ ! private static void loadDevicesNames() { int oEntNum = 0; ! try { ! mNumInputs = 0; ! mNumOutputs = 0; ! for (int k = 0; k < MIDIDevice.getNumberOfDevices(); k++) ! { ! MIDIDevice oDev = MIDIDevice.getDevice(k); // String oS2 = oDev.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("device = "+oS2); ! for (int entity = 0; entity < oDev.getNumberOfEntities(); entity++) ! { ! MIDIEntity oEnt = oDev.getEntity(entity); ! String oSEntity = oDev.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("entity = "+oSEntity); ! mNumInputs += oEnt.getNumberOfSources(); ! mNumOutputs += oEnt.getNumberOfDestinations(); ! for (int i = 0; i < oEnt.getNumberOfSources(); i++) ! { ! MIDIEndpoint oIn = oEnt.getSource(i); ! String oSIn = oIn.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("input = "+oSIn); ! mInputNames.add(oSEntity+" "+oSIn); ! } ! for (int i = 0; i < oEnt.getNumberOfDestinations(); i++) ! { ! MIDIEndpoint oIn = oEnt.getDestination(i); ! String oSOut = oIn.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("output = "+oSOut); ! mOutputNames.add(oSEntity+" "+oSOut); ! } } } } - catch (Exception e) - { - e.printStackTrace(); - } } --- 252,288 ---- Load devices names into static variables */ ! private static void loadDevicesNames() throws Exception { int oEntNum = 0; ! mNumInputs = 0; ! mNumOutputs = 0; ! for (int k = 0; k < MIDIDevice.getNumberOfDevices(); k++) ! { ! MIDIDevice oDev = MIDIDevice.getDevice(k); // String oS2 = oDev.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("device = "+oS2); ! for (int entity = 0; entity < oDev.getNumberOfEntities(); entity++) ! { ! MIDIEntity oEnt = oDev.getEntity(entity); ! String oSEntity = oDev.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("entity = "+oSEntity); ! mNumInputs += oEnt.getNumberOfSources(); ! mNumOutputs += oEnt.getNumberOfDestinations(); ! for (int i = 0; i < oEnt.getNumberOfSources(); i++) ! { ! MIDIEndpoint oIn = oEnt.getSource(i); ! String oSIn = oIn.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("input = "+oSIn); ! mInputNames.add(oSEntity+" "+oSIn); ! } ! for (int i = 0; i < oEnt.getNumberOfDestinations(); i++) ! { ! MIDIEndpoint oIn = oEnt.getDestination(i); ! String oSOut = oIn.getStringProperty(MIDIConstants.kMIDIPropertyName).asString(); // System.out.println("output = "+oSOut); ! mOutputNames.add(oSEntity+" "+oSOut); } } } } *************** *** 441,449 **** { // System.out.println("SYSEX sent IN"); - synchronized(mLockSysexSend) - { - mSysexCount--; - mLockSysexSend.notifyAll(); - } // System.out.println("SYSEX sent OUT"); } --- 295,298 ---- *************** *** 488,548 **** } - /** - Thread used to execute action with CA calls - */ - class ActionExecutor extends Thread - { - private List mAction = new Vector(); - private boolean mStop = false; - /** execute the Runnable within the thread */ - synchronized void setAction(Runnable aAction) - { - // System.out.println("setAction "+aAction); - mAction.add(aAction); - notify(); - } - /** stops the thread */ - synchronized void kill() - { - mStop = true; - notify(); - } - /** - loop until action set, then run it. - */ - public void run() - { - // System.out.println("ActionExecutor start"); - while(true) - { - try - { - synchronized(this) - { - // System.out.println("Wait for action "+mAction.size()); - if (mAction.size() == 0) - { - wait(); - } - if (mStop) - { - break; - } - while(mAction.size() > 0) - { - Runnable oRun = (Runnable)mAction.remove(0); - // System.out.println("Run "+oRun); - oRun.run(); - } - } - } - catch(Exception e) - { - e.printStackTrace(); - } - } - // System.out.println("ActionExecutor exit"); - } - } } --- 337,340 ---- |
From: <dqu...@us...> - 2003-07-26 06:20:30
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaFS1R In directory sc8-pr-cvs1:/tmp/cvs-serv29920/YamahaFS1R Log Message: Directory /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaFS1R added to the repository |
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaFS1R In directory sc8-pr-cvs1:/tmp/cvs-serv30293 Added Files: YamahaFS1RDevice.java YamahaFS1RPerformanceDriver.java YamahaFS1RSystemDriver.java YamahaFS1RVoiceDriver.java Log Message: FS1R drivers for basic operation --- NEW FILE: YamahaFS1RDevice.java --- package synthdrivers.YamahaFS1R; import core.*; /** * Yamaha FS1R device. * * @author Denis Queffeulou mailto:dqu...@fr... */ public class YamahaFS1RDevice extends Device { /** * Creates new YamahaFS1RDevice */ public YamahaFS1RDevice() { manufacturerName = "Yamaha"; modelName = "FS1R"; synthName = "FS1R"; // inquiryID = "F07E**06020F05000000000002**F7"; // addDriver(new YamahaFS1RBankDriver()); addDriver(new YamahaFS1RVoiceDriver()); addDriver(new YamahaFS1RPerformanceDriver()); addDriver(new YamahaFS1RSystemDriver()); // addDriver(new YamahaFS1RFseqDriver()); infoText="JSynthLib supports librarian functions on voices/performances patches.\n"; } } --- NEW FILE: YamahaFS1RPerformanceDriver.java --- package synthdrivers.YamahaFS1R; import core.*; import java.io.*; import javax.swing.JInternalFrame; /** * Multi driver for FS1R. Multi are named Performance on FS1R. *@author Denis Queffeulou mailto:dqu...@fr... */ public class YamahaFS1RPerformanceDriver extends Driver { /** size of patch without header */ static final int PATCH_SIZE = 400; /** common + effects parameters size */ static final int COMMON_SIZE = 192; /** effects parameters size */ static final int EFFECTS_SIZE = 112; /** part parmeters */ static final int PART_SIZE = 52; /** start of data in sysex */ static final int DATA_START = 9; /** offset without sysex header */ static final int PATCHNAME_OFFSET = DATA_START; /** number of characters in patch name */ static final int PATCHNAME_SIZE = 12; /** size of header begin + end */ static final int HEADER_SIZE = 11; /** size of all */ static final int PATCH_AND_HEADER_SIZE = PATCH_SIZE+HEADER_SIZE; private static final String mLabels128[] = new String[] { "1","2","3","4","5","6","7", "8","9","10","11","12","13","14","15", "16","17","18","19","20","21","22","23", "24","25","26","27","28","29","30","31", "32","33","34","35","36","37","38","39", "40","41","42","43","44","45","46","47", "48","49","50","51","52","53","54","55", "56","57","58","59","60","61","62","63", "64","65","66","67","68","69","70","71", "72","73","74","75","76","77","78","79", "80","81","82","83","84","85","86","87", "88","89","90","91","92","93","94","95", "96","97","98","99","100","101","102","103", "104","105","106","107", "108","109","110","111","112","113","114","115", "116","117","118","119","120","121","122","123", "124","125","126","127", "128"}; private static final byte mInitPerf[] = new byte[] { (byte)0xF0, 0x43, 0x00, 0x5E, 0x03, 0x10, 0x11, 0x00, 0x2F, 0x49, 0x6E, 0x69, 0x74, 0x50, 0x65, 0x72, 0x66, 0x72, 0x6D, 0x6E, 0x63, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x40, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x11, 0x00, 0x0A, 0x00, 0x09, 0x00, 0x18, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x04, 0x45, 0x0A, 0x40, 0x00, 0x1A, 0x05, 0x0D, 0x03, 0x27, 0x08, 0x27, 0x08, 0x00, 0x4A, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x40, 0x00, 0x2E, 0x00, 0x40, 0x00, 0x40, 0x00, 0x22, 0x00, 0x40, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x34, 0x00, 0x32, 0x00, 0x40, 0x00, 0x40, 0x00, 0x16, 0x00, 0x40, 0x00, 0x30, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x40, 0x14, 0x40, 0x40, 0x40, 0x15, 0x40, 0x28, 0x00, 0x7F, 0x40, 0x0C, 0x07, 0x00, 0x40, 0x22, 0x07, 0x40, 0x36, 0x07, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x18, 0x40, 0x40, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x7F, 0x00, 0x28, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x32, 0x42, 0x3E, 0x32, 0x00, 0x01, 0x7F, 0x00, 0x01, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x11, 0x7F, 0x01, 0x00, 0x00, 0x18, 0x40, 0x40, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x7F, 0x00, 0x28, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x32, 0x42, 0x3E, 0x32, 0x00, 0x01, 0x7F, 0x00, 0x01, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x11, 0x7F, 0x01, 0x00, 0x00, 0x18, 0x40, 0x40, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x7F, 0x00, 0x28, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x32, 0x42, 0x3E, 0x32, 0x00, 0x01, 0x7F, 0x00, 0x01, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x11, 0x7F, 0x01, 0x00, 0x00, 0x18, 0x40, 0x40, 0x7F, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x7F, 0x00, 0x28, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x02, 0x32, 0x42, 0x3E, 0x32, 0x00, 0x01, 0x7F, 0x00, 0x01, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x76, (byte)0xF7 }; private int mCurrentBankNum; private static YamahaFS1RPerformanceDriver mSingleton; /** * Constructor for the YamahaFS1RPerformanceDriver object */ public YamahaFS1RPerformanceDriver() { manufacturer = "Yamaha"; model = "FS1R"; patchType = "Performance"; id = "FS1R"; authors="Denis Queffeulou"; sysexID = "F043005E03101*00"; patchSize = PATCH_AND_HEADER_SIZE; patchNameStart = PATCHNAME_OFFSET; patchNameSize = PATCHNAME_SIZE; deviceIDoffset = -1; checksumStart = 4; checksumEnd = PATCH_AND_HEADER_SIZE - 3; checksumOffset = PATCH_AND_HEADER_SIZE - 2; sysexRequestDump=new SysexHandler("F0 43 20 5E 11 00 *patchNum* F7"); bankNumbers = new String[]{"Internal", "Current performance"}; patchNumbers = mLabels128; mSingleton = this; } public static YamahaFS1RPerformanceDriver getInstance() { return mSingleton; } public void setBankNum (int bankNum) { mCurrentBankNum = bankNum; // System.out.println("setBankNum = "+ bankNum); updateSysexRequest(); } public void setPatchNum (int patchNum) { // il ne faut pas envoyer de prog change } public void sendPatch(Patch p) { super.sendPatch(p); } /** Met a jour la requete selon le type de banque. */ private void updateSysexRequest() { if (mCurrentBankNum == 1) { // current sysexRequestDump.setSysex("F0 43 20 5E 10 00 00 F7"); } else { // internal sysexRequestDump.setSysex("F0 43 20 5E 11 00 *patchNum* F7"); } } /**Sends a patch to a set location on a synth.*/ public void storePatch (Patch p, int bankNum,int patchNum) { // change the address to internal performance p.sysex[6] = (byte)0x11; p.sysex[7] = (byte)0; p.sysex[8] = (byte)patchNum; calculateChecksum(p); sendPatch (p); } /** @param p a bank patch @param aPatchOffset offset of performance in patch sysex */ String getPatchName(Patch p, int aPatchOffset) { if (patchNameSize==0) return ("-"); try { String s = new String (p.sysex, aPatchOffset+patchNameStart, patchNameSize, "US-ASCII"); return s; } catch (UnsupportedEncodingException ex) {return "-";} } /** @param p a bank patch @param aPatchOffset offset of performance in patch sysex */ public void setPatchName (Patch p, String name, int aPatchOffset) { if (name.length ()<patchNameSize) name=name+" "; byte [] namebytes = new byte [64]; try { namebytes=name.getBytes ("US-ASCII"); for (int i=0;i<patchNameSize;i++) p.sysex[aPatchOffset+patchNameStart+i]=namebytes[i]; } catch (UnsupportedEncodingException ex) {return;} } /** * Description of the Method * *@return Description of the Return Value */ public Patch createNewPatch() { byte[] sysex = new byte[PATCH_AND_HEADER_SIZE]; initPatch(sysex, 0); Patch oPatch = new Patch(sysex); oPatch.ChooseDriver(); return oPatch; } static void initPatch(byte[] sysex, int aOffset) { for (int i = 0; i < PATCH_AND_HEADER_SIZE; i++) { sysex[aOffset+i] = mInitPerf[i]; } } /** * Return editor window for performance * *@param p data of the performance *@return Description of the Return Value */ public JInternalFrame editPatch(Patch p) { // set the address to "current performance" so when patch is sent // the FS1R display show this "in edit" performance whenever it comes from. /* p.sysex[6] = (byte)0x10; p.sysex[7] = (byte)0; p.sysex[8] = (byte)0; calculateChecksum(p); return new YamahaFS1RPerformanceEditor(p); */ return null; } static class Sender extends SysexSender { protected int parameter; protected byte []b = new byte [10]; protected int mPart = 0; /** Common parameter */ Sender(int param) { parameter=param; b[0]=(byte)0xF0; b[1]=(byte)0x43; b[2]=(byte)0x10; b[3]=(byte)0x5E; b[4]= (byte)(0x10); b[5]=(byte)((parameter >> 8) & 0x7F); b[6]=(byte)(parameter & 0x7F); b[9]=(byte)0xF7; } /** Part parameter @param aPart number 1..4 */ Sender(int param, int aPart) { this(param); b[4]= (byte)(0x30 + aPart -1); b[5]= 0; mPart = aPart; } public byte [] generate (int value) { b[7]=(byte)((value >> 7)&127); b[8]=(byte)(value&127); return b; } } static class Model extends ParamModel { protected int mPart = 0; /** * Parametre common @param offset dans la table (7bits MSB + 7bits LSB) */ Model(Patch p,int offset) { // l'offset indique dans la doc ne correspond pas a un offset lineaire // dans le sysex, il faut recalculer la valeur sur 16bits lineaires super(p, (offset & 127) + ((offset >> 1) & 0x3F80) + DATA_START); //System.out.println("offset "+offset+" => "+((offset & 127) + ((offset >> 1) & 0x3F80) + DATA_START)); } /** * Parametre de part @param offset dans la table @param aPart part number 1..4 */ Model(Patch p,int offset, int aPart) { this(p, offset); mPart = aPart; if (aPart > 0) { ofs = COMMON_SIZE + PART_SIZE*(mPart-1) + offset + DATA_START; } } public void set(int i) { // TODO 16 bits //System.out.println("set "+ofs+" = "+i); patch.sysex[ofs] = (byte)(i & 127); } public int get() { // TODO 16 bits //System.out.println("get "+ofs+" = "+patch.sysex[ofs]); return patch.sysex[ofs]; } } static class BitModel extends Model { private int mMask; private int mShift; /** Peut servir pour common ou part selon le decalage et le numero de part (0 pour common). @param aPart part number 0,1..4 @param offset decalage soit sur common soit sur part */ BitModel(Patch p,int offset, int aPart, int aMask, int aShift) { super(p, offset, aPart); mMask = aMask; mShift = aShift; if (aPart > 0) { ofs = COMMON_SIZE+PART_SIZE*(mPart-1) + offset + DATA_START; } } public void set(int i) { patch.sysex[ofs] &= ~mMask; patch.sysex[ofs] |= (i << mShift); } public int get() { return (patch.sysex[ofs] & mMask) >> mShift; } } static class BitSender extends Sender { private Patch mPatch; /** Common parameter */ BitSender(Patch aPatch, int param) { super(param); mPatch = aPatch; } /** Part parameter @param aPart number 1..4 */ BitSender(Patch aPatch, int param, int aPart) { super(param, aPart); mPatch = aPatch; } public byte [] generate (int value) { // on recupere la valeur directement dans le patch // DATA_START est le decalage de l'entete sysex int oValue = mPatch.sysex[parameter + DATA_START]; if (mPart > 0) { oValue = mPatch.sysex[COMMON_SIZE + PART_SIZE*(mPart-1) + parameter + DATA_START]; } b[7]=0; b[8]=(byte)(oValue&127); return b; } } } --- NEW FILE: YamahaFS1RSystemDriver.java --- package synthdrivers.YamahaFS1R; import core.*; import java.io.*; import javax.swing.JInternalFrame; /** * System parameters driver for Yamaha FS1R. * *@author Denis Queffeulou mailto:dqu...@fr... */ public class YamahaFS1RSystemDriver extends Driver { /** size of patch without header */ static final int PATCH_SIZE = 76; /** size of header begin + end */ static final int HEADER_SIZE = 11; static final int DATA_OFFSET = 9; /** size of all */ static final int PATCH_AND_HEADER_SIZE = PATCH_SIZE+HEADER_SIZE; /** * Constructor for the YamahaFS1RSystemDriver object */ public YamahaFS1RSystemDriver() { manufacturer = "Yamaha"; model = "FS1R"; patchType = "System"; id = "FS1R"; authors="Denis Queffeulou"; sysexID = "F043005E004C"; // inquiryID="F07E**06020F0200*************F7"; patchSize = PATCH_AND_HEADER_SIZE; patchNameSize = 0; deviceIDoffset = 2; checksumStart = 4; checksumEnd = PATCH_AND_HEADER_SIZE - 3; checksumOffset = PATCH_AND_HEADER_SIZE - 2; sysexRequestDump=new SysexHandler("F0 43 20 5E 00 00 00 F7"); } /** * Description of the Method * *@return Description of the Return Value */ public Patch createNewPatch() { return newPatch(); } /** Patch factory, static because no context is needed. */ static Patch newPatch() { byte[] sysex = new byte[PATCH_AND_HEADER_SIZE]; sysex[0] = (byte) 0xF0; sysex[1] = (byte) 0x43; sysex[2] = (byte) 0x00; sysex[3] = (byte) 0x5E; sysex[4] = (byte) (PATCH_AND_HEADER_SIZE / 256); sysex[5] = (byte) (PATCH_AND_HEADER_SIZE % 256); sysex[6] = (byte) 0x00; sysex[7] = (byte) 0x00; sysex[8] = (byte) 0x00; sysex[PATCH_AND_HEADER_SIZE-1] = (byte) 0xF7; Patch oPatch = new Patch(sysex); oPatch.ChooseDriver(); return oPatch; } /** * Create individual patch from the sysex. * * @param aOffset offset in the sysex * @return the patch */ static Patch newPatch(byte aSysex[], int aOffset) { Patch oNewPatch = newPatch(); System.arraycopy(aSysex, aOffset, oNewPatch.sysex, HEADER_SIZE-1, PATCH_SIZE); return oNewPatch; } /** * Description of the Method * *@param p Description of the Parameter *@return Description of the Return Value */ public JInternalFrame editPatch(Patch p) { /* return new YamahaFS1RSystemEditor(p); */ return null; } } --- NEW FILE: YamahaFS1RVoiceDriver.java --- package synthdrivers.YamahaFS1R; import core.*; import javax.swing.*; import java.io.*; /** * Single driver for Yamaha FS1R voices. * *@author Denis Queffeulou mailto:dqu...@fr... */ public class YamahaFS1RVoiceDriver extends Driver { /** size of patch without header */ static final int PATCH_SIZE = 608; /** offset without sysex header */ static final int PATCHNAME_OFFSET = 9; /** number of characters in patch name */ static final int PATCHNAME_SIZE = 10; /** size of header begin + end */ static final int HEADER_SIZE = 11; static final int COMMON_SIZE = 112; static final int VOICE_SIZE = 62; static final int INTERNAL_PATCHNUM_OFFSET = 8; static final int BANK_NUM_INTERNAL = 0; static final int BANK_NUM_PERFORMANCE = 1; private int mCurrentBankNum; private int mCurrentPatchNum; private static final byte[] mInitVoice = new byte[] { (byte)0xF0,0x43,0x00,0x5E,0x04,0x60,0x41,0x00,0x00,0x49,0x6E,0x69,0x74,0x20,0x56,0x6F, 0x69,0x63,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x18,0x32,0x32,0x32,0x32,0x14,0x14,0x14,0x14, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01, 0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40, 0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x24,0x07, 0x55,0x07,0x00,0x00,0x45,0x3C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x32,0x64, 0x4B,0x4B,0x1E,0x1E,0x1E,0x63,0x00,0x00,0x00,0x18,0x01,0x00,0x00,0x38,0x00,0x14, 0x0F,0x32,0x32,0x14,0x14,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x63, 0x27,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x07,0x18,0x0E,0x00,0x00, 0x14,0x07,0x00,0x32,0x32,0x14,0x14,0x00,0x07,0x63,0x63,0x63,0x00,0x00,0x14,0x14, 0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x18,0x01,0x00,0x00,0x38,0x01,0x14,0x0F,0x32, 0x32,0x14,0x14,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x00,0x27,0x00, 0x00,0x03,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x07,0x18,0x0F,0x00,0x00,0x14,0x07, 0x00,0x32,0x32,0x14,0x14,0x00,0x07,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00, 0x00,0x07,0x07,0x07,0x07,0x18,0x01,0x00,0x00,0x38,0x02,0x14,0x0F,0x32,0x32,0x14, 0x14,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x03, 0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x07,0x18,0x0F,0x4B,0x00,0x14,0x07,0x00,0x32, 0x32,0x14,0x14,0x00,0x07,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x07, 0x07,0x07,0x07,0x18,0x01,0x00,0x00,0x38,0x03,0x14,0x0F,0x32,0x32,0x14,0x14,0x63, 0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x03,0x00,0x00, 0x00,0x00,0x38,0x07,0x07,0x07,0x18,0x10,0x00,0x00,0x14,0x07,0x00,0x32,0x32,0x14, 0x14,0x00,0x07,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x07,0x07,0x07, 0x07,0x18,0x01,0x00,0x00,0x38,0x04,0x14,0x0F,0x32,0x32,0x14,0x14,0x63,0x63,0x63, 0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x03,0x00,0x00,0x00,0x00, 0x38,0x07,0x07,0x07,0x18,0x10,0x2A,0x00,0x14,0x07,0x00,0x32,0x32,0x14,0x14,0x00, 0x07,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x18, 0x01,0x00,0x00,0x38,0x05,0x14,0x0F,0x32,0x32,0x14,0x14,0x63,0x63,0x63,0x00,0x00, 0x14,0x14,0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x38,0x07, 0x07,0x07,0x18,0x10,0x4B,0x00,0x14,0x07,0x00,0x32,0x32,0x14,0x14,0x00,0x07,0x63, 0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x18,0x01,0x00, 0x00,0x38,0x06,0x14,0x0F,0x32,0x32,0x14,0x14,0x63,0x63,0x63,0x00,0x00,0x14,0x14, 0x00,0x00,0x00,0x00,0x27,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x07, 0x18,0x10,0x68,0x00,0x14,0x07,0x00,0x32,0x32,0x14,0x14,0x00,0x07,0x63,0x63,0x63, 0x00,0x00,0x14,0x14,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x18,0x01,0x00,0x00,0x38, 0x07,0x14,0x0F,0x32,0x32,0x14,0x14,0x63,0x63,0x63,0x00,0x00,0x14,0x14,0x00,0x00, 0x00,0x00,0x27,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x38,0x07,0x07,0x07,0x18,0x11, 0x00,0x00,0x14,0x07,0x00,0x32,0x32,0x14,0x14,0x00,0x07,0x63,0x63,0x63,0x00,0x00, 0x14,0x14,0x00,0x00,0x00,0x07,0x07,0x07,0x07,0x6B,(byte)0xF7 }; private static String mVoicesLabels128[] = new String[] { "1","2","3","4","5","6","7", "8","9","10","11","12","13","14","15", "16","17","18","19","20","21","22","23", "24","25","26","27","28","29","30","31", "32","33","34","35","36","37","38","39", "40","41","42","43","44","45","46","47", "48","49","50","51","52","53","54","55", "56","57","58","59","60","61","62","63", "64","65","66","67","68","69","70","71", "72","73","74","75","76","77","78","79", "80","81","82","83","84","85","86","87", "88","89","90","91","92","93","94","95", "96","97","98","99","100","101","102","103", "104","105","106","107", "108","109","110","111","112","113","114","115", "116","117","118","119","120","121","122","123", "124","125","126","127", "128"}; /** size of all */ static final int PATCH_AND_HEADER_SIZE = PATCH_SIZE+HEADER_SIZE; private static YamahaFS1RVoiceDriver mSingleton; /** * Constructor for the YamahaFS1RSingleDriver object */ public YamahaFS1RVoiceDriver() { mSingleton = this; manufacturer = "Yamaha"; model = "FS1R"; patchType = "Voice"; id = "FS1R"; authors="Denis Queffeulou"; sysexID = "F043005E0460**00"; // inquiryID="F07E**06020F0200*************F7"; patchSize = PATCH_AND_HEADER_SIZE; patchNameStart = PATCHNAME_OFFSET; patchNameSize = PATCHNAME_SIZE; // deviceIDoffset est l'emplacement du canal midi si besoin deviceIDoffset = -1; checksumStart = 4; checksumEnd = PATCH_AND_HEADER_SIZE - 3; checksumOffset = PATCH_AND_HEADER_SIZE - 2; sysexRequestDump=new SysexHandler("F0 43 20 5E 51 00 *patchNum* F7"); bankNumbers = new String[]{"Internal", "Current performance voices (1..4)"}; patchNumbers = mVoicesLabels128; } public static YamahaFS1RVoiceDriver getInstance() { return mSingleton; } public void setBankNum (int bankNum) { mCurrentBankNum = bankNum; // System.out.println("setBankNum = "+ bankNum); updateSysexRequest(); } public void setPatchNum (int patchNum) { mCurrentPatchNum = patchNum; if (mCurrentBankNum == BANK_NUM_PERFORMANCE) { if (mCurrentPatchNum > 3) { mCurrentPatchNum = 3; } } // System.out.println("setPatchNum = "+patchNum); updateSysexRequest(); } /** Send a voice in current performance part. @param aPart 1..4 */ public void sendPatch (Patch p, int aPart) { p.sysex[6] = (byte)(0x40 + aPart - 1); p.sysex[7] = (byte)0; p.sysex[8] = (byte)0; calculateChecksum(p); sendPatch (p); } /**Sends a patch to a set location on a synth.*/ public void storePatch (Patch p, int bankNum,int patchNum) { // change the address to internal voice p.sysex[6] = (byte)0x51; p.sysex[7] = (byte)0; p.sysex[8] = (byte)patchNum; calculateChecksum(p); sendPatch (p); } /** Met a jour la requete selon le type de banque. */ private void updateSysexRequest() { if (mCurrentBankNum == BANK_NUM_PERFORMANCE) { sysexRequestDump.setSysex("F0 43 20 5E 4"+mCurrentPatchNum+" 00 00 F7"); } else { sysexRequestDump.setSysex("F0 43 20 5E 51 00 *patchNum* F7"); } } /** @param p a bank patch @param aPatchOffset offset of voice in patch sysex */ String getPatchName(Patch p, int aPatchOffset) { if (patchNameSize==0) return ("-"); try { String s = new String (p.sysex, aPatchOffset+patchNameStart, patchNameSize, "US-ASCII"); return s; } catch (UnsupportedEncodingException ex) {return "-";} } /** @param p a bank patch @param aPatchOffset offset of voice in patch sysex */ public void setPatchName (Patch p, String name, int aPatchOffset) { if (name.length ()<patchNameSize) name=name+" "; byte [] namebytes = new byte [64]; try { namebytes=name.getBytes ("US-ASCII"); for (int i=0;i<patchNameSize;i++) p.sysex[aPatchOffset+patchNameStart+i]=namebytes[i]; } catch (UnsupportedEncodingException ex) {return;} } /** * Description of the Method * *@return an Init Voice copy */ public Patch createNewPatch() { byte[] sysex = new byte[PATCH_AND_HEADER_SIZE]; initPatch(sysex, 0); Patch oPatch = new Patch(sysex); oPatch.ChooseDriver(); return oPatch; } static void initPatch(byte[] sysex, int aOffset) { for (int i = 0; i < PATCH_AND_HEADER_SIZE; i++) { sysex[aOffset+i] = mInitVoice[i]; } } /** * Return voice editor window. * *@param p Description of the Parameter *@return Description of the Return Value */ public JInternalFrame editPatch(Patch p) { /* return new YamahaFS1RVoiceEditor(p); */ return null; } /** @param aPart part number in performance */ public JInternalFrame editPatch(Patch p, int aPart) { /* return new YamahaFS1RVoiceEditor(p, aPart); */ return null; } } |
From: <dqu...@us...> - 2003-07-26 04:28:55
|
Update of /cvsroot/jsynthlib/JSynthLib In directory sc8-pr-cvs1:/tmp/cvs-serv30424 Modified Files: synthdrivers.properties Log Message: YamahaFS1R drivers added Index: synthdrivers.properties =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** synthdrivers.properties 2 Mar 2003 22:04:00 -0000 1.4 --- synthdrivers.properties 25 Jul 2003 18:37:17 -0000 1.5 *************** *** 121,122 **** --- 121,126 ---- deviceClass.K4=synthdrivers.KawaiK4.K4Device deviceName.Generic=Generic Device Driver + deviceName.YamahaFS1R=Yamaha FS1R + deviceClass.YamahaFS1R=synthdrivers.YamahaFS1R.YamahaFS1RDevice + inquriyID.YamahaFS1R=NONE + manufacturer.YamahaFS1R=Yamaha |
From: <ge...@us...> - 2003-04-10 20:37:14
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv32625 Modified Files: PatchEdit.java PrefsDialog.java Added Files: JavasoundMidiWrapper.java Log Message: Added MidiWrapper for the SUN JavaSound API. Minimum requirement is JDK1.4.2beta!!!!! --- NEW FILE: JavasoundMidiWrapper.java --- // This is a MidiWrapper for the generic Javasound API // Danger, to use it you need JDK1.4.2beta at least..... /** * * @author Gerrit Gehnen * @version $Id: JavasoundMidiWrapper.java,v 1.1 2003/04/10 20:37:08 gehnen Exp $ */ package core; import javax.sound.midi.*; import java.util.*; public class JavasoundMidiWrapper extends MidiWrapper implements Receiver { int currentOutport; int currentInport; int faderPort; MidiDevice.Info[] mdi; Vector sourceInfoVector; Vector destinationInfoVector; MidiDevice sourceDevice; MidiDevice destinationDevice; Transmitter input=null; Transmitter fader=null; Receiver output=null; MidiDevice md; List list = Collections.synchronizedList(new LinkedList()); public JavasoundMidiWrapper(int inport, int outport) throws Exception { currentInport=inport; currentOutport=outport; faderPort=PatchEdit.appConfig.getFaderPort(); sourceInfoVector=new Vector(); destinationInfoVector=new Vector(); mdi=MidiSystem.getMidiDeviceInfo(); for (int i=0;i<mdi.length;i++) { try { md=MidiSystem.getMidiDevice(mdi[i]); md.open(); // This can really throw an MidiUnavailableException on my System if (md.getMaxReceivers()!=0) { //System.out.println("is possible Destination"); destinationInfoVector.add(mdi[i]); } if (md.getMaxTransmitters()!=0) { //System.out.println("is possible Source"); sourceInfoVector.add(mdi[i]); } } catch (MidiUnavailableException e) {} // Ignore, can happen..... catch (Exception e) { e.printStackTrace(); } } MidiDevice destDevice=MidiSystem.getMidiDevice((MidiDevice.Info)destinationInfoVector.get(outport)); //destDevice.open(); output=destDevice.getReceiver(); MidiDevice sourceDevice=MidiSystem.getMidiDevice((MidiDevice.Info)sourceInfoVector.get(inport)); //sourceDevice.open(); input=sourceDevice.getTransmitter(); input.setReceiver(this); if (faderPort!=inport) { sourceDevice=MidiSystem.getMidiDevice((MidiDevice.Info)sourceInfoVector.get(faderPort)); fader=sourceDevice.getTransmitter(); fader.setReceiver(this); } } public JavasoundMidiWrapper() throws Exception { this(0,0); } //this gets called whenever a midimessage arrives at input public void send(MidiMessage msg,long l) { int dummy; dummy=msg.getStatus(); if (msg instanceof ShortMessage) { //System.out.println("Status: "+((ShortMessage)msg).getStatus()); // Filter out Active Sensing if (((ShortMessage)msg).getStatus()==ShortMessage.ACTIVE_SENSING) return; } //System.out.println("JavasoundMidiWrapper:Got Message length "+msg.getLength()+" Status "+dummy); if (msg instanceof SysexMessage) { System.out.println("SYSEX: Status: "+msg.getStatus()+" Last Byte "+msg.getMessage()[msg.getMessage().length-1]); } list.add(msg); } public void close() { if (input!=null) {input.setReceiver(null); /*input.close();*/} if (fader!=null) {fader.setReceiver(null);/* fader.close();*/} /* if (output!=null) { output.close();}*/ for (int i=0;i<mdi.length;i++) { md.close(); } } public void finalize() { close(); } protected void setInputDeviceNum(int port)throws Exception { try { if ((port==PatchEdit.appConfig.getFaderPort()) && (fader!=null)) { MidiDevice srcDevice=MidiSystem.getMidiDevice((MidiDevice.Info)sourceInfoVector.get(port)); fader=srcDevice.getTransmitter(); return; }; if (currentInport!=port) { input.setReceiver(null); // input.close (); MidiDevice srcDevice=MidiSystem.getMidiDevice((MidiDevice.Info)sourceInfoVector.get(port)); // srcDevice.open(); input=srcDevice.getTransmitter(); input.setReceiver(this); } currentInport=port; } catch (Exception e) { e.printStackTrace(); ErrorMsg.reportError("Error","Wire MIDI is flipping out.",e);} } protected void setOutputDeviceNum(int port)throws Exception { if (currentOutport!=port) { //output.close (); MidiDevice destDevice=MidiSystem.getMidiDevice((MidiDevice.Info)destinationInfoVector.get(port)); output=destDevice.getReceiver(); if (destDevice.isOpen()) destDevice.open(); System.out.println("Outport: "+destDevice.getDeviceInfo().getName()+" is Open: "+destDevice.isOpen()); } currentOutport=port; } public void writeLongMessage(int port,byte []sysex)throws Exception { writeLongMessage(port,sysex,sysex.length); } public void writeLongMessage(int port,byte []sysex,int size)throws Exception { //System.out.println("JavaSoundMapper:Writing to port "+port); setOutputDeviceNum(port); byte [] tmpArray=new byte[255]; if (size==2) { writeShortMessage(port,sysex[0],sysex[1]); return; } if (size==3) { writeShortMessage(port,sysex[0],sysex[1],sysex[2]); return; } SysexMessage msg = new SysexMessage(); //msg.setMessage(sysex,size); for (int i=0 ;i<sysex.length;i+=250) { if (i==0) { if (((i+250))<sysex.length) { System.arraycopy(sysex,i,tmpArray,0,250); } else { System.arraycopy(sysex,i,tmpArray,0,(sysex.length%250)); } if (((i+250))<sysex.length) msg.setMessage(tmpArray,250); else msg.setMessage(tmpArray,sysex.length%250); } else { if (((i+250))<sysex.length) { tmpArray[0]=(byte)0xF7;System.arraycopy(sysex,i,tmpArray,1,250); } else { tmpArray[0]=(byte)0xF7;System.arraycopy(sysex,i,tmpArray,1,sysex.length%250); } if (((i+250))<sysex.length) msg.setMessage(tmpArray,251); else msg.setMessage(tmpArray,(sysex.length%250)+1); } logMidi(port,false,sysex,size); output.send(msg,-1); } } public void writeShortMessage(int port, byte b1, byte b2)throws Exception { writeShortMessage(port,b1,b2,(byte)0); } public void writeShortMessage(int port,byte b1, byte b2,byte b3)throws Exception { setOutputDeviceNum(port); ShortMessage msg=new ShortMessage(); msg.setMessage((int)b1,(int)b2,(int)b3); output.send(msg,-1); } public int getNumInputDevices()throws Exception { return sourceInfoVector.size(); } public int getNumOutputDevices()throws Exception { return destinationInfoVector.size(); } public String getInputDeviceName(int port)throws Exception { return ((MidiDevice.Info)(sourceInfoVector.get(port))).getName(); } public String getOutputDeviceName(int port)throws Exception { return ((MidiDevice.Info)(destinationInfoVector.get(port))).getName(); } public int messagesWaiting(int port)throws Exception { setInputDeviceNum(port); return list.size(); } public int readMessage(int port,byte []sysex,int maxSize)throws Exception { setInputDeviceNum(port); MidiMessage msg = (MidiMessage) list.get(0); list.remove(0); //System.out.println("MidiMessagelength:"+msg.getLength()); //System.out.println("MidiMessage: "+msg.getMessage()[0]); if (msg.getMessage()[0]==-9) { System.arraycopy(msg.getMessage(),1,sysex,0,msg.getLength()-1); logMidi(port,true,sysex,msg.getLength()-1); return msg.getLength()-1; } System.arraycopy(msg.getMessage(),0,sysex,0,msg.getLength()); logMidi(port,true,sysex,msg.getLength()); return msg.getLength(); } } Index: PatchEdit.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/PatchEdit.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PatchEdit.java 27 Mar 2003 20:45:53 -0000 1.14 --- PatchEdit.java 10 Apr 2003 20:37:09 -0000 1.15 *************** *** 538,541 **** --- 538,542 ---- case 3: MidiOut=new LinuxMidiWrapper (appConfig.getInitPortIn(),appConfig.getInitPortOut()); break; case 4: MidiOut=new MacOSXMidiWrapper (appConfig.getInitPortIn(),appConfig.getInitPortOut()); break; + case 5: MidiOut=new JavasoundMidiWrapper (appConfig.getInitPortIn(),appConfig.getInitPortOut()); break; } MidiIn=MidiOut; Index: PrefsDialog.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/PrefsDialog.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PrefsDialog.java 6 Oct 2002 22:18:05 -0000 1.7 --- PrefsDialog.java 10 Apr 2003 20:37:09 -0000 1.8 *************** *** 1,2 **** --- 1,5 ---- + /** + * @version $Id$ + */ package core; import jmidi.*; *************** *** 199,202 **** --- 202,206 ---- cbPlatform.addItem ("GNU/Linux (/dev/*)"); cbPlatform.addItem ("MacOS X"); + cbPlatform.addItem ("JavaSound (for JDK1.4.2)"); cbPlatform.addItemListener (new ItemListener () { |
From: <ge...@us...> - 2003-03-27 20:52:50
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv30975 Removed Files: Performance.java PerformanceFrame.java PerformanceListModel.java PerformanceTableCellEditor.java Log Message: Refactoring Performance->Scene --- Performance.java DELETED --- --- PerformanceFrame.java DELETED --- --- PerformanceListModel.java DELETED --- --- PerformanceTableCellEditor.java DELETED --- |
From: <ge...@us...> - 2003-03-27 20:46:04
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv28090 Modified Files: AbstractLibraryFrame.java AbstractPatchListModel.java PatchEdit.java SearchDialog.java Added Files: Scene.java SceneFrame.java SceneListModel.java SceneTableCellEditor.java Log Message: Refactorting Performance->Scene --- NEW FILE: Scene.java --- /* * Scene.java * * Created on 18. April 2002, 20:51 * * Refactored from Performance.java */ package core; import java.io.*; import java.awt.datatransfer.*; import javax.swing.JComboBox; /** * @version $Id: Scene.java,v 1.1 2003/03/27 20:45:55 gehnen Exp $ * @author Gerrit Gehnen */ public class Scene extends java.lang.Object implements Serializable, Transferable { private Patch patch; private int bankNumber; private int patchNumber; private StringBuffer comment; /** Creates a new instance of Scene */ public Scene() { patch=new Patch(); bankNumber=0; patchNumber=0; comment=new StringBuffer(); } public Scene(Patch p) { patch=p; bankNumber=0; patchNumber=0; comment=p.comment; } /** Getter for property bankNumber. * @return Value of property bankNumber. */ public int getBankNumber() { return bankNumber; } /** Setter for property bankNumber. * @param bankNumber New value of property bankNumber. */ public void setBankNumber(int bankNumber) { this.bankNumber = bankNumber; } /** Getter for property patchNumber. * @return Value of property patchNumber. */ public int getPatchNumber() { return patchNumber; } /** Setter for property patchNumber. * @param patchNumber New value of property patchNumber. */ public void setPatchNumber(int patchNumber) { this.patchNumber = patchNumber; } /** Getter for property patch. * @return Value of property patch. */ public core.Patch getPatch() { return patch; } /** Setter for property patch. * @param patch New value of property patch. */ public void setPatch(core.Patch patch) { this.patch = patch; } public Object getTransferData(java.awt.datatransfer.DataFlavor dataFlavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException { return this; } public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors() { System.out.println("getTransferDataFlavors "+patch.driverNum); DataFlavor[] df=new DataFlavor[1]; df[0]= new DataFlavor(patch.getDriver().getClass(),patch.getDriver().toString()); return df; } public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor dataFlavor) { System.out.println("isDataFlavorSupported "+patch.driverNum); if( dataFlavor.equals(new DataFlavor(patch.getDriver().getClass(),patch.getDriver().toString()))) { return true; } return false; } /** Getter for property comment. * @return Value of property comment. */ public java.lang.StringBuffer getComment() { return comment; } /** Setter for property comment. * @param comment New value of property comment. */ public void setComment(java.lang.StringBuffer comment) { this.comment = comment; } } --- NEW FILE: SceneFrame.java --- package core; import java.awt.event.MouseEvent; import javax.swing.JOptionPane; import java.io.File; import javax.swing.event.InternalFrameEvent; /** * * @author Gerrit Gehnen * @version $Id: SceneFrame.java,v 1.1 2003/03/27 20:45:55 gehnen Exp $ */ public class SceneFrame extends javax.swing.JInternalFrame implements AbstractLibraryFrame { static int openFrameCount = 0; static final int xOffset = 30, yOffset = 30; SceneListModel myModel; public DNDLibraryTable table; DNDLibraryTable table2; javax.swing.JLabel statusBar; File filename; boolean changed=false; //has the library been altered since it was last saved? SceneTableCellEditor rowEditor ; /** * @param file */ public SceneFrame(File file) { super(file.getName(), true, //resizable true, //closable true, //maximizable true);//iconifiable InitLibraryFrame(); } public SceneFrame() { super("Unsaved Scene #" + (++openFrameCount), true, //resizable true, //closable true, //maximizable true);//iconifiable InitLibraryFrame(); } protected void InitLibraryFrame() { //...Create the GUI and put it in the window... addInternalFrameListener(new javax.swing.event.InternalFrameListener() { public void internalFrameClosing(InternalFrameEvent e) { if (!changed) return; int i; javax.swing.JInternalFrame[] jList =PatchEdit.desktop.getAllFrames(); for (int j=0;j<jList.length;j++) { if (jList[j] instanceof BankEditorFrame) { for (i=0;i<myModel.sceneList.size();i++) if (((BankEditorFrame)(jList[j])).bankData==((Scene)myModel.sceneList.get(i)).getPatch()) { jList[j].moveToFront(); try{jList[j].setSelected(true); jList[j].setClosed(true); }catch (Exception e1){} break;} } if (jList[j] instanceof PatchEditorFrame) { for (i=0;i<myModel.sceneList.size();i++) if (((PatchEditorFrame)(jList[j])).p==((Patch)(myModel.sceneList.get(i)))) { jList[j].moveToFront(); try{jList[j].setSelected(true); jList[j].setClosed(true); }catch (Exception e1){} break;} } } if (JOptionPane.showConfirmDialog(null,"This Scene may contain unsaved data.\nSave before closing?","Unsaved Data",JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) return; if (getTitle().startsWith("Unsaved Scene")) { javax.swing.JFileChooser fc2=new javax.swing.JFileChooser(); javax.swing.filechooser.FileFilter type1 = new ExtensionFilter("PatchEdit Scene Files",".scenelib"); fc2.addChoosableFileFilter(type1); fc2.setFileFilter(type1); int returnVal = fc2.showSaveDialog(null); if (returnVal == javax.swing.JFileChooser.APPROVE_OPTION) { File file = fc2.getSelectedFile(); try { if (!file.getName().toUpperCase().endsWith(".SCENELIB")) file=new File(file.getPath()+".scenelib"); if (file.isDirectory()) { ErrorMsg.reportError("Error", "Can not save over a directory"); return; } if (file.exists()) if (JOptionPane.showConfirmDialog(null,"Are you sure?","File Exists",JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) return; save(file); } catch (Exception ex) { ErrorMsg.reportError("Error", "Error saving File",ex); } } return; } try { save(); } catch (Exception ex) {}; } public void internalFrameOpened(InternalFrameEvent e) {} public void internalFrameActivated(InternalFrameEvent e) { PatchEdit.receiveAction.setEnabled(true); PatchEdit.pasteAction.setEnabled(true); PatchEdit.importAction.setEnabled(true); PatchEdit.importAllAction.setEnabled(true); PatchEdit.newPatchAction.setEnabled(true); if (table.getRowCount()>0) { PatchEdit.saveAction.setEnabled(true); PatchEdit.menuSaveAs.setEnabled(true); PatchEdit.searchAction.setEnabled(true); PatchEdit.transferSceneAction.setEnabled(true); } if (table.getRowCount()>1) { PatchEdit.sortAction.setEnabled(true); PatchEdit.dupAction.setEnabled(true); PatchEdit.crossBreedAction.setEnabled(true); } if (table.getSelectedRowCount()>0) { PatchEdit.extractAction.setEnabled(true); PatchEdit.sendAction.setEnabled(true); PatchEdit.sendToAction.setEnabled(true); PatchEdit.playAction.setEnabled(true); PatchEdit.storeAction.setEnabled(true); PatchEdit.reassignAction.setEnabled(true); Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); try{ // look, if the driver for the selected patch brings his own editor myPatch.getDriver().getClass().getDeclaredMethod("editPatch", new Class[]{myPatch.getClass()}); // since the call didn't throw an exception, the driver implements the method itself PatchEdit.editAction.setEnabled(true); } catch(NoSuchMethodException ex) { // oh, the driver has no own editor. Is it a bank driver? if (myPatch.getDriver() instanceof BankDriver) { // for a bankDriver is it ok, since the universal bankEditor works PatchEdit.editAction.setEnabled(true); } else { // don't allow editing PatchEdit.editAction.setEnabled(false); } }; PatchEdit.cutAction.setEnabled(true); PatchEdit.copyAction.setEnabled(true); PatchEdit.deleteAction.setEnabled(true); PatchEdit.exportAction.setEnabled(true); } } public void internalFrameClosed(InternalFrameEvent e) {} public void internalFrameDeactivated(InternalFrameEvent e) { PatchEdit.receiveAction.setEnabled(false); PatchEdit.extractAction.setEnabled(false); PatchEdit.sendAction.setEnabled(false); PatchEdit.sendToAction.setEnabled(false); PatchEdit.playAction.setEnabled(false); PatchEdit.storeAction.setEnabled(false); PatchEdit.reassignAction.setEnabled(false); PatchEdit.editAction.setEnabled(false); PatchEdit.saveAction.setEnabled(false); PatchEdit.menuSaveAs.setEnabled(false); PatchEdit.sortAction.setEnabled(false); PatchEdit.searchAction.setEnabled(false); PatchEdit.dupAction.setEnabled(false); PatchEdit.cutAction.setEnabled(false); PatchEdit.copyAction.setEnabled(false); PatchEdit.pasteAction.setEnabled(false); PatchEdit.deleteAction.setEnabled(false); PatchEdit.importAction.setEnabled(false); PatchEdit.importAllAction.setEnabled(false); PatchEdit.exportAction.setEnabled(false); PatchEdit.newPatchAction.setEnabled(false); PatchEdit.crossBreedAction.setEnabled(false); PatchEdit.transferSceneAction.setEnabled(false); } public void internalFrameDeiconified(InternalFrameEvent e) {} public void internalFrameIconified(InternalFrameEvent e) {} }); myModel = new SceneListModel(changed); table = new DNDLibraryTable(myModel); table2=table; rowEditor=new SceneTableCellEditor(table); table.setPreferredScrollableViewportSize(new java.awt.Dimension(500, 70)); table.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(MouseEvent e) { if(e.isPopupTrigger()) { PatchEdit.menuPatchPopup.show(table2, e.getX(), e.getY()); table2.setRowSelectionInterval( table2.rowAtPoint(new java.awt.Point(e.getX(),e.getY())), table2.rowAtPoint(new java.awt.Point(e.getX(),e.getY())) ); } } public void mouseReleased(MouseEvent e) { if(e.isPopupTrigger()) { PatchEdit.menuPatchPopup.show(table2, e.getX(), e.getY()); table2.setRowSelectionInterval( table2.rowAtPoint(new java.awt.Point(e.getX(),e.getY())), table2.rowAtPoint(new java.awt.Point(e.getX(),e.getY())) ); } } public void mouseClicked(MouseEvent e) { if(e.getClickCount()==2) { PlaySelectedPatch(); } } }); //Create the scroll pane and add the table to it. final javax.swing.JScrollPane scrollPane = new javax.swing.JScrollPane(table); DNDViewport myviewport=new DNDViewport(); scrollPane.setViewport(myviewport); myviewport.setView(table); scrollPane.getVerticalScrollBar().addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(MouseEvent e) {} public void mouseReleased(MouseEvent e) { myModel.fireTableDataChanged(); } }); //Add the scroll pane to this window. javax.swing.JPanel statusPanel=new javax.swing.JPanel(); statusBar=new javax.swing.JLabel(myModel.sceneList.size()+" Patches"); statusPanel.add(statusBar); getContentPane().setLayout(new java.awt.BorderLayout()); getContentPane().add(scrollPane, java.awt.BorderLayout.CENTER); getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH); javax.swing.table.TableColumn column = null; column = table.getColumnModel().getColumn(0); // Synth column.setPreferredWidth(50); column = table.getColumnModel().getColumn(1); // Type column.setPreferredWidth(50); column = table.getColumnModel().getColumn(2); // Patch Name column.setPreferredWidth(100); column = table.getColumnModel().getColumn(3); //Bank Number column.setPreferredWidth(50); column.setCellEditor(rowEditor); // Set the special pop-up Editor for Bank numbers column = table.getColumnModel().getColumn(4); //Patch Number column.setPreferredWidth(50); column.setCellEditor(rowEditor); // Set the special pop-up Editorfor Patch Numbers column = table.getColumnModel().getColumn(5); //Comment column.setPreferredWidth(200); //...Then set the window size or call pack... setSize(600,300); //Set the window's location. setLocation(xOffset*openFrameCount, yOffset*openFrameCount); this.addFocusListener(new java.awt.event.FocusListener() { public void focusGained(java.awt.event.FocusEvent e) { // System.out.println ("Focus Gained"); } public void focusLost(java.awt.event.FocusEvent e) { //System.out.println ("Focus Lost"); } }); table.getModel().addTableModelListener( new javax.swing.event.TableModelListener() { public void tableChanged(javax.swing.event.TableModelEvent e) { statusBar.setText(myModel.sceneList.size()+" Patches"); if (((SceneListModel)e.getSource()).getRowCount()>0) { PatchEdit.saveAction.setEnabled(true); PatchEdit.menuSaveAs.setEnabled(true); PatchEdit.searchAction.setEnabled(true); PatchEdit.exportAction.setEnabled(true); PatchEdit.transferSceneAction.setEnabled(true); } if (((SceneListModel)e.getSource()).getRowCount()>1) { PatchEdit.sortAction.setEnabled(true); PatchEdit.dupAction.setEnabled(true); PatchEdit.crossBreedAction.setEnabled(true); } } } ); table.getSelectionModel().addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { //System.out.println ("ValueChanged"+((ListSelectionModel)e.getSource ()).getMaxSelectionIndex ()); if (((javax.swing.ListSelectionModel)e.getSource()).getMaxSelectionIndex()>=0) { PatchEdit.extractAction.setEnabled(true); PatchEdit.sendAction.setEnabled(true); PatchEdit.sendToAction.setEnabled(true); PatchEdit.playAction.setEnabled(true); PatchEdit.storeAction.setEnabled(true); PatchEdit.reassignAction.setEnabled(true); Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); try{ myPatch.getDriver().getClass().getDeclaredMethod("editPatch", new Class[]{myPatch.getClass()}); PatchEdit.editAction.setEnabled(true); } catch(NoSuchMethodException ex) { if (myPatch.getDriver() instanceof BankDriver) PatchEdit.editAction.setEnabled(true); else PatchEdit.editAction.setEnabled(false); }; PatchEdit.copyAction.setEnabled(true); PatchEdit.cutAction.setEnabled(true); PatchEdit.deleteAction.setEnabled(true); PatchEdit.exportAction.setEnabled(true); } else { PatchEdit.extractAction.setEnabled(false); PatchEdit.sendAction.setEnabled(false); PatchEdit.sendToAction.setEnabled(false); PatchEdit.playAction.setEnabled(false); PatchEdit.storeAction.setEnabled(false); PatchEdit.reassignAction.setEnabled(false); PatchEdit.editAction.setEnabled(false); PatchEdit.copyAction.setEnabled(false); PatchEdit.cutAction.setEnabled(false); PatchEdit.deleteAction.setEnabled(false); } } }); } /** * @param file * @throws IOException * @throws FileNotFoundException */ public void ImportPatch(File file) throws java.io.IOException, java.io.FileNotFoundException { int i; int offset=0; java.io.FileInputStream fileIn= new java.io.FileInputStream(file); byte [] buffer =new byte [(int)file.length()]; fileIn.read(buffer); fileIn.close(); while (offset<buffer.length-1) { // There is still something unprocessed in the file Patch firstpat=new Patch(buffer,offset); offset+=firstpat.sysex.length; //System.out.println("Buffer length:"+ buffer.length+" Patch Lenght: "+firstpat.sysex.length); Patch[] patarray=firstpat.dissect(); if (patarray.length>1) { // Conversion was sucessfull, we have at least one converted patch for (int j=0;j<patarray.length;j++) { myModel.sceneList.add(patarray[j]); // add all converted patches } } else { // No conversion. Try just the original patch.... if (table.getSelectedRowCount()==0) myModel.sceneList.add(firstpat); else myModel.sceneList.add(table.getSelectedRow(),firstpat); } } myModel.fireTableDataChanged(); changed=true; } /** * @param file * @throws IOException * @throws FileNotFoundException */ public void ExportPatch(File file) throws java.io.IOException, java.io.FileNotFoundException { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error", "No Patch Selected."); return; } java.io.FileOutputStream fileOut= new java.io.FileOutputStream(file); fileOut.write(((Patch)myModel.sceneList.get(table.getSelectedRow())).sysex); fileOut.close(); } public void DeleteSelectedPatch() { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error", "No Patch Selected."); return; } myModel.sceneList.remove(table.getSelectedRow()); myModel.fireTableDataChanged(); } public void CopySelectedPatch() { try { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error", "No Patch Selected."); return; } Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); byte [] mySysex = new byte[myPatch.sysex.length]; System.arraycopy(myPatch.sysex,0,mySysex,0,myPatch.sysex.length); PatchEdit.Clipboard=new Patch(mySysex, myPatch.deviceNum, myPatch.driverNum, (myPatch.date.toString()), (myPatch.author.toString()), (myPatch.comment.toString())); }catch (Exception e) {}; } /** */ public void SendSelectedPatch() { Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).sendPatch(myPatch); } public void SendToSelectedPatch() { Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); new SysexSendToDialog(myPatch); } public void ReassignSelectedPatch() { Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); new ReassignPatchDialog(myPatch); myModel.fireTableDataChanged(); } public void PlaySelectedPatch() { Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).sendPatch(myPatch); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).playPatch(myPatch); } public void StoreSelectedPatch() { Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); new SysexStoreDialog(myPatch); } /** * @return */ public javax.swing.JInternalFrame EditSelectedPatch() { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error", "No Patch Selected."); return null; } Patch myPatch=((Scene)myModel.sceneList.get(table.getSelectedRow())).getPatch(); changed=true; return(PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).editPatch(myPatch)); } public void PastePatch() { Patch myPatch=PatchEdit.Clipboard; if (myPatch!=null) { byte [] mySysex = new byte[myPatch.sysex.length]; System.arraycopy(myPatch.sysex,0,mySysex,0,myPatch.sysex.length); if (table.getSelectedRowCount()==0) myModel.sceneList.add(new Scene(new Patch(mySysex, myPatch.deviceNum, myPatch.driverNum, (myPatch.date.toString()), (myPatch.author.toString()), (myPatch.comment.toString())))); else myModel.sceneList.add(table.getSelectedRow(),new Scene(new Patch(mySysex, myPatch.deviceNum, myPatch.driverNum, (myPatch.date.toString()), (myPatch.author.toString()), (myPatch.comment.toString())))); changed=true; myModel.fireTableDataChanged(); } } /** * @throws Exception */ public void save() throws Exception { PatchEdit.waitDialog.show(); java.io.FileOutputStream f = new java.io.FileOutputStream(filename); java.io.ObjectOutputStream s = new java.io.ObjectOutputStream(f); s.writeObject(myModel.sceneList); s.flush(); s.close(); f.close(); PatchEdit.waitDialog.hide(); changed=false; } /** * @return */ public int getSelectedRowCount() { return table.getSelectedRowCount(); } /** * @param file * @throws Exception */ public void save(File file) throws Exception { filename=file; setTitle(file.getName()); save(); } /** * @param file * @throws Exception */ public void open(File file) throws Exception { PatchEdit.waitDialog.show(); setTitle(file.getName()); filename=file; java.io.FileInputStream f = new java.io.FileInputStream(file); java.io.ObjectInputStream s = new java.io.ObjectInputStream(f); myModel.sceneList=(java.util.ArrayList)s.readObject(); for (int i=0; i<myModel.sceneList.size();i++) ((Scene)myModel.sceneList.get(i)).getPatch().ChooseDriver(); s.close(); f.close(); PatchEdit.waitDialog.hide(); } /** * @return */ public java.util.ArrayList getPatchCollection() { java.util.ArrayList ar=new java.util.ArrayList(); int i; for (i=0;i<myModel.sceneList.size();i++) ar.add(myModel.getPatchAt(i)); return ar; } //Re-assigns drivers to all patches in libraryframe. Called after new drivers are added or or removed protected void revalidateDrivers() { int i; for (i=0;i<myModel.sceneList.size();i++) ((Scene)(myModel.sceneList.get(i))).getPatch().ChooseDriver(); myModel.fireTableDataChanged(); } /** * Send all patches of the scene to the * configured places in the synth's. */ void sendScene() { int i,bankNum,patchNum; // System.out.println("Transfering Scene"); for (i=0;i<myModel.sceneList.size();i++) { bankNum=((Scene)(myModel.sceneList.get(i))).getBankNumber(); patchNum=((Scene)(myModel.sceneList.get(i))).getPatchNumber(); Patch myPatch=((Scene)myModel.sceneList.get(i)).getPatch(); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).calculateChecksum(myPatch); PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum).storePatch(myPatch,bankNum,patchNum); } } /** * @return */ public AbstractPatchListModel getAbstractPatchListModel() { return myModel; } /** * @return */ public DNDLibraryTable getTable() { return table; } public void ExtractSelectedPatch() { if (table.getSelectedRowCount()==0) { ErrorMsg.reportError("Error","No Patch Selected."); return; } Patch myPatch=myModel.getPatchAt(table.getSelectedRow()); BankDriver myDriver=(BankDriver)PatchEdit.getDriver(myPatch.deviceNum,myPatch.driverNum); for (int i=0;i<myDriver.numPatches;i++) if (myDriver.getPatch(myPatch,i)!=null) myModel.addPatch(myDriver.getPatch(myPatch,i)); myModel.fireTableDataChanged(); changed=true; // statusBar.setText(myModel.PatchList.size()+" Patches"); } } --- NEW FILE: SceneListModel.java --- /* * SceneListModel.java * * Refactored from PerformanceListModel */ package core; /** * * @author Gerrit Gehnen * @version $Id: SceneListModel.java,v 1.1 2003/03/27 20:45:56 gehnen Exp $ */ class SceneListModel extends javax.swing.table.AbstractTableModel implements AbstractPatchListModel { final String[] columnNames = {"Synth", "Type", "Patch Name", "Bank Number", "Patch Number", "Comment"}; boolean changed; public java.util.ArrayList sceneList = new java.util.ArrayList(); public SceneListModel(boolean c) { changed=c; } public int getColumnCount() { return columnNames.length; } public int getRowCount() { return sceneList.size(); } public String getColumnName(int col) { return columnNames[col]; } public Object getValueAt(int row, int col) { Scene myScene=(Scene)sceneList.get(row); if (col==0) return ((Device)PatchEdit.appConfig.getDevice(myScene.getPatch().deviceNum)).getSynthName(); if (col==1) return PatchEdit.getDriver(myScene.getPatch().deviceNum,myScene.getPatch().driverNum).getPatchType(); if (col==2) return PatchEdit.getDriver(myScene.getPatch().deviceNum,myScene.getPatch().driverNum).getPatchName(myScene.getPatch()); if (col==3) return PatchEdit.getDriver(myScene.getPatch().deviceNum,myScene.getPatch().driverNum).bankNumbers[myScene.getBankNumber()]; if (col==4) return PatchEdit.getDriver(myScene.getPatch().deviceNum,myScene.getPatch().driverNum).patchNumbers[myScene.getPatchNumber()]; return myScene.getComment(); } /* * JTable uses this method to determine the default renderer/ * editor for each cell. If we didn't implement this method, * then the last column would contain text ("true"/"false"), * rather than a check box. */ public Class getColumnClass(int c) { try{ return Class.forName("java.lang.String"); } catch (Exception e) { return null; } } public boolean isCellEditable(int row, int col) { if (col>2) return true; else return false; } public void setValueAt(Object value, int row, int col) { //System.out.println("SetValue at "+row+" "+col+" Value:"+value); changed=true; Scene myScene=(Scene)sceneList.get(row); if (col==0) { PatchEdit.appConfig.getDevice(myScene.getPatch().deviceNum).setSynthName((String)value); } if (col==1) { // don't allow to change the Patch Type } if (col==2) { // don't allow to change the Patch Name } if (col==3) { myScene.setBankNumber(((Integer)value).intValue()); } if (col==4) { myScene.setPatchNumber(((Integer) value).intValue()); } if (col==5) { /* Comment */ myScene.setComment(new StringBuffer((String)value)); } sceneList.set(row,myScene); } public Scene getSceneAt(int row) { return (Scene)sceneList.get(row); } public void setSceneAt(Scene p,int row) { sceneList.set(row,p); fireTableRowsUpdated(row, row); } public Patch getPatchAt(int row) { return ((Scene)sceneList.get(row)).getPatch(); } public void setPatchAt(Patch p,int row) { Scene perf; perf=((Scene)sceneList.get(row)); perf.setPatch(p); fireTableRowsUpdated(row, row); } public void addPatch(Patch p) { Scene perf=new Scene(p); sceneList.add(perf); this.fireTableDataChanged(); } public StringBuffer getCommentAt(int row) { return ((Scene)sceneList.get(row)).getComment(); } } --- NEW FILE: SceneTableCellEditor.java --- /** * SceneTableCellEditor * * @version $Id: SceneTableCellEditor.java,v 1.1 2003/03/27 20:45:56 gehnen Exp $ * @author Gerrit Gehnen */ package core; import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.table.*; import javax.swing.event.*; public class SceneTableCellEditor implements TableCellEditor, TableModelListener { protected TableCellEditor editor, defaultEditor; protected JComboBox box; JTable table; private int oldrow=-1; private int oldcol=-1; /** * Constructs a SceneTableCellEditor. * create default editor * * @see TableCellEditor * @see DefaultCellEditor */ public SceneTableCellEditor(JTable table) { this.table = table; defaultEditor = new DefaultCellEditor(new JTextField()); this.table.getModel().addTableModelListener(this); } public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { return editor.getTableCellEditorComponent(table, value, isSelected, row, column); } public Object getCellEditorValue() { // System.out.println("getCellEditorValue "+box.getSelectedItem()); return new Integer(box.getSelectedIndex()); } public boolean stopCellEditing() { return editor.stopCellEditing(); } public void cancelCellEditing() { editor.cancelCellEditing(); } public boolean isCellEditable(EventObject anEvent) { selectEditor((MouseEvent)anEvent); return editor.isCellEditable(anEvent); } public void addCellEditorListener(CellEditorListener l) { editor.addCellEditorListener(l); } public void removeCellEditorListener(CellEditorListener l) { editor.removeCellEditorListener(l); } public boolean shouldSelectCell(EventObject anEvent) { selectEditor((MouseEvent)anEvent); return editor.shouldSelectCell(anEvent); } protected void selectEditor(MouseEvent e) { Driver driver; int row,col; if (e == null) { row = table.getSelectionModel().getAnchorSelectionIndex(); col=table.getSelectedColumn(); } else { row = table.rowAtPoint(e.getPoint()); col=table.columnAtPoint(e.getPoint()); } // System.out.println("selectEditor "+ row); if ((row!=oldrow)||(col!=oldcol)) { oldrow=row; oldcol=col; box=new JComboBox(); driver=((SceneListModel)table.getModel()).getSceneAt(row).getPatch().getDriver(); if (driver.patchNumbers.length > 1) { if (col==3) { for (int i = 0 ; i < driver.bankNumbers.length ; i++) { box.addItem(driver.bankNumbers[i]); } } if (col==4) for (int i = 0 ; i < driver.patchNumbers.length ; i++) { box.addItem(driver.patchNumbers[i]); } } editor = new DefaultCellEditor(box ); if (editor == null) { editor = defaultEditor; } } } public void tableChanged(javax.swing.event.TableModelEvent tableModelEvent) { oldcol=-1; oldrow=-1; } } Index: AbstractLibraryFrame.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/AbstractLibraryFrame.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractLibraryFrame.java 14 Jan 2003 20:42:15 -0000 1.2 --- AbstractLibraryFrame.java 27 Mar 2003 20:45:52 -0000 1.3 *************** *** 8,12 **** /** Abstract interface for unified handling of ! * Library and Performance frames. * @author Gerrit.Gehnen * @version $Id$ --- 8,12 ---- /** Abstract interface for unified handling of ! * Library and Scene frames. * @author Gerrit.Gehnen * @version $Id$ Index: AbstractPatchListModel.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/AbstractPatchListModel.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractPatchListModel.java 24 Sep 2002 20:59:54 -0000 1.2 --- AbstractPatchListModel.java 27 Mar 2003 20:45:53 -0000 1.3 *************** *** 7,11 **** /** This is the general interface to unify the handling of ! * the LibraryTable and PerformanceTable. * @author Gerrit * @version $Id$ --- 7,11 ---- /** This is the general interface to unify the handling of ! * the LibraryTable and SceneTable. * @author Gerrit * @version $Id$ Index: PatchEdit.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/PatchEdit.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PatchEdit.java 14 Feb 2003 22:03:30 -0000 1.13 --- PatchEdit.java 27 Mar 2003 20:45:53 -0000 1.14 *************** *** 57,62 **** public static MonitorAction monitorAction; ! public static NewPerformanceAction newPerformanceAction; ! public static TransferPerformanceAction transferPerformanceAction; SearchDialog searchDialog; --- 57,62 ---- public static MonitorAction monitorAction; ! public static NewSceneAction newSceneAction; ! public static TransferSceneAction transferSceneAction; SearchDialog searchDialog; *************** *** 158,166 **** menuLib.add (new JSeparator ()); ! newPerformanceAction=new NewPerformanceAction(); ! menuLib.add(newPerformanceAction); ! transferPerformanceAction=new TransferPerformanceAction(); ! menuLib.add(transferPerformanceAction); menuLib.add (new JSeparator ()); --- 158,166 ---- menuLib.add (new JSeparator ()); ! newSceneAction=new NewSceneAction(); ! menuLib.add(newSceneAction); ! transferSceneAction=new TransferSceneAction(); ! menuLib.add(transferSceneAction); menuLib.add (new JSeparator ()); *************** *** 369,375 **** } ! protected void createPerformanceFrame () { ! PerformanceFrame frame = new PerformanceFrame (); frame.setVisible (true); desktop.add (frame); --- 369,375 ---- } ! protected void createSceneFrame () { ! SceneFrame frame = new SceneFrame (); frame.setVisible (true); desktop.add (frame); *************** *** 392,396 **** } catch (Exception e) { ! PerformanceFrame frame2=new PerformanceFrame(file); try { --- 392,396 ---- } catch (Exception e) { ! SceneFrame frame2=new SceneFrame(file); try { *************** *** 425,435 **** } catch (Exception e) { ! PerformanceFrame perFrame; try { ! perFrame=(PerformanceFrame)desktop.getSelectedFrame (); ! if (perFrame.getTitle ().startsWith ("Unsaved ")) {saveFrameAs ();return;} ! perFrame.save (); } catch (Exception e2) { ErrorMsg.reportError ("Error", "Unable to Save Library",e2);return;} --- 425,435 ---- } catch (Exception e) { ! SceneFrame sceneFrame; try { ! sceneFrame=(SceneFrame)desktop.getSelectedFrame (); ! if (sceneFrame.getTitle ().startsWith ("Unsaved ")) {saveFrameAs ();return;} ! sceneFrame.save (); } catch (Exception e2) { ErrorMsg.reportError ("Error", "Unable to Save Library",e2);return;} *************** *** 467,471 **** } catch (Exception pr) { ! ((PerformanceFrame)desktop.getSelectedFrame()).save(file); } } --- 467,471 ---- } catch (Exception pr) { ! ((SceneFrame)desktop.getSelectedFrame()).save(file); } } *************** *** 902,924 **** } ! class NewPerformanceAction extends AbstractAction { ! public NewPerformanceAction () { ! super ("NewPerformance",null); } public void actionPerformed (ActionEvent e) { ! createPerformanceFrame (); } } ! class TransferPerformanceAction extends AbstractAction { ! public TransferPerformanceAction () { ! super ("Transfer Performance",null); //putValue (Action.MNEMONIC_KEY, new Integer ('S')); setEnabled (false); --- 902,924 ---- } ! class NewSceneAction extends AbstractAction { ! public NewSceneAction () { ! super ("New Scene",null); } public void actionPerformed (ActionEvent e) { ! createSceneFrame (); } } ! class TransferSceneAction extends AbstractAction { ! public TransferSceneAction () { ! super ("Transfer Scene",null); //putValue (Action.MNEMONIC_KEY, new Integer ('S')); setEnabled (false); *************** *** 928,934 **** try { ! ((PerformanceFrame)desktop.getSelectedFrame ()).sendPerformance (); } catch (Exception ex) ! {ErrorMsg.reportError ("Error","Performance Library must be the selected window.",ex);}; } } --- 928,934 ---- try { ! ((SceneFrame)desktop.getSelectedFrame ()).sendScene (); } catch (Exception ex) ! {ErrorMsg.reportError ("Error","Scene Library must be the selected window.",ex);}; } } *************** *** 942,946 **** { JFileChooser fc=new JFileChooser (); ! javax.swing.filechooser.FileFilter type1 = new ExtensionFilter ("PatchEdit Library Files",new String[] {".patchlib",".perflib"}); fc.setCurrentDirectory (new File (appConfig.getLibPath())); fc.addChoosableFileFilter (type1); --- 942,946 ---- { JFileChooser fc=new JFileChooser (); ! javax.swing.filechooser.FileFilter type1 = new ExtensionFilter ("PatchEdit Library Files",new String[] {".patchlib",".scenelib"}); fc.setCurrentDirectory (new File (appConfig.getLibPath())); fc.addChoosableFileFilter (type1); Index: SearchDialog.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/SearchDialog.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SearchDialog.java 24 Sep 2002 20:59:54 -0000 1.4 --- SearchDialog.java 27 Mar 2003 20:45:56 -0000 1.5 *************** *** 60,64 **** group.add(button5); ! if (PatchEdit.desktop.getSelectedFrame() instanceof PerformanceFrame) { button2.setEnabled(false); --- 60,64 ---- group.add(button5); ! if (PatchEdit.desktop.getSelectedFrame() instanceof SceneFrame) { button2.setEnabled(false); *************** *** 117,121 **** public void show() { ! if (PatchEdit.desktop.getSelectedFrame() instanceof PerformanceFrame) { button2.setEnabled(false); --- 117,121 ---- public void show() { ! if (PatchEdit.desktop.getSelectedFrame() instanceof SceneFrame) { button2.setEnabled(false); |
From: <ge...@us...> - 2003-03-13 17:28:37
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX7 In directory sc8-pr-cvs1:/tmp/cvs-serv24662/YamahaTX7 Modified Files: YamahaTX7VoiceBankDriver.java Log Message: Testing the syncmail options. Index: YamahaTX7VoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX7/YamahaTX7VoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX7VoiceBankDriver.java 2 Mar 2003 22:00:23 -0000 1.1 --- YamahaTX7VoiceBankDriver.java 13 Mar 2003 17:28:01 -0000 1.2 *************** *** 469,473 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 469,473 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 488,493 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX7Constants.INIT_VOICE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 488,493 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX7Constants.INIT_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) |
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX802 In directory sc8-pr-cvs1:/tmp/cvs-serv24662/YamahaTX802 Modified Files: YamahaTX802AdditionalVoiceBankDriver.java YamahaTX802FractionalScalingBankDriver.java YamahaTX802MicroTuningBankDriver.java YamahaTX802PerformanceBankDriver.java Log Message: Testing the syncmail options. Index: YamahaTX802AdditionalVoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX802/YamahaTX802AdditionalVoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX802AdditionalVoiceBankDriver.java 2 Mar 2003 22:00:24 -0000 1.1 --- YamahaTX802AdditionalVoiceBankDriver.java 13 Mar 2003 17:28:03 -0000 1.2 *************** *** 254,258 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; --- 254,258 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; *************** *** 272,277 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX802Constants.INIT_ADDITIONAL_VOICE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) putPatch(p,v,i); --- 272,277 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX802Constants.INIT_ADDITIONAL_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) putPatch(p,v,i); Index: YamahaTX802FractionalScalingBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX802/YamahaTX802FractionalScalingBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX802FractionalScalingBankDriver.java 2 Mar 2003 22:00:24 -0000 1.1 --- YamahaTX802FractionalScalingBankDriver.java 13 Mar 2003 17:28:04 -0000 1.2 *************** *** 188,192 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; --- 188,192 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; *************** *** 204,209 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX802Constants.INIT_FRACTIONAL_SCALING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) putPatch(p,v,i); --- 204,209 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX802Constants.INIT_FRACTIONAL_SCALING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) putPatch(p,v,i); Index: YamahaTX802MicroTuningBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX802/YamahaTX802MicroTuningBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX802MicroTuningBankDriver.java 2 Mar 2003 22:00:24 -0000 1.1 --- YamahaTX802MicroTuningBankDriver.java 13 Mar 2003 17:28:05 -0000 1.2 *************** *** 184,188 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 184,188 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 201,206 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX802Constants.INIT_MICRO_TUNING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 201,206 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX802Constants.INIT_MICRO_TUNING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaTX802PerformanceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX802/YamahaTX802PerformanceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX802PerformanceBankDriver.java 2 Mar 2003 22:00:24 -0000 1.1 --- YamahaTX802PerformanceBankDriver.java 13 Mar 2003 17:28:05 -0000 1.2 *************** *** 366,370 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 366,370 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 383,388 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX802Constants.INIT_PERFORMANCE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 383,388 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX802Constants.INIT_PERFORMANCE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) |
From: <ge...@us...> - 2003-03-13 17:19:21
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s In directory sc8-pr-cvs1:/tmp/cvs-serv20394/YamahaDX7s Modified Files: YamahaDX7sAdditionalVoiceBankDriver.java YamahaDX7sFractionalScalingBankDriver.java YamahaDX7sMicroTuningBankDriver.java YamahaDX7sPerformanceBankDriver.java YamahaDX7sVoiceBankDriver.java Log Message: Testing the quiet-option in syncmail Index: YamahaDX7sAdditionalVoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s/YamahaDX7sAdditionalVoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7sAdditionalVoiceBankDriver.java 2 Mar 2003 22:00:19 -0000 1.1 --- YamahaDX7sAdditionalVoiceBankDriver.java 13 Mar 2003 17:19:14 -0000 1.2 *************** *** 254,258 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 254,258 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 273,278 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7sConstants.INIT_ADDITIONAL_VOICE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 273,278 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7sConstants.INIT_ADDITIONAL_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7sFractionalScalingBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s/YamahaDX7sFractionalScalingBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7sFractionalScalingBankDriver.java 2 Mar 2003 22:00:20 -0000 1.1 --- YamahaDX7sFractionalScalingBankDriver.java 13 Mar 2003 17:19:14 -0000 1.2 *************** *** 188,192 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 188,192 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 205,210 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7sConstants.INIT_FRACTIONAL_SCALING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 205,210 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7sConstants.INIT_FRACTIONAL_SCALING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7sMicroTuningBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s/YamahaDX7sMicroTuningBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7sMicroTuningBankDriver.java 2 Mar 2003 22:00:20 -0000 1.1 --- YamahaDX7sMicroTuningBankDriver.java 13 Mar 2003 17:19:15 -0000 1.2 *************** *** 184,188 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 184,188 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 201,206 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7sConstants.INIT_MICRO_TUNING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 201,206 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7sConstants.INIT_MICRO_TUNING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7sPerformanceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s/YamahaDX7sPerformanceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7sPerformanceBankDriver.java 2 Mar 2003 22:00:20 -0000 1.1 --- YamahaDX7sPerformanceBankDriver.java 13 Mar 2003 17:19:15 -0000 1.2 *************** *** 186,190 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 186,190 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 216,221 **** ! Patch v = new Patch(DX7sConstants.INIT_PERFORMANCE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 216,221 ---- ! Patch v = new Patch(getDeviceNum(),DX7sConstants.INIT_PERFORMANCE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7sVoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7s/YamahaDX7sVoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7sVoiceBankDriver.java 2 Mar 2003 22:00:20 -0000 1.1 --- YamahaDX7sVoiceBankDriver.java 13 Mar 2003 17:19:15 -0000 1.2 *************** *** 475,479 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; --- 475,479 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; *************** *** 493,498 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7sConstants.INIT_VOICE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 493,498 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7sConstants.INIT_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) |
From: <ge...@us...> - 2003-03-13 17:19:19
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX7 In directory sc8-pr-cvs1:/tmp/cvs-serv20394/YamahaTX7 Modified Files: YamahaTX7PerformanceBankDriver.java Log Message: Testing the quiet-option in syncmail Index: YamahaTX7PerformanceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaTX7/YamahaTX7PerformanceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaTX7PerformanceBankDriver.java 2 Mar 2003 22:00:23 -0000 1.1 --- YamahaTX7PerformanceBankDriver.java 13 Mar 2003 17:19:15 -0000 1.2 *************** *** 347,351 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 347,351 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 366,371 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(TX7Constants.INIT_PERFORMANCE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 366,371 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),TX7Constants.INIT_PERFORMANCE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) |
From: <ge...@us...> - 2003-03-13 17:05:03
|
Update of /cvsroot/jsynthlib/CVSROOT In directory sc8-pr-cvs1:/tmp/cvs-serv12898 Modified Files: loginfo Log Message: Test with quiet-option. Index: loginfo =================================================================== RCS file: /cvsroot/jsynthlib/CVSROOT/loginfo,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** loginfo 11 Mar 2003 22:09:02 -0000 1.15 --- loginfo 13 Mar 2003 17:04:26 -0000 1.16 *************** *** 28,32 **** # Send commit mail for JSynthLib commits #DEFAULT perl $CVSROOT/CVSROOT/logmail.pl -s -m jsy...@ov... -f /dev/null -u $USER %s ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail %{sVv} jsy...@li... --- 28,32 ---- # Send commit mail for JSynthLib commits #DEFAULT perl $CVSROOT/CVSROOT/logmail.pl -s -m jsy...@ov... -f /dev/null -u $USER %s ! DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -q %{sVv} jsy...@li... |
From: <ge...@us...> - 2003-03-13 17:00:37
|
Update of /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II In directory sc8-pr-cvs1:/tmp/cvs-serv10592/YamahaDX7II Modified Files: YamahaDX7IIAdditionalVoiceBankDriver.java YamahaDX7IIFractionalScalingBankDriver.java YamahaDX7IIMicroTuningBankDriver.java YamahaDX7IIPerformanceBankDriver.java YamahaDX7IIVoiceBankDriver.java Log Message: Torstens changes from March 6. 2003 Index: YamahaDX7IIAdditionalVoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIAdditionalVoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7IIAdditionalVoiceBankDriver.java 2 Mar 2003 22:00:16 -0000 1.1 --- YamahaDX7IIAdditionalVoiceBankDriver.java 13 Mar 2003 17:00:10 -0000 1.2 *************** *** 254,258 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 254,258 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 273,278 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7IIConstants.INIT_ADDITIONAL_VOICE); ! Patch p = new Patch(sysex, getDeviceNum(), getDriverNum()); for (int i=0;i<numPatches;i++) --- 273,278 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7IIConstants.INIT_ADDITIONAL_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7IIFractionalScalingBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIFractionalScalingBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7IIFractionalScalingBankDriver.java 2 Mar 2003 22:00:16 -0000 1.1 --- YamahaDX7IIFractionalScalingBankDriver.java 13 Mar 2003 17:00:12 -0000 1.2 *************** *** 188,192 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 188,192 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 205,210 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7IIConstants.INIT_FRACTIONAL_SCALING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 205,210 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7IIConstants.INIT_FRACTIONAL_SCALING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7IIMicroTuningBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIMicroTuningBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7IIMicroTuningBankDriver.java 2 Mar 2003 22:00:17 -0000 1.1 --- YamahaDX7IIMicroTuningBankDriver.java 13 Mar 2003 17:00:14 -0000 1.2 *************** *** 184,188 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 184,188 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 201,206 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7IIConstants.INIT_MICRO_TUNING); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 201,206 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7IIConstants.INIT_MICRO_TUNING); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) Index: YamahaDX7IIPerformanceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIPerformanceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7IIPerformanceBankDriver.java 2 Mar 2003 22:00:17 -0000 1.1 --- YamahaDX7IIPerformanceBankDriver.java 13 Mar 2003 17:00:17 -0000 1.2 *************** *** 184,188 **** } ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; --- 184,188 ---- } ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); return p; *************** *** 213,218 **** ! Patch v = new Patch(DX7IIConstants.INIT_PERFORMANCE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) putPatch(p,v,i); --- 213,218 ---- ! Patch v = new Patch(getDeviceNum(),DX7IIConstants.INIT_PERFORMANCE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) putPatch(p,v,i); Index: YamahaDX7IIVoiceBankDriver.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/synthdrivers/YamahaDX7II/YamahaDX7IIVoiceBankDriver.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** YamahaDX7IIVoiceBankDriver.java 2 Mar 2003 22:00:18 -0000 1.1 --- YamahaDX7IIVoiceBankDriver.java 13 Mar 2003 17:00:18 -0000 1.2 *************** *** 475,479 **** ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); --- 475,479 ---- ! Patch p = new Patch(getDeviceNum(),sysex); // single sysex PatchEdit.getDriver(p.deviceNum,p.driverNum).calculateChecksum(p); *************** *** 494,499 **** sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(DX7IIConstants.INIT_VOICE); ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); for (int i=0;i<numPatches;i++) --- 494,499 ---- sysex[trimSize-1]=(byte)0xF7; ! Patch v = new Patch(getDeviceNum(),DX7IIConstants.INIT_VOICE); // single sysex ! Patch p = new Patch(sysex,getDeviceNum(),getDriverNum()); // bank sysex for (int i=0;i<numPatches;i++) |
From: <tti...@us...> - 2003-03-13 12:31:09
|
Update of /cvsroot/jsynthlib/JSynthLib/core In directory sc8-pr-cvs1:/tmp/cvs-serv23439/JSynthLib/core Modified Files: Patch.java Log Message: Additional constructor and ChooseDriver method for patches with known deviceNum Index: Patch.java =================================================================== RCS file: /cvsroot/jsynthlib/JSynthLib/core/Patch.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Patch.java 24 Feb 2003 22:54:05 -0000 1.11 --- Patch.java 13 Mar 2003 12:31:05 -0000 1.12 *************** *** 36,39 **** --- 36,60 ---- } + /** + * Constructor - The device number is known, but not the driver number + * @param dev The known device number + * @param gsysex The MIDI SysEx message + */ + public Patch (int deviceNum, byte[] gsysex) + { + comment = new StringBuffer (); + date= new StringBuffer (); + author= new StringBuffer (); + sysex= gsysex; + this.deviceNum= deviceNum; + ChooseDriver(deviceNum); + } + + /** + * Constructor - Device and driver number are known + * @param gsysex The MIDI SysEx message + * @param deviceNum The known device number + * @param driverNum The known driver number + */ public Patch (byte[] gsysex, int deviceNum, int driverNum) { *************** *** 66,69 **** --- 87,99 ---- } + /** + * Constructor - all parameters are known + * @param gsysex The MIDI SysEx message + * @param deviceNum The known device number + * @param driverNum The known driver number + * @param gdate A comment + * @param gauthor Another comment + * @param gcomment A last comment + */ public Patch (byte[] gsysex, int deviceNum, int driverNum, String gdate, String gauthor, String gcomment) { *************** *** 76,79 **** --- 106,134 ---- } + /** + * Which driver of a device with known device number supports this patch + * @param deviceNum The known device number + */ + public void ChooseDriver(int deviceNum) + { + this.deviceNum = deviceNum; + Device dev = (Device)PatchEdit.appConfig.getDevice(deviceNum); + StringBuffer patchString=this.getPatchHeader(); + + for (int j=0;j<dev.driverList.size ();j++) + { + // iterating over all Drivers of the given device + if (((Driver)dev.driverList.get (j)).supportsPatch (patchString,this)) + { + this.driverNum=j; + getDriver().trimSysex(this); + return; + } + } + // Unkown patch, try to guess at least the manufacturer + comment=new StringBuffer("Probably a "+LookupManufacturer.get(sysex[1],sysex[2],sysex[3])+" Patch, Size: "+sysex.length); + + } + public void ChooseDriver () { |