1 /* B.Shapr
2 * Beat / envelope shaper LV2 plugin
3 *
4 * Copyright (C) 2019 by Sven Jähnichen
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21 #ifndef URIDS_HPP_
22 #define URIDS_HPP_
23
24 #include <lv2/lv2plug.in/ns/lv2core/lv2.h>
25 #include <lv2/lv2plug.in/ns/ext/atom/util.h>
26 #include <lv2/lv2plug.in/ns/ext/urid/urid.h>
27 #include <lv2/lv2plug.in/ns/ext/midi/midi.h>
28 #include <lv2/lv2plug.in/ns/ext/time/time.h>
29 #include "definitions.hpp"
30
31 struct BShaprURIDs
32 {
33 LV2_URID atom_Float;
34 LV2_URID atom_Int;
35 LV2_URID atom_Long;
36 LV2_URID atom_Object;
37 LV2_URID atom_Blank;
38 LV2_URID atom_eventTransfer;
39 LV2_URID atom_Vector;
40 LV2_URID atom_String;
41 LV2_URID midi_Event;
42 LV2_URID time_Position;
43 LV2_URID time_barBeat;
44 LV2_URID time_bar;
45 LV2_URID time_beatsPerMinute;
46 LV2_URID time_beatsPerBar;
47 LV2_URID time_beatUnit;
48 LV2_URID time_speed;
49 LV2_URID state_shape;
50 LV2_URID ui_on;
51 LV2_URID ui_off;
52 LV2_URID notify_shapeEvent;
53 LV2_URID notify_shapeNr;
54 LV2_URID notify_shapeData;
55 LV2_URID notify_nodeEvent;
56 LV2_URID notify_nodeNr;
57 LV2_URID notify_nodeOperation;
58 LV2_URID notify_nodeData;
59 LV2_URID notify_monitorEvent;
60 LV2_URID notify_monitor;
61 LV2_URID notify_messageEvent;
62 LV2_URID notify_message;
63 LV2_URID notify_statusEvent;
64 };
65
mapURIDs(LV2_URID_Map * m,BShaprURIDs * uris)66 void mapURIDs (LV2_URID_Map* m, BShaprURIDs* uris)
67 {
68 uris->atom_Float = m->map(m->handle, LV2_ATOM__Float);
69 uris->atom_Int = m->map(m->handle, LV2_ATOM__Int);
70 uris->atom_Long = m->map(m->handle, LV2_ATOM__Long);
71 uris->atom_Object = m->map(m->handle, LV2_ATOM__Object);
72 uris->atom_Blank = m->map(m->handle, LV2_ATOM__Blank);
73 uris->atom_eventTransfer = m->map(m->handle, LV2_ATOM__eventTransfer);
74 uris->atom_Vector = m->map(m->handle, LV2_ATOM__Vector);
75 uris->atom_String = m->map(m->handle, LV2_ATOM__String);
76 uris->midi_Event = m->map(m->handle, LV2_MIDI__MidiEvent);
77 uris->time_Position = m->map(m->handle, LV2_TIME__Position);
78 uris->time_barBeat = m->map(m->handle, LV2_TIME__barBeat);
79 uris->time_bar = m->map(m->handle, LV2_TIME__bar);
80 uris->time_beatsPerMinute = m->map(m->handle, LV2_TIME__beatsPerMinute);
81 uris->time_beatUnit = m->map(m->handle, LV2_TIME__beatUnit);
82 uris->time_beatsPerBar = m->map(m->handle, LV2_TIME__beatsPerBar);
83 uris->time_speed = m->map(m->handle, LV2_TIME__speed);
84 uris->state_shape = m->map(m->handle, BSHAPR_URI "#STATEshape");
85 uris->ui_on = m->map(m->handle, BSHAPR_URI "#UIon");
86 uris->ui_off = m->map(m->handle, BSHAPR_URI "#UIoff");
87 uris->notify_shapeEvent = m->map(m->handle, BSHAPR_URI "#NOTIFYshapeEvent");
88 uris->notify_shapeNr = m->map(m->handle, BSHAPR_URI "#NOTIFYshapeNr");
89 uris->notify_shapeData = m->map(m->handle, BSHAPR_URI "#NOTIFYshapeData");
90 uris->notify_nodeEvent = m->map(m->handle, BSHAPR_URI "#NOTIFYnodeEvent");
91 uris->notify_nodeNr = m->map(m->handle, BSHAPR_URI "#NOTIFYnodeNr");
92 uris->notify_nodeOperation = m->map(m->handle, BSHAPR_URI "#NOTIFYnodeOperation");
93 uris->notify_nodeData = m->map(m->handle, BSHAPR_URI "#NOTIFYnodeData");
94 uris->notify_monitorEvent = m->map(m->handle, BSHAPR_URI "#NOTIFYmonitorEvent");
95 uris->notify_monitor = m->map(m->handle, BSHAPR_URI "#NOTIFYmonitor");
96 uris->notify_messageEvent = m->map(m->handle, BSHAPR_URI "#NOTIFYmessageEvent");
97 uris->notify_message = m->map(m->handle, BSHAPR_URI "#NOTIFYmessage");
98 uris->notify_statusEvent = m->map(m->handle, BSHAPR_URI "#NOTIFYstatusEvent");
99 }
100
101 #endif /* URIDS_HPP_ */
102