change samplerate due to file

robmausser's icon

I have a setup in MAX where when a file is dropped into a folder it automatically gets loaded into sfplay~, and then recorded into a new file by sfrecord~. The only problem is, when the sample rate of the file is say 44.1khz, it will still play through the device at 96khz and record at 96khz if that is what my DAC is set to.

Now I know that sfinfo~ will tell me info about the file, but how can I get the output of the samplerate to trigger and change the sample rate of my DAC?

Thanks

Rob

Mike S's icon
Max Patch
Copy patch and select New From Clipboard in Max.

adstatus is what you need