How to save a selection of audio from a waveform - Help please! :(

    Mar 06 2013 | 12:23 pm
    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?

    • Mar 06 2013 | 12:46 pm
      I think you should make in non-realtime, using uzi, peek~ and poke~ here's how to do. you can make a lot of processing this way.
    • Mar 06 2013 | 1:05 pm
      bertrandfraysse sir, you are an absolute legend and genius. Works a charm! If I could swing you around in the air and hug you in joy I would do it right now (that might be a bit far).
      Still, I was hoping a non-realtime method was an option, but simply did not know enough about max to do it! I've learnt a great deal today then, thank you!!!