SND file v3 handler | ||
1. Purpose
Read SND file, play it, convert it to S3M or MIDI.
2. SND file format
SND is a file format for storing NES
(and some other console) music (almost) losslessly.
SND version 3 file format: Position Length Description 0 4 Signature: "SND",26 4 1 Version of file format. We use 3. 5 1 Channelcount. For NES, 5. 6 1 Rate (unsigned integer) How many rows does it play in a second? General values are 50 and 60. 7 9 Unused, set to zero 0x10 n Events, see below Event format: Data Bytes Description 0xFF 1 Next row (submit this row) 0xFD x 2 Submit this row x times 0xFE c t 3 Set channel c (zero based) type: type 1: square type 2: noise type 3: triangle type 4: dpcm 0xFC c ... 34 Define a 32-byte PCM sample to be used on channel c (VERSION 2 ONLY) 0xFB n sl sh 4+s Redefine PCM sample number n (1-based) Size = sh:sl PCM data follows (bytes 0x60..0x9F) 0xdv c wl wh 4 Alter square wave on channel c (VERSION 3 ONLY): Set duty = d (2,4,8,12) Volume = v (0..15) Wavelen = wh:wl (0..0x7FF) c wl wh v 4 Alter channel c For triangle and noise: Wavelen = wh:wl (0..0x7FF) (IN VERSION 1, frequency) Volume = v (0..15) For dpcm: Sample number = v (set to 0 to stop sample) Wavelen = wh:wl (0..0x7FF) (IN VERSION 1, frequency) SNDv3 files are generated by nezplay (produced by a patch to nezplug) from NSF and GBS files. SNDv2 format was proposed to Martin Korth (no$gmb author) for Game Boy music logging, but he ignored the proposition. SNDv1 files were generated by older versions of iNES from NES gaming sessions. Note that SNDv3 files use wavelengths whereas SNDv2 and SNDv1 files use frequencies. Therefore this format isn't backwards compatible.The program converts the SND to MidiS3M with Adlib instruments. PCM samples are converted into S3M digital samples. Conversion to MIDI format is also supported, but it doesn't save the PCM samples. 3. Examples
This zip file contains
some S3M files generated by sndtool2 (only the instrument list
has been finetuned by hand) and one MIDI generated by sndtool2
(not edited). Note that the S3M files use adlib instruments. Most mod players are unable to playback them, and most of the rest which can, only use an emulator which isn't perfect. 4. Development status
The program works, but isn't yet ready for users. Command line options have to be implemented and the instrument type heuristics enhanced. Three primary goals are:
5. How to use
>/dev/null part of the command is important to prevent
your terminal being flooded with binary data. The binary data is actually
PCM data: the program will resynthesize the song into stdout. If you want
to listen it, you can try this: ./snd sndfilename.snd 2>tmptmp | ecat -m .
You can find the ecat program here.
The
You can acquire
By the way... you almost certainly need an unix environment to do this all.
I guess Cygwin will do for Windows users. 6. Development ideas
7. Copying
sndtool2 has been written by Joel Yliluoma, a.k.a.
Bisqwit, and is distributed under the following terms:
8. Requirements
GNU tools are always good to have near.
9. See also
10. DownloadingDownloading help
Date (Y-md-Hi) acc Size Name 2008-0925-2001 r-- 41562 sndtool2-3.3.1.tar.bz2 2008-0925-2001 r-- 46420 sndtool2-3.3.1.tar.gz 2006-0209-2312 r-- 39297 sndtool2-3.3.0.1.tar.bz2 2006-0209-2312 r-- 42049 sndtool2-3.3.0.1.tar.gz 2006-0209-2312 r-- 6222 patch-sndtool2-3.3.0-3.3.0.1.bz2 2006-0209-2312 r-- 5711 patch-sndtool2-3.3.0-3.3.0.1.gz 2006-0209-2312 r-- 18544 patch-sndtool2-3.2-3.3.0.1.bz2 2006-0209-2312 r-- 19858 patch-sndtool2-3.2-3.3.0.1.gz 2005-1205-2256 r-- 37092 sndtool2-3.3.0.tar.bz2 2005-1205-2256 r-- 38717 sndtool2-3.3.0.tar.gz 2005-1205-2256 r-- 4854 patch-sndtool2-3.2.1-3.3.0.bz2 2005-1205-2256 r-- 4636 patch-sndtool2-3.2.1-3.3.0.gz 2005-1205-2256 r-- 15513 patch-sndtool2-3.2-3.3.0.bz2 2005-1205-2256 r-- 15557 patch-sndtool2-3.2-3.3.0.gz 2004-0725-2151 r-- 36747 sndtool2-3.2.1.tar.bz2 2004-0725-2151 r-- 13351 patch-sndtool2-3.2-3.2.1.bz2 2002-1209-2359 r-- 34628 sndtool2-3.2.tar.bz2 2002-1209-2359 r-- 5471 patch-sndtool2-3.1-3.2.bz2 2002-1128-0100 r-- 33178 sndtool2-3.1.tar.bz2 2002-1128-0100 r-- 6974 patch-sndtool2-3.0.2-3.1.bz2 2002-1127-0013 r-- 29013 sndtool2-3.0.2.tar.bz2 2002-1127-0013 r-- 4025 patch-sndtool2-3.0.1-3.0.2.bz2 2002-1127-0011 r-- 28228 sndtool2-3.0.1.tar.bz2 2002-1127-0011 r-- 6408 patch-sndtool2-3.0-3.0.1.bz2 2002-1126-2332 r-- 28461 sndtool2-3.0.tar.bz2 2002-1126-2332 r-- 2711 patch-sndtool2-2.0-3.0.bz2 2002-1126-2152 r-- 28370 sndtool2-2.0.tar.bz2 2002-1126-2152 r-- 5342 patch-sndtool2-1.5-2.0.bz2 2002-1126-2055 r-- 25772 sndtool2-1.5.tar.bz2 2002-1126-2055 r-- 2654 patch-sndtool2-0.3.1-1.5.bz2 2002-1126-1835 r-- 25163 sndtool2-0.3.1.tar.bz2 2002-1126-1835 r-- 5164 patch-sndtool2-0.3.0-0.3.1.bz2 2002-1126-1556 r-- 23834 sndtool2-0.3.0.tar.bz2 2002-1126-1556 r-- 9708 patch-sndtool2-0.2.3-0.3.0.bz2 2002-1126-1506 r-- 23494 sndtool2-0.2.3.tar.bz2 2002-1126-1506 r-- 13475 patch-sndtool2-0.2.2-0.2.3.bz2 2002-1126-0301 r-- 20080 sndtool2-0.2.2.tar.bz2 2002-1126-0301 r-- 1717 patch-sndtool2-0.2.1-0.2.2.bz2 2002-1126-0232 r-- 19633 sndtool2-0.2.1.tar.bz2 2002-1126-0232 r-- 3200 patch-sndtool2-0.2-0.2.1.bz2 2002-1126-0017 r-- 18947 sndtool2-0.2.tar.bz2 2002-1023-2043 r-- 18133 sndtool2-0.1.tar.bz2← Back to the source directory index at Bisqwit's homepage | ||