トトトトト Velvet Studio. AMS Format v2.2 トトトトトト Advanced Module System Revision 1.0 Offs Byte(s) Desc [Header] 0 7 Header: "AMShdr",1ah 7 1 Length of ModName (max 30 bytes) 8 x ModName ? 2 Version of format (Hi = MainVer, Low = SubVer e.g. 0202 = 2.2) +2 1 Nr of Instruments (0-255) +3 2 Nr of Patterns (1-1024) +5 2 Nr of Positions (1-65535) +7 2 Initial BPM (High byte=Integer part, Low byte=Fraction) +9 1 Initial Speed +10 1 Default Channels (1-32) +11 1 Default Commands (1-7) +12 1 Default Rows (0-255) +13 2 Flags:uuuuuuuumfsuuuuu ウウウウウウウウウウウタチチチチト Unused ウウウウウウウウウウタトトトトトト 1=Stereo,0=Mono ウウウウウウウウウタトトトトトトト Use Linear freq table. ウウウウウウウウタトトトトトトトト MIDI channels are used in tune. タチチチチチチチトトトトトトトトト Unused [Instrument] 1 Length of InstrumentName (max 30 bytes) x Instrument name 1 Number of samples in instrument (0-16) (if 0, skip this inst.) 120 Inst number for all notes 1 Volume Env. Speed 1 Volume sustain point 1 Volume loop start point 1 Volume loop end point 1 Number of volume points (0-63) x*3 Volume envelope info. uuuuuttx xxxxxxxx yyyyyyyy ウウウウウウウウ ウウウウウウウウ タチチチチチチチト Volume (0-7f) ウウウウウウウタトチチチチチチチチトトトトトトトトトト Delta X ウウウウウタチトトトトトトトトトトトトトトトトトトトト Curve (0=Line,1=sine 1, 2=sine 2) タチチチチトトトトトトトトトトトトトトトトトトトトトト Reserved for future use. 1 Panning Env. Speed 1 Panning sustain point 1 Panning loop start point 1 Panning loop end point 1 Number of panning points (0-63) x*3 Points for panning envelope uuuuuttx xxxxxxxx yyyyyyyy ウウウウウウウウ ウウウウウウウウ タチチチチチチチト Pan value (0-ff) ウウウウウウウタトチチチチチチチチトトトトトトトトトト Delta X ウウウウウタチトトトトトトトトトトトトトトトトトトトト Curve (0=Line,1=sine 1, 2=sine 2) タチチチチトトトトトトトトトトトトトトトトトトトトトト Reserved for future use. 1 Vibrato Env. Speed 1 Vibrato sustain point 1 Vibrato loop start point 1 Vibrato loop end point 1 Number of vibrato points (0-63) x*3 Points for vibrato envelope uuuuuttx xxxxxxxx yyyyyyyy ウウウウウウウウ ウウウウウウウウ タチチチチチチチト Vibrato depth (0-ff) ウウウウウウウタトチチチチチチチチトトトトトトトトトト Delta X ウウウウウタチトトトトトトトトトトトトトトトトトトトト Curve (0=Line,1=sine 1, 2=sine 2) タチチチチトトトトトトトトトトトトトトトトトトトトトト Reserved for future use. 1 Shadow Instrument. If non-zero, the value=the shadowed inst. 2 Vib.Amplify+Volume fadeout fedcba9876543210 ウウウウタチチチチチチチチチチチ Volume Fadeout. ウウタチトトトトトトトトトトトト Vibrato Amplify タチトトトトトトトトトトトトトト Reserved 2 Envelope flags: fedcba9876543210 ウウウウウウウウウウウウウウウタ Volume :Loop on ウウウウウウウウウウウウウウタト Volume :Sustain on ウウウウウウウウウウウウウタトト Volume :Envelope on ウウウウウウウウウウウウタトトト Panning:Loop on ウウウウウウウウウウウタトトトト Panning:Sustain on ウウウウウウウウウウタトトトトト Panning:Envelope on ウウウウウウウウウタトトトトトト Vibrato:Loop on ウウウウウウウウタトトトトトトト Vibrato:Sustain on ウウウウウウウタトトトトトトトト Vibrato:Envelope on ウウウウウウタトトトトトトトトト Volume :Break Loop ウウウウウタトトトトトトトトトト Panning:Break Loop ウウウウタトトトトトトトトトトト Vibrato:Break Loop タチチチトトトトトトトトトトトト Reserved [Sample] (repeated for each sample in the Instrument) 1 Length of SampName (max 22 bytes) x SampName 4 Length Of Sample (in samples) (if 0, skip rest of the sample.) 4 Repeat Start for sample (in samples) 4 Repeat End for sample (in samples) 2 Sampled rate (the rate the sample is sampled in) 1 Hi Nibble=PanPosition, Lo Nibble=FineTuneValue 2 SampleRate for C-4 (normally 8363Hz) 1 Relative note (signed byte) 1 Volume (0-127) 1 Info Byte 76543210 ウウウウウウタチト Pack Method ウウウウウタトトト 16 bit sample ウウウウタトトトト Looped sample ウウウタトトトトト PingPong loop ウウタトトトトトト Reserved ウタトトトトトトト Direction (1=Reversed) タトトトトトトトト Reserved Data for rest of Instruments are exactly the same! [Text] 1 Length of Composer name (max 30 bytes) x Composer Name レ>1 Length of ChannelName (max 11 bytes) タトx ChannelName 4 Length of Description (packed, inclusive header) 4 Length of Description (unpacked) 1 Version of packroutine (currently 01h) 1 PreProcessing type (currently none) 1 Packing method (Currently RLE with #255 as packbyte) x Description of Module The Number of ChannelNames are always 32. [PatternOrder] x PatternNr. Holds number (0-65535) to tell the tracker what pattern to play at that position (x=Nr of Positions) [PatternData] 4 PatternSize (packed) 1 PatternLength-1 (0-255) 1 cccsssss c = Nr of Commands used in pattern s = Nr of Channels-1 used in pattern (0-31) 1 Length of PatternName (max 10 bytes) x PatternName x PatternData fp0aaaaa ennnnnnn iiiiiiii [rgcccccc bbbbbbbb...] Legend: f 1=Last data chunk on the row. p 0=Read Note+InstNr 1=Don't Read Note+Instnr a Channel (0-31) e 1=Read one command n Note. 2-121 (C-0 to B-9), 1=Key off note. i InstrumentNr (0-255) r 1=Read one more command g 1=Low 6 bits are volume/2 c Command-nr b Command-byte If first byte = -1 then this row is empty If g is set, the command only consist of that byte and the low 6 bits are assumed to be a volume command. You have to multiply the volume by 2 to get the proper value (Volume will only be stored this way if it's even) [Samples] All samples stored after eachother, packed with a special packing method not described here since we're so lazy! You've got a routine that does the unpacking instead. (You can also save the samples unpacked, and it that case they are in twos complement form.) 16 Bits Samples are usually not packed, since we don't have a special 16 bits pack-routine. However, you better check the Pack Method Bit to be sure. Header for packed samples. Stored as the first bytes in the sample data. Offset Desc 0 4 Unpacked size 4 4 Packed size 8 1 Packcharacter 9 x Packed data... ** MIDI not yet supported. If MIDI Bit=0 then skip this section ** [MIDI Section] 4 MIDI Section Size トトトトト Velvet Studio. AIS Format v1.0 トトトトトト Advanced Instrument System The only that differs the AIS format from the Instrument used in the AMS is the following header before the other info: Offset bytes Desc 0 7 Header: "AIShdr",1ah 7 1 Type: 0aah=new version, <1fh=old version (Only new versions should exist, so don't bother with this flag) 8 2 Version of format (Hi = MainVer, Low = SubVer e.g. 0100 = 1.0) The actual sampledata is stored right after the Instrument data. トトトトト Velvet Studio ASE Format v1.0 トトトトトト Advanced Sample System Offset Bytes Desc 0 7 Header: "ASEhdr",1ah 7 2 Version of format (Hi = MainVer, Low = SubVer e.g. 0100 = 1.0) 9 1 Length of SampName (max 22 bytes) 10 x SampName 4 Length Of Sample 4 Repeat Start for sample 4 Repeat End for sample 2 Sampled rate (the rate the sample is sampled in) 1 Hi Nibble=PanPosition, Lo Nibble=FineTuneValue 2 SampleRate for C-4 (normally 8363Hz) 1 Relative note (signed byte) 1 Volume (0-127) 1 Info Byte 76543210 ウウウウウウタチト Pack Method ウウウウウタトトト 16 bit sample ウウウウタトトトト Looped sample ウウウタトトトトト PingPong loop ウウタトトトトトト Reserved ウタトトトトトトト Direction (1=Reversed) タトトトトトトトト Reserved x Sample data. Maybe packed. トトトト== Velvet Studio Misc Info ==トトトト * The BPM Fraction value is multiplied with 26 to be able to do some optimizations. (9*26・55) Values can range from 0*26 to 9*26. * The Default Channels/Command/Rows can be ignored since they are only used internally in VS. * If a Shadow sample is encountered, DON'T read any sample data for that sample, instead use the same sample data as it's shadowed to. * Each pattern can have different number of commands/rows/channels therefore you must use a variable patter...
Amiga78