AnalogTapeModel

Physical modelling signal processing for analog tape recording
Log | Files | Refs | Submodules | README | LICENSE

STNModel.cpp (565B)


      1 #include "STNModel.h"
      2 
      3 namespace STNSpace
      4 {
      5 static bool printed = false;
      6 
      7 STNModel::STNModel()
      8 {
      9     // useful for debugging...
     10     if (! printed)
     11     {
     12 #if USE_RTNEURAL_STATIC
     13         DBG ("Using RTNeural ModelT STN");
     14 #elif USE_RTNEURAL_POLY
     15         DBG ("Using RTNeural polymorphic STN");
     16 #endif
     17         printed = true;
     18     }
     19 }
     20 
     21 void STNModel::loadModel (const nlohmann::json& modelJ)
     22 {
     23 #if USE_RTNEURAL_STATIC
     24     model.parseJson (modelJ);
     25 #elif USE_RTNEURAL_POLY
     26     model = RTNeural::json_parser::parseJson<double> (modelJ);
     27 #endif
     28 }
     29 
     30 } // namespace STNSpace