FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing/java/libraries/sound/src/processing/sound/FFT.java at master · h2oop/processing · GitHub
h2oop
processing
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
processing
/
java
/
libraries
/
sound
/
src
/
processing
/
sound
/
FFT.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (35 loc) · 843 Bytes
Breadcrumbs
processing
/
java
/
libraries
/
sound
/
src
/
processing
/
sound
/
FFT.java
Copy path
File metadata and controls
41 lines (35 loc) · 843 Bytes
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
package
processing
.
sound
;
import
processing
.
core
.*;
public
class
FFT
{
PApplet
parent
;
private
Engine
m_engine
;
private
long
ptr
;
public
FFT
(
PApplet
theParent
) {
this
.
parent
=
theParent
;
parent
.
registerMethod
(
"dispose"
,
this
);
m_engine
.
setPreferences
(
theParent
,
512
,
44100
);
m_engine
.
start
();
}
public
void
input
(
SoundObject
input
,
int
fftSize
){
ptr
=
m_engine
.
fft
(
input
.
returnId
(),
fftSize
);
}
public
void
analyze
(
float
[]
value
){
float
[]
m_value
=
m_engine
.
poll_fft
(
ptr
);
int
num_samples
=
Math
.
min
(
value
.
length
,
m_value
.
length
);
for
(
int
i
=
0
;
i
<
num_samples
;
i
++){
value
[
i
] =
m_value
[
i
];
}
}
/*
public void stop(){
m_engine.synthStop(m_nodeId);
}
public int returnId(){
return m_nodeId;
}
*/
public
void
dispose
() {
m_engine
.
destroy_fft
(
ptr
);
//m_engine.synthStop(m_nodeId);
}
}
Back
|
FazBrowse Home
|
New Git URL