Saving/loading sound files with presets.
i want to be able to save what file was loaded in to sfplay~ at a preset number. so preset 1 could be a snare, preset 2 would be a kick. etc
As with most things in Max, there are several ways to go about this. This is one of them:
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 889.3ocyW1rbaBCD.9L9oPC8pqGDHwOsG5zWf9BjIiGgQwVsfvCnzjzLoO6U ZAbrwDavASygPLRZk18S6e77LK637G4k1nuftAYY87LKKXHy.V0uaYmwdbUJ qDVlsj+Pd7OsmWMkh+nBFtH+dEGU9TVbdZyjhDXJ8x+LF2L3c4Rkjkwgo9dg fsa4x6yzaRJWAGja8nUCodZKuRKssmq+Cc6daWo3OvjX2ENutWBY6sZKSsZi PtdYAekpZ27h7WPmiHANZQQAQlmt5eit0HxKylYdL+8glsrU+BIPkcfkvgRE 7aRkwlHXfHT70fHJMNh6.GAilShPpL9IwL45gQF7YIimOcDHSFurjsl2AD7+ 34SPbCAKODhOndfoiCGWmhU4oon6Do7kFitqnExPIC4j4PleI4RNu+Ag3Y9W jyq9G0xXrvkILEqFN0zwLw8RXSpORK6lUcCpBwF7VsIkreySVpwg9bWxTpBQ rNyaY6sjmEyAxgqE+BtnVkmkwMARsuoXRExnGH0FNp1Str4GnGDpMvLaK3kZ rs.sI+AjVHSRPUdgQLlZ2xERjdpJCpZFVsjfLZ9xRS+ViRjJj7c3hdrOh2P8 QbFmKeRTU9.pODaPIP8D5EFhTY+cDB3NPG8lMZWFwCGXmqYu8wwTHS.N.LSG vImruSd0ArrsC7.Af1mVkK6B.X+AlE7vZ.81PoPVdLInIL9JzXPAeKWlfx0O 6zTo+mJEzCt3BbIjdkJB5hcu11NdAMhhCCFZ+Q0.vGBz8nguqZgsHvNWiRcJ tjN4h2GatD.7f3dM5PvDmjnsy70cRFxn9IFmn0wSQnyG5DAO8CtFYTJuaaJ6 o+10GfMZvoTrVZD5R5t9D9OtUcO4p6dBJfFcT6SlNNp0gO8Cy4uyZgaLrIqj SjuVLm5V69p8AvE1InChVewKnNlwOj35fvhUMGYyWwhdUgR3kJgjoD5JUutH Hs8dqZiHIgK2uUiLQx1bc42Zsf3.oRnUEScC7N9MLFBq77IFFgqBrZzBQIKN spYOmNck5q4Q5g00BAGabim53ZtTOi5PFFp8nPhIhGspuE+cucEvoQ+8Ni9G LYzLrGWtjISaB5g1DNYZieO0F7jwly426OcQg39jVvexnS6zquUR3ojP98Ri bmPMh1aMZpt0b6SwkOXd0muT9XpQd8Ritzbz5NgdY1+.Nfeei. -----------end_max5_patcher-----------
thanks a whole hell of a lot. coll was my next best guess for what to do and i really didnt feel like messing around with it.
oh, i noticed a little bug.
if that wire i added isnt hooked up to the message that is sent to the coll, you cant save multiples of the same sample in certain cases. for instance, if you saved preset 1 as "snare.wav" and preset 2 as "hihat.wav" then you recall preset 1, it loads the snare sample, but then if you then save it as preset 3, it will save the "hihat.wav" because when the data was called from the coll, it was not refreshing the message that would be inputted to the coll. it would only work if a new sample was selected.
anyway. thanks again. just thought id point that out. heres the extra wire.
Forums > MaxMSP