Beispiel #1
0
void FLUIDGui::processEvent(const MusECore::MidiPlayEvent& ev) 
{
      // p4.0.27 
      if (ev.type() == MusECore::ME_SYSEX)   {
            const unsigned char* data = ev.data();
            switch (*data) {
                  case FS_SEND_SOUNDFONT_NAME: {
                        //const char* filename = data+1;
                        //pathEntry->setText(QString(filename));
                        pathEntry->setText((const char*)(data+1));
                        break;
                        }
                  default:
                          #ifdef FS_DEBUG
                          printf("FLUIDGui::processEvent() : Unknown Sysex received: %d\n", ev.type());
                          #endif
                        break;
            }
      }
      else
      {
          #ifdef FS_DEBUG
          printf("FLUIDGui::processEvent - unknown event of type %dreceived from synth.\n", ev.type());
          #endif
      }    
}
Beispiel #2
0
//---------------------------------------------------------
//   processEvent
//    All events from the sequencer go here
//---------------------------------------------------------
bool ISynth::processEvent(const MusECore::MidiPlayEvent& ev)
      {
      switch(ev.type()) {
            case MusECore::ME_CONTROLLER:
                setController(ev.channel(), ev.dataA(), ev.dataB());
                //return true;  // ??
                break;            
            case MusECore::ME_NOTEON:
                  return playNote(ev.channel(), ev.dataA(), ev.dataB());
            case MusECore::ME_NOTEOFF:
                  return playNote(ev.channel(), ev.dataA(), 0);
            case MusECore::ME_SYSEX:
                  return sysex(ev.len(), ev.data());
            case MusECore::ME_PITCHBEND:
                setController(ev.channel(), MusECore::CTRL_PITCH, ev.dataA());
                break;
            // Synths are not allowed to receive ME_PROGRAM, CTRL_HBANK, or CTRL_LBANK alone anymore - only CTRL_PROGRAM.
            //case MusECore::ME_PROGRAM:
            //    setController(ev.channel(), MusECore::CTRL_PROGRAM, ev.dataA());
            //    break;   
            default:
                break;
            }
      return false;
      }
Beispiel #3
0
//---------------------------------------------------------
//   processEvent
//    All events from the sequencer go here
//---------------------------------------------------------
bool ISynth::processEvent(const MusECore::MidiPlayEvent& ev)
      {
      switch(ev.type()) {
            case MusECore::ME_CONTROLLER:
                setController(ev.channel(), ev.dataA(), ev.dataB());
                //return true;  // ??
                break;            
            case MusECore::ME_NOTEON:
                  return playNote(ev.channel(), ev.dataA(), ev.dataB());
            case MusECore::ME_NOTEOFF:
                  return playNote(ev.channel(), ev.dataA(), 0);
            case MusECore::ME_SYSEX:
                  return sysex(ev.len(), ev.data());
            case MusECore::ME_PITCHBEND:
                setController(ev.channel(), MusECore::CTRL_PITCH, ev.dataA());
                break;            
            case MusECore::ME_PROGRAM:
                setController(ev.channel(), MusECore::CTRL_PROGRAM, ev.dataA());
                break;   
            default:
                break;
            }
      return false;
      }