File: pd64.patch

package info (click to toggle)
pd-mjlib 0.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 372 kB
  • sloc: ansic: 1,175; makefile: 31
file content (158 lines) | stat: -rw-r--r-- 4,370 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Description: Use Pd64-safe types
Author: IOhannes m zmölnig
Origin: Debian
Forwarded: no
Last-Update: 2024-06-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-mjlib.orig/src/about.c
+++ pd-mjlib/src/about.c
@@ -22,12 +22,12 @@
 
 static void about_float(t_about *x , t_float f)
 {
-	float errp = (( (float) rand() / (float) RAND_MAX) *  ( x->x_err * 2));
-	float tenp =  ((errp - x->x_err)/100)  * f;
-	//float ep = (errp/100) * f;
-	//float correction = ep - tenp;
-	//float outf = f + correction;
-	float outf = f + tenp;
+	t_float errp = (( (t_float) rand() / (t_float) RAND_MAX) *  ( x->x_err * 2));
+	t_float tenp =  ((errp - x->x_err)/100)  * f;
+	//t_float ep = (errp/100) * f;
+	//t_float correction = ep - tenp;
+	//t_float outf = f + correction;
+	t_float outf = f + tenp;
 	outlet_float( x->x_obj.ob_outlet , outf );
 }
 
--- pd-mjlib.orig/src/metroplus.c
+++ pd-mjlib/src/metroplus.c
@@ -76,7 +76,7 @@
 *	if we have run over the end
 */
 
-static float metroplus_getNextDelay( t_metroplus *x )
+static t_float metroplus_getNextDelay( t_metroplus *x )
 {
 	if ( x->x_idx == x->x_size )
 	{
@@ -122,17 +122,17 @@
 	}
 	if ( ac > 0 )
 	{
-		x->x_times = (float *) malloc( ac * sizeof( float ));
+		x->x_times = (t_float *) malloc( ac * sizeof( t_float ));
 		for( i = 0 ; i < ac ; i++ )
 		{
-			float t = atom_getfloat( &av[i] );
+			t_float t = atom_getfloat( &av[i] );
 			x->x_times[i] = t > 0 ? t : 10;
 		}
 		x->x_size=ac;
 	}
 	else
 	{
-		x->x_times = (float *) malloc( sizeof( float ));
+		x->x_times = (t_float *) malloc( sizeof( t_float ));
 		x->x_times[0] = 10;		
 		x->x_size=1;		
 	}
@@ -149,7 +149,7 @@
 	{
 		free( x->x_times );
 	}
-	x->x_times = (float *) malloc( sizeof( float ));
+	x->x_times = (t_float *) malloc( sizeof( t_float ));
 	x->x_times[0] = f > 0 ? f : 10;
 	x->x_size=1;
 	x->x_idx = 0;
--- pd-mjlib.orig/src/metroplus.h
+++ pd-mjlib/src/metroplus.h
@@ -18,7 +18,7 @@
 static void metroplus_ft1(t_metroplus *x, t_floatarg g);
 static void metroplus_free(t_metroplus *x);
 static void *metroplus_new(t_symbol *s, int argc, t_atom *argv);
-static float metroplus_getNextDelay( t_metroplus *x );
+static t_float metroplus_getNextDelay( t_metroplus *x );
 static void metroplus_time_seq( t_metroplus *x, t_symbol *s, int ac, t_atom *av );
 static void metoplus_time_float( t_metroplus *x, t_float f );
 
--- pd-mjlib.orig/src/monorhythm.c
+++ pd-mjlib/src/monorhythm.c
@@ -34,7 +34,7 @@
 
 static void monorhythm_do_beat( t_monorhythm* x )
 {
-	float beat;
+	t_float beat;
 	if ( x->x_idx == x->x_size )
 	{
 		x->x_idx = 0;
@@ -134,7 +134,7 @@
 
 static void *monorhythm_new(t_symbol *s, int argc, t_atom *argv)
 {
-	float f;
+	t_float f;
 	t_monorhythm *x = (t_monorhythm *)pd_new(monorhythm_class);	
     x->x_pattern = NULL;
 	// parse any settings
@@ -169,10 +169,10 @@
 	}
 	if ( ac > 0 )
 	{
-		x->x_pattern = (float *) malloc( ac * sizeof( float ));
+		x->x_pattern = (t_float *) malloc( ac * sizeof( t_float ));
 		for( i = 0 ; i < ac ; i++ )
 		{
-			float t = atom_getfloat( &av[i] );
+			t_float t = atom_getfloat( &av[i] );
 			x->x_pattern[i] = t;
 		}
 		x->x_size=ac;
--- pd-mjlib.orig/src/pin~.c
+++ pd-mjlib/src/pin~.c
@@ -21,9 +21,9 @@
 
 t_int *pin_tilde_perform(t_int *w)
 {
-     float *in = (float *)(w[1]);
-    float *outl = (float *)(w[2]);
-	float *outr = (float *)(w[3]);
+     t_sample *in = (t_sample *)(w[1]);
+    t_sample *outl = (t_sample *)(w[2]);
+	t_sample *outr = (t_sample *)(w[3]);
     t_pin_tilde*obj = (t_pin_tilde *)(w[4]);
     int n = (t_int)(w[5]);
 	int i = 0;
--- pd-mjlib.orig/src/pin~.h
+++ pd-mjlib/src/pin~.h
@@ -3,13 +3,13 @@
 typedef struct _pin_tilde
 {
      t_object x_obj;     
-	 float p_prob;		
-	 float p_ticktime;	 
+	 t_float p_prob;		
+	 t_float p_ticktime;	 
 	 int p_outchannel;
 	 t_clock* p_clock;
 	 long p_numticks;
 	 int p_normalized_prob;
-	 float x_f;
+	 t_float x_f;
 } t_pin_tilde;
 
 t_int *pin_tilde_perform(t_int *w);
--- pd-mjlib.orig/src/synapseA~.c
+++ pd-mjlib/src/synapseA~.c
@@ -18,7 +18,7 @@
 
 t_int *synapseA_tilde_perform(t_int *w)
 {
-	float *in = (float *)(w[1]);
+	t_sample *in = (t_sample *)(w[1]);
 	t_synapseA_tilde *x = (t_synapseA_tilde *)(w[2]);
 	int n = (t_int)(w[3]);