--- libgig/trunk/src/gig.h 2006/10/29 17:57:20 930 +++ libgig/trunk/src/gig.h 2007/03/11 17:44:31 1093 @@ -1,8 +1,8 @@ /*************************************************************************** * * - * libgig - C++ cross-platform Gigasampler format file loader library * + * libgig - C++ cross-platform Gigasampler format file access library * * * - * Copyright (C) 2003-2006 by Christian Schoenebeck * + * Copyright (C) 2003-2007 by Christian Schoenebeck * * * * * * This library is free software; you can redistribute it and/or modify * @@ -210,12 +210,14 @@ dimension_none = 0x00, ///< Dimension not in use. dimension_samplechannel = 0x80, ///< If used sample has more than one channel (thus is not mono). dimension_layer = 0x81, ///< For layering of up to 8 instruments (and eventually crossfading of 2 or 4 layers). - dimension_velocity = 0x82, ///< Key Velocity (this is the only dimension where the ranges can exactly be defined). + dimension_velocity = 0x82, ///< Key Velocity (this is the only dimension in gig2 where the ranges can exactly be defined). dimension_channelaftertouch = 0x83, ///< Channel Key Pressure dimension_releasetrigger = 0x84, ///< Special dimension for triggering samples on releasing a key. dimension_keyboard = 0x85, ///< Dimension for keyswitching dimension_roundrobin = 0x86, ///< Different samples triggered each time a note is played, dimension regions selected in sequence dimension_random = 0x87, ///< Different samples triggered each time a note is played, random order + dimension_smartmidi = 0x88, ///< For MIDI tools like legato and repetition mode + dimension_roundrobinkeyboard = 0x89, ///< Different samples triggered each time a note is played, any key advances the counter dimension_modwheel = 0x01, ///< Modulation Wheel (MIDI Controller 1) dimension_breath = 0x02, ///< Breath Controller (Coarse, MIDI Controller 2) dimension_foot = 0x04, ///< Foot Pedal (Coarse, MIDI Controller 4) @@ -324,7 +326,7 @@ class Region; class Group; - /** Encapsulates articulation information of a dimension region. + /** @brief Encapsulates articulation information of a dimension region. * * Every Gigasampler Instrument has at least one dimension region * (exactly then when it has no dimension defined). @@ -338,7 +340,7 @@ */ class DimensionRegion : protected DLS::Sampler { public: - uint8_t VelocityUpperLimit; ///< Defines the upper velocity value limit of a velocity split (only if an user defined limit was set, thus a value not equal to 128/NumberOfSplits, else this value is 0). + uint8_t VelocityUpperLimit; ///< Defines the upper velocity value limit of a velocity split (only if an user defined limit was set, thus a value not equal to 128/NumberOfSplits, else this value is 0). Only for gig2, otherwise the DimensionUpperLimts are used instead. Sample* pSample; ///< Points to the Sample which is assigned to the dimension region. // Sample Amplitude EG/LFO uint16_t EG1PreAttack; ///< Preattack value of the sample amplitude EG (0 - 1000 permille). @@ -422,6 +424,7 @@ bool MSDecode; ///< Gigastudio flag: defines if Mid Side Recordings should be decoded. uint16_t SampleStartOffset; ///< Number of samples the sample start should be moved (0 - 2000). double SampleAttenuation; ///< Sample volume (calculated from DLS::Sampler::Gain) + uint8_t DimensionUpperLimits[8]; ///< gig3: defines the upper limit of the dimension values for this dimension region // derived attributes from DLS::Sampler DLS::Sampler::UnityNote; @@ -710,6 +713,7 @@ Group* GetGroup(uint index); Group* AddGroup(); void DeleteGroup(Group* pGroup); + void DeleteGroupOnly(Group* pGroup); virtual ~File(); protected: // overridden protected methods from DLS::File @@ -727,7 +731,14 @@ std::list::iterator GroupsIterator; }; - /** Will be thrown whenever a gig specific error occurs while trying to access a Gigasampler File. */ + /** + * Will be thrown whenever a gig specific error occurs while trying to + * access a Gigasampler File. Note: In your application you should + * better catch for RIFF::Exception rather than this one, except you + * explicitly want to catch and handle gig::Exception, DLS::Exception + * and RIFF::Exception independently, which usually shouldn't be + * necessary though. + */ class Exception : public DLS::Exception { public: Exception(String Message);