Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1018631 // spectro_minMaxValues

JavaX fragment (include)

1  
!include once #1018630 // Spectro Edit
2  
3  
static Pair<Double> spectro_minMaxValues(Clip clip) ctex {
4  
  double min = Double.POSITIVE_INFINITY, max = Double.NEGATIVE_INFINITY;
5  
  
6  
  for (int col = 0; col < clip.getFrameCount(); col++) {
7  
    net.bluecow.spectro.Frame f = clip.getFrame(col);
8  
    for (int row = 0; row < f.getLength(); row++) {
9  
      double d = f.getReal(row);
10  
      min = min(min, d);
11  
      max = max(max, d);
12  
    }
13  
  }
14  
  
15  
  ret pair(min, max);
16  
}

Author comment

Began life as a copy of #1018580

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018631
Snippet name: spectro_minMaxValues
Eternal ID of this version: #1018631/1
Text MD5: c8edcefc8c51dcf3dd0248a2472f3d40
Author: stefan
Category: javax / audio analysis
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-08 01:51:39
Source code size: 474 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 259 / 314
Referenced in: [show references]