if statement and read/writeagain coll in saving clock
Been working on this clock for a bit with help from others (Broc has been super helpful so far!), I feel like I’m making baby steps to having it done. It’s basically a clock that saves how long you’ve been working on a project in Ableton as you work. Problems encountered were that having the clock just simply tick into a live.numbox or any other live.* object would write to the undo history, which wasnt good at all. So there’s a coll in it’s place now and I’ve been reading about writeagain and readgain messages going into coll, so my current attempt was to the try have a load bang that would trigger a live.numbox to send its output into an if statement which depending on whether it was 0 or anything other than 0 (if its the first time you dropped it into your session, or if you’re opening a new session) would either immediately ask you to name the file and save it somewhere, or it would send a readagain to read what it saved from the session before.
I guess before anything else, can readagain and writeagain work over the closing of a session in live? Or does closing the session basically make them just send normal read and write commands when you re-open the session? If it’s the latter, I’ll have to think of something else entirely I’m afraid!
----------begin_max5_patcher---------- 1377.3oc6Z10ihaCEF9ZleEVndWYG4OyGUUUcW0apzdUusZ0n.wv3pPBJwvt SWs82disSBILfwYmPXXZuf.1wIb7iOG62iS95cSlNO6K7hofeB7mfIS95cSl nqRUwjpxSltN5KKRhJzMaZJ+yYy+qoyLmRx+hTWsDfpqKc65rsxDtTeAnpZE w51UdsuC2zzMQxEOJRW8PNegzXE3ff68Yy.XRv8vxuvpinxeC9T0EYt4xm1v MWwTQZ40Ve1kYoxzn05yM884hnDvGxRhm15zEh+VeZDr7d2XyhzFSVU22t6N 0gYuLrDyShdp7OBBcmNPWnCjp3hG57zYdT5pAEO3gCO+XO7ZPgV4hu1awWCD B9d1X6zfGZmFVO7YHVPCxDHQHZzv7tQ7XVyKJhVweFb9btPxcGLTajgocZnL crDCpIimMx7Z0iQrD7CBzu.AxG4ofBtDjyihiVEIRA7jBttpdRNrsvMBSEgQ BzLCCcXZnq9LzIhc76KuKpVUcO2Ek2XHG4zcYD9HLBd9ojHPcDGwD2wrhnYf oKSxhZMwzln7RCTxyefmFMOg2dvpKQpprHZGO9gHoLWLeqju+WEUnohMpNex Vd1x5pqqu8+YssUMFz4bEOlkKsPuNMNIKckqscapPVHexzWglyqGpq+5Jrzi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D8.xPH6Y.sG7EPFFine DfTpIIIy60V2RDe+NhL8uLzFMDyQ8cE0TKvzDPvLOOktkFoYxTL.eNFLdR+P tnTg85xbPin83hNtQ0ZPNXMnuCqA7o691c+qs9BnM -----------end_max5_patcher-----------
It’s unlikely that readagain/writeagain would work across sessions.
So you probably need to store the filename in your patch and use it for read/write operations.
The filename could for example be stored in [textedit] and typed in from the user.
But finding an elegant solution seems tricky. Good luck!
Sorry about the delay getting back to you. Sad to hear that the readagain/writeagain idea wont work. Almost wondering if having a C/C++ external that deals with either the whole saving process or just the naming process might be the best bet. Will have to read up on that. Thanks for all the help again!!
Hey, I suggest looking into [pattr]. Activate parameter_enable attribute and it will save clock state together with your live set ;>
[pattr] can be used to save the clock state but it writes the clock values to the undo history.
As mentioned in the original post, this behavior is not wanted.