Added post processing volume (output)

pull/1/head
Holger Wirtz 8 years ago
parent fbcbb98397
commit 02c9fafb25
  1. 2
      src/Dexed.ttl
  2. 7
      src/dexed.cpp
  3. 1
      src/dexed.h

@ -73,7 +73,7 @@
lv2:name "Output" ; lv2:name "Output" ;
lv2:default 1.000000 ; lv2:default 1.000000 ;
lv2:minimum 0.0 ; lv2:minimum 0.0 ;
lv2:maximum 1.0 ; lv2:maximum 2.0 ;
] , ] ,
[ [
a lv2:InputPort, lv2:ControlPort ; a lv2:InputPort, lv2:ControlPort ;

@ -48,6 +48,13 @@ void DexedVoice::render(uint32_t from, uint32_t to)
} }
} }
void DexedVoice::post_process(uint32_t from, uint32_t to)
{
for (uint32_t i = from; i < to; ++i)
{
p(p_lv2_audio_out_1)[i] *= *p(p_output);
}
}
//============================================================================== //==============================================================================

@ -54,6 +54,7 @@ class DexedVoice : public lvtk::Voice
void off(unsigned char velocity); void off(unsigned char velocity);
unsigned char get_key(void) const; unsigned char get_key(void) const;
void render(uint32_t from, uint32_t to); void render(uint32_t from, uint32_t to);
void post_process(uint32_t from, uint32_t to);
protected: protected:
unsigned char m_key; unsigned char m_key;

Loading…
Cancel
Save