I'm creating a patch for a university module, and have chosen to create a patch to enable the user to import a sound file, make a selection of audio, edit a few variables such as playback speed and volume of the selected audio, then save the selection as a new audio file. Basically a sample creator. I will be adding on many more features to the patch for the moment my main problem is that I can't get anyway way of saving audio to work with my patch. I've tried using sfrecord~ and putting the length of the selection as the Record length, but it's not working - I think because the x milliseconds of audio is being recorded when the patch is opened as apposed to when the user wants to save. I've looked around the forums for various solutions but I am simply not adept enough at Max yet to take many of the suggestions into the context of my own patch!
In summary: I want the user to be able to click a button, choose a save location, and have the program save one loop of the selected audio in the waveform.
Please could some geniuses provide help on how I could achieve this?