I'd like to draw straight lines in multislider in order to draw a waveform into buffer~. I want to use the same sort of straight-line drawer that is included in the table object. Is there some way to use this outside of table?
You can also use bpfunction to draw the lines. Set the domain size to the size of the buffer you want, then dump the values out into peek~ (yourbuffer~). I think there's a dump command for all values at once, otherwise use the index outlet of an uzi.
The posts about generating your own functions to create these waveforms are also good. Experiment a bit with sin, pow, etc... you can send ranges of good values through them to generate interesting signal-level values (-1.0 to 1.0), particularly with sin/cos as these give values within this range naturally. You can then use pow on them, multiply them together, etc... lots of good ear and eye candy there.
I was at the house of one of my students/band-mates a few weeks ago and I showed him how you could make something like that using [function] and [record~] to draw envelopes into a buffer (could easily be used for waveforms as well).
I am not sure CJ's idea will work very elegantly because the dump of [function] only dumps the breakpoints, so you would need to add a [line~] to fill in the values into the whole buffer (I think?).
I will ask him to email me the patch and I'll post it, maybe someone can point out how to combine CJ and my techniques into some sort of non-realtime dump.
> Another way is to use a function and dump its lines into a buffer~
> Below an de-encapsulated version of my envbuffer~ abhaXion, after the
> dump you can go on and draw to your liking...
oh, didn't notice Stefan was talking about this too. I think we may be talking about something similar but I can't seem to get his to work. Anyway, I really should be finishing this emails and not hanging out on the Max list, so I will explore his patch again later.
Yes, yes, much more useful to actually use with [preset] included.
Just wanted to mention, that the original I posted was for making envelopes--nice to have them in buffers, glad you noticed my examples wasn't for waveform drawing and made the write changes. I'll link the thread to my friend so he can check out your additions.
> That example is cool. I altered it a bit (*~2. then -~1. to give signal/buffer values between -1. and 1.) Also you can preset the bpfunction to save your line designs.
It has been a long day, so I didn't think of it when writing my last post, but you can save the extra MSP objects by changing the min/max of the [function] if you get info on it.
Also, sorry laotze, I overlooked that you were on Max 4.6. Here is my original example in 4.6 but like you asked, I changed the min/max already to -1, +1, for waveform drawing (unlike the default of 0, +1, which works well for writing an envelope into the [buffer~]).
One of my ongoing projects is creating a waveshaping patch for use with [cycle~] that uses [multislider] to draw the wave. So far it has a few functions like smooth, digitise, randomise etc. but I'm now looking into using [ubutton] or a transparent [lcd] for drawing straight lines. I'll let you know how it progresses.
It's written in 5 I'm afraid and uses 512 element lists for the wavetable in [cycle~]. Also I'm not sure how many of the [zl] modes I've used were included in 4.6.
It's not quite finished yet anyway but I have tomorrow off work so it won't be long. If you want I could post it to the list and maybe someone will create a 4.6 version. Or I could take a screenshot and you could try to piece it back together yourself. Just let me know and I'll see what I can do.
Once my main patch is finished I will show you what I have. I had a look on your blog and like the look of your interpolation process, how does it sound? Sometimes waveshaping interpolation throws up some unexpected timbres if you're using the waveform as an audio range oscillator, which can be good or bad depending on your taste. You might want to look into spectrum interpolation which should give you a more expected "musical" change. Oh, and I really like "Bruteforce" well done on that front it's quite mesmerising.
Hey, thanks for checking it out. The interpolator is working pretty well, although i can't say i've worked out every last bug. But yeah, sometimes if you're switching from one waveshape to another drastically different one, you get some strange unpleasant sound and especially around zero it gets quiet (as you would expect). It's coming along though. I'm using function now to get straight lines but I'd rather be able to just draw them as I've indicated. Thanks again for your help.