/* * static RiffChunkListWvpl() * { * chunkTypeDictionary = new Dictionary<string, Type>(); * * bodyTypeDictionary = new Dictionary<string, Type>(); * // chunkTypeDictionary.Add( RiffChunkList.ID, typeof( RiffChunkList ) ); * bodyTypeDictionary.Add( RiffChunkListWave.TYPE, typeof( RiffChunkListWave ) ); * }*/ public RiffChunkListWvpl(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { type = TYPE; waveListList = GetChunkListList("LIST", RiffChunkListWave.TYPE); }
public RiffChunkListSdta(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { type = TYPE; smplBody = ( RiffChunkSmpl )GetChunk(RiffChunkSmpl.ID); }
public RiffChunkXxdb(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { dataArray = aByteArray.ReadBytes(( int )size); informationList.Add("Data Array:" + dataArray); }
public RiffChunkListWvpl(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; waveListList = GetChunkListList("LIST", RiffChunkListWave.TYPE); }
public RiffChunkAvih(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { microSecPerFrame = aByteArray.ReadUInt32(); maxBytesPerSec = aByteArray.ReadUInt32(); paddingGranularity = aByteArray.ReadUInt32(); flags = aByteArray.ReadUInt32(); totalFrames = aByteArray.ReadUInt32(); initialFrames = aByteArray.ReadUInt32(); streams = aByteArray.ReadUInt32(); suggestedBufferSize = aByteArray.ReadUInt32(); width = aByteArray.ReadUInt32(); height = aByteArray.ReadUInt32(); reserved = aByteArray.ReadBytes(16); informationList.Add("Micro Sec Per Frame:" + microSecPerFrame); informationList.Add("Max Bytes Per Sec:" + maxBytesPerSec); informationList.Add("Padding Granularity:" + paddingGranularity); informationList.Add("Flags:" + flags); informationList.Add("Total Frames:" + totalFrames); informationList.Add("Initial Frames:" + initialFrames); informationList.Add("Streams:" + streams); informationList.Add("Suggested Buffer Size:" + suggestedBufferSize); informationList.Add("Width:" + width); informationList.Add("Height:" + height); informationList.Add("Reserved:" + reserved); }
public RiffChunkSmpl(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { manufacturer = aByteArray.ReadUInt32(); product = aByteArray.ReadUInt32(); samplePeriod = aByteArray.ReadUInt32(); midiUnityNote = aByteArray.ReadUInt32(); midiPitchFraction = aByteArray.ReadUInt32(); smpteFormat = aByteArray.ReadUInt32(); smpteOffset = aByteArray.ReadUInt32(); sampleLoops = aByteArray.ReadUInt32(); samplerData = aByteArray.ReadUInt32(); informationList.Add("Manufacturer:" + manufacturer); informationList.Add("Product:" + product); informationList.Add("Sample Period:" + samplePeriod); informationList.Add("Midi Unity Note:" + midiUnityNote); informationList.Add("Midi Pitch Fraction:" + midiPitchFraction); informationList.Add("SMPTE Format:" + smpteFormat); informationList.Add("SMPTE Offset:" + smpteOffset); informationList.Add("Sample Loops:" + sampleLoops); informationList.Add("Sampler Data:" + samplerData); sampleLoopList = new List <SampleLoop>(); for (int i = 0; i < sampleLoops; i++) { informationList.Add("----------------"); sampleLoopList.Add(new SampleLoop(aByteArray, informationList)); } }
public RiffChunkListMovi(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; chunkXxdb = ( RiffChunkXxdb )GetChunk(RiffChunkXxdb.ID); }
public RiffChunkSmpl(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { aByteArray.AddPosition(( int )size); informationList.Add("Sample Data:" + size); }
public RiffDls_Msyn(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { msyn = aByteArray.ReadUInt32(); informationList.Add("Msyn:" + msyn); }
public readonly string codingHistory; // ASCII or S-JIS, Coding history public RiffChunkBext(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { description = aByteArray.ReadString(256); originator = aByteArray.ReadString(32); originatorReference = aByteArray.ReadString(32); originationDate = aByteArray.ReadString(10); originationTime = aByteArray.ReadString(8); timeReferenceLow = aByteArray.ReadUInt32(); timeReferenceHigh = aByteArray.ReadUInt32(); version = aByteArray.ReadUInt16(); umid = aByteArray.ReadBytes(64); reserved = aByteArray.ReadBytes(190); codingHistory = aByteArray.ReadString(( int )(size - 256 - 32 - 32 - 10 - 8 - 4 - 4 - 2 - 64 - 190)); informationList.Add("Description:" + description); informationList.Add("Originator:" + originator); informationList.Add("Originator Reference:" + originatorReference); informationList.Add("Origination Date:" + originationDate); informationList.Add("Origination Time:" + originationTime); informationList.Add("Time Reference Low:" + timeReferenceLow.ToString()); informationList.Add("Time Reference High:" + timeReferenceHigh.ToString()); informationList.Add("Version:" + version.ToString()); informationList.Add("UMID:" + umid.ToString()); informationList.Add("Reserved:" + reserved.ToString()); informationList.Add("Coding History:" + codingHistory); }
public RiffWaveFact(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { sampleLength = aByteArray.ReadUInt32(); informationList.Add("Sample Length:" + sampleLength); }
public RiffChunkListSdta(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; smplBody = ( RiffChunkSmpl )GetChunk(RiffChunkSmpl.ID); }
public RiffDls_Art2(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { tuning = 0; count = 0; // To Be Fixed. lsize = aByteArray.ReadUInt32(); collectionBlocks = aByteArray.ReadUInt32(); informationList.Add("Size:" + lsize); informationList.Add("Collection Blocks:" + collectionBlocks); collectionBlock = new CollectionBlock[collectionBlocks]; for (int i = 0; i < collectionBlocks; i++) { collectionBlock[i] = new CollectionBlock(aByteArray, informationList); if (collectionBlock[i].destination == 3 && count < 1) { tuning = collectionBlock[i].scale; count++; } } }
/* * static RiffChunkListLins() * { * chunkTypeDictionary = new Dictionary<string, Type>(); * * bodyTypeDictionary = new Dictionary<string, Type>(); * // chunkTypeDictionary.Add( RiffChunkList.ID, typeof( RiffChunkList ) ); * bodyTypeDictionary.Add( RiffChunkListIns_.TYPE, typeof( RiffChunkListIns_ ) ); * }*/ public RiffChunkListLins(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { type = TYPE; ins_ListList = GetChunkListList("LIST", "ins "); }
public RiffChunkWsmp(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { lsize = aByteArray.ReadUInt32(); unityNote = aByteArray.ReadUInt16(); fineTune = aByteArray.ReadInt16(); attenuation = aByteArray.ReadInt32(); options = aByteArray.ReadUInt32(); sampleLoops = aByteArray.ReadUInt32(); informationList.Add("Size:" + lsize); informationList.Add("Unity Note:" + unityNote); informationList.Add("Fine Tune:" + fineTune); informationList.Add("Attenuation:" + attenuation); informationList.Add("Options:" + options); informationList.Add("Sample Loops:" + sampleLoops); waveSampleLoop = new WaveSampleLoop[sampleLoops]; for (int i = 0; i < sampleLoops; i++) { informationList.Add("Wave Sample Loop:"); waveSampleLoop[i] = new WaveSampleLoop(aByteArray, informationList); } }
public RiffDls_Colh(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { instruments = aByteArray.ReadUInt32(); informationList.Add("Instruments:" + instruments); }
public RiffDls_Data(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { informationList.Add("Sample Array:" + position); aByteArray.SetPosition(( int )(position + Size)); }
public RiffChunkListLar2(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; art1Body = ( RiffChunkArt1 )GetChunk(RiffChunkArt1.ID); art2Body = ( RiffChunkArt2 )GetChunk(RiffChunkArt2.ID); }
public RiffChunkListStrl(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; chunkStrf = ( RiffChunkStrf )GetChunk(RiffChunkStrf.ID); chunkStrh = ( RiffChunkStrh )GetChunk(RiffChunkStrh.ID); }
/* * static RiffChunkListLar2() * { * chunkTypeDictionary = new Dictionary<string, Type>(); * chunkTypeDictionary.Add( RiffDls_Art1.ID, typeof( RiffDls_Art1 ) ); * chunkTypeDictionary.Add( RiffDls_Art2.ID, typeof( RiffDls_Art2 ) ); * * bodyTypeDictionary = new Dictionary<string, Type>(); * } */ public RiffChunkListLar2(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { type = TYPE; art1Body = ( RiffDls_Art1 )GetChunk(RiffDls_Art1.ID); art2Body = ( RiffDls_Art2 )GetChunk(RiffDls_Art2.ID); }
public RiffChunkListAvi_(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; moviBodyList = ( RiffChunkListMovi )GetChunkList("LIST", RiffChunkListMovi.TYPE); hdrlBodyList = ( RiffChunkListHdrl )GetChunkList("LIST", RiffChunkListHdrl.TYPE); }
/* * static RiffChunkListLrgn() * { * chunkTypeDictionary = new Dictionary<string, Type>(); * * bodyTypeDictionary = new Dictionary<string, Type>(); * // chunkTypeDictionary.Add( RiffChunkList.ID, typeof( RiffChunkList ) ); * bodyTypeDictionary.Add( RiffChunkListRgn_.TYPE, typeof( RiffChunkListRgn_ ) ); * bodyTypeDictionary.Add( RiffChunkListRgn2.TYPE, typeof( RiffChunkListRgn2 ) ); * }*/ public RiffChunkListLrgn(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { type = TYPE; rgn_ListList = GetChunkListList("LIST", RiffChunkListRgn_.TYPE); rgn2ListList = GetChunkListList("LIST", RiffChunkListRgn2.TYPE); }
public SoundclusterDls(RiffDls_Riff aDls_Riff) { BankDictionary = new Dictionary <int, ABank>(); RiffDls_Riff dls_Riff = aDls_Riff; List <WaveformReaderPcm> lWaveformList = new List <WaveformReaderPcm>(); try { Logger.Error(dls_Riff.GetChunk("LIST").GetType().ToString()); RiffChunkList lRiffChunkList = ( RiffChunkList )dls_Riff.GetChunk("LIST"); List <RiffChunkList> wvplListList = lRiffChunkList.GetChunkListList("LIST", RiffChunkListWvpl.TYPE); //RiffChunkListWvpl wvplList = ( RiffChunkListWvpl )dls_Riff.wvplListList; List <RiffChunkList> waveListList = wvplListList[0].GetChunkListList("LIST", RiffChunkListWave.TYPE); for (int i = 0; i < waveListList.Count; i++) { RiffChunkListWave lWaveList = ( RiffChunkListWave )waveListList[i]; lWaveformList.Add(new WaveformReaderPcm(lWaveList, dls_Riff.name)); } RiffChunkListLins linsList = ( RiffChunkListLins )dls_Riff.linsListList; Logger.Warning("linsList.ins_ListList.Count:" + linsList.ins_ListList.Count); for (int i = 0; i < linsList.ins_ListList.Count; i++) { RiffChunkListIns_ ins_List = ( RiffChunkListIns_ )linsList.ins_ListList[i]; RiffDls_Insh inshChunk = ( RiffDls_Insh )ins_List.inshChunk; int bank = ( int )inshChunk.midiLocal.bank; if (( uint )bank == 0x80000000) { Logger.Warning("Change Bank:" + bank.ToString("X8")); bank = 0x7F00; } if (BankDictionary.ContainsKey(bank) == false) { Logger.Warning("Bank:" + bank.ToString("X8")); BankDictionary.Add(bank, new BankDls()); } BankDls lDlsBank = ( BankDls )BankDictionary[bank]; lDlsBank.AddInstrument(ins_List, lWaveformList); } } catch (Exception aExpection) { Logger.Error("Expection at RIFF Read:" + aExpection.ToString()); } }
public RiffChunkLabl(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { name = aByteArray.ReadUInt32(); data = aByteArray.ReadString(( int )size - 4); informationList.Add(" Name:" + name); informationList.Add(" Data:" + data); }
public RiffChunkInsh(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { regions = aByteArray.ReadUInt32(); informationList.Add("Regions:" + regions); midiLocal = new MidiLocal(aByteArray, informationList); }
public RiffChunkVers(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { versionMs = aByteArray.ReadUInt32(); versionLs = aByteArray.ReadUInt32(); informationList.Add("Version Ms:" + versionMs); informationList.Add("Version Ls:" + versionLs); }
public RiffChunkListSfbk(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(chunkTypeDictionary, bodyTypeDictionary, aId, aSize, aByteArray, aParent) { type = TYPE; sdtaListList = GetChunkListList("LIST", RiffChunkListSdta.TYPE); pdtaListList = GetChunkListList("LIST", RiffChunkListPdta.TYPE); sdtaBodyList = ( RiffChunkListSdta )GetChunkList("LIST", RiffChunkListSdta.TYPE); }
/* * static RiffChunkListIns_() * { * Dictionary<string, Type> lChunkTypeDictionary = new Dictionary<string, Type>(); * lChunkTypeDictionary.Add( RiffDls_Dlid.ID, typeof( RiffDls_Dlid ) ); * lChunkTypeDictionary.Add( RiffDls_Insh.ID, typeof( RiffDls_Insh ) ); * * ChunkTypeDictionaryDictionary = new Dictionary<string, Dictionary<string,Type>>(); * ChunkTypeDictionaryDictionary.Add( "ins ", lChunkTypeDictionary ); * * //bodyTypeDictionary = new Dictionary<string, Type>(); * // chunkTypeDictionary.Add( RiffChunkList.ID, typeof( RiffChunkList ) ); * //bodyTypeDictionary.Add( RiffChunkListLrgn.TYPE, typeof( RiffChunkListLrgn ) ); * //bodyTypeDictionary.Add( RiffChunkListLart.TYPE, typeof( RiffChunkListLart ) ); * //bodyTypeDictionary.Add( RiffInfoList.TYPE, typeof( RiffInfoList ) ); * } */ public RiffChunkListIns_(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { dlidChunk = ( RiffDls_Dlid )GetChunk(RiffDls_Dlid.ID); inshChunk = ( RiffDls_Insh )GetChunk(RiffDls_Insh.ID); lrgnListList = null; // GetChunkListList( "LIST", RiffChunkListLrgn.TYPE ); lartListList = null; //GetChunkListList( "LIST", RiffChunkListLart.TYPE ); infoListList = null; //GetChunkListList( "LIST", RiffInfoList.TYPE ); }
public RiffInfoIgen(string aId, UInt32 aSize, AByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { igenDataArray = new IgenData[Size / 4]; for (int i = 0; i * 4 < Size; i++) { igenDataArray[i] = new IgenData(aByteArray, informationList); } }
public RiffChunkPhdr(string aId, UInt32 aSize, ByteArray aByteArray, RiffChunkList aParent) : base(aId, aSize, aByteArray, aParent) { phdrDataArray = new PhdrData[size / 38]; for (int i = 0; i * 38 < size; i++) { phdrDataArray[i] = new PhdrData(aByteArray, informationList); } }