Add "chasing tone" effect All great guitarists have at some point wondered "what would it sound like if I was accompanied by a scurry of insane chipmunks - with tiny tiny bagpipes?" Jimi Hendrix wondered. The closest he ever came was the Roger Mayer Octavia together with the Univox Uni-Vibe, and he turned to drugs to fill that empty spot in his soul from never having found that perfect tone. And Plato spent five years in a cave - it wasn't an allegory - together with a family of chipmunks, trying to teach them to play the bagpipes in order to find true knowledge and understanding. He too failed in his search for that perfect tone, and ended up giving up on electric guitar entirely. Today known mainly for his philosophy, with few sources even mentioning his bloody hands from trying to sew tiny tiny bagpipes. Wonder no more. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Recent Commits to AudioNoise:main
-
Add "chasing tone" effect
-
growlingbass: fix abs() confusion, use fabsf()
growlingbass: fix abs() confusion, use fabsf() I've made the mistake of using abs instead of fabs, here is a quick fix. [ Updated to fix both places, and also to use 'fabsf()' which is the proper one that avoids double conversions - not relevant on a real computer, but visible on microcontrollers with hardware support only for 32-bit floats - Linus ] Signed-off-by: Philippe Strauss <catseyechandra@proton.me> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
warn about implicit floating point to integer conversions
warn about implicit floating point to integer conversions This got disabled when I had to disable '-Wdouble-promotion' due to it being practically unavoidable with variadic functions. But while '-Wdouble-promotion' wasn't practical, I should have kept '-Wfloat-conversion' around. Yes, it requires a few manual casts for out hacky 'pow()' usage that I'll need to fix for the actual real-time microcontroller case, but those are good to have anyway, not the unavoidable issue with the calling conventions. That makes a couple of bugs in the growlingbass implementation obvious. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
Add 'growlingbass' effect
Add 'growlingbass' effect A growling/purring bass effect with a sign flip one period over two for subharmonic generation and split odd/even order distorsion. Simpler than what has been discussed on github repos and very effective. Signed-off-by: Philippe Strauss <catseyechandra@proton.me> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
Add random 'tube' model
Add random 'tube' model It's broken and has only a very fleeting association with anything that would be a tube, but I'm committing it just as an example and 'something like this'. I'm pretty sure I'm doing very wrong things with the FIR filter, but it works (modulo that random multiplier hack) with at least one amplifier impulse file (converted to raw format). And when I say "works", I mean "makes something that sounds like guitar". I'm not sure the sound actually matches what it should sound like, and how much that FIR thing really matters. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
convert: add somewhat realtime control interface
convert: add somewhat realtime control interface This is pretty raw and stupid, but I wanted to try changing the conversion parameters on the fly with a "control file descriptor". This is currently very limited, and doesn't have an interface for switching the effect itself at runtime (like I do on the hardware: long-press the foot-switch for one second), but at least allows for sending "pot commands" to change the pot values dynamically. The format is a five-byte ASCII packet of 'pXYY\n', which sets put X to value YY (X being in the range '0'..'3', and YY being '00'..'99'). Why that format? Because right now the only testing I've done is from the terminal, doing something like this: $ ./convert --control=0 phaser input.raw | aplay -c1 -r 48000 -f s32 -B 100 and then you can just type in those commands at the terminal by hand: the "--control=0" is the magic that says that fd 0 is a control channel. Very combersome, very stupid, but hey, it works. Note that I'm back to using 'aplay' for this, because with ffplay the latency is absolutely horrible. Something like three seconds of audio later does any pot command take effect, because ffplay has slurped in a lot of data into its input buffers. In contrast, with 'aplay', the effect is basically instantaneous, particularly with that "-B 100" that keeps the buffering to a very reasonable 100ms. If there is a flag for ffplay that makes it not buffer input very much, I haven't found it (and yes, I tried the obvious ones, but no, I didn't do any exhaustive search since aplay works fine for me). It should be very possible to wrap a UI around this, and I should also add some command to switch the effect at runtime too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -
convert: start parsing arguments more flexibly
convert: start parsing arguments more flexibly In particular, allow default pot values (all at noon), and specifying input and output files rather than always doing stdin/stdout. And no, this is still not all that smart, but it is at least a tiny bit more flexible than it used to be, and the Makefile has been updated accordingly. Also, when F_SETPIPE_SZ is available, use it to limit the buffering of the output if it's a pipe. That, together with the very limited buffering by 'make_one_noise()' should make this somewhat real-time if the target i sreading a pipe and doesn't have huge input buffers. Put another way: if I add interfaces to modify the pots concurrently, that hopefully actually takes effect in a timely way. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
Update effect definition interface
Update effect definition interface Add a 'description' callback for printing pot meaning, and pass the pot values as an array to it and to the init function. This makes the interface a bit cleaner, but also means that we can now use the same structure as the RP2354A hardware does: call the '->init' function multiple times as the pots may change during playback. The pots don't actually change during playback - yet - but this starts the restructuring. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-
Refactor visualize.py to use native sample units and improve slider
Refactor visualize.py to use native sample units and improve slider Dynamically visualize the X axis in different modes, making the raw sample data the core internal data. This is similar to how we format the Y axis. - Switch internal logic (view updates, data loading, panning) from seconds to sample indices (integers) to match the underlying data structure - Add 'Samples' vs 'Time' X-axis mode toggle using RadioButtons - Update X-axis FuncFormatter to display either integer samples or seconds based on selected mode - Overhaul slider logic to dynamically switch ranges and formats: - In Time mode: Range [0, Duration Seconds], Format '%.3f s' - In Samples mode: Range [0, Max Samples], Format '%d' - Make the slider be a range slider rather than just showing where the current audio window plot starts This was more antigravity with hand-holding and some manual edits. Also just update the initial window size to the full audio size (ok, still limited to one hour), since it's now no longer a performance issue at least with the test file I have. Knock wood. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -
Optimize visualize.py for large datasets
Optimize visualize.py for large datasets Speed up plotting (courtesy of antigravity) to the point where you can reasonably zoom out to fairly long audio files: - Implement downsampling based on MAX_PLOT_POINTS to avoid over-plotting massive datasets - Pre-allocate time axis and index buffers to eliminate transient float allocations during zoom/scroll operations - Use in-place numpy operations for coordinate generation - Remove arbitrary MAX_WIDTH_SEC limit and instead clamp zoom to the actual data duration - Fix backwards compatibility issue with np.linspace by using np.copyto and a pre-computed index buffer Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>