// if (type == NOTE_ON || type == NOTE_OFF) 
private void addNoteAsFingerMarker(byte[] dat) {
		final int command = dat[0] & 0xf0;
		final int channel = dat[0] & 0x0f;
		int note = dat[1];
		final int velocity = dat[2];
		// if (type == NOTE_ON || type == NOTE_OFF) 
		if ((command & 0x80) == 0x80) {
			// only show if channel switch is on
			if (GuitarChannel.isChannelEnabled(chanTog, channel)) {
				GuitarChannel guitarchannel = GuitarChannel.get(gchannels,
						channel);
				if (command == NOTEON && velocity != 0) {
					printMessage(dat);
					guitarchannel.noteOn(note);
				} else /* if (command == NOTEOFF || velocity == 0) */{
					guitarchannel.noteOff(note);
				}
			}
			// update progress slider periodically
			if (noteCount % 30 == 0) {
				// need to figure out why this doesn't work
				// float percent = sequencer.getTickPosition() /
				// sequence.getTickLength() * 100;
				GuitarView.getProgSlide().setValue(sequencer.getTickPosition());
				// GuitarView.getProgSlide().setValueLabel(String.format("%d",
				// percent));
				// GuitarView.myTextarea.append(String.format("%d", percent) +
				// "\n");
			}
			noteCount++;
		}
	}
int note = dat[1];
final int velocity = dat[2];
// if (type == NOTE_ON || type == NOTE_OFF)
if ((command & 0x80) == 0x80) {
// only show if channel switch is on
private void addNoteAsFingerMarker(byte[] dat) {
final int command = dat[0] & 0xf0;
final int channel = dat[0] & 0x0f;
int note = dat[1];
final int velocity = dat[2];
// if (type == NOTE_ON || type == NOTE_OFF)
if ((command & 0x80) == 0x80) {
// only show if channel switch is on
if (GuitarChannel.isChannelEnabled(chanTog, channel)) {
GuitarChannel guitarchannel = GuitarChannel.get(gchannels,
channel);
if (command == NOTEON && velocity != 0) {
printMessage(dat);
guitarchannel.noteOn(note);
} else /* if (command == NOTEOFF || velocity == 0) */{
guitarchannel.noteOff(note);
private void addNoteAsFingerMarker(byte[] dat) {
final int command = dat[0] & 0xf0;
final int channel = dat[0] & 0x0f;
int note = dat[1];
final int velocity = dat[2];
// if (type == NOTE_ON || type == NOTE_OFF)
if ((command & 0x80) == 0x80) {
// only show if channel switch is on
if (GuitarChannel.isChannelEnabled(chanTog, channel)) {
GuitarChannel guitarchannel = GuitarChannel.get(gchannels,
channel);
if (command == NOTEON && velocity != 0) {
printMessage(dat);
guitarchannel.noteOn(note);
} else /* if (command == NOTEOFF || velocity == 0) */{
guitarchannel.noteOff(note);
}
}
// update progress slider periodically
if (noteCount % 30 == 0) {
// need to figure out why this doesn't work
// float percent = sequencer.getTickPosition() /
// sequence.getTickLength() * 100;
GuitarView.getProgSlide().setValue(sequencer.getTickPosition());
// GuitarView.getProgSlide().setValueLabel(String.format("%d",
// percent));