Forums > Max For Live

can file name of Buffer~ & Groove~ be an argument?

Nov 07 2013 | 6:13 pm

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.

Nov 08 2013 | 12:03 am

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.

-- Pasted Max Patch, click to expand. --


Nov 08 2013 | 10:20 am

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:

-- Pasted Max Patch, click to expand. --


Nov 08 2013 | 1:37 pm

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?

Nov 08 2013 | 2:04 pm

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.

Nov 08 2013 | 4:37 pm

You could use "—" instead of an argument, to give a unique ID to each device.

Nov 08 2013 | 5:56 pm

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?

Nov 08 2013 | 6:37 pm

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.

Nov 08 2013 | 9:19 pm

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.

Nov 09 2013 | 9:49 am

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.

-- Pasted Max Patch, click to expand. --


Nov 09 2013 | 1:09 pm

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.

Nov 09 2013 | 2:15 pm

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.

Nov 09 2013 | 3:12 pm

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.

Nov 09 2013 | 4:48 pm

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?

Nov 10 2013 | 5:41 pm

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.

Nov 11 2013 | 5:14 pm

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.

Nov 11 2013 | 6:08 pm

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,

"write BlueCat.aiff".

You can add a folder location with something like,

"read "MacintoshHD:/Users/Mike/Documents/MyLoops/BlueCat.aiff"".

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.

Nov 11 2013 | 6:21 pm

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.

Nov 11 2013 | 6:34 pm

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.

Nov 11 2013 | 6:57 pm

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.

Nov 11 2013 | 7:44 pm

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.

Nov 11 2013 | 8:15 pm

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" ?

Nov 11 2013 | 9:26 pm

You still have to find and drag the file into Ableton.

Nov 12 2013 | 10:32 am

Well thats a drag :)

Viewing 24 posts - 1 through 24 (of 24 total)

Forums > Max For Live