Ejemplo n.º 1
0
 public Modulator(IReadable input)
 {
     _sourceModulationData = new ModulatorType(input);
     _destinationGenerator = input.ReadUInt16LE();
     _amount = input.ReadInt16LE();
     _sourceModulationAmount = new ModulatorType(input);
     _sourceTransform        = input.ReadUInt16LE();
 }
Ejemplo n.º 2
0
 public Modulator(IReadable input)
 {
     _sourceModulationData = new ModulatorType(input);
     _destinationGenerator = input.ReadUInt16LE();
     _amount = input.ReadInt16LE();
     _sourceModulationAmount = new ModulatorType(input);
     _sourceTransform = input.ReadUInt16LE();
 }
Ejemplo n.º 3
0
        public static HydraImod Load(IReadable reader)
        {
            var imod = new HydraImod();

            imod.ModSrcOper    = reader.ReadUInt16LE();
            imod.ModDestOper   = reader.ReadUInt16LE();
            imod.ModAmount     = reader.ReadInt16LE();
            imod.ModAmtSrcOper = reader.ReadUInt16LE();
            imod.ModTransOper  = reader.ReadUInt16LE();
            return(imod);
        }
Ejemplo n.º 4
0
        public SoundFontInfo(IReadable input)
        {
            Tools         = "";
            Comments      = "";
            Copyright     = "";
            TargetProduct = "";
            Author        = "";
            DataRom       = "";
            CreationDate  = "";
            BankName      = "";
            SoundEngine   = "";
            var id   = input.Read8BitChars(4);
            var size = input.ReadInt32LE();

            if (id.ToLower() != "list")
            {
                throw new Exception("Invalid soundfont. Could not find INFO LIST chunk.");
            }
            var readTo = input.Position + size;

            id = input.Read8BitChars(4);
            if (id.ToLower() != "info")
            {
                throw new Exception("Invalid soundfont. The LIST chunk is not of type INFO.");
            }

            while (input.Position < readTo)
            {
                id   = input.Read8BitChars(4);
                size = input.ReadInt32LE();
                switch (id.ToLower())
                {
                case "ifil":
                    SfVersionMajor = input.ReadInt16LE();
                    SfVersionMinor = input.ReadInt16LE();
                    break;

                case "isng":
                    SoundEngine = input.Read8BitStringLength(size);
                    break;

                case "inam":
                    BankName = input.Read8BitStringLength(size);
                    break;

                case "irom":
                    DataRom = input.Read8BitStringLength(size);
                    break;

                case "iver":
                    RomVersionMajor = input.ReadInt16LE();
                    RomVersionMinor = input.ReadInt16LE();
                    break;

                case "icrd":
                    CreationDate = input.Read8BitStringLength(size);
                    break;

                case "ieng":
                    Author = input.Read8BitStringLength(size);
                    break;

                case "iprd":
                    TargetProduct = input.Read8BitStringLength(size);
                    break;

                case "icop":
                    Copyright = input.Read8BitStringLength(size);
                    break;

                case "icmt":
                    Comments = input.Read8BitStringLength(size);
                    break;

                case "isft":
                    Tools = input.Read8BitStringLength(size);
                    break;

                default:
                    throw new Exception("Invalid soundfont. The Chunk: " + id + " was not expected.");
                }
            }
        }
Ejemplo n.º 5
0
        public SoundFontInfo(IReadable input)
        {
            Tools = "";
            Comments = "";
            Copyright = "";
            TargetProduct = "";
            Author = "";
            DataRom = "";
            CreationDate = "";
            BankName = "";
            SoundEngine = "";
            var id = input.Read8BitChars(4);
            var size = input.ReadInt32LE();
            if (id.ToLower() != "list")
                throw new Exception("Invalid soundfont. Could not find INFO LIST chunk.");
            var readTo = input.Position + size;
            id = input.Read8BitChars(4);
            if (id.ToLower() != "info")
                throw new Exception("Invalid soundfont. The LIST chunk is not of type INFO.");

            while (input.Position < readTo)
            {
                id = input.Read8BitChars(4);
                size = input.ReadInt32LE();
                switch (id.ToLower())
                {
                    case "ifil":
                        SfVersionMajor = input.ReadInt16LE();
                        SfVersionMinor = input.ReadInt16LE();
                        break;
                    case "isng":
                        SoundEngine = input.Read8BitStringLength(size);
                        break;
                    case "inam":
                        BankName = input.Read8BitStringLength(size);
                        break;
                    case "irom":
                        DataRom = input.Read8BitStringLength(size);
                        break;
                    case "iver":
                        RomVersionMajor = input.ReadInt16LE();
                        RomVersionMinor = input.ReadInt16LE();
                        break;
                    case "icrd":
                        CreationDate = input.Read8BitStringLength(size);
                        break;
                    case "ieng":
                        Author = input.Read8BitStringLength(size);
                        break;
                    case "iprd":
                        TargetProduct = input.Read8BitStringLength(size);
                        break;
                    case "icop":
                        Copyright = input.Read8BitStringLength(size);
                        break;
                    case "icmt":
                        Comments = input.Read8BitStringLength(size);
                        break;
                    case "isft":
                        Tools = input.Read8BitStringLength(size);
                        break;
                    default:
                        throw new Exception("Invalid soundfont. The Chunk: " + id + " was not expected.");
                }
            }
        }