--- linuxsampler/trunk/src/engines/sfz/sfz.h 2011/04/25 08:12:36 2175 +++ linuxsampler/trunk/src/engines/sfz/sfz.h 2011/07/28 15:47:51 2220 @@ -51,7 +51,9 @@ class Sample : public LinuxSampler::SampleFileBase { public: - Sample(String File, bool DontClose = false) : LinuxSampler::SampleFileBase(File, DontClose) { } + Sample(String File, bool DontClose = false, uint offset = 0): LinuxSampler::SampleFileBase(File, DontClose) { + Offset = offset; + } virtual ~Sample() { } }; @@ -70,7 +72,7 @@ class SampleManager : public LinuxSampler::SampleManager { public: - Sample* FindSample(std::string samplePath); + Sample* FindSample(std::string samplePath, int offset); protected: virtual void OnSampleInUse(Sample* pSample) { @@ -238,6 +240,19 @@ EG(); }; + class LFO + { + public: + float freq; // 0 to 20 Hz + uint wave; // 0 to 4294967296 + float delay; // 0 to 100 seconds + int pitch; // -9600 to 9600 cents + int cutoff; // -9600 to 9600 cents + float resonance; // 0 to 40 dB + float pan; // -100 to 100 % + LFO(); + }; + // Fixed size array with copy-on-write semantics template class Array @@ -396,8 +411,11 @@ //Deprecated (from version 1) float ampeg_delay, ampeg_start, ampeg_attack, ampeg_hold, ampeg_decay, ampeg_sustain, ampeg_release; + float ampeg_vel2delay, ampeg_vel2attack, ampeg_vel2hold, ampeg_vel2decay, ampeg_vel2sustain, ampeg_vel2release; float fileg_delay, fileg_start, fileg_attack, fileg_hold, fileg_decay, fileg_sustain, fileg_release; float pitcheg_delay, pitcheg_start, pitcheg_attack, pitcheg_hold, pitcheg_decay, pitcheg_sustain, pitcheg_release; + float pitcheg_vel2delay, pitcheg_vel2attack, pitcheg_vel2hold, pitcheg_vel2decay, pitcheg_vel2sustain, pitcheg_vel2release; + int pitcheg_depth; float amplfo_delay, amplfo_fade, amplfo_freq, amplfo_depth; float fillfo_delay, fillfo_fade, fillfo_freq, fillfo_depth; float pitchlfo_delay, pitchlfo_fade, pitchlfo_freq; @@ -405,6 +423,9 @@ // envelope generators LinuxSampler::ArrayList eg; + + // low frequency oscillators + LinuxSampler::ArrayList lfos; }; class Query { @@ -546,6 +567,7 @@ int parseKey(const std::string& value); EG& eg(int x); EGNode& egnode(int x, int y); + LFO& lfo(int x); std::string currentDir; /// Pointer to the Instrument belonging to this file