Forums > MaxMSP

signalrate version of expr?

February 12, 2007 | 10:13 pm

Is there a signalrate version of expr like expr~?


February 17, 2007 | 10:53 am

Just saw this, apparently w/out response.

On 12-Feb-2007, at 23:13, Batuhan wrote:
> Is there a signalrate version of expr like expr~?

Someone wrote a 3rd party expr~ shortly after the introduction of
MSP. It was very crash-prone. You’re probably better off building an
abstraction from the MSP mathematical operations.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


February 17, 2007 | 3:36 pm

Thanks! I was starting to think that I was asking a dumbish question. :)

I find it strange that msp still does not have a mathematical expression evaluator. When you need to try lots of waveshaping functions, that would come handy as building complex formulas with objects is a time consuming task. But I guess, an object to handle it in signal rate would probably work slower than a dedicated abstraction done int plain msp. If I had a clue about parsing c like expressions(I’ve never been a coding whiz…), I would consider making a seperate application that would transfer those expressions to a patch-patcher that max/msp could use…

Quote: Peter Castine wrote on Sat, 17 February 2007 12:53
—————————————————-
> Just saw this, apparently w/out response.
>
> On 12-Feb-2007, at 23:13, Batuhan wrote:
> > Is there a signalrate version of expr like expr~?
>
> Someone wrote a 3rd party expr~ shortly after the introduction of
> MSP. It was very crash-prone. You’re probably better off building an
> abstraction from the MSP mathematical operations.
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>
—————————————————-


February 18, 2007 | 10:39 am

Hi all,

I’ve just coded up a signal rate version of expr (in the last hour, so
consider it beta!). I’ve named it expr~ since it should be pretty much
backwards compatible with expr~ object that used to be available.

Universal Binary, no Windows version yet (I don’t have a Windows box with
VS near me):

http://www.mat.ucsb.edu/~wakefield/soft/expr~.zip

Enjoy!

Graham

> Just saw this, apparently w/out response.
>
> On 12-Feb-2007, at 23:13, Batuhan wrote:
>> Is there a signalrate version of expr like expr~?
>
> Someone wrote a 3rd party expr~ shortly after the introduction of
> MSP. It was very crash-prone. You’re probably better off building an
> abstraction from the MSP mathematical operations.
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>


February 18, 2007 | 1:28 pm

>
> I’ve just coded up a signal rate version of expr (in the last hour, so
> consider it beta!). I’ve named it expr~ since it should be pretty much
> backwards compatible with expr~ object that used to be available.
>
Maybe that would be better to use some kind of prefix of your own (gw.expr~
or something), in case expr~ comes one day by cycling74…
JF.



jln
February 18, 2007 | 1:47 pm


February 18, 2007 | 2:05 pm

>> Maybe that would be better to use some kind of prefix of your own
>> (gw.expr~
>> or something), in case expr~ comes one day by cycling74…
>
> Or maybe leaving it this way till Cycling74 release one ? This way,
> if another version which strictly replace this one is released, one
> won’t have to update his patchs. Just to add my 2 cents…
>
> Best,
> Julien.
>
Except that no one knows for sure what syntax/messages cycling would use -
or have been using (wouldn’t that be a nice thing to have in Max 5…)
They maintain compatibility with previous versions, but I doubt they would
do it with 3rd party objects.
JF.



jln
February 18, 2007 | 2:52 pm


February 18, 2007 | 3:31 pm

based on past experience, two different expr~s won’t only have
different syntax, they’ll do completely different things.

in~
out~
cross~

I’m probably forgetting several other examples.

Conversely, if they offer a function provided by 3rd party objects,
it almost invariably has a different name (as well as a different
syntax).

The only time I can think of when Cycling ’74 took over a 3rd party
while maintaining backwards compatibility and retaining the name was
multislider.

So, nice idea, but I wouldn’t take any bets.

On 18-Feb-2007, at 14:47, jln wrote:

> Or maybe leaving it this way till Cycling74 release one ? This way,
> if another version which strictly replace this one is released, one
> won’t have to update his patchs. Just to add my 2 cents…

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


February 18, 2007 | 8:39 pm

Well done, Graham.

Since Batuhan’s wish came up specifically in the context of
waveshaping functions, it’s worth noting that Eric Lyon wrote a
waveshaper object that lets you specify a list of amplitudes for
harmonics and builds a whopping 64k waveshaping lookup table. It uses
practically no CPU during signal processing at all, whereas expr~ is
fairly cycle hungry. I read 6.2% CPU usage when evaluating an 8th-
order Chebyshev function with expr~ on a 1.83GHz dual core.

For completely general purpose mapping, having an expr~ is nice, though.

I should also mention that there is a powerful mapping object called
lp.scamp~ that does a lot of stuff faster than expr~.

Eric’s el.waveshape~ is part of his LyonPotpourri (http://
http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/)

lp.scamp~ is part of Litter Power Pro (URI below).

– P.

On 18-Feb-2007, at 11:39, lists@grahamwakefield.net wrote:
> I’ve just coded up a signal rate version of expr (in the last hour, so
> consider it beta!). I’ve named it expr~ since it should be pretty
> much
> backwards compatible with expr~ object that used to be available.

PS to Graham: I presume you’re using the expr API, and not a hand-
coded parser?

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


February 18, 2007 | 9:03 pm

Indeed, expr~ uses the same c74 support tool expr_eval() in the code
(that’s why it only took an hour to code), so it is not super-optimized
for audio. If the internals of the expr_eval() code were available, I
could make expr~ optimized for vector processing, which would make it a
lot faster indeed. Still, in some cases it might end up being as fast or
faster than max objects, depending on buffer sizes and complexity of calls
- try it and see. Even if not, its useful to have around for prototyping
ideas (I find writing an expression usually faster than patching together
some math objects).

Regarding the naming of the object, I was aiming for backwards
compatibility with the older 3rd party expr~. But to be on the safe side,
I’ve modified the .zip file and it now contains both an expr~ and a
gw.expr~ so you can take your pick. If C74 release an expr~ in the future
I’ll remove mine.

G

> Well done, Graham.
>
> Since Batuhan’s wish came up specifically in the context of
> waveshaping functions, it’s worth noting that Eric Lyon wrote a
> waveshaper object that lets you specify a list of amplitudes for
> harmonics and builds a whopping 64k waveshaping lookup table. It uses
> practically no CPU during signal processing at all, whereas expr~ is
> fairly cycle hungry. I read 6.2% CPU usage when evaluating an 8th-
> order Chebyshev function with expr~ on a 1.83GHz dual core.
>
> For completely general purpose mapping, having an expr~ is nice, though.
>
> I should also mention that there is a powerful mapping object called
> lp.scamp~ that does a lot of stuff faster than expr~.
>
> Eric’s el.waveshape~ is part of his LyonPotpourri (http://
> http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/)
>
> lp.scamp~ is part of Litter Power Pro (URI below).
>
> — P.
>
> On 18-Feb-2007, at 11:39, lists@grahamwakefield.net wrote:
>> I’ve just coded up a signal rate version of expr (in the last hour, so
>> consider it beta!). I’ve named it expr~ since it should be pretty
>> much
>> backwards compatible with expr~ object that used to be available.
>
> PS to Graham: I presume you’re using the expr API, and not a hand-
> coded parser?
>
>
> ————– http://www.bek.no/~pcastine/Litter/ ————-
> Peter Castine +–> Litter Power & Litter Bundle for Jitter
> Universal Binaries on the way
> iCE: Sequencing, Recording &
> Interface Building for |home | chez nous|
> Max/MSP Extremely cool |bei uns | i nostri|
> http://www.dspaudio.com/ http://www.castine.de
>
>
>


February 18, 2007 | 10:40 pm

Thanks for the responses!

Graham, will you be compiling expr~ for windows in the near future? Thanks for your time!


February 18, 2007 | 11:33 pm

Hope so, if I can get around to installing windows and VS on my machine.

Or I can provide the source if someone else wants to do it.

On Feb 18, 2007, at 2:40 PM, Batuhan wrote:

>
> Thanks for the responses!
>
> Graham, will you be compiling expr~ for windows in the near future?
> Thanks for your time!


February 20, 2007 | 10:56 am

Having mentioned Eric’s el.waveshape~, I note that Luke Dubois wrote
a Gen17 object. Although it works with a buffer~ and you have to
patch your own lookup-waveshaper, it has a much more efficient
calculation of Chebyshev polynomials.

While I was looking at Eric’s and Luke’s code, it occured to me that
I had code for a general purpose polynomial evalulator left over from
another project. I’ll see about whipping up an MSP object wrapper for
it. CPU usage should be an order of magnitude less than expr~.

On 18-Feb-2007, at 21:39, undersigned wrote:

> Since Batuhan’s wish came up specifically in the context of
> waveshaping functions, it’s worth noting that Eric Lyon wrote a
> waveshaper object that lets you specify a list of amplitudes for
> harmonics and builds a whopping 64k waveshaping lookup table. It
> uses practically no CPU during signal processing at all, whereas
> expr~ is fairly cycle hungry. I read 6.2% CPU usage when evaluating
> an 8th-order Chebyshev function with expr~ on a 1.83GHz dual core.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de



f.e
February 21, 2007 | 8:57 am


February 21, 2007 | 6:26 pm


Viewing 16 posts - 1 through 16 (of 16 total)