예제 #1
0
bool ZynAddSubFxInstrument::handleMidiEvent( const MidiEvent& event, const MidiTime& time, f_cnt_t offset )
{
    // do not forward external MIDI Control Change events if the according
    // LED is not checked
    if( event.type() == MidiControlChange &&
            event.sourcePort() != this &&
            m_forwardMidiCcModel.value() == false )
    {
        return true;
    }

    MidiEvent localEvent = event;
    localEvent.setChannel( 0 );
    m_pluginMutex.lock();
    if( m_remotePlugin )
    {
        m_remotePlugin->processMidiEvent( localEvent, 0 );
    }
    else
    {
        m_plugin->processMidiEvent( localEvent );
    }
    m_pluginMutex.unlock();

    return true;
}
예제 #2
0
void MidiChannel::sendMidi(const Action* a, int localFrame)
{
	if (isPlaying() && !mute) {
		if (midiOut) {
			MidiEvent event = a->event;
			event.setChannel(midiOutChan);
			kernelMidi::send(event.getRaw());
		}
#ifdef WITH_VST
		addVstMidiEvent(a->event.getRaw(), localFrame);
#endif
	}
}