2

I am trying to save the contents of a ~buffer object into the current live set project. Is there a way to get the full file path of the Ableton Live set file programmatically without using an interactive dialog? I will use the set path to calculate the path of the new audio file and send it to the ~buffer with a "write" message.

Thanks!

patrickkidd
  • 2,797
  • 2
  • 19
  • 19

1 Answers1

0

As far as I know the Live API will not give you the path to your Live set.

However, it looks like you want to load recorded audio clips into a buffer. Since Live 9, this can be done with the file_path property of a clip.

If you paste the code below into an empty audio device, it should automatically load the last clip you recorded on its track into a buffer:


----------begin_max5_patcher----------
1712.3oc6a0zrZaCEcM7qviW19xarjk+ftqsyzY5pl8YxvHvBPoBaO1hWdIY
R9sW8gse1.FK.mGhlrw.RxxGcz8dtWIr9xzItKxdlT557aNuyYxjuLcxDUQx
BlT86ItawOujgKUMyMk7wrEev8AcUbxybUwL5SjG4ankIjmnKI00uJKkWR+L
Q1Ff2idUEmtaa1NNivU8oeUo5h3eJmnAj6Bb5Z2Gbboo75ObdeUiyw7kanoq
mWPVx0sGNCHdBNAxKQyjWAwO50bGzDEREn+MAwsAXJdq5I596ETLy4OxXItu
.TZZMNAxx95zoxKObkzUFNYKorzojvcJwayYmGkA5ixNIAAfM7C..NIAE8ZQ
PeD+DYUVw1uU2iK1sZEon4Q1kb5xBg8wBqD7qxj4DegQKUeZ.i4KmFbfAgxO
BQ8PYg0frjvDc.MKcYFKqnpij2p2iQwwP+.427fQn.f7aAM8VGxLX7r1xKH4
jzDGwGL7xWCKsZWwX4033SZpEbi8E0FbeqxMTvDdNvyhhfCZFpDxLfuhgZeS
uSRXnaLgk6jsnjT7D4u9aF4sX9l+Y0aY3OIFQ+IilO1VWsbh7dLF4C7iTdRH
.HJT9MUQ9OHcwLfh88eT3+ABgmjhAWDE29gSJpH1JlUzUTF4IRQoPXnUqm3h
yyaU7jV2hb53C5AekTmrHZptHPSQEhXt02eTSo3BAEvEi+cEZ3+bbnqtRgIv
z5asgeTwEBUwMCiTVfg9sz5DFKqYYK+Whhl7pKLSnrPSEJLkjTNlWghlpSHq
v6X74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JSrDHKWDuQFyyrFi4Yl59E
YMPFYHjk6BfsHYDaJMGaOXFZZzD6AylBYj0fXSML7sG2OSkLrGyBjorLvd79
LDwxzQsEmOSi9Armb4NRLhd7+rm3ePi0LrGOPeSwLxhD5Lc4THncgYiVahm0
j0Lx3n11iV2QfROX1dVpMxT8YjEE4NzT6Y6YUfHSiofrn0TY51vfFqEU479o
sOyRCs+0eYjNYQCexkNiiayQAwId388PWyxVfYUGvrl68HmpmouPhizg9isa
c1N92FmSFYIccpb317sgODtPO8qBn+oN3dvK4b6AGWVhld6HIPTzvjD3ZIIU
m1c6n0b19hIUL2AhHxyeuCrAa8rfkNqr4PwiCENNXN7rvimEgmHSvS3qGdBL
AOnWO7.LAOAuZ3wD3.eUQCv.z.t.znc826HKKAxdGU48NlxGdDk663IKdNec
5+kdwbrB
-----------end_max5_patcher-----------
Mattijs
  • 1,909
  • 3
  • 19
  • 28
  • That is an interesting piece of the pie. I wonder if there is a way to do the opposite? That is, save the contents of a buffer~ into a clip on the track? – patrickkidd May 31 '14 at 01:57
  • It doesn't look like the ClipSlot object has a feature to load clips: http://cycling74.com/docs/max5/refpages/m4l-ref/m4l_live_object_model.html#ClipSlot, so I would say this is not possible at the moment. You can however save the path to a buffer you saved to disk as an audiofile in your live set with the `pattr` object. Perhaps that is more towards where you want to go? Could you explain more about what you are building? – Mattijs Jun 02 '14 at 11:56
  • 1
    I think pattr is the way to go here. Too bad there isn't a way to register the sample so it will work with Live's "Collect and Save" feature. I have built an audio effect meant for live performance that allows you to record a note (or any sound) from a live instrument into one of 8 slots assigned to midi notes which come on from another device added to a midi track that sends them via max. I then use the "Midi Sequencer" device to send the notes and adjust the per-step chance values from a set of midi knobs. The question above is about automatically saving the state of the device. – patrickkidd Jun 03 '14 at 17:06
  • Yup, it would be great if it were possible to register newly created samples with collect all and save, that would be a great feature. – Mattijs Jun 03 '14 at 17:18