/[svn]/libgig/trunk/src/gig.h
ViewVC logotype

Diff of /libgig/trunk/src/gig.h

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

revision 1416 by schoenebeck, Sun Oct 14 12:06:32 2007 UTC revision 1678 by persson, Sun Feb 10 16:07:22 2008 UTC
# Line 639  namespace gig { Line 639  namespace gig {
639              friend class Instrument;              friend class Instrument;
640      };      };
641    
642        /** Abstract base class for all MIDI rules. */
643        class MidiRule {
644            public:
645                virtual ~MidiRule() { }
646        };
647    
648        /** MIDI rule for triggering notes by control change events. */
649        class MidiRuleCtrlTrigger : public MidiRule {
650            public:
651                uint8_t ControllerNumber;   ///< MIDI controller number.
652                uint8_t Triggers;           ///< Number of triggers.
653                struct trigger_t {
654                    uint8_t TriggerPoint;   ///< The CC value to pass for the note to be triggered.
655                    bool    Descending;     ///< If the change in CC value should be downwards.
656                    uint8_t VelSensitivity; ///< How sensitive the velocity should be to the speed of the controller change.
657                    uint8_t Key;            ///< Key to trigger.
658                    bool    NoteOff;        ///< If a note off should be triggered instead of a note on.
659                    uint8_t Velocity;       ///< Velocity of the note to trigger. 255 means that velocity should depend on the speed of the controller change.
660                    bool    OverridePedal;  ///< If a note off should be triggered even if the sustain pedal is down.
661                } pTriggers[32];
662    
663            protected:
664                MidiRuleCtrlTrigger(RIFF::Chunk* _3ewg);
665                friend class Instrument;
666        };
667    
668      /** Provides all neccessary information for the synthesis of an <i>Instrument</i>. */      /** Provides all neccessary information for the synthesis of an <i>Instrument</i>. */
669      class Instrument : protected DLS::Instrument {      class Instrument : protected DLS::Instrument {
670          public:          public:
# Line 671  namespace gig { Line 697  namespace gig {
697              virtual void UpdateChunks();              virtual void UpdateChunks();
698              // own methods              // own methods
699              Region*   GetRegion(unsigned int Key);              Region*   GetRegion(unsigned int Key);
700                MidiRule* GetMidiRule(int i);
701          protected:          protected:
702              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key
703    
# Line 679  namespace gig { Line 706  namespace gig {
706              void UpdateRegionKeyTable();              void UpdateRegionKeyTable();
707              friend class File;              friend class File;
708              friend class Region; // so Region can call UpdateRegionKeyTable()              friend class Region; // so Region can call UpdateRegionKeyTable()
709            private:
710                MidiRule** pMidiRules;
711      };      };
712    
713      /** @brief Group of Gigasampler objects      /** @brief Group of Gigasampler objects
# Line 749  namespace gig { Line 778  namespace gig {
778              Group*      AddGroup();              Group*      AddGroup();
779              void        DeleteGroup(Group* pGroup);              void        DeleteGroup(Group* pGroup);
780              void        DeleteGroupOnly(Group* pGroup);              void        DeleteGroupOnly(Group* pGroup);
781                void        SetAutoLoad(bool b);
782                bool        GetAutoLoad();
783              virtual    ~File();              virtual    ~File();
784              virtual void UpdateChunks();              virtual void UpdateChunks();
785          protected:          protected:
# Line 766  namespace gig { Line 797  namespace gig {
797          private:          private:
798              std::list<Group*>*          pGroups;              std::list<Group*>*          pGroups;
799              std::list<Group*>::iterator GroupsIterator;              std::list<Group*>::iterator GroupsIterator;
800                bool                        bAutoLoad;
801      };      };
802    
803      /**      /**

Legend:
Removed from v.1416  
changed lines
  Added in v.1678

  ViewVC Help
Powered by ViewVC