can file name of Buffer~ & Groove~ be an argument?
I’m really lame when it comes to working with arguments. I’ve gotten a few to work but I’ve also failed miserably a few times. I’ve looked at the documentation but yeah.. it’s still an embarrassing gap in my knowledge.
Anyway, before I start stumbling around to make my Buffer~ and Groove~ respond to arguments for the file name I figure I should ask if it’s even possible first. That way when it doesn’t work I know if it’s just my method or if I’m just trying the impossible.
Buffer~ and groove~ both respond to "set" messages. You can put the objects in an abstraction or a bpatcher an set the argument in the inspector. Use "#1" for the argument name.
----------begin_max5_patcher---------- 439.3ocyTtsTCBCDF9Z3ofI5k0NP.oTuymCGGmPYKMcnIcRB0pcpO6lrPOn1 VQmNUuIvdHI+7wt6JeORtbInIA2E7Pfm2JeOOzkygWqsGYFa4nJlFSiHfmk4 SI8ZBYfkFzckjUjyDkaBHpmwEUfA2TTqywRgQyeEPez9g6xUVa9bxMtLuLGZ jGAO9fGaCOmYFMgKJeRAiLMYjPcmYvvgt0zP2J0ttcK7BTpV4eSFYOIIXyv6 fbuhypHt.q88cK85HTlAZMqD9BUzfI35nCxD5YgImjGwoHOhFl3djDiFYGFH CtL.4p+LXjDlhe+wYtGwz92dbXjbdgwQZYJUR4B3s.o.NHTh+IPgdLnn4kBq r6s8sSWwfzglgMOCxNUKD8h.o75wiA0wgTzYARisiuLNF8syXnwg6SnnSQnn tQHbqjJt3yChwq24+iXSKqUi1n71gYA6DPAnMbAyvkh8xI4C4LgWT.X3Mfpf qY4U.J9vC96qqpYPGTC8ekZhtXpIoCpYvuTMMkQr4yW.Jc6QhBw1mMUpblo8 PStnwD6cHJXAeS93HGBSYq5M1R9ZUSI6xrTaAq8dV6+NAke4HB -----------end_max5_patcher-----------
1) groove doesn’t know from files. All it needs is the name of a buffer.
2) Check out the second tab of the buffer~ help file, called "format". You’ll see the a filename being used as an argument there.
3) If you open the reference page for buffer~, you’ll see all of the possible arguments described there.
Here’s an example:
----------begin_max5_patcher---------- 698.3ocyV1rbaBCDG+L9ofQmc7f3C+QO0duuAY53Q1H6nLXIFIA0NYhe1qzJ .iS.GbpG2d.Pr6h3u9oUqzqi7PqD6oJj+27ez2y60QddfIqAup28P6H6WmQT PXHN82hUOiF6boo60fYsOt11FAWqXuPs1wgSBpLyK1IJzYTMzO3JqNS5C4Tm HPLtoC+Uk2bhd8SL91kR5ZsKfj.SO5GMEdDFC2Msa9DVJnGiFe.GzVRbxN3e f9gjQxPmTEi2HJqs2FMxda7.4gk.qJzZA+pF+QUV2IRoWjGnwtqy3RC1yyHG P8CqEymjL1e9LKklgs2Sh5lUK9bTkSjF6ZpbIkSVkAQDzRPFBX+FkVjeynK8 kTx5inNQXvmMtiCgjj3j56cMvm2oVC+BZMiURmrkv3M5sjHaP4G8d9nIouD. EaK2NIztk8ZSlfnsMxXpKujwQivDfCyAlfil0MNldoYabmnpxnhTRSWRzZIy rdfdpkphYUPyhkrBpXSs4Z6s+mYB919Q2YgpdRH0CL1ZrFzguclwj02CyBlz seBL6OsSuLNSaWq..uU8nyBpvDjRevAyXmeHIq9wUlw0SsXSdxwaSw3pLtOO 4BOCpDGEco5wI2gxw8fjsRgnjdzWUR49g9eOSHxuxcrhtlEnCFbgXXUINFeI xEekjK51QtUEa1PkUjKUVr6mFzMgv1bUvKrO30TEaEgu8h7Jb1b.QU.ycNf9 .VzeQpFzelBI72evHPTV6mSQknPttd7TetC+SxJkpzLNQybaP9Xy9Nsh4IVZ Jk2dWsTlxV1EFRAcNcNT4rX.p4cR9esbRtapwremOd.SU36lZ9+IwId.rY5c iMwCfMSuarIY.pI9KpFWAHRddIUpp5RPHlB1OKjvgPFCux3tWgMvQRZIqNd3 3jHhzTEUaJgVHcU.2OeJZj8+71n+.Tm8J8M -----------end_max5_patcher-----------
That’s good to know. So instead of sending a "set" message, I could name them "buffer~ #1_loop" and "groove~ #1_loop".
Btw, I’m talking about "naming" the buffer. JohnisFaster, maybe you are talking "reading" a file to the buffer?
Well I made a sampler that can gran audio from live and let me play it on keys. Nothing fancy. But obviously this allows for a single instance unless I create multiple versions that use different buffer names. Not ideal but easy enough. What Im hoping though is that I can make one version that allows me to simply type in the buffer name on the maxforlive interface so I can have as many independant versions as I need.
You could use "—" instead of an argument, to give a unique ID to each device.
Hm, so if I have a capture device on an audio track how would I associate its buffer to the synth? Is there a way I could put the audio capture part inside the synth and route lives audio to it?
I often have to capture to a buffer with an audio device, and midi playback of the buffer with an instrument device. Both devices would reference the same buffer. Of course this is a little tedious, and won’t really work with the previous mentioned arguments. If you get this method going, and need unique buffer names, let me know and I’ll post how I do it.
Well I already do have that method going, capturing audio with an audio device and playing back with a midi device. I was gling to make a folder with like 8 versions of each device each with their own buffer names but theres gotta be a better way than that. If youve got a trick Id love to hear about it.
I had once asked the question, is there a way to make an argument for a device? But, I’m pretty sure the answer is no, so here’s my workaround. Not very exciting but it works.
----------begin_max5_patcher---------- 877.3oc6XE0bhBCD9Y8WQFl6QqCAADt4d49czoSmfrpoSHwIIX0qSue6WR.r 1SgRsVa6M2KHrYYylucyW9vGFNvKSrATdnuitFMXvCCGLvYxZXP8yC7JHalw HJmadyDEE.W6MpZLMrQ6rOWHQjxbp.kCqoyfFGlKWjYcveresEdYAky.sKd3 ZiqjfxDVhlJ32JgY5pbZJ17ZnISsW8quft4o.IJ0MQpI7qH5YKo7EGFkT6Ub jKNA6GHZtaIHxt6pfI6RbAWyIEfaneJoD19inn+xMBNXru05iCGZuL5LfhTt RKKsCeZPYugkISC6OtD7ghK+3pqPL5ZnFQPpkhRVNRBEPQFHQ5kTExrvM2OB sUThtmxXnkDyanEHEnQTMpfvKIL1Vi2.ZNUpzHMsXG7xnbXlnj6lwvyR66jX WmG1OXbzaoAdWbv13TWphaoTgitHkpBPoHKfCJUVvNfIDq7NFfEzMfEZPJaW XbzQ2wWgV5sqfJ287ZAKwsikgUfXPfCRScSDNoEnL9h.k1N6w1tWiW0QcMQt a51a3qw23cJ8gAQc0GdHrNxPEwDDca3aPG8pMykClmDWQtzB9N0aWfjlkqFj 2BbRFC1eQoLaiyukn0RZVoFd5NUMlVCpVTiUBh4Mlarue3YB9htQ1m4tgnQp Ol+Gy4FDDejwJ4TsRusZk4WMtqMo4mWYOCGt2ffGr6agTHVC+F05FvIsUyUT CtvrU956N4RePp675jNOPAm7gyR8M7oPQ0rHq5reWnn1MEteBmzIEU5EAGao cybdcl4XSDFcpL9MzEo98DNG0Nj1CVoDmXmzfN053+esNmC8koIuBQKgeADs bN1aiCcht6k7ijOYpO5T5wYUDQbPu0PD+oQBw+B5GxJmOGjcnen0xcUo1Tyy H7EmbIuV6P0Wl1FAczmcoCmChhZ7nOZ.B+hHA3bcXdM6PeNKG+lfFWDcGV9W +GYtjxZ+43kRTJm0r3pmdzS4UNnzTtSAzd9XX4MfWiOKo44.e+SVyoJKcV9t M9GT25a1XE17hoi8aduP4iU65KmOIOyoOd7I8hkO1OO9Eym+JoeOym39.OWr rIrGYSzkqV0irI7DylJZHxpUqAopNjtDwPPemPZeLdj6QJu5Q24JdRyGPz3e jyBQZ3R0FhzRYES3ljXug144wg+AqEvt9A -----------end_max5_patcher-----------
Hey I appreciate that, I was thinking something like that was possible. Not the most ideal solution but it will definitely work.
I don’t suppose there is a way to replace the number box with a text box where I could type a word? I think better with words than with numbers.
Maybe if we simply observe the track name and somehow strip the number off the front of it we could set the argument with track names?
I figured out how to observe clip names a few days ago so Im sure it would work but I wouldnt need to actually use all clip names as arguments thats a bit much.
A dialog object will let you enter text . Not sure how the device will remember the name, maybe with a pattr object?
Also, not sure how observing the track names would help, because you’re trying to get two device to reference the same buffer.
Im probably just over complicating it but I could have the midi device groove~ use its tracks name, then have the audio device on another track with a umenu to select tracks in the set. I stumbled on another thread where they populated a umenu with track names in a set. This way only one setting is made and its not an arbitrary number.
Its a super overly complicated way to do what your very simple patch did. Part of me is just trying to learn more and part of me is just being OCD about it.
Does observe tracks and such inside a patch have a hit on CPU?
That’s a good idea, a little more elegant than me assigning numbers. So the audio device’s buffer name will be changed, to reference the groove~ objects in midi devices, that’ll have the same name as the track they are on. Don’t see why that wouldn’t work. Maybe I’ll try it too if/when I redesign my devices.
Observing the track should not be a problem. Especially since the operation would occur when you open your set, and not during performance.
Well I haven’t spent much time looking into that idea of mine, put your patch into action which satisfied me enough to start following other tangents.
I was thinking I might ask you, Mike, before starting a new thread; How might I save the contents of the buffer as presets without having to actually save the audio as files on the computer? I read that I could do this by reading the contents of the buffer using the peek~ but I have no idea what to actually do with that. It would be super fantastic to be able to capture tons of audio on the fly AND recall it the next time I load the set without having to save each file.
I have built something like that, but it’s too messy to post. The way to do it is to send buffer~ special read and write messages. The message would something like,
You can add a folder location with something like,
Look into the helpfile for buffer~. If I can clean up my patch I’ll post something.
and btw, you will need to read and write to the computer, unless you only want to store loops into the temporary ram. But I think you are talking about being able to store and recall your loops at a later point, so reading and writing is how it’s done, I believe.
Actually I’m not really looking at the moment to be able to access the audio for other livesets, I’d really like to just save the whats in the ram as a preset in the current live set. This is just cause I don’t want to take the time to save audio files one by one I’d rather just grab a sample on the fly and say "yeah thats good that’ll be on preset 1" and go on and on till my preset tab is full and then rock out.
And yeah, to be able to recall that audio when loading the set again.
Saving tons of audio files to the computer and naming them would be slower work for me.
You could make multiple buffers, or use something like polybuffer~.
As soon as you close your set, the Ram will be erased, so you would have to write to the hard drive, if you want to recall.
One option is to make the audio into an Ableton clip, and drag it to a live.drop object in you device.
hmm… well I found an old thread where someone mentioned that you can read all the of the data out of a buffer using peek~ which can read every sample in buffer into basically text that can be reloaded into the buffer as a preset. I’m not sure if I was totally misunderstanding it or not but if it’s at all possible I’d love to get that to work.
Hadn’t thought of that. My only concern would be, a really long list could bog down the preset object…?
If you get it working, I’d be curious to see it.
How bout this, if I click write to the buffer it opens a save window and I save the file. Then do I have to drag the file onto a drop box to load it from that location before I save the set or is there a way to have the act of saving the file to tell buffer that "hey, this is what you’re gonna reference from now on" ?
You still have to find and drag the file into Ableton.
Well thats a drag :)