Ardour does not detect MIDI in on LV2 plug

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
f00bar
Established Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Ardour does not detect MIDI in on LV2 plug

Post by f00bar »

What is wrong here?
ardour-pinouts.png
ardour-pinouts.png (21.4 KiB) Viewed 919 times
As you can see, there is no MIDI input visible. The test plugin works perfectly in Carla. The manifest looks like

Code: Select all

# This file has been generated by /usr/local/bin/lv2spectottl.php
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix lv2:  <http://lv2plug.in/ns/lv2core#> .
@prefix midi: <http://lv2plug.in/ns/ext/midi#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://example.org/monosynth#gtk>
	a ui:GtkUI;
	ui:binary <monosynth-gtk.so>.

<http://example.org/monosynth>
	a lv2:Plugin;
	a lv2:InstrumentPlugin;
	lv2:binary <monosynth.so>;
	doap:name "Monophonic synth";
	doap:maintainer [ foaf:name "Milasudril" ; ] ;
	doap:license <https://opensource.org/licenses/isc>

	ui:ui <http://example.org/monosynth#qt5>;

lv2:port
	[
	a lv2:InputPort,atom:AtomPort;
	lv2:index 0;
	lv2:symbol "MIDI_in";
	lv2:name "MIDI in";
	],
	[
	a lv2:InputPort,lv2:ControlPort;
	lv2:index 1;
	lv2:symbol "Cutoff";
	lv2:name "Cutoff";
	lv2:minimum 0;
	lv2:maximum 1;
	lv2:default 0.5;
	],
	[
	a lv2:OutputPort,lv2:AudioPort;
	lv2:index 2;
	lv2:symbol "Audio_out";
	lv2:name "Audio out";
	].
Ardour log:

Code: Select all

bind txt domain [gtk2_ardour5] to /opt/ardour/share/locale
Ardour5.3.5 (built using 5.3-5-g0ff233d och GCC version 5.3.1 20160205)
ardour: [INFO]: Your system is configured to limit Ardour to only 65 536 open files
ardour: [INFO]: Loading system configuration file /opt/ardour/etc/system_config
ardour: [INFO]: Loading user configuration file /home/torbjorr/.config/ardour5/config
ardour: [INFO]: CPU vendor: GenuineIntel
ardour: [INFO]: AVX-capable processor
ardour: [INFO]: CPU brand:        Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
ardour: [INFO]: Using SSE optimized routines
Cannot xinstall SIGPIPE error handler
ardour: [INFO]: Loading default ui configuration file /opt/ardour/etc/default_ui_config
ardour: [INFO]: Loading user ui configuration file /home/torbjorr/.config/ardour5/ui_config

(ardour-5.3.5:22704): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "adwaita",

(ardour-5.3.5:22704): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "adwaita",
ardour: [INFO]: Loading color file /opt/ardour/share/themes/cubasish-ardour.colors

(ardour-5.3.5:22704): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "adwaita",

(ardour-5.3.5:22704): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "adwaita",
ardour: [INFO]: Loading ui configuration file /opt/ardour/etc/clearlooks.rc
ardour: [INFO]: Loading ui configuration file /opt/ardour/etc/clearlooks.rc

(ardour-5.3.5:22704): Gtk-WARNING **: Theme directory  of theme oxygen has no size field

Found nothing along /home/torbjorr/.config/ardour5/templates:/opt/ardour/share/templates
run dialog
Announcement is: Version 5.4 has been released. Update at http://ardour.org/download
RemoteVSTClient: all cache files are up-to-date, not running scanner
RemoteVSTClient: all cache files are up-to-date, not running scanner
error: failed to expand CURIE `foaf:name'
Scanning folders for bundled LV2s: /opt/ardour/lib/LV2
error: failed to expand CURIE `foaf:name'
KP is ardour.keys
Set cursor set to default
Set buffering params to 262144|131072|10|10
Set buffering params to 262144|131072|10|10
Skip explicit buffer seconds, preset in use
Skip explicit buffer seconds, preset in use
Ardour version: Ardour5.3.5 (built using 5.3-5-g0ff233d och GCC version 5.3.1 20160205), in case this is a bug.
f00bar
Established Member
Posts: 83
Joined: Sun May 12, 2013 7:40 pm

Re: Ardour does not detect MIDI in on LV2 plug

Post by f00bar »

falkTX wrote:you need to report what kind of atom port it is, and that is supports midi events.
Saw that *by comparing with another file on the disk*. Why not JSON instead?

Code: Select all

{
 "targets":[{"name":"plugindescriptor.hpp"}]
,"specification":
	{
	 "name":"Monophonic synth"
	,"uri":"http://example.org/monosynth"
	,"binary":"monosynth.so"
	,"maintainer":"Milasudril"
	,"license":"https://opensource.org/licenses/isc"
	,"type":"InstrumentPlugin"

	,"ports":
		[
		 {"name":"MIDI in","type":"MIDI","direction":"in"}
		,{"name":"Cutoff","type":"Control","direction":"in","minimum":0,"maximum":1,"default":0.5}
		,{"name":"Audio out","type":"Audio","direction":"out"}
		]

	,"ui":
		{
		 "type":"Gtk","binary":"monosynth-gtk.so"
		,"uri":"http://example.org/monosynth#gtk"
		}
	}
}
Nice, and clean.
Obscurus
Posts: 2
Joined: Sat Mar 25, 2017 9:42 am

Re: Ardour does not detect MIDI in on LV2 plug

Post by Obscurus »

Hi! I have the similar problem with my plugin and ardour 5.4. This viewtopic.php?t=12695#p54175 post said, what port description should have this properties

Code: Select all

atom:bufferType atom:Sequence ;
atom:supports <http://lv2plug.in/ns/ext/midi#MidiEvent> ;
But it still not works!

Manifest file here:

Code: Select all

@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix lv2:  <http://lv2plug.in/ns/lv2core#> .
@prefix midi: <http://lv2plug.in/ns/ext/midi#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#>.

<http://sguitar.sourceforge.net>
        a lv2:Plugin, lv2:InstrumentPlugin ;
        doap:name "Simple guitar" ;
        lv2:requiredFeature urid:map ;
        ui:ui <http://sguitar.sourceforge.net/#qt> ;
        lv2:port [
                a lv2:InputPort, atom:AtomPort ;
                atom:butfferType atom:Sequence ;
                atom:supports midi:MidiEvent ;
                lv2:designation lv2:control ;
                lv2:index 0 ;
                lv2:symbol "control" ;
                lv2:name "Control"
        ], [
                a lv2:AudioPort, lv2:OutputPort ;
                lv2:index 1 ;
                lv2:symbol "out_left" ;
                lv2:name "Left Out"
        ],[
                a lv2:AudioPort, lv2:OutputPort ;
                lv2:index 2 ;
                lv2:symbol "out_right" ;
                lv2:name "Right Out"
        ],[
                a lv2:InputPort, lv2:ControlPort;
                lv2:index 3;
                lv2:symbol "volume";
                lv2:name "Volume";
                lv2:minimum 0;
                lv2:maximum 1;
                lv2:default 1;
        ],[
                a lv2:InputPort, lv2:ControlPort;
                lv2:index 4;
                lv2:symbol "pan";
                lv2:name "Panorame";
                lv2:minimum 0;
                lv2:maximum 1;
                lv2:default 0.5;
       ],[
                a lv2:InputPort, lv2:ControlPort;
                lv2:index 5;
                lv2:symbol "type";
                lv2:name "Tone";
                lv2:portProperty lv2:integer, lv2:enumeration;
                lv2:scalePoint [ rdfs:label "Clean"; rdf:value 0 ];
                lv2:scalePoint [ rdfs:label "Driven"; rdf:value 1 ];
                lv2:default 0;
                lv2:minimum 0;
                lv2:maximum 1;
        ] .

<http://sguitar.sourceforge.net/#qt>
	a ui:Qt5UI ;
	ui:binary <sguitar_gui_qt.so> ;
	ui:portNotification [
		ui:plugin <http://sguitar.sourceforge.net> ;
		lv2:symbol "notify" ;
		ui:notifyType atom:Blank
	] .
User avatar
sadko4u
Established Member
Posts: 986
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: Ardour does not detect MIDI in on LV2 plug

Post by sadko4u »

This port specification works:
[
a lv2:InputPort, atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports atom:Sequence, midi:MidiEvent ;
lv2:index 2 ;
lv2:symbol "in_midi" ;
lv2:name "Midi input" ;
]
You need to properly declare atom:supports and atom:bufferType options. Also remove lv2:designation from your port specification.
LSP (Linux Studio Plugins) Developer and Maintainer.
Obscurus
Posts: 2
Joined: Sat Mar 25, 2017 9:42 am

Re: Ardour does not detect MIDI in on LV2 plug

Post by Obscurus »

It helps, thanks a lot!
Post Reply