public static void changeLiveTuning() {
	if(kbPanel == null){
	    return;
	}
	if((sineCombo.getSelectedIndex() > 0) || (jKeyStrings.getSelectedIndex() > 0))
	    try{
		kbPanel.setFrequencies(tuningSchemes.getPitchShifts((String)jTunings.getSelectedItem(),2,jNotes.getSelectedIndex(),jTuningAdvancedPanel.getRootNote(), jTuningAdvancedPanel.getFrequency()),jNotes.getSelectedIndex(),jTuningAdvancedPanel.getRootNote(),jTuningAdvancedPanel.getFrequency());
	    } catch (Exception e) {}

	// set the program
	int program = jProgram.getSelectedIndex();

	// set the tuning
	int pitchshift[] = {0,0,0,0,0,0,0,0,0,0,0,0};
	// load the pitch shift values for each channel
	int rootnote = jNotes.getSelectedIndex();
	try{
	    pitchshift = tuningSchemes.getPitchShifts((String)jTunings.getSelectedItem(),2,rootnote,jTuningAdvancedPanel.getRootNote(), jTuningAdvancedPanel.getFrequency());
	} catch (Exception e){
	    displayerror(e.getMessage());
	}
	
	
	kbPanel.setProgram(program);
	kbPanel.setPitchShifts(pitchshift,rootnote);
	// fire an event on jKeyStrings to update the strings if
	// strings are shown
	//int keystringi = ;
	if(jKeyStrings.getSelectedIndex() > 0){
	    updateKeyStrings(jKeyStrings.getSelectedIndex());

	    //jKeyStrings.setSelectedIndex(-1);
	    //jKeyStrings.setSelectedIndex(keystringi);
	}
	
	/////////////////////
	if(!(theSequencer == null)){
	    // a call to seSequencerTickPosition will automatically write
	    // the changed data where it will be immediately processed
	    // by the synth
	    if(theSequencer.isRunning()){
		long pos = theSequencer.getTickPosition();
		startSequence(pos);
	    }
	    //setSequencerTickPosition(pos);
	}
	/////////////
	// pitch shifts should take place immediately - don't know
	// why I had the next line - but having it makes things not
	// smooth when you slide the general meantone slider
	//kbPanel.replayAllNotes();
    }