/[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 1524 by schoenebeck, Sun Nov 25 17:29:37 2007 UTC revision 1627 by persson, Sun Jan 6 10:53:53 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* GetFirstMidiRule();
701                MidiRule* GetNextMidiRule();
702          protected:          protected:
703              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
704    
# Line 679  namespace gig { Line 707  namespace gig {
707              void UpdateRegionKeyTable();              void UpdateRegionKeyTable();
708              friend class File;              friend class File;
709              friend class Region; // so Region can call UpdateRegionKeyTable()              friend class Region; // so Region can call UpdateRegionKeyTable()
710            private:
711                std::list<MidiRule*> MidiRules;
712                std::list<MidiRule*>::iterator MidiRulesIterator;
713      };      };
714    
715      /** @brief Group of Gigasampler objects      /** @brief Group of Gigasampler objects

Legend:
Removed from v.1524  
changed lines
  Added in v.1627

  ViewVC Help
Powered by ViewVC