MCPcopy Create free account
hub / github.com/LMMS/lmms / playNote

Method playNote

plugins/monstro/Monstro.cpp:1032–1050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1030
1031
1032void MonstroInstrument::playNote( NotePlayHandle * _n,
1033 sampleFrame * _working_buffer )
1034{
1035 const fpp_t frames = _n->framesLeftForCurrentPeriod();
1036 const f_cnt_t offset = _n->noteOffset();
1037
1038 if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL )
1039 {
1040 _n->m_pluginData = new MonstroSynth( this, _n );
1041 }
1042
1043 MonstroSynth * ms = static_cast<MonstroSynth *>( _n->m_pluginData );
1044
1045 ms->renderOutput( frames, _working_buffer + offset );
1046
1047 //applyRelease( _working_buffer, _n ); // we have our own release
1048
1049 instrumentTrack()->processAudioBuffer( _working_buffer, frames + offset, _n );
1050}
1051
1052void MonstroInstrument::deleteNotePluginData( NotePlayHandle * _n )
1053{

Callers

nothing calls this directly

Calls 4

instrumentTrackFunction · 0.50
renderOutputMethod · 0.45
processAudioBufferMethod · 0.45

Tested by

no test coverage detected