custom waveform (buffer?)

oshii's icon

Hi guys,
what is the best way to create and work with a custom wave form (hand drawn one)?

I am currently only aware of the [waveform~] + [buffer~] combo, however I guess in order to save the drawn waveform I have to save it as a file, which I don't find too neat, since I guess it won't load (automatically) when a preset is invoked (i know everything is possible in Max, but I'm first thinking of something more elegant).
Any other ways?

Florent Ghys's icon

not sure if that's exactly what you're looking for, but someone did something like this a while back on this forum, using the old lcd object. I'm sure there are tones of other ways to do similar drawing/buffer stuff.

Max Patch
Copy patch and select New From Clipboard in Max.

Arvid Tomayko's icon

I'e been happily using one I made using jitter openGL in a pwindow, probably is an adaptation of one of the techniques in the thread mentioned by Wrappin Raja. Makes it GPU accelerated!

oshii's icon

No, what I would like is to be able to save a waveform I've drawn, like in [waveform~], so it can be recalled with a [preset]. So far I am only aware of one way doing that, i.e. save the buffer content as a wav/aiff file and then recall it, but I don't like this option much.. I think it only complicates things, and I'm looking for a smarter solution.

Max Patch
Copy patch and select New From Clipboard in Max.

testcase's icon

you might want to consider if polybuffer~ could help in this. you would need to save the individual buffers to file but it has an embed attribute that will load all the files when the patch is loaded and you can select different buffer using presets.

Arvid Tomayko's icon

I could also imagine using javascript to base64 encode a small buffer and store that in a dict (which could be embedded in the patcher), or even send it into a object so it would be recorded by pattr. Then youd also have to decode when reloading the patch.

oshii's icon

My wish is to avoid dealing with external files because i like my patches to be self dependent as much as possible.
👽MC WRAPPIN R∆J∆👽, if i understand your second suggestion correctly I can achieve this by storing the data from buffer~ to a coll object, and then recall the data with the presets? If correct, can you pls give some further advice how to do it? i don't find this in the help files..
TESTCASE, for the reason above I will first try with MC WRAPPIN's approach, then as a last resort, if nothing else can be done I will have to consider working with external files.. Will let you know how it goes.
ARVID TOMAYKO, unfortunately I still haven't started learning javascript (in my bucket list though), so I can't try out your tip.

oshii's icon

Thanks for the thorough explanation, I will try it out!

oshii's icon

In the meantime I think I also found a solution! :)

Max Patch
Copy patch and select New From Clipboard in Max.