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
58c521b0
Commit
58c521b0
authored
4 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Plain Diff
Merge branch 'add-noise-seed'
parents
2c1c35fa
a9177c4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!450
add "seed" method and update docs
Pipeline
#2351
canceled
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pd/doc/5.reference/noise~-help.pd
+11
-6
11 additions, 6 deletions
pd/doc/5.reference/noise~-help.pd
pd/src/d_osc.c
+8
-0
8 additions, 0 deletions
pd/src/d_osc.c
with
19 additions
and
6 deletions
pd/doc/5.reference/noise~-help.pd
+
11
−
6
View file @
58c521b0
#N canvas 4
29 3
4 555 619 10;
#N canvas 4
75 2
4 555 619 10;
#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -228856 -66577 0;
#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header noise~ 3 12 0 18
-204280 -1 0;
#X obj 0 4
6
6 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
#X obj 0 4
4
6 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
#N canvas 481 283 494 344 META 0;
#X text 12 105 LIBRARY internal;
...
...
@@ -32,7 +32,7 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
#X text 8 2 [noise~] Related Objects;
#X obj 22 43 random;
#X restore 102 597 pd Related_objects;
#X obj 78 4
7
5 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
#X obj 78 4
5
5 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj 78 512 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
...
...
@@ -41,18 +41,22 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
#X obj 218 217 noise~;
#X obj 284 256 print~;
#X obj 218 256 env~ 4096;
#X text
216 19
2 the output range is -1 to 1...;
#X text
156 32
2 the output range is -1 to 1...;
#X obj 152 256 snapshot~;
#X floatatom 152 283 0 0 0 0 - - -;
#X msg 152 229 bang;
#X msg 284 229 bang;
#X text 168 474 - the inlet to [noise~] is not used.;
#X text 98 511 signal;
#X text 11 23 uniformly distributed white noise;
#X text 98 474 (inactive);
#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
;
#X obj 480 53 pddp/dsp;
#X msg 218 169 seed 42;
#X text 278 169 provide a seed for a deterministic sequence of samples
;
#X text 98 454 seed;
#X text 168 454 - provide a seed for the random number generator. A
given seed will always output the same sequence of samples.;
#X connect 13 0 14 0;
#X connect 13 0 15 0;
#X connect 13 0 17 0;
...
...
@@ -60,3 +64,4 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
#X connect 17 0 18 0;
#X connect 19 0 17 0;
#X connect 20 0 14 0;
#X connect 25 0 13 0;
This diff is collapsed.
Click to expand it.
pd/src/d_osc.c
+
8
−
0
View file @
58c521b0
...
...
@@ -396,11 +396,19 @@ static void noise_dsp(t_noise *x, t_signal **sp)
dsp_add
(
noise_perform
,
3
,
sp
[
0
]
->
s_vec
,
&
x
->
x_val
,
(
t_int
)
sp
[
0
]
->
s_n
);
}
static
void
noise_float
(
t_noise
*
x
,
t_float
f
)
{
/* set the seed */
x
->
x_val
=
(
int
)
f
;
}
static
void
noise_tilde_setup
(
void
)
{
noise_class
=
class_new
(
gensym
(
"noise~"
),
(
t_newmethod
)
noise_new
,
0
,
sizeof
(
t_noise
),
0
,
0
);
class_addmethod
(
noise_class
,
(
t_method
)
noise_dsp
,
gensym
(
"dsp"
),
A_CANT
,
0
);
class_addmethod
(
noise_class
,
(
t_method
)
noise_float
,
gensym
(
"seed"
),
A_FLOAT
,
0
);
}
/* ----------------------- global setup routine ---------------- */
...
...
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