Permalink
Browse files

Believe it or not

  • Loading branch information...
sik
sik committed Dec 13, 2015
1 parent 99e102b commit 8a6a8aeb582e6b5619263d8f2404865eba94981d
Showing with 1,249 additions and 0 deletions.
  1. +45 −0 eif2tfi/README
  2. +28 −0 eif2tfi/doc/eif
  3. +36 −0 eif2tfi/doc/tfi
  4. +674 −0 eif2tfi/tool/LICENSE
  5. +20 −0 eif2tfi/tool/Makefile
  6. +88 −0 eif2tfi/tool/eif.c
  7. +34 −0 eif2tfi/tool/eif.h
  8. +165 −0 eif2tfi/tool/main.c
  9. +58 −0 eif2tfi/tool/main.h
  10. +67 −0 eif2tfi/tool/tfi.c
  11. +34 −0 eif2tfi/tool/tfi.h
View
@@ -0,0 +1,45 @@
+-----------------------------------------------------------------------------
+ _____ _____ _____ ____ _____ _____ _
+| ___| ___| ___|___ \|_ _| ___| |
+| |__ | |___| |__ __| | | | | |__ | |
+| __||___ | __| / __/ | | | __|| |
+| |___ ___| | | | |___ | | | | | |
+|_____|_____|_| |_____| |_| |_| |_|
+
+by Javier Degirolmo (Sik)
+sik dot the dot hedgehog at gmail dot com
+
+EIF2TFI is a quick tool for converting Echo FM instruments into TFM Maker
+instruments.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+Provided in this package:
+
+ * Tool source code
+ * TFI format documentation
+ * EIF format documentation
+
+The source code for the tool is licensed under the GPL version 3 or later
+(see tool/LICENSE).
+
+-----------------------------------------------------------------------------
+
+This is a command line tool. It takes an instrument meant for use by the Echo
+sound engine (".eif" extension) and turns it into a TFM Maker instrument
+(".tfi" extension). This makes it possible to edit FM instruments for Echo
+with a wider range of tools.
+
+You can build this tool by using the makefile or just compiling together all
+the C files. This tool is licensed under the GPL version 3 or later.
+
+To convert a EIF file into TFI:
+
+ eif2tfi «infile» «outfile»
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+It's suggested to use the ".eif" extension for Echo FM instruments (e.g.
+"example.eif").
+
+-----------------------------------------------------------------------------
View
@@ -0,0 +1,28 @@
+ _____ _ _____
+| ___| | ___|
+| |__ | | |__
+| __|| | __|
+| |___| | |
+|_____|_|_|
+
+EIF stands for "Echo Instrument Format" and it's the format in which Echo
+expects the FM instruments.
+
+EIF is a pretty compact format and is essentially a raw "dump" of the YM2612
+registers. An instrument is 29 bytes long, where each byte represents a
+different register.
+
+The following YM2612 registers are stored, in the this order:
+
+ $B0,
+ $30, $34, $38, $3C,
+ $40, $44, $48, $4C,
+ $50, $54, $58, $5C,
+ $60, $64, $68, $6C,
+ $70, $74, $78, $7C,
+ $80, $84, $88, $8C,
+ $90, $94, $98, $9C
+
+Please see the YM2612 documentation for the format of each register. The
+registers above assume the first FM channel, change as needed for whatever
+channel you're using.
View
@@ -0,0 +1,36 @@
+ _____ _____ _
+|_ _| ___| |
+ | | | |__ | |
+ | | | __|| |
+ | | | | | |
+ |_| |_| |_|
+
+TFI is the format in which TFM Maker instruments are stored.
+
+TFI is a format designed to be easy to parse by editors, rather than by
+hardware. Each TFI file is 42 bytes long, where each byte specifies a
+different parameter.
+
+The first two bytes are the parameters global to the entire instrument:
+
+ * Algorithm (0..7)
+ * Feedback (0..7)
+
+After that, there are four groups of ten bytes each, where each group
+contains the information for a different operator. The data for each group
+is as follows:
+
+ * Multiplier (0..15)
+ * Detune (0..6, see below)
+ * Total level (0..127)
+ * Rate scaling (0..3)
+ * Attack rate (0..31)
+ * Decay rate (0..31)
+ * Sustain rate (0..31)
+ * Release rate (0..15)
+ * Sustain level (0..15)
+ * SSG-EG (0..15)
+
+The detune parameter may range from -3 to 3. The TFI file will contain the
+detune value incremented by 3 (i.e. a value of 0 means a detune of -3, while
+a value of 6 means a detune of 3).
Oops, something went wrong.

0 comments on commit 8a6a8ae

Please sign in to comment.