/[svn]/jsampler/trunk/src/org/jsampler/CC.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/CC.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1329 by iliev, Sat Sep 8 18:33:05 2007 UTC revision 1467 by iliev, Sat Nov 3 13:14:31 2007 UTC
# Line 403  public class CC { Line 403  public class CC {
403                  try {                  try {
404                          String s = getJSamplerHome();                          String s = getJSamplerHome();
405                          if(s == null) return;                          if(s == null) return;
406                            getOrchestras().addOrchestraListListener(getHandler());
407                                                    
408                          File f = new File(s + File.separator + "orchestras.xml.bkp");                          File f = new File(s + File.separator + "orchestras.xml.bkp");
409                          if(f.isFile()) HF.createBackup("orchestras.xml.bkp", "orchestras.xml.rec");                          if(f.isFile()) HF.createBackup("orchestras.xml.bkp", "orchestras.xml.rec");
# Line 431  public class CC { Line 432  public class CC {
432                  for(int i = 0; i < getOrchestras().getOrchestraCount(); i++) {                  for(int i = 0; i < getOrchestras().getOrchestraCount(); i++) {
433                          getOrchestras().getOrchestra(i).addOrchestraListener(getHandler());                          getOrchestras().getOrchestra(i).addOrchestraListener(getHandler());
434                  }                  }
                 getOrchestras().addOrchestraListListener(getHandler());  
435          }          }
436                    
437          private static void          private static void
# Line 729  public class CC { Line 729  public class CC {
729                  SamplerChannelModel[] channels = getSamplerModel().getChannels();                  SamplerChannelModel[] channels = getSamplerModel().getChannels();
730                                    
731                  for(int i = 0; i < channels.length; i++) {                  for(int i = 0; i < channels.length; i++) {
732                          SamplerChannelModel scm = getSamplerModel().getChannelById(i);                          SamplerChannelModel scm = channels[i];
733                          exportChannelToLscpScript(scm.getChannelInfo(), i, lscpClient);                          exportChannelToLscpScript(scm.getChannelInfo(), i, lscpClient);
734                          sb.append(out.toString());                          sb.append(out.toString());
735                          out.reset();                          out.reset();
# Line 797  public class CC { Line 797  public class CC {
797                  try {                  try {
798                          lscpCLient.addSamplerChannel();                          lscpCLient.addSamplerChannel();
799                                                    
800                          int i = chn.getMidiInputDevice();                          SamplerModel sm = CC.getSamplerModel();
801                          if(i != -1) lscpCLient.setChannelMidiInputDevice(chnId, i);                          int id = chn.getMidiInputDevice();
802                            if(id != -1) {
803                                    for(int i = 0; i < sm.getMidiDeviceCount(); i++) {
804                                            if(sm.getMidiDevice(i).getDeviceId() == id) {
805                                                    lscpCLient.setChannelMidiInputDevice(chnId, i);
806                                                    break;
807                                            }
808                                    }
809                            }
810                          lscpCLient.setChannelMidiInputPort(chnId, chn.getMidiInputPort());                          lscpCLient.setChannelMidiInputPort(chnId, chn.getMidiInputPort());
811                          lscpCLient.setChannelMidiInputChannel(chnId, chn.getMidiInputChannel());                          lscpCLient.setChannelMidiInputChannel(chnId, chn.getMidiInputChannel());
812                                                    
813                          i = chn.getAudioOutputDevice();                          id = chn.getAudioOutputDevice();
814                          if(i != -1) {                          if(id != -1) {
815                                  lscpCLient.setChannelAudioOutputDevice(chnId, i);                                  for(int i = 0; i < sm.getAudioDeviceCount(); i++) {
816                                            if(sm.getAudioDevice(i).getDeviceId() == id) {
817                                                    lscpCLient.setChannelAudioOutputDevice(chnId, i);
818                                                    break;
819                                            }
820                                    }
821                                    
822                                  Integer[] routing = chn.getAudioOutputRouting();                                  Integer[] routing = chn.getAudioOutputRouting();
823                                                                    
824                                  for(int j = 0; j < routing.length; j++) {                                  for(int j = 0; j < routing.length; j++) {
# Line 821  public class CC { Line 835  public class CC {
835                          }                          }
836                                                    
837                          String s = chn.getInstrumentFile();                          String s = chn.getInstrumentFile();
838                          i = chn.getInstrumentIndex();                          int i = chn.getInstrumentIndex();
839                          if(s != null) lscpCLient.loadInstrument(s, i, chnId, true);                          if(s != null) lscpCLient.loadInstrument(s, i, chnId, true);
840                                                    
841                          if(chn.isMuted()) lscpCLient.setChannelMute(chnId, true);                          if(chn.isMuted()) lscpCLient.setChannelMute(chnId, true);

Legend:
Removed from v.1329  
changed lines
  Added in v.1467

  ViewVC Help
Powered by ViewVC