Lossless event slew (particularly useful for VSTs)

Mar 26, 2010 at 3:37am

Lossless event slew (particularly useful for VSTs)

If you send a lot of data to a VST, it can crash. The object “speedlim” samples from a continuous stream of data; it reduces message volume by throwing away messages. What if you want to spread a burst of messages across time, without losing any?

Attached is one solution. Hope you like it.

Attachments:
  1. messageSlew.zip
#49334
Aug 15, 2010 at 10:46am

Very groovy! This is the perfect thing to throttle UDP output to TouchOSC. I cleaned up your patch and removed the third party external, I hope others stumble onto this.

Cheers :)

Attachments:
  1. messageSlew.maxpat
#177269
Aug 20, 2010 at 8:02am

I was finding the above to bog my system quite a bit. I wrote a similar process in js, it seems to handle things in a much better manner for me. Here it is:

autowatch=1;

inlets=4;
outlets=1;
setinletassist(0, "buffered input");
setinletassist(1, "event threshold, same as first argument");
setinletassist(2, "event interval, same as second argument");
setinletassist(3, "maximum buffer size, same as third argument");

var event=0;
var buffer=[];
var thresh=Math.max(5, jsarguments[1]);
var interval=Math.max(5,jsarguments[2]);
var buffer_size=Math.max(20, jsarguments[3]);

var timer=new Task(burst, this);
timer.interval=interval;
timer.repeat();

function anything(args)
{
    switch(inlet)
    {
        case 0:
            event++;
            var buffer_temp=arrayfromargs(messagename, arguments);
            if(event>thresh)
            {
                if(buffer.length0)
    {
        for(i=0;i
#177270
Aug 20, 2010 at 1:24pm

for bank dumps, good solution.

but as for CC, wouldn´t slide and speedlim represent the intended controller movement
better than delaying the incoming data?

#177271
Aug 21, 2010 at 9:25am

thanks for sharing this js, very useful :-)
it works fine when using arguments, but when I try to modify threshold or event interval with messages to 2nd or 3rd inlets, it seems to stop working (just pass thru incoming messages without delay).

Mathieu

#177272

You must be logged in to reply to this topic.