FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-sound/src/processing/sound/Analyzer.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
/
Analyzer.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (41 loc) · 1.16 KB
Breadcrumbs
processing-sound
/
src
/
processing
/
sound
/
Analyzer.java
Copy path
File metadata and controls
52 lines (41 loc) · 1.16 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
package
processing
.
sound
;
import
com
.
jsyn
.
ports
.
UnitOutputPort
;
import
processing
.
core
.
PApplet
;
/**
* Common superclass of all audio analysis classes
* @webref Analysis
*/
public
abstract
class
Analyzer
{
protected
SoundObject
input
;
protected
Analyzer
(
PApplet
parent
) {
Engine
.
getEngine
(
parent
);
}
/**
* Define the audio input for the analyzer.
*
* @param input The input sound source
* @webref Analysis:Analyzer
**/
public
void
input
(
SoundObject
input
) {
if
(
this
.
input
==
input
) {
Engine
.
printWarning
(
"This input was already connected to the analyzer"
);
}
else
{
if
(
this
.
input
!=
null
) {
if
(!
this
.
input
.
isPlaying
()) {
// unit was only analyzed but not playing out loud - remove from synth
Engine
.
getEngine
().
remove
(
this
.
input
.
circuit
);
}
this
.
removeInput
();
}
this
.
input
=
input
;
if
(!
this
.
input
.
isPlaying
()) {
Engine
.
getEngine
().
add
(
input
.
circuit
);
}
this
.
setInput
(
input
.
circuit
.
output
.
output
);
}
}
// remove the current input
protected
abstract
void
removeInput
();
// connect sound source in subclass AND add analyser unit to Engine
protected
abstract
void
setInput
(
UnitOutputPort
input
);
}
Back
|
FazBrowse Home
|
New Git URL