File: MSPd.h

package info (click to toggle)
pd-lyonpotpourri 2.0%2Bgit20121009-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,176 kB
  • sloc: ansic: 18,330; makefile: 376
file content (50 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (3)
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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <strings.h>
#include <string.h>

/* choose your poison */

#define __MSP__ (0)
#define __PD__ (!__MSP__)

/*
Note - Pd does silly things to a curly brace inside a string. Oh, well.
*/

#define LYONPOTPOURRI_MSG "by Eric Lyon  -{LyonPotpourri 2.0}-"

#if __MSP__
#include "ext.h"
#include "z_dsp.h"
#include "buffer.h"
#include "ext_obex.h"
#define t_floatarg double
#define resizebytes t_resizebytes
#define getbytes t_getbytes
#define freebytes t_freebytes
#endif

/* because Max and Pd have different ideas of what A_FLOAT is, use t_floatarg
to force consistency. Otherwise functions that look good will fail on some
hardware. Also note that Pd messages cannot accept arguments of type A_LONG. */

#if __PD__
#include "m_pd.h"
#define t_floatarg float
#define atom_getsymarg atom_getsymbolarg
#endif

#ifndef PIOVERTWO
#define PIOVERTWO 1.5707963268
#endif
#ifndef TWOPI
#define TWOPI 6.2831853072
#endif
#ifndef PI
#define PI 3.14159265358979
#endif