All times are UTC

 
 



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Simple logic question
PostPosted: Sun Apr 07, 2013 12:51 pm 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
So I need to build a device that does this:

If [new input number] doesn't equal [last number] then pass on new input number. Else - do nothing.

I'm not having much luck getting the 'IF' statement to do this for me and I understand there are more efficient ways to solve this in Max - can anyone give me a tip?

Many thanks. :D

_________________
--
http://www.psykers.com


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Sun Apr 07, 2013 1:02 pm 

Joined: Mon Jul 26, 2004 8:37 am
Posts: 1076
Have a look at the [change] object.


Last edited by broc on Sun Apr 07, 2013 1:04 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Sun Apr 07, 2013 1:04 pm 

Joined: Sun Dec 06, 2009 10:26 pm
Posts: 3461
Location: Wageningen, Netherlands
There are several ways you can do this, the main issue though is how long you want to keep remembering that 'last' number.

As a rule of thumb: When dealing with lists the first object to check out is "zl".

In your case you want "zl change"; it accepts a list in both inlets (though using the left is the better idea here) and when it receives the same value / object as before it doesn't do anything. Only if the value is different than the previous value will it output the new value.

_________________
With kind regards,

Peter

Using the Big Trio: Live 9 Suite, Max (for Live) and Reason 6.5.
Blog: SynthFan.info.


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Sun Apr 07, 2013 1:07 pm 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
Brilliant, thanks to both. ZL Change sounds about perfect!

_________________
--
http://www.psykers.com


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Sun Apr 07, 2013 1:14 pm 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
Or maybe 'change' seems to do the job fine. I only need to remember the last number till the next one comes along, not usually very long given my drummer ;)

_________________
--
http://www.psykers.com


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Sun Apr 07, 2013 9:43 pm 

Joined: Mon May 31, 2010 12:36 pm
Posts: 655
zl is the king.

_________________
http://www.tete-de-son.com/
Soundcloud


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Mon Apr 08, 2013 9:57 am 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
I don't get it why is zl more useful here?

_________________
--
http://www.psykers.com


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Mon Apr 08, 2013 10:17 am 

Joined: Mon Jul 26, 2004 8:37 am
Posts: 1076
jomtones wrote:
I don't get it why is zl more useful here?

In fact it's not useful at all here. Strictly speaking, the usage is even incorrect since the input numbers are not a list.


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Mon Apr 08, 2013 10:37 am 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
Cool thanks. Can anyone advise on the number of MIDI messages it's safe to route to Ableton? I'm experimenting with 'speedlim' at the moment, had stability issues.

_________________
--
http://www.psykers.com


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Mon Apr 08, 2013 11:37 am 

Joined: Mon Jul 26, 2004 8:37 am
Posts: 1076
The MIDI protocol is designed to transmit about 1000 messages per second.
But obviously, how much Live can handle depends on what you're doing with the messages.


Top
 Profile  
 
 Post subject: Re: Simple logic question
PostPosted: Mon Apr 08, 2013 11:53 am 

Joined: Sat Oct 15, 2005 4:24 pm
Posts: 209
Location: London
Thanks broc. It's just pitch-bend data ... not too sure what was going on.

It could just be a problem caused by too many requests for a preset load - like if my drummer does a fill and it's requesting a different preset 5 times a second or something.

I've tried setting a speedlim of 10 for the pitchbend, hopefully that'll fix it and won't sound too choppy! Guess I'll find out in rehearsal. Maybe I should add a speedlim to the preset loader too.

My original thread about this with a copy of the sub-patch is here if you have time to take a look:
https://forum.ableton.com/viewtopic.php?f=35&t=192232

_________________
--
http://www.psykers.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC

 
 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group