Open always the same audio driver and cameras

R_Gol's icon

How Can I make sure that my patch will always open the correct audio driver as well the correct camera I'm using? (using Windows computer)

Source Audio's icon

you need to collect devices that are available, compare with wished ones, and

activate if found.

If not post error.

R_Gol's icon

OK I will look into it., Another question is regarding windows driver in max - which one I should use? the list is too big... I'm using the mic input of the webcam camera and the audio output of the pc computer

R_Gol's icon

This is the drivers list:

R_Gol's icon

you need to collect devices that are available, compare with wished ones, and

Which object return my drivers and camera lists?

Source Audio's icon

what do you use to select camera now ?

Same thing should list available devices.

Regarding multiple I/O from windows audio driver,

you will have to select driver AND input / output devices.

Have a look at adstatus help file.

Usually Input Device is option 1, Output Device Option 2

but be warned - replugging camera could cause troubles.

In fact you don't need to do all this if your audio device is allways present when Max starts.

That because max stores all audio settings including prefered

audio configuration when one quits Max.

Only trouble is that it will pick any other available driver

in case last used one is NOT available.

R_Gol's icon

I'm using this message to always select the same driver which is works fine:

;

dsp setdriver "DRIVER NAME"

is the above also possible for input and output devices?

is there something similar regarding cameras?

what do you use to select camera now ?

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

I am not sure about messages on windoews to set prefered I/O

audio devices.

It gets stored into Driver configurations which are separate

text files.

for the camera

either pass camera name directly,

or try to recall it from the umenu after getdevlist

R_Gol's icon

ok! Many thanks!

btw - it seems that vdevice $1 is expecting integer and not symbol. (or I miss something?)

R_Gol's icon

btw 2 - why windows have so many drivers option? and how should I know which one to use? (It seems more then one can work)

Roman Thilenius's icon

first time i looked into the windows version and saw those 8 drivers i immediately turned into a giant facepalm and froze to blue ice for 3 minutes.

multimedia driver is bullshit - wasapi and that other thing are the coreaudio API drivers of windows.

why some DACs have more than one ASIO driver, no idea, either.

on my windows laptop max usually does not remember which driver i had chosen last time, and after a crash max won´t open again because of issues with the audio driver.

then again, i am just a dumb mac user and there are windows users who do not have these problems.

Source Audio's icon

@Roman

yes windows versions of max don't manage to store audio settings if one quits max

in a certain way.

I have reported that several times, but never got any reply from cycling.

The key is window flag noclose, which makes the trouble.

Also

;

max quit

message to quit max causes mentioned missbehaviour.

@R-GOL ignore all but directsound or ASIO drivers.

P.S.

one can set prefered I/O devices using messages to #AD

example

;

#AD dsinputdevicepref "Microphone (Realtek High Definition Audio)"

you can also combine

;

dsp setdriver ad_directsound;

#AD dsinputdevicepref "Microphone (Realtek High Definition Audio)" ;

#AD dsoutputdevicepref "Speaker/HP (Realtek High Definition Audio)"

Audio settings text files are written in user's

AppData/Roaming/Cycling '74/Max 8/Settings folder

AppData is Invisible and "normal" windows users have no rights to even look inside.