soundflower, aggregate & max

Jun 13, 2007 at 9:49am

soundflower, aggregate & max

hi

___I am lost between aggregate audio device and soundflower…____

I am trying to run the NI “Guitar Rig” app as an “insert” (or
“external loop”) inside maxmsp.

what i am trying to achive is

_the (external) audio gets into maxmsp (for the moment by the
build-in audio, later will be sound card)

_at some point in the patch this audio is routed – hopefully with
soundflower – to Guitar rig

_the guitar Rig outputs go back into max

_the final result goes out through the output of the build-in audio

(all this is on a PPC Mac, OSX48, max457, and latest Grig, and latest
soundflower)

**********

what i tried to do is to
_create (in the mac’s audio & midi configuration panel) an aggregate
audio device (“macflower”), where 1 & 2 are the build in channels and
3 & 4 the soundflower2ch channels.

* but then the audio generated in max is output by dac~ 1 2
on built-in outs (L & R) but so is the dac~ 3 4 (goes to built-in L
& R)

_I can send the audio from GRig to max, BUT also got a feedback loop
(audio feedback) in GR…

___well, in a word i did all i could think of (including using
soundflower16ch) but can not find a solution – to what seems easy.
The soundflower doc is non-existent, at least i did not found it
(apart from the small “read me”)

I can send from one app to the other, but never managed to send AND
receive the audio

any help??

thanks

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart

#32440
Jun 13, 2007 at 10:14am

This is the way it should work:

#P flonum 132 236 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 132 127 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 85 236 41 196617 *~ 0.2;
#P newex 34 236 41 196617 *~ 0.2;
#P newex 85 127 41 196617 *~ 0.2;
#P newex 34 127 41 196617 *~ 0.2;
#P comment 87 210 183 196617 soundflower input 1 2 (from guitar rig);
#P newex 34 210 49 196617 adc~ 1 2;
#P comment 102 262 115 196617 built-in output 1 2;
#P comment 87 153 181 196617 soundflower output 1 2 (to guitar rig);
#P newex 34 103 49 196617 adc~ 3 4;
#P newex 34 262 49 196617 dac~ 3 4;
#P newex 34 153 49 196617 dac~ 1 2;
#P user com 34 39 128 196617 33;
#K set 0 24935 26482 25959 24948 25888 25701 30313 25445 14861 29551 30062 25702 27759 30565 29216 12832 25448 8294 26994 29556 11296 3426 30057 27764 8297 28192 24949 25705 28448 29541 25455 28260 11776;
#K end;
#P comment 97 103 115 196617 built-in audio input 1 2;
#P connect 14 0 11 1;
#P connect 14 0 12 1;
#P connect 13 0 9 1;
#P connect 13 0 10 1;
#P connect 11 0 3 0;
#P connect 12 0 3 1;
#P connect 4 0 9 0;
#P connect 4 1 10 0;
#P connect 7 1 12 0;
#P connect 7 0 11 0;
#P connect 10 0 2 1;
#P connect 9 0 2 0;

Hth,
Mattijs

Quote: Kasper T Toeplitz wrote on Wed, 13 June 2007 11:49
—————————————————-
> hi
>
> ___I am lost between aggregate audio device and soundflower…____
>
> I am trying to run the NI “Guitar Rig” app as an “insert” (or
> “external loop”) inside maxmsp.
>
> what i am trying to achive is
>
> _the (external) audio gets into maxmsp (for the moment by the
> build-in audio, later will be sound card)
>
> _at some point in the patch this audio is routed – hopefully with
> soundflower – to Guitar rig
>
> _the guitar Rig outputs go back into max
>
> _the final result goes out through the output of the build-in audio
>
> (all this is on a PPC Mac, OSX48, max457, and latest Grig, and latest
> soundflower)
>
> **********
>
> what i tried to do is to
> _create (in the mac’s audio & midi configuration panel) an aggregate
> audio device (“macflower”), where 1 & 2 are the build in channels and
> 3 & 4 the soundflower2ch channels.
>
> * but then the audio generated in max is output by dac~ 1 2
> on built-in outs (L & R) but so is the dac~ 3 4 (goes to built-in L
> & R)
>
> _I can send the audio from GRig to max, BUT also got a feedback loop
> (audio feedback) in GR…
>
>
> ___well, in a word i did all i could think of (including using
> soundflower16ch) but can not find a solution – to what seems easy.
> The soundflower doc is non-existent, at least i did not found it
> (apart from the small “read me”)
>
> I can send from one app to the other, but never managed to send AND
> receive the audio
>
> any help??
>
> thanks
>
> kasper
> —
> Kasper T. Toeplitz
> noise, composition, bass, computer
> http://www.sleazeArt.com
>
> http://www.myspace.com/sleazeart
>
>
—————————————————-

#106705
Jun 13, 2007 at 10:20am

Kasper T Toeplitz skrev:
> hi
>
> ___I am lost between aggregate audio device and soundflower…____
>
> I am trying to run the NI “Guitar Rig” app as an “insert” (or
> “external loop”) inside maxmsp.
Hi Kasper,

just out of curiosity, what is the particular reason for not running
Guitar Rig as a vst plugin inside maxmsp?

Thanks,
Andreas.

#106706
Jun 13, 2007 at 10:39am

thanks
yes, this i sthe way it _should_ work, but it does not:

_the output of GRig is send to max’s adc~ 1 2 , BUT is also send to
guitar Rig input, creating an audio feedback (by the way, taht’s a
cool way to create feedback in Grig, something a lot of people ask
for!

_and of course sending anything from max to Grig produces a feedback as well

I belive the way to go would be to use soundflower16ch, and sending
on different channels than receiving – that’s what i am trying to do
since a few hours (with a break to download Jack X..)

many thanks

kasper

>This is the way it should work:
>
>#P flonum 132 236 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

> > hi
>>
>> ___I am lost between aggregate audio device and soundflower…____
>>
>> I am trying to run the NI “Guitar Rig” app as an “insert” (or
>> “external loop”) inside maxmsp.
>>
>> what i am trying to achive is
>>
>> _the (external) audio gets into maxmsp (for the moment by the
>> build-in audio, later will be sound card)
>>
>> _at some point in the patch this audio is routed – hopefully with
>> soundflower – to Guitar rig
>>
>> _the guitar Rig outputs go back into max
>>
>> _the final result goes out through the output of the build-in audio
>>
>> (all this is on a PPC Mac, OSX48, max457, and latest Grig, and latest
>> soundflower)
>>
>> **********
>>
>> what i tried to do is to
>> _create (in the mac’s audio & midi configuration panel) an aggregate
>> audio device (“macflower”), where 1 & 2 are the build in channels and
>> 3 & 4 the soundflower2ch channels.
>>
>> * but then the audio generated in max is output by dac~ 1 2
>> on built-in outs (L & R) but so is the dac~ 3 4 (goes to built-in L
>> & R)
>>
>> _I can send the audio from GRig to max, BUT also got a feedback loop
>> (audio feedback) in GR…
>>
>>
>> ___well, in a word i did all i could think of (including using
>> soundflower16ch) but can not find a solution – to what seems easy.
>> The soundflower doc is non-existent, at least i did not found it
>> (apart from the small “read me”)
>>
>> I can send from one app to the other, but never managed to send AND
>> receive the audio
>>
>> any help??
>>
>> thanks
>>
> > kasper

#106707
Jun 13, 2007 at 10:44am

>Kasper T Toeplitz skrev:
>>hi
>>
>>___I am lost between aggregate audio device and soundflower…____
>>
>>I am trying to run the NI “Guitar Rig” app as an “insert” (or
>>”external loop”) inside maxmsp.
>Hi Kasper,
>
>just out of curiosity, what is the particular reason for not running
>Guitar Rig as a vst plugin inside maxmsp?

just because i noticed that the same GRig “patch” (same devices, same
order etc) use much less CPU when run as standalone

my max/grig patch (grig as vst plug-in) is a little too heavy for my
G4 pBook, and since my grig set up (bigMuff, sans amp, amp + cabinet)
takes 10/15% less CPU when run as stand alone, i thought it would be
a good solution.

if I manage to run the audio, next will be the iac midi control – but
i am not yet there

best

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart

#106708
Jun 13, 2007 at 11:16am

ok, so i think it works now:

_i did an aggregate with
(first) build-in audio
(second) soundflower16

_audio build-in works as it always did (ins/outs 1&2)

_I send (in stereo) to GRig through dac~ 3 4
_I send from GRig on channles 5 & 6 (receiving it in max on adc~ 5 6)

I still have to try how robust it is, i also have a feeling than the
order of starting the apps does a change.

but it seems to be willing to work

best

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart

#106709
Jun 13, 2007 at 12:15pm

Quote: Kasper T Toeplitz wrote on Wed, 13 June 2007 12:39
—————————————————-
> thanks
> yes, this i sthe way it _should_ work, but it does not:
>
> _the output of GRig is send to max’s adc~ 1 2 , BUT is also send to
> guitar Rig input, creating an audio feedback (by the way, taht’s a
> cool way to create feedback in Grig, something a lot of people ask
> for!

Then I guess you’ll have to find out why guitar rig sends its output back to its input, right? The patch assumes that guitar rig receives on input 1 & 2 and sends on output 1 & 2.

btw You did select the aggregate device as sound driver in max -and- guitar rig, right?

btw2, the underscores don’t increase readability here ;)

>
> _and of course sending anything from max to Grig produces a feedback as well
>
> I belive the way to go would be to use soundflower16ch, and sending
> on different channels than receiving – that’s what i am trying to do
> since a few hours (with a break to download Jack X..)

#106710
Jun 13, 2007 at 12:34pm

>
>Then I guess you’ll have to find out why guitar rig sends its output
>back to its input, right? The patch assumes that guitar rig receives
>on input 1 & 2 and sends on output 1 & 2.

sure but this seems to be the way sound flower works:
If you want an application
to send and receive audio through Soundflower, (for instance using
Max/MSP to manipulate and return another application’s audio)
you must send and receive the audio on different audio channels
or a feedback loop will be created.

of course i am not 100% sure to understand, but it seems to mean
that if i send to GR on channel 3, GR can not output on channel 3
without feedback. At least this is how i understand this, and that’s
how it works now (i send to GR on channels 3 4 and from CG on 5 6 –
and this works)

>
>btw You did select the aggregate device as sound driver in max -and-
>guitar rig, right?

righht

>
>btw2, the underscores don’t increase readability here ;)
>
sorry for that

best

kasper

#106711
Jun 13, 2007 at 1:36pm

Quote: Kasper T Toeplitz wrote on Wed, 13 June 2007 14:34
—————————————————-
> sure but this seems to be the way sound flower works:
> If you want an application
> to send and receive audio through Soundflower, (for instance using
> Max/MSP to manipulate and return another application’s audio)
> you must send and receive the audio on different audio channels
> or a feedback loop will be created.

Aa! Of course. Sorry for that. Here is an updated patch (which you seem to have figured out by yourself, but just to be sure we understand each other)

#P user com 208 46 199 196617 48;
#K set 0 19809 27493 8307 30066 25888 31087 29984 29541 29728 26990 12143 30068 8291 26721 28270 25964 29472 12599 12081 14368 29807 8304 26745 29545 25441 27680 26990 12143 30068 8241 14127 12600 8297 28192 17491 20512 21364 24948 30067 8237 15904 18735 20256 19809 28784 26990 26483 8192;
#K end;
#P flonum 139 243 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 139 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 92 243 41 196617 *~ 0.2;
#P newex 41 243 41 196617 *~ 0.2;
#P newex 92 134 41 196617 *~ 0.2;
#P newex 41 134 41 196617 *~ 0.2;
#P comment 94 217 183 196617 soundflower input 3 4 (from guitar rig);
#P newex 41 217 49 196617 adc~ 3 4;
#P comment 109 269 115 196617 built-in output 1 2;
#P comment 94 160 181 196617 soundflower output 1 2 (to guitar rig);
#P newex 41 110 61 196617 adc~ 17 18;
#P newex 41 269 61 196617 dac~ 17 18;
#P newex 41 160 49 196617 dac~ 1 2;
#P window linecount 3;
#P user com 41 46 128 196617 33;
#K set 0 24935 26482 25959 24948 25888 25701 30313 25445 14861 29551 30062 25702 27759 30565 29216 12598 8291 26656 26217 29299 29740 8205 25205 26988 29728 26990 8289 30052 26991 8307 25955 28526 25646;
#K end;
#P window linecount 1;
#P comment 108 110 115 196617 built-in audio input 1 2;
#P connect 11 0 3 0;
#P connect 12 0 3 1;
#P connect 4 0 9 0;
#P connect 4 1 10 0;
#P connect 7 0 11 0;
#P connect 7 1 12 0;
#P connect 14 0 11 1;
#P connect 14 0 12 1;
#P connect 13 0 9 1;
#P connect 13 0 10 1;
#P connect 10 0 2 1;
#P connect 9 0 2 0;

An important comment which might have been your problem previously:

Make sure you set in/out channels 17/18 to physical in/out 17/18 in DSP Status -> I/O Mappings in Max. Personally I think it is strange this is not set correctly by default.

Mattijs

#106712
Jun 13, 2007 at 3:27pm

>Quote: Kasper T Toeplitz wrote on Wed, 13 June 2007 14:34
>—————————————————-
>> sure but this seems to be the way sound flower works:
>> If you want an application
>> to send and receive audio through Soundflower, (for instance using
>> Max/MSP to manipulate and return another application’s audio)
>> you must send and receive the audio on different audio channels
>> or a feedback loop will be created.
>
>Aa! Of course. Sorry for that. Here is an updated patch (which you
>seem to have figured out by yourself, but just to be sure we
>understand each other)

yeah, that’s it

when you think about it it’s totally right and using the same number
(same channel) internally is stupid – how the machine could know I
want it from here to there and not from there to here???

ok, I made the same mistake!

>An important comment which might have been your problem previously:
>
>Make sure you set in/out channels 17/18 to physical in/out 17/18 in
>DSP Status -> I/O Mappings in Max. Personally I think it is strange
>this is not set correctly by default.

I personaly prefer to keep the outs 1 & 2 the “basic outs” (and ins)
- ie either build in or the first 2 of a sound card – makes so much
easier to check the examples, use old patches etc.

best

kasper

#106713
Jun 14, 2007 at 10:12pm

Mattijs Kneppers schrieb:
> Make sure you set in/out channels 17/18 to physical in/out 17/18 in
> DSP Status -> I/O Mappings in Max. Personally I think it is strange
> this is not set correctly by default.

It is correct by default, but if you changed it once in your Max life,
Max will remember what you forgot some years ago… ;-)

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#106714
Jun 15, 2007 at 8:05am

Quote: Stefan Tiedje wrote on Fri, 15 June 2007 00:12
—————————————————-
> Mattijs Kneppers schrieb:
> > Make sure you set in/out channels 17/18 to physical in/out 17/18 in
> > DSP Status -> I/O Mappings in Max. Personally I think it is strange
> > this is not set correctly by default.
>
> It is correct by default, but if you changed it once in your Max life,
> Max will remember what you forgot some years ago… ;-)

No. It is correct up to channel 16. channel 17 and 18 are in the next tab and in the next tab all channels are set to off by default.

Mattijs

#106715
Jun 16, 2007 at 4:11pm

Hi all,

I am trying to send audio from jit.qt.movie to a soundflower channel and then back into max and out again trough the headphones/speakers using an aggregate device. I have played around with it and i can get the audio from the movie into max but then i can’t output it through my headphones/speakers.

I have set up my agg device as:
soundflower(2ch)
Built in Output

is that correct?

so then in max i will get the signal in adc~ 1 2
and send it out dac~ 3 4

I have tried this and it doesn’t work. How should I set my system sound preferences; to the aggergate device?

any help would be super! It would be really good to finally understand soundflower and aggregate devices.

thanks,

tim

#106716
Jun 16, 2007 at 5:21pm

Tim,
First thing is that you shouldn’t need to use the Sound control panel in System Preferences–you can do all of your system config. in Audio Midi Setup. Look there first to verify the ordering of the channels in your aggregate device. If, when you created the aggregate, you chose soundflower (2 ch) first, then those should indeed show as the first two channels when you display the Properties for your aggregate device. The Built-in Audio should show as channels 3 and 4 in both input and output. If you don’t see all four inputs and outputs in the properties, it could be because you have a different sample rate selected for the individual drivers that you aggregated. Look in the properties for both Soundflower (2 ch) and Built in Audio and make sure they are set to the same sample rate. Then the properties for your aggregate device should show all four ins and all four outs.

Second thing is that the in and out channel numbers in MSP are “logical” channel numbers, and they need to be mapped to the available channels in the driver you are using. In the DSP Status window, click on I/O Mappings. In the case you described, the default mapping should work–1 to 1, 2 to 2, 3 to 3, and 4 to 4 for both in and out.

It seems like you are doing everything correctly–just make sure that you have the sample rates matching and that you are not using Built in Audio 2, which only has inputs and not outputs (the line input on Powerbooks and other models).

Best,
Tim

#106717
Jun 17, 2007 at 1:13am

Hi Tim,

That is very helpful and makes things alot clearer. The only problem is as soon as i went to change or check the sample rates were the same soundflower went to 96000.2 kHz and i can’t change it back to 44100.2 kHz? It is bizarre. Has it happened to anyone?

Cheers,

Tim

#106718
Jun 17, 2007 at 1:47am

Quote: Timothy Devine wrote on Sat, 16 June 2007 21:13
—————————————————-
> Hi Tim,
>
> That is very helpful and makes things alot clearer. The only problem is as soon as i went to change or check the sample rates were the same soundflower went to 96000.2 kHz and i can’t change it back to 44100.2 kHz? It is bizarre. Has it happened to anyone?
>
> Cheers,
>
> Tim
—————————————————-

Yes, I have. First, you must open Audio Midi Setup and in the Properties for menu, select Built-in Audio, and change its sample rate to your desired rate (I guess 96000). Then select Soundflower (2 channel) and do the same for that. Then select your aggregate driver, and it should now show 96000 as the selected format. Under both the audio input column and the audio output column you will find a selection menu that allows you to select both Soundflower Input Stream #1, and Stream 2, which is your Built-in. If you cannot access both, it is probably because the sample rates are not matched.

Once that is set, you will need to relaunch Max/MSP if it is running, and open the DSP status box. Choose your driver and reset the sampling rate to 96000. Try turning it on and off, closing it and reopening it. If it stays at 96000 and still shows 4 of each input and output channels, then you should be ready to sail.

#106719
Jun 17, 2007 at 1:49am

ok so i restarted and it works now… still open to suggestions as to why and how to fix the sample rate w/o having to restart…

BUT

It works so i can get audio from a jit.qt.movie via soundflower and an aggregate device. Fantastic. The question now is how would you split two sources of audio that you can’t set output for i.e jit.qt.movie and iTunes, which use the default output?

Is it possible?

Cheers,

tim

#106720
Jun 17, 2007 at 4:22pm

If you set the default device to Soundflower (2 ch), then you can bring the outputs from those apps into any other app. Or you can use the SoundflowerBed for easy routing.

I typically set up an aggregate device that has Soundflower (16 ch) first and built-in audio second (or whatever device I am using for output). Then I set the Soundflower (16 ch) as the default output, and use the first two channels of it for that purpose. Then, in Max, channels 1 and 2 of my aggregate device are bringing in audio from those kinds of apps, and I have 14 more soundflower channels to move things around (say to AU Lab, etc.). Then output channels 17 and 18 of my aggregate device go to my speakers/headphones.

#106721

You must be logged in to reply to this topic.