drawing straight lines in multislider

Jay's icon

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?

Jay's icon

always forget to mention that i'm using 4.6
thanks~

Gregory Taylor's icon

If I am reading you correctly, then the
answer is "No."

Tj Shredder's icon

Jay Bodley schrieb:
> 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 have to patch it yourself I am afraid, but why don't you draw the
waveform with waveform~ directly into the buffer~?

you could construct such a function with the aid of mousestate by the way...

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...

Stefan

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

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

swieser1's icon

Use a [vexpr] object to create a list out of a function, then send the list to multislider.

Stephen Lee's icon

Since the table/itable object can do this already, why not just use an itable instead of the multislider?

seejayjames's icon

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.

-CJ

Roth's icon

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.

Roth's icon

Quote: stefantiedje wrote on Thu, 06 November 2008 03:16
----------------------------------------------------

>
> 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.

Roth's icon

Here is the example I was talking about:

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

And while I haven't had a chance to try it, I bet I couldn't get Stefan's to work because I foolishly forgot to turn on DSP.

seejayjames's icon

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.

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

Roth's icon

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.

Roth's icon

Quote: seejayjames wrote on Sun, 09 November 2008 18:49
----------------------------------------------------
> 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~]).

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

Luke Hall's icon

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.

lh

Jay's icon

i'd be interested in seeing this patch if you wouldn't mind sharing. keep in mind i'm on 4.6 - if the patch can be used in 4.6 i'd love to check it out.

the reason i'm asking about this in the first place is that i'm making a waveshaper using multislider.

Luke Hall's icon

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.

lh

roger.carruthers's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If you're OK with 3rd party dependencies, then [gen24] from PerColate might be the thing for you; see below.
cheers
Roger

Luke Hall's icon

Here are the screenshots, let me know if you have trouble re-creating them, it's by no means perfect. If anyone else is interested in seeing them let me know and I'll post the max 5 versions here.

lh

Jay's icon

thanks a lot for sharing. i'm looking forward to re-creating this.

Luke Hall's icon

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.

lh

Jay's icon

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.

keepsound's icon

See Click~ help