Audio Router Module?

As aside about switches - its been briefly mentioned above I think, but hard switching of audio is going to
produce potentially loud and annoying clicks, since truncating a waveform is equivalent to the sound of
a sharp impact.

You need a band-limited method for cross-fading if you want live switching to work professionally (ie
click-free), which means a quality "cross-bar switch" would be a wrapper for an array of fade effects.

The same issue affects the mixer class, except that often the gain settings on a mixer are typically
ramped up and down rather than hard switched between 0 and 1. Ramping reduces the audibility
of the clicks.

In the days of analog mixing desks switching would often be done with JFETs with an RC low-pass
filter on the gate electrode to ensure switching happened slow enough to avoid clicks.
https://sound-au.com/articles/muting.html#s2
 
I am currently using dynamic patch connections, but they have issues as well as there is a bug with them ( https://forum.pjrc.com/threads/64446-Dynamic-Audio-Connection-Bug-A-new-one! ) that I can't solve. Hopefully Paul will have time to look at it someday!

For what I'm doing it would be easy enough to mute the outputs before swapping from straight through to crossed. Since my goal is to make a 2x2 both outputs would be changing at the same time.

I'm not that skilled in C++, but I'm interested in your comment about importing custom libraries into the audio tool!
 
Yes I have also read about the Dynamic connections bug.
I'm not that skilled in C++, but I'm interested in your comment about importing custom libraries into the audio tool!
The current state is now.
Can
* add/edit/remove custom node def. groups
* add/edit/remove custom node def.
* import and parse from github URL with
.h files containing special //GUI: tags
for example https://github.com/chipaudette/OpenAudio_ArduinoLibrary/blob/master/AudioEffectCompressor2_F32.h line 127-128

Cannot yet
* Import from a index.html
* import help
* import custom Editors (needed when using Audio objects that have arbitrary inputs/outputs)
* automatic download of used lib. files

It's available in the tool right main menu
And is called "Node definition manager"

I will post complete documentation on the "modified tool" thread when everything is working.
 
Hi folks!
I need some help with relative simple problem.
How to write proper function for mixing 2 audio signals to one without multiplying or gain changes.
a range 0-1023
b range 0-1023
Both with bias 511
I can’t use just x = a+b; 🤣 and map it to the range 0-1023 and I can’t use audio tool for this.
Could you please give me some tips.
Thank you
 
constrain (a+b-511, 0, 1023) ;
Thank you for suggestion, I know it, it works with any other data but not really for audio. I need find more advanced solutions and probably bunch of code similar to mixer code from audio library.
 
Thank you for suggestion, I know it, it works with any other data but not really for audio. I need find more advanced solutions and probably bunch of code similar to mixer code from audio library.

I don't get your point - you have 10 bit unsigned ADC data by the sound of it, but not using the Audio library (is there a deep reason for this BTW?), so clearly you have some other framework in mind - but what? Is the point that you need to create a framework for handling streamed audio samples?
 
I don't get your point - you have 10 bit unsigned ADC data by the sound of it, but not using the Audio library (is there a deep reason for this BTW?), so clearly you have some other framework in mind - but what? Is the point that you need to create a framework for handling streamed audio samples?

I just use ADC library and on SPI dac output on T4 board. I wrote own code for effects and looper. All working good. From effect code I have 2 identical mono streams, one of them I sent to looper input. Now I need some mixing solution to merge second effect stream with looper output stream.
I have hardware mixer where I connected physical 2 outputs from T4 (looper and effect). I need mixing it in software.
Some like software wet/dry, and controlled by one knob, where wet is stream from looper and dry is stream from effect, merged streams send to one mono output.
Is couple ways to do it, and I looking for the best one.
Must exist somewhere wet/dry code which works good 🤣
 
Now I've even more confused - you said you didn't want multiplying or gain, and how you want a wet/dry control which necessarily
has gains and therefore multiplying.

Do you want :

constrain ((g1 * (a-511) + g2 * (b-511)) + 511, 0, 1023);

(perhaps with g1+g2 = 1.0 ?)
 
Now I've even more confused - you said you didn't want multiplying or gain, and how you want a wet/dry control which necessarily
has gains and therefore multiplying.

Do you want :

constrain ((g1 * (a-511) + g2 * (b-511)) + 511, 0, 1023);

(perhaps with g1+g2 = 1.0 ?)

No no gain and multiplying is necessary, but not over the range I meant. Sorry before I not said exactly. Anyway, above function with g1,g2 works for me 🙂
Thank you for your help, I appreciate it.
 
Two gains and multiplying are necessary in fact :)

You were looking for a cross-fade in particular, but didn't use that term, which I think helped sow confusion
especially as we've been talking about exactly that further back, although we're really on the topic of switching
signals, which can be a rapid cross-fade (click free switching).
 
Two gains and multiplying are necessary in fact :)

You were looking for a cross-fade in particular, but didn't use that term, which I think helped sow confusion
especially as we've been talking about exactly that further back, although we're really on the topic of switching
signals, which can be a rapid cross-fade (click free switching).
Yeah exactly. Cross-fade 🙂 finally I got everything done but you mentioned about free-click switching audio signals, so I have little bit headache with it 🤣
In my effect I use encoder for switching presets and when switching preset to another one, click occurs in audio stream. It happens only on presets where I used large array buffers. Presets without arrays switched smooth.
I just wondering how I can resolve it.
Preloading/ initialising buffers little bit helped but still occasionally clicking happens.
 
This thread may be of relevance. Can't tell, no code provided...
I not really want boring you with 2000 lines of code just for help me find one buggy line 🤣
Any way I resolve problem clicks. Just I wrote simple memset function for wiping out buffer and feeding it again with initial values when encoder state changed and clicking gone.
 
Back
Top