FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-sound/src/processing/sound/Noise.java at main · processing/processing-sound · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
processing
/
processing-sound
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
49
Star
163
Code
Issues
25
Pull requests
1
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
processing-sound
/
src
/
processing
/
sound
/
Noise.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
71 lines (59 loc) · 1.49 KB
Breadcrumbs
processing-sound
/
src
/
processing
/
sound
/
Noise.java
Copy path
File metadata and controls
71 lines (59 loc) · 1.49 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
package
processing
.
sound
;
import
com
.
jsyn
.
unitgen
.
UnitGenerator
;
import
com
.
jsyn
.
unitgen
.
UnitSource
;
import
processing
.
core
.
PApplet
;
/**
* Common superclass of all noise generators
* @webref Noise
*/
public
abstract
class
Noise
<
JSynNoise
extends
UnitGenerator
>
extends
SoundObject
{
protected
JSynNoise
noise
;
protected
Noise
(
PApplet
theParent
,
JSynNoise
noise
) {
super
(
theParent
);
this
.
noise
=
noise
;
this
.
circuit
=
new
JSynCircuit
(((
UnitSource
)
this
.
noise
).
getOutput
());
}
public
void
play
(
float
amp
) {
this
.
amp
(
amp
);
this
.
play
();
}
/**
* Starts the noise
* @webref Noise:Noise
* @param amp The amplitude of the noise as a value between 0.0 and 1.0.
* @param pos The panoramic position of the noise as a float from -1.0 to 1.0.
**/
public
void
play
(
float
amp
,
float
pos
) {
this
.
pan
(
pos
);
this
.
play
(
amp
);
}
public
void
play
(
float
amp
,
float
add
,
float
pos
) {
this
.
set
(
amp
,
add
,
pos
);
this
.
play
();
}
/**
* Set the amplitude and panoramic position with one method.
* @webref Noise:Noise
* @param amp The amplitude of the noise as a value between 0.0 and 1.0.
* @param pos The panoramic position of the noise as a float from -1.0 to 1.0.
**/
public
void
set
(
float
amp
,
float
pos
) {
this
.
amp
(
amp
);
this
.
pan
(
pos
);
}
/**
* @deprecated
*/
public
void
set
(
float
amp
,
float
add
,
float
pos
) {
this
.
amp
(
amp
);
this
.
add
(
add
);
this
.
pan
(
pos
);
}
/**
* Stop the noise from playing back
* @webref Noise:Noise
*/
public
void
stop
() {
super
.
stop
();
}
}
Back
|
FazBrowse Home
|
New Git URL