/[svn]/linuxsampler/trunk/src/engines/sfz/sfz.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/sfz.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2027 by iliev, Tue Nov 3 19:27:42 2009 UTC revision 2055 by persson, Sat Jan 30 10:30:02 2010 UTC
# Line 2  Line 2 
2   *                                                                         *   *                                                                         *
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2008-2009 Anders Dahnielson <anders@dahnielson.com>     *   *   Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com>          *
6   *   Copyright (C) 2009 Grigor Iliev                                       *   *   Copyright (C) 2009 - 2010 Anders Dahnielson and Grigor Iliev          *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 32  Line 32 
32    
33  #include "../common/SampleFile.h"  #include "../common/SampleFile.h"
34  #include "../common/SampleManager.h"  #include "../common/SampleManager.h"
35    #include "../../common/ArrayList.h"
36    
37  #define TRIGGER_ATTACK  ((unsigned char) (1 << 0)) // 0x01  #define TRIGGER_ATTACK  ((unsigned char) (1 << 0)) // 0x01
38  #define TRIGGER_RELEASE ((unsigned char) (1 << 1)) // 0x02  #define TRIGGER_RELEASE ((unsigned char) (1 << 1)) // 0x02
39  #define TRIGGER_FIRST   ((unsigned char) (1 << 2)) // 0x04  #define TRIGGER_FIRST   ((unsigned char) (1 << 2)) // 0x04
40  #define TRIGGER_LEGATO  ((unsigned char) (1 << 3)) // 0x08  #define TRIGGER_LEGATO  ((unsigned char) (1 << 3)) // 0x08
41    
42  namespace sfz  namespace sfz
43  {  {
44      // Forward declarations      // Forward declarations
45      class Articulation;      class Articulation;
# Line 46  namespace sfz Line 47  namespace sfz
47      class Group;      class Group;
48      class Instrument;      class Instrument;
49      class File;      class File;
50        
51      class Sample : public LinuxSampler::SampleFileBase<Region> {      class Sample : public LinuxSampler::SampleFileBase<Region> {
52          public:          public:
53              Sample(String File, bool DontClose = false) : LinuxSampler::SampleFileBase<Region>(File, DontClose) { }              Sample(String File, bool DontClose = false) : LinuxSampler::SampleFileBase<Region>(File, DontClose) { }
# Line 214  namespace sfz Line 215  namespace sfz
215          virtual ~Articulation();          virtual ~Articulation();
216      };      };
217    
218        class EGNode
219        {
220        public:
221            float time;
222            float level;
223            float shape;
224            float curve;
225            EGNode();
226        };
227    
228        class EG
229        {
230        public:
231            LinuxSampler::ArrayList<EGNode> node;
232            int sustain;
233            int loop;
234            int loop_count;
235            float amplitude;
236            float cutoff;
237            EG();
238        };
239    
240      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////
241      // class Definition      // class Definition
242    
# Line 331  namespace sfz Line 354  namespace sfz
354          float ampeg_delay, ampeg_start, ampeg_attack, ampeg_hold, ampeg_decay, ampeg_sustain, ampeg_release;          float ampeg_delay, ampeg_start, ampeg_attack, ampeg_hold, ampeg_decay, ampeg_sustain, ampeg_release;
355          float fileg_delay, fileg_start, fileg_attack, fileg_hold, fileg_decay, fileg_sustain, fileg_release;          float fileg_delay, fileg_start, fileg_attack, fileg_hold, fileg_decay, fileg_sustain, fileg_release;
356          float pitcheg_delay, pitcheg_start, pitcheg_attack, pitcheg_hold, pitcheg_decay, pitcheg_sustain, pitcheg_release;          float pitcheg_delay, pitcheg_start, pitcheg_attack, pitcheg_hold, pitcheg_decay, pitcheg_sustain, pitcheg_release;
357    
358            // envelope generators
359            LinuxSampler::ArrayList<EG> eg;
360      };      };
361    
362      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////
# Line 459  namespace sfz Line 485  namespace sfz
485          void  push_opcode(std::string token);          void  push_opcode(std::string token);
486          int   parseInt(std::string value);          int   parseInt(std::string value);
487          float parseFloat(std::string value);          float parseFloat(std::string value);
488            EG& eg(int x);
489            EGNode& egnode(int x, int y);
490    
491          std::string currentDir;          std::string currentDir;
492          /// Pointer to the Instrument belonging to this file          /// Pointer to the Instrument belonging to this file

Legend:
Removed from v.2027  
changed lines
  Added in v.2055

  ViewVC Help
Powered by ViewVC