neural-amp-modeler

Neural network emulator for guitar amplifiers
Log | Files | Refs | README | LICENSE

model-file.rst (3870B)


      1 .. _nam-file-spec:
      2 
      3 ``.nam`` file specification and change log
      4 ==========================================
      5 
      6 The current specification
      7 -------------------------
      8 
      9 ``.nam`` files are currently able to be parsed as JSON files. The outermost data 
     10 structure is a dictionary.
     11 
     12 There are a few keys you should expect to find with the following values:
     13 
     14 * ``"version"``: A string stating the version of the file. It follows semantic
     15   versioning.
     16 * ``"architecture"``: The high-level architecture of the model (usually either 
     17   "WaveNet" or "LSTM", though any string corresponding to a model class name 
     18   defined in the ``nam`` package is valid. Also, if you've made a new 
     19   architecture, you would give it a new name here. The convention is to use the 
     20   class name.)
     21 * ``"config"``: A dictionary architecture-specific details (e.g. number of 
     22   layers, etc).
     23 * ``"weights"``: a list of float-type numbers that are the weights (parameters) 
     24   of the model. How they map into the model is architecture-specific. Looking at
     25   ``._export_weights()`` will usually tell you what you need to know (e.g. for 
     26   ``WaveNet`` at
     27   `wavenet.py <https://github.com/sdatkinson/neural-amp-modeler/blob/cb100787af4b16764ac94a2edf9bcf7dc5ae59a7/nam/models/wavenet.py#L428>`_ 
     28   and ``LSTM`` at
     29   `recurrent.py <https://github.com/sdatkinson/neural-amp-modeler/blob/cb100787af4b16764ac94a2edf9bcf7dc5ae59a7/nam/models/recurrent.py#L317>`_.)
     30 
     31 There are also some optional keys that ``nam`` may use:
     32 
     33 * ``"sample_rate"``: The (possibly non-integer) sample rate of the data that the
     34   model expects to see, in samples/sec (Hz) If not present, one should generally
     35   assume the sample rate was 48kHz.
     36 * ``"metadata"``: A dictionary with key-value pairs of information about the 
     37   model. The following may be used by this package:
     38 
     39   * ``"date"``: a dictionary with the ``"year"``, ``"month"``, ``"day"``, 
     40     ``"hour"``, ``"minute"``, and ``"second"`` at which the model was exported 
     41     (all integer-type).
     42   * ``"name"``: The name of the model (could be used as the display name by plugins.)
     43   * ``"modeled_by"``: Who made the model
     44   * ``"gear_make"``: Make of the gear (E.g. Fender)
     45   * ``"gear_model"``: Model of the gear (E.g. Deluxe Reverb)
     46   * ``"gear_type"``: What kind of gear this is a model of. Options are 
     47     ``"amp"``, ``"pedal"``, ``"pedal_amp"``, ``"amp_cab"``, ``"amp_pedal_cab"``,
     48     ``"preamp"``, and ``"studio"``.
     49   * ``"tone_type"``: How the model sounds. Options are ``"clean"``, 
     50     ``"overdrive"``, ``"crunch"``, ``"hi_gain"``, and ``"fuzz"``.
     51   * ``"training"``: A dictionary containing information about training (*Only 
     52     when the simplified trainers are used.*)
     53   * ``"input_level_dbu"``: The level being input to the gear, in dBu, corresponding to a
     54     1kHz sine wave with 0dBFS peak.
     55   * ``"output_level_dbu"``: The level, in dBu, of a 1kHz sine wave that achieves 0dBFS
     56     peak when input to the interface that's recording the output of the gear being
     57     modeled.
     58 
     59 
     60 Change log
     61 ----------
     62 
     63 v0.5
     64 ^^^^
     65 
     66 v0.5.4
     67 """"""
     68 
     69 Introduced in ``neural-amp-modeler`` `version 0.10.0 <https://github.com/sdatkinson/neural-amp-modeler/releases/tag/v0.10.0>`_.
     70 
     71 * Add ``"input_level_dbu"`` and ``"output_level_dbu"`` fields under ``"metadata"``.
     72 
     73 v0.5.3
     74 """"""
     75 
     76 Introduced in ``neural-amp-modeler`` `version 0.9.0 <https://github.com/sdatkinson/neural-amp-modeler/releases/tag/v0.9.0>`_.
     77 
     78 * Add ``"training"`` field under ``"metadata"`` whose contents follow the
     79   ``TrainingMetadata`` 
     80   `Pydantic model <https://github.com/sdatkinson/neural-amp-modeler/blob/cb100787af4b16764ac94a2edf9bcf7dc5ae59a7/nam/train/metadata.py#L84>`_. (`#420 <https://github.com/sdatkinson/neural-amp-modeler/pull/420>`_)
     81 
     82 v0.5.2
     83 """"""
     84 
     85 Version corresponding to ``neural-amp-modeler`` 
     86 `version 0.5.2 <https://github.com/sdatkinson/neural-amp-modeler/releases/tag/v0.5.2>`_.
     87 TODO more info.