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

4
LINES

< > BotCompany Repo | #1033256 // sin_squareWave - like sine but square wave-y

JavaX fragment (include)

static double sin_squareWave(double phi) {
  double phase = frac_nonNeg(phi/(pi()*2));
  ret phase < .5 ? 1 : -1;
}

Author comment

Began life as a copy of #1033249

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033256
Snippet name: sin_squareWave - like sine but square wave-y
Eternal ID of this version: #1033256/2
Text MD5: 49e39dd656182ea217ec3638be4edb34
Author: stefan
Category: javax / audio analysis
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-17 23:22:21
Source code size: 118 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 60 / 82
Version history: 1 change(s)
Referenced in: [show references]