1 /* -----------------------------------------------------------------------------
2  *
3  * Giada - Your Hardcore Loopmachine
4  *
5  * -----------------------------------------------------------------------------
6  *
7  * Copyright (C) 2010-2020 Giovanni A. Zuliani | Monocasual
8  *
9  * This file is part of Giada - Your Hardcore Loopmachine.
10  *
11  * Giada - Your Hardcore Loopmachine is free software: you can
12  * redistribute it and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation, either
14  * version 3 of the License, or (at your option) any later version.
15  *
16  * Giada - Your Hardcore Loopmachine is distributed in the hope that it
17  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
18  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  * See the GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with Giada - Your Hardcore Loopmachine. If not, see
23  * <http://www.gnu.org/licenses/>.
24  *
25  * -------------------------------------------------------------------------- */
26 
27 
28 #ifndef G_GLUE_EVENTS_H
29 #define G_GLUE_EVENTS_H
30 
31 
32 #include "core/types.h"
33 
34 
35 /* giada::c::events
36 Functions that take care of live event dispatching. Every live gesture that
37 comes from the UI, MIDI thread or keyboard interaction and wants to change the
38 internal engine state must call these functions. */
39 
40 namespace giada {
41 namespace m
42 {
43 class MidiEvent;
44 }
45 namespace c {
46 namespace events
47 {
48 /* Channel*
49 Channel-related events. */
50 
51 void pressChannel            (ID channelId, int velocity, Thread t);
52 void releaseChannel          (ID channelId, Thread t);
53 void killChannel             (ID channelId, Thread t);
54 void setChannelVolume        (ID channelId, float v, Thread t);
55 void setChannelPitch         (ID channelId, float v, Thread t);
56 void sendChannelPan          (ID channelId, float v); // FIXME typo: should be setChannelPan
57 void toggleMuteChannel       (ID channelId, Thread t);
58 void toggleSoloChannel       (ID channelId, Thread t);
59 void toggleArmChannel        (ID channelId, Thread t);
60 void toggleReadActionsChannel(ID channelId, Thread t);
61 void killReadActionsChannel  (ID channelId, Thread t);
62 void sendMidiToChannel       (ID channelId, m::MidiEvent e, Thread t);
63 
64 /* Main*
65 Master I/O, transport and other engine-related events. */
66 
67 void toggleMetronome      ();
68 void setMasterInVolume    (float v, Thread t);
69 void setMasterOutVolume   (float v, Thread t);
70 void multiplyBeats        ();
71 void divideBeats          ();
72 void startSequencer       (Thread t);
73 void stopSequencer        (Thread t);
74 void toggleSequencer      (Thread t);
75 void rewindSequencer      (Thread t);
76 void toggleActionRecording();
77 void toggleInputRecording ();
78 
79 /* Plug-ins. */
80 
81 #ifdef WITH_VST
82 void setPluginParameter(ID pluginId, int paramIndex, float value, bool gui);
83 #endif
84 }}} // giada::c::events::
85 
86 
87 #endif
88