src/FaustSawtooth.cpp
dsp_voice(dsp* dsp):decorator_dsp(dsp)
    {
        // Default versions
        fVelFun = [](int velocity) { return double(velocity)/127.0; };
        fKeyFun = [](int pitch) { return midiToFreq(pitch); };
        dsp->buildUserInterface(this);
        fNote = kFreeVoice;
        fLevel = FAUSTFLOAT(0);
        fDate = 0;
        fRelease = 0;
        fMaxRelease = dsp->getSampleRate()/2; // One 1/2 sec used in release mode to detect end of note
        extractPaths(fGatePath, fFreqPath, fGainPath);
    }
// MIDI velocity to gain conversion function
MIDI velocity to gain conversion function
MIDI velocity to gain conversion function
dsp_voice(dsp* dsp):decorator_dsp(dsp)
    {
        fVelFun = [](int velocity) { return double(velocity)/127.0; };
        fKeyFun = [](int pitch) { return midiToFreq(pitch); };
        dsp->buildUserInterface(this);
        fNote = kFreeVoice;
        fLevel = FAUSTFLOAT(0);
        fDate = 0;
        fRelease = 0;
        fMaxRelease = dsp->getSampleRate()/2; 
        extractPaths(fGatePath, fFreqPath, fGainPath);
    }
dsp_voice ( dsp * dsp ) : decorator_dsp ( dsp ) { fVelFun = [ ] ( int velocity ) { return double ( velocity ) / 127.0 ; } ; fKeyFun = [ ] ( int pitch ) { return midiToFreq ( pitch ) ; } ; dsp -> buildUserInterface ( this ) ; fNote = kFreeVoice ; fLevel = FAUSTFLOAT ( 0 ) ; fDate = 0 ; fRelease = 0 ; fMaxRelease = dsp -> getSampleRate ( ) / 2 ; extractPaths ( fGatePath , fFreqPath , fGainPath ) ; }
MIDI velocity to gain conversion function
MIDI velocity to gain conversion function
// Default versions // One 1/2 sec used in release mode to detect end of note