SF2cute  0.1
Modern C++ Library for SoundFont 2
types.hpp File Reference

SoundFont 2 Basic Types and Structures. More...

#include <stdint.h>
#include <utility>
#include <tuple>
#include <string>
#include <ostream>
#include <sstream>

Classes

struct  sf2cute::RangesType
 The RangesType class represents a range for amount of generator. More...
 
union  sf2cute::GenAmountType
 The GenAmountType class represents an amount of generator. More...
 
struct  sf2cute::SFVersionTag
 The SFVersionTag class represents a version tag. More...
 
struct  std::hash< sf2cute::SFVersionTag >
 The hash template for the sf2cute::SFVersionTag class. More...
 

Enumerations

enum  sf2cute::SFSampleLink : uint16_t {
  sf2cute::SFSampleLink::kMonoSample = 1, sf2cute::SFSampleLink::kRightSample = 2, sf2cute::SFSampleLink::kLeftSample = 4, sf2cute::SFSampleLink::kLinkedSample = 8,
  sf2cute::SFSampleLink::kRomMonoSample = 0x8001, sf2cute::SFSampleLink::kRomRightSample = 0x8002, sf2cute::SFSampleLink::kRomLeftSample = 0x8004, sf2cute::SFSampleLink::kRomLinkedSample = 0x8008
}
 Values that represents both the type of sample (mono, stereo left, etc.) and the whether the sample is located in RAM or ROM memory. More...
 
enum  sf2cute::SFGenerator : uint16_t {
  kStartAddrsOffset = 0, kEndAddrsOffset, kStartloopAddrsOffset, kEndloopAddrsOffset,
  kStartAddrsCoarseOffset, kModLfoToPitch, kVibLfoToPitch, kModEnvToPitch,
  kInitialFilterFc, kInitialFilterQ, kModLfoToFilterFc, kModEnvToFilterFc,
  kEndAddrsCoarseOffset, kModLfoToVolume, kUnused1, kChorusEffectsSend,
  kReverbEffectsSend, kPan, kUnused2, kUnused3,
  kUnused4, kDelayModLFO, kFreqModLFO, kDelayVibLFO,
  kFreqVibLFO, kDelayModEnv, kAttackModEnv, kHoldModEnv,
  kDecayModEnv, kSustainModEnv, kReleaseModEnv, kKeynumToModEnvHold,
  kKeynumToModEnvDecay, kDelayVolEnv, kAttackVolEnv, kHoldVolEnv,
  kDecayVolEnv, kSustainVolEnv, kReleaseVolEnv, kKeynumToVolEnvHold,
  kKeynumToVolEnvDecay, kInstrument, kReserved1, kKeyRange,
  kVelRange, kStartloopAddrsCoarseOffset, kKeynum, kVelocity,
  kInitialAttenuation, kReserved2, kEndloopAddrsCoarseOffset, kCoarseTune,
  kFineTune, kSampleID, kSampleModes, kReserved3,
  kScaleTuning, kExclusiveClass, kOverridingRootKey, kUnused5,
  kEndOper
}
 Values that represents the type of generator. More...
 
enum  sf2cute::SFGeneralController : uint8_t {
  kNoController = 0, kNoteOnVelocity = 2, kNoteOnKeyNumber = 3, kPolyPressure = 10,
  kChannelPressure = 13, kPitchWheel = 14, kPitchWheelSensitivity = 16, kLink = 127
}
 Values that represents the type of general controller. More...
 
enum  sf2cute::SFMidiController : uint8_t {
  kBankSelect = 0, kModulationDepth, kController2, kController3,
  kController4, kPortamentoTime, kDataEntry, kChannelVolume,
  kController8, kController9, kPan, kExpression,
  kController12, kController13, kController14, kController15,
  kController16, kController17, kController18, kController19,
  kController20, kController21, kController22, kController23,
  kController24, kController25, kController26, kController27,
  kController28, kController29, kController30, kController31,
  kBankSelectLSB, kController33, kController34, kController35,
  kController36, kController37, kDataEntryLSB, kController39,
  kController40, kController41, kController42, kController43,
  kController44, kController45, kController46, kController47,
  kController48, kController49, kController50, kController51,
  kController52, kController53, kController54, kController55,
  kController56, kController57, kController58, kController59,
  kController60, kController61, kController62, kController63,
  kHold, kPortamento, kSostenuto, kSoft,
  kController68, kController69, kController70, kFilterResonance,
  kReleaseTime, kAttackTime, kBrightness, kDecayTime,
  kVibratoRate, kVibratoDepth, kVibratoDelay, kController79,
  kController80, kController81, kController82, kController83,
  kController84, kController85, kController86, kController87,
  kController88, kController89, kController90, kReverbSendLevel,
  kController92, kChorusSendLevel, kController94, kController95,
  kController96, kController97, kNRPNLSB, kNRPNMSB,
  kRPNLSB, kRPNMSB, kController102, kController103,
  kController104, kController105, kController106, kController107,
  kController108, kController109, kController110, kController111,
  kController112, kController113, kController114, kController115,
  kController116, kController117, kController118, kController119,
  kAllSoundOff, kResetAllController, kController122, kAllNotesOff,
  kOmniModeOff, kOmniModeOn, kMonoModeOn, kPolyModeOn
}
 Values that represents the type of MIDI controller. More...
 
enum  sf2cute::SFControllerPalette : uint8_t { kGeneralController = 0, kMidiController = 1 }
 Values that represents the type of controller palette. More...
 
enum  sf2cute::SFControllerDirection : uint8_t { kIncrease = 0, kDecrease = 1 }
 Values that represents the direction of controller. More...
 
enum  sf2cute::SFControllerPolarity : uint8_t { kUnipolar = 0, kBipolar = 1 }
 Values that represents the polarity of controller. More...
 
enum  sf2cute::SFControllerType : uint8_t { kLinear = 0, kConcave = 1, kConvex = 2, kSwitch = 3 }
 Values that represents the source type of controller. More...
 
enum  sf2cute::SFTransform : uint8_t { kLinear = 0, kAbsoluteValue = 2 }
 Values that represents the transform type of controller. More...
 
enum  sf2cute::SampleMode : uint16_t { sf2cute::SampleMode::kNoLoop = 0, sf2cute::SampleMode::kLoopContinuously, sf2cute::SampleMode::kUnusedNoLoop, sf2cute::SampleMode::kLoopEndsByKeyDepression }
 Values that represents the bit flags for the sampleModes generator.
 

Detailed Description

SoundFont 2 Basic Types and Structures.

Author
gocha https://github.com/gocha

Enumeration Type Documentation

enum sf2cute::SFControllerDirection : uint8_t
strong

Values that represents the direction of controller.

Remarks
This enumeration represents the D field of SFModulator type.
See also
"8.2 Modulator Source Enumerators". In SoundFont Technical Specification 2.04.
enum sf2cute::SFControllerPalette : uint8_t
strong

Values that represents the type of controller palette.

Remarks
This enumeration represents the CC field of SFModulator type.
See also
"8.2 Modulator Source Enumerators". In SoundFont Technical Specification 2.04.
enum sf2cute::SFControllerPolarity : uint8_t
strong

Values that represents the polarity of controller.

Remarks
This enumeration represents the P field of SFModulator type.
See also
"8.2 Modulator Source Enumerators". In SoundFont Technical Specification 2.04.
enum sf2cute::SFControllerType : uint8_t
strong

Values that represents the source type of controller.

Remarks
This enumeration represents the Type field of SFModulator type.
See also
"8.2.4 Source Types". In SoundFont Technical Specification 2.04.
enum sf2cute::SFGeneralController : uint8_t
strong

Values that represents the type of general controller.

Remarks
This enumeration represents the Index field of SFModulator type, while the CC field is set to 0.
See also
"8.2.1. Source Enumerator Controller Palettes". In SoundFont Technical Specification 2.04.
enum sf2cute::SFGenerator : uint16_t
strong

Values that represents the type of generator.

Remarks
This enumeration represents the official SFGenerator type.
See also
"8.1.2 Generator Enumerators Defined". In SoundFont Technical Specification 2.04.
enum sf2cute::SFMidiController : uint8_t
strong

Values that represents the type of MIDI controller.

If you want to construct SFMidiController from a control number, it can be done in SFMidiController(number).

Remarks
This enumeration represents the Index field of SFModulator type, while the CC field is set to 1. which is a kind of Modulator Source Enumerators.
See also
General MIDI Level 2 Recommended Practice (RP024).
enum sf2cute::SFSampleLink : uint16_t
strong

Values that represents both the type of sample (mono, stereo left, etc.) and the whether the sample is located in RAM or ROM memory.

Remarks
This enumeration represents the official SFSampleLink type.
See also
"4.5 SoundFont 2 RIFF File Format Type Definitions". In SoundFont Technical Specification 2.04.
enum sf2cute::SFTransform : uint8_t
strong

Values that represents the transform type of controller.

Remarks
This enumeration represents the official SFTransform type.
See also
"8.3 Modulator Transform Enumerators". In SoundFont Technical Specification 2.04.