Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Wilkes
purr-data
Commits
2fac5aee
Commit
2fac5aee
authored
11 years ago
by
Ivica Bukvic
Browse files
Options
Downloads
Patches
Plain Diff
added ability to change udpreceive's port after creation and improved help file.
parent
c82fe645
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
externals/mrpeach/net/udpreceive~-help.pd
+57
-49
57 additions, 49 deletions
externals/mrpeach/net/udpreceive~-help.pd
externals/mrpeach/net/udpreceive~.c
+6
-0
6 additions, 0 deletions
externals/mrpeach/net/udpreceive~.c
with
63 additions
and
49 deletions
externals/mrpeach/net/udpreceive~-help.pd
+
57
−
49
View file @
2fac5aee
#N canvas 221 129
767
415 10;
#N canvas 87
4
257 494 344 META 0;
#X text 12 1
55
HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
#N canvas 221 129
832
415 10;
#N canvas 87
2
257 494 344 META 0;
#X text 12 1
88
HELP_PATCH_AUTHORS "pd meta" information added by Jonathan
Wilkes for Pd version 0.42.;
#X text 12 25 LICENSE GPL v2 or later;
#X text 12 135 AUTHOR Martin Peach;
#X text 12 5 KEYWORDS control network;
#X text 12 45 DESCRIPTION receive datagrams over a udp connection and
outputs them as a signal;
#X restore 695 379 pd META;
#X obj 522 267 print udpreceive~;
#X symbolatom 177 354 10 0 0 0 - - -;
#X floatatom 211 288 5 0 0 0 - - -;
#X floatatom 246 267 7 0 0 0 - - -;
#X floatatom 280 332 9 0 0 0 - - -;
#X obj 177 313 prepend set;
#X text 147 287 channels:;
#X text 131 353 format:;
#X text 231 331 bitrate:;
#X text 182 266 framesize:;
#X floatatom 315 289 9 0 0 0 - - -;
#X floatatom 349 267 9 0 0 0 - - -;
#X floatatom 384 310 5 0 0 0 - - -;
#X floatatom 418 289 5 0 0 0 - - -;
#X text 258 288 overflow:;
#X text 289 266 underflow:;
#X text 323 309 queuesize:;
#X text 370 288 average:;
#X msg 35 58 info;
#X msg 15 38 reset;
#X text 68 57 status info to rightmost outlet;
#X text 53 37 reset underflow & overflow counters;
#X floatatom 210 169 3 0 0 0 - - -;
#X floatatom 233 169 3 0 0 0 - - -;
#X floatatom 256 169 3 0 0 0 - - -;
#X floatatom 279 169 3 0 0 0 - - -;
#X floatatom 303 169 5 0 0 0 - - -;
#X obj 210 143 unpack 0 0 0 0 0;
#X text 173 168 from:;
#X obj 82 152 dac~ 1 2;
#X floatatom 453 332 9 0 0 0 - - -;
#X text 401 331 packets:;
#X text 348 142 To communicate \, a [udpreceive~] and [udpsend~] pair
#X text 12 161 AUTHOR Martin Peach with additional features by Ivica
Ico Bukvic;
#X text 11 76 INLET_0 signal port reset info buffer;
#X text 11 99 OUTLET_N incoming signal over network (variable);
#X text 11 124 OUTLET_R last three outlets are for signal level \,
object status \, and incoming data packet address info;
#X restore 753 382 pd META;
#X obj 580 270 print udpreceive~;
#X symbolatom 235 357 10 0 0 0 - - -;
#X floatatom 269 291 5 0 0 0 - - -;
#X floatatom 304 270 7 0 0 0 - - -;
#X floatatom 338 335 9 0 0 0 - - -;
#X obj 235 316 prepend set;
#X text 205 290 channels:;
#X text 189 356 format:;
#X text 289 334 bitrate:;
#X text 240 269 framesize:;
#X floatatom 373 292 9 0 0 0 - - -;
#X floatatom 407 270 9 0 0 0 - - -;
#X floatatom 442 313 5 0 0 0 - - -;
#X floatatom 476 292 5 0 0 0 - - -;
#X text 316 291 overflow:;
#X text 347 269 underflow:;
#X text 381 312 queuesize:;
#X text 428 291 average:;
#X msg 93 61 info;
#X msg 73 41 reset;
#X text 126 60 status info to rightmost outlet;
#X text 111 40 reset underflow & overflow counters;
#X floatatom 268 172 3 0 0 0 - - -;
#X floatatom 291 172 3 0 0 0 - - -;
#X floatatom 314 172 3 0 0 0 - - -;
#X floatatom 337 172 3 0 0 0 - - -;
#X floatatom 361 172 5 0 0 0 - - -;
#X obj 268 146 unpack 0 0 0 0 0;
#X text 231 171 from:;
#X obj 140 155 dac~ 1 2;
#X floatatom 511 335 9 0 0 0 - - -;
#X text 459 334 packets:;
#X text 406 145 To communicate \, a [udpreceive~] and [udpsend~] pair
must have the same number of channels and the same blocksize. Also
[udpsend~] must [connect( to the port on which [udpreceive~] is listening.
;
#X msg
56 79
buffer 2;
#X text 1
18 78
set number of frames to buffer before playback;
#X obj
177
23
0
route format channels framesize bitrate overflow underflow
#X msg
113 81
buffer 2;
#X text 1
76 81
set number of frames to buffer before playback;
#X obj
235
23
3
route format channels framesize bitrate overflow underflow
queuesize average packets tag_errors;
#X floatatom
487
31
0
9 0 0 0 - - -;
#X text 4
21 309
tag errors:;
#X obj
144
18
1
env~;
#X floatatom
144
20
4
9 0 0 0 - - -;
#X text 2
04
19
3
The rightmost signal outlet outputs 1 if the stream
#X floatatom
545
31
3
9 0 0 0 - - -;
#X text 4
79 312
tag errors:;
#X obj
202
18
4
env~;
#X floatatom
202
20
7
9 0 0 0 - - -;
#X text 2
62
19
6
The rightmost signal outlet outputs 1 if the stream
is valid \, else 0;
#X text 4
20 77
Arguments: port \, channels \, blocksize \, multicast_address.
#X text 4
78 80
Arguments: port \, channels \, blocksize \, multicast_address.
Blocksize should match [udpsend~]. multicast_address is optional. Arguments
must be in that order.;
#X obj
8
1 12
1
udpreceive~ 9999 2 512;
#X text 2
21
12
0
receives 2 channels on port 9999 Same blocksize as
#X obj 1
39
12
4
udpreceive~ 9999 2 512;
#X text 2
79
12
3
receives 2 channels on port 9999 Same blocksize as
udpsend~;
#X msg 53 21 port 9000;
#X text 114 20 change port after creation;
#X connect 6 0 2 0;
#X connect 19 0 43 0;
#X connect 20 0 43 0;
...
...
@@ -86,3 +93,4 @@ udpsend~;
#X connect 43 2 39 0;
#X connect 43 3 36 0;
#X connect 43 4 28 0;
#X connect 45 0 43 0;
This diff is collapsed.
Click to expand it.
externals/mrpeach/net/udpreceive~.c
+
6
−
0
View file @
2fac5aee
...
...
@@ -389,6 +389,11 @@ static int udpreceive_tilde_createsocket(t_udpreceive_tilde* x, char *address, i
return
1
;
}
static
int
udpreceive_tilde_setsocket
(
t_udpreceive_tilde
*
x
,
t_float
portno
)
{
udpreceive_tilde_createsocket
(
x
,
x
->
x_addr_name
,
(
int
)
portno
);
}
/* Queue is 1 to 16 frames long */
#define QUEUESIZE (int)((x->x_framein + DEFAULT_AUDIO_BUFFER_FRAMES - x->x_frameout) % DEFAULT_AUDIO_BUFFER_FRAMES)
/* Block is a set of sample vectors inside a frame, one vector per channel */
...
...
@@ -795,6 +800,7 @@ void udpreceive_tilde_setup(void)
class_addmethod
(
udpreceive_tilde_class
,
(
t_method
)
udpreceive_tilde_dsp
,
gensym
(
"dsp"
),
0
);
class_addmethod
(
udpreceive_tilde_class
,
(
t_method
)
udpreceive_tilde_reset
,
gensym
(
"reset"
),
A_DEFFLOAT
,
0
);
class_addmethod
(
udpreceive_tilde_class
,
(
t_method
)
udpreceive_tilde_reset
,
gensym
(
"buffer"
),
A_DEFFLOAT
,
0
);
class_addmethod
(
udpreceive_tilde_class
,
(
t_method
)
udpreceive_tilde_setsocket
,
gensym
(
"port"
),
A_DEFFLOAT
,
0
);
post
(
"udpreceive~ v%s, (c) 2004 Olaf Matthes, 2010 Martin Peach"
,
VERSION
);
ps_format
=
gensym
(
"format"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment