aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/obj_radio.cpp
blob: d0c2452e97d083caf765e3c77d2b7344023f500f (plain)
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
/* 

VASP modular - vector assembling signal processor / objects for Max/MSP and PD

Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.  

*/

/*! \file obj_radio.cpp
	\brief objects for radio messages.
*/

#include "main.h"
#include "classes.h"


/*! \class vasp_radio
	\remark \b vasp.radio
	\brief Lets only radio messages pass through.
	\since 0.0.6
	\param inlet.1 * - any message
	\retval outlet.1 radio messages
	\retval outlet.2 other messages
*/
class vasp_radio:
	public flext_base
{
	FLEXT_HEADER(vasp_radio,flext_base)

public:

	vasp_radio()
	{
		AddInAnything();
		AddOutAnything(2);

		FLEXT_ADDMETHOD(0,m_any);
	}

	virtual V m_any(const t_symbol *s,I argc,t_atom *argv);

	virtual V m_help() { post("%s - split into radio and non-radio messages",thisName()); }
private:
	FLEXT_CALLBACK_A(m_any);
};

FLEXT_LIB("vasp, vasp.radio",vasp_radio)


V vasp_radio::m_any(const t_symbol *s,I argc,t_atom *argv) 
{
	ToOutAnything(s == vasp_base::sym_radio?0:1,s,argc,argv);
}