# Using buses as FluidMFCC input - Supercollider

**URL:** <https://discourse.flucoma.org/t/using-buses-as-fluidmfcc-input-supercollider/942>\
**Category:** Usage Questions\
**Created:** [July 28, 2021, 8:26am UTC](https://discourse.flucoma.org/t/using-buses-as-fluidmfcc-input-supercollider/942 "2021-07-28T08:26:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alberto.rizzo](https://discourse.flucoma.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@alberto.rizzo](https://discourse.flucoma.org/u/alberto.rizzo)\
**Post date:** [July 28, 2021, 8:26am UTC](https://discourse.flucoma.org/t/using-buses-as-fluidmfcc-input-supercollider/942/1 "2021-07-28T08:26:55Z")

</div>

Hello everyone,

I am a new user of the discourse forum but I have tried to integrate FluCoMa for a few weeks.  
I’m trying to read from a Bus (audio-rate) and using it as input of the FluidMFCC method but it seems to not working.  
I’m working at 192 kHz of sampling rate as I want to analyze signals from 40 to 50 kHz.

Thanks in advance for your help.

This is a very simple example:

```auto
{(
	Out.ar(0, LPF.ar(SinOsc.ar!2, 220, 0.5) ); 
)}.play

(
b = Bus.new(\control,0,13);
w = Window("MFCCs Monitor", Rect(10, 10, 420, 320)).front;
a = MultiSliderView(w,Rect(10, 10, 400, 300)).elasticMode_(1).isFilled_(1);
a.reference_(Array.fill(13,{0.5})); //make a center line to show 0
)

(
~winRange = 40;

r = Routine {
    {
        b.get({ arg val;
            {
                if(w.isClosed.not) {
                    a.value = val.linlin(~winRange.neg,~winRange,0,1);
                }
            }.defer
        });
        0.01.wait;
    }.loop
}.play
)

(
x = {arg bands = 20, low = 40000, high = 50000;
	var source = In.ar(0,2);
	Out.kr(b,FluidMFCC.kr(source, 40, bands, low, high, 4096));
	source.dup;
}.play;
)

```

---

<div class="post-metadata">

**Author:** ![weefuzzy](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/weefuzzy/32/362_2.png) [@weefuzzy](https://discourse.flucoma.org/u/weefuzzy)\
**Post date:** [July 28, 2021, 10:24am UTC](https://discourse.flucoma.org/t/using-buses-as-fluidmfcc-input-supercollider/942/2 "2021-07-28T10:24:09Z")

</div>

Hi @alberto.rizzo and welcome!

As far as I can tell, reading from an audio bus does work!

For the low-numbered audio-buses that map to hardware channels, I don’t think it’s possible to use `In.ar` to read from `Out.ar` like that, unless your sound card has some sort of loopback. Even using a private bus, I found I needed to use `InFeedback` rather than `In` to pick up the signal. Then, on the output, I think the multichannel expansion was complicating things; in the working example below, I’m just reading mono from the input bus, and capping the MFCC outputs to 13 to keep things simple.

This seems to work for me. I’ve used pink noise as a test signal instead, because a 220Hz sine wave isn’t going to yield anything useful between 40-50k:

```auto
(
s.options.sampleRate = 192000;
s.reboot; 
)

(
b = Bus.new(\control,0,13);
c = Bus.audio(s,2);
w = Window("MFCCs Monitor", Rect(10, 10, 420, 320)).front;
a = MultiSliderView(w,Rect(10, 10, 400, 300)).elasticMode_(1).isFilled_(1);
a.reference_(Array.fill(13,{0.5})); //make a center line to show 0
)

(
~winRange = 40;

r = Routine {
    {
        b.get({ arg val;
            {
                if(w.isClosed.not) {
                    a.value = val.linlin(~winRange.neg,~winRange,0,1);
                }
            }.defer
        });
        0.01.wait;
    }.loop
}.play
)

(
{	Out.ar(c, PinkNoise.ar!2 ); }.play; 

x = {arg bands = 40, low = 40000, high = 50000;
    var source = InFeedback.ar(c,1);
    var mfcc = FluidMFCC.kr(source, 13, bands, low, high, 4096,maxNumCoeffs:13);
    Out.kr(b,mfcc);
}.play;
)

```

---

<div class="post-metadata">

**Author:** ![alberto.rizzo](https://discourse.flucoma.org/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@alberto.rizzo](https://discourse.flucoma.org/u/alberto.rizzo)\
**Post date:** [July 28, 2021, 2:29pm UTC](https://discourse.flucoma.org/t/using-buses-as-fluidmfcc-input-supercollider/942/3 "2021-07-28T14:29:10Z")

</div>

Thank you for your reply, really appreciated!

Using the `InFeedback` Ugen definitely did the job, and of course, working with a mono channel is correct.  
I used to use `In` when I need to work in a ProxySpace, but this is a different context.  
Apologies for the bad example, I have pasted an incorrect chunk of code.
