| 22 | // ----------------------------------------------------------------------- |
| 23 | |
| 24 | DISTRHO_PLUGIN_EXPORT |
| 25 | void lv2_generate_ttl() |
| 26 | { |
| 27 | Context context; |
| 28 | context._engine.sampleRate = 48000.f; |
| 29 | contextSet(&context); |
| 30 | |
| 31 | engine::Module* module = PLUGIN_MODEL->createModule(); |
| 32 | |
| 33 | d_stdout("@prefix doap: <http://usefulinc.com/ns/doap#> ."); |
| 34 | d_stdout("@prefix foaf: <http://xmlns.com/foaf/0.1/> ."); |
| 35 | d_stdout("@prefix lv2: <http://lv2plug.in/ns/lv2core#> ."); |
| 36 | d_stdout("@prefix mod: <http://moddevices.com/ns/mod#> ."); |
| 37 | d_stdout(""); |
| 38 | |
| 39 | d_stdout("<urn:cardinal:" SLUG ">"); |
| 40 | d_stdout(" a \"" PLUGIN_LV2_CATEGORY "\", doap:Project ;"); |
| 41 | d_stdout(" doap:name \"" SLUG "\" ;"); |
| 42 | d_stdout(" mod:brand \"" PLUGIN_BRAND "\" ;"); |
| 43 | d_stdout(" mod:label \"" PLUGIN_LABEL "\" ;"); |
| 44 | d_stdout(""); |
| 45 | |
| 46 | int index = 0; |
| 47 | |
| 48 | for (int i=0, numAudio=0, numCV=0; i<module->getNumInputs(); ++i) |
| 49 | { |
| 50 | d_stdout(" lv2:port ["); |
| 51 | if (kCvInputs[i]) |
| 52 | { |
| 53 | d_stdout(" a lv2:InputPort, lv2:CVPort, mod:CVPort ;"); |
| 54 | d_stdout(" lv2:symbol \"lv2_cv_in_%d\" ;", ++numCV); |
| 55 | if (kCvOutputs[i] == Bi) |
| 56 | { |
| 57 | d_stdout(" lv2:minimum -5.0 ;"); |
| 58 | d_stdout(" lv2:maximum 5.0 ;"); |
| 59 | } |
| 60 | else |
| 61 | { |
| 62 | d_stdout(" lv2:minimum 0.0 ;"); |
| 63 | d_stdout(" lv2:maximum 10.0 ;"); |
| 64 | } |
| 65 | } |
| 66 | else |
| 67 | { |
| 68 | d_stdout(" a lv2:InputPort, lv2:AudioPort ;"); |
| 69 | d_stdout(" lv2:symbol \"lv2_audio_in_%d\" ;", ++numAudio); |
| 70 | } |
| 71 | d_stdout(" lv2:name \"%s\" ;", module->getInputInfo(i)->getFullName().c_str()); |
| 72 | d_stdout(" lv2:index %d ;", index++); |
| 73 | d_stdout(" ] ;"); |
| 74 | d_stdout(""); |
| 75 | } |
| 76 | |
| 77 | for (int i=0, numAudio=0, numCV=0; i<module->getNumOutputs(); ++i) |
| 78 | { |
| 79 | d_stdout(" lv2:port ["); |
| 80 | if (kCvOutputs[i]) |
| 81 | { |
nothing calls this directly
no test coverage detected