Uses 1113K of libraries. Click here for Pure Java version (7294L/38K).
!7 cm > DynImageSurface { start-thread { AudioRecognizer recognizer = new(1.0, new SineSoundSource(440), 1); printVars(len := recognizer.mainSample.length(), amplitude := recognizer.mainSample.maxAmplitude()); //ret recognizer.mainSample.render(); Var<Double> shift = new(0.0); repeatForNSeconds(10, r { var tuned = recognizer.mainSample.sampleAt(439.5*2); tuned = tuned.shift(shift!); //print(tuned.firstPixels()); setImage(tuned.render()); //print(shift); shift.set(shift! + 0.05); }); } }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx
No comments. add comment
Snippet ID: | #1032422 |
Snippet name: | Single-Frequency Audio Sampling With Shift Demo |
Eternal ID of this version: | #1032422/1 |
Text MD5: | efedfd182febd12d804b829348090c4f |
Transpilation MD5: | b1c087de31332559d0d1c4cb470819b9 |
Author: | stefan |
Category: | javax / audio recognition |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-03 05:02:57 |
Source code size: | 585 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 166 / 310 |
Referenced in: | -