-
Notifications
You must be signed in to change notification settings - Fork 0
/
vopamo.h
64 lines (54 loc) · 1.79 KB
/
vopamo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef VOPA_MO_H
#define VOPA_MO_H
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* vopamo.h
*
* Copyright (C) 2016 - Yann Collette
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <lv2.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
#include "lv2/lv2plug.in/ns/ext/midi/midi.h"
#include "lv2/lv2plug.in/ns/ext/urid/urid.h"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#define MIDI_COMMANDMASK 0xF0
#define MIDI_CHANNELMASK 0x0F
#define MIDI_CONTROL 0xB0
enum PORTS_VOPA_ST {
PORT_VOPA_OUTPUT=0,
PORT_VOPA_INPUT,
PORT_VOPA_MIDI
};
void runVOPA_MO(LV2_Handle arg, uint32_t nframes);
LV2_Handle instantiateVOPA_MO(const LV2_Descriptor *descriptor,double s_rate, const char *path,const LV2_Feature * const* features);
void cleanupVOPA_MO(LV2_Handle instance);
void connectPortVOPA_MO(LV2_Handle instance, uint32_t port, void *data_location);
typedef struct VOPA_MO_t {
float* output;
const float* input;
const LV2_Atom_Sequence* MidiIn;
// Features
LV2_URID_Map* map;
LV2_URID midi_MidiEvent;
unsigned int volume;
} VOPA_MO;
#endif