First time here? Check out the FAQ!
x

Has anyone got an update of the Phm toolkit (physical modeling, from Harm Visser)?

0 votes
1,118 views

I bought a copy of it from his website:

http://www.hvsynthdesign.com/kymax.php

Thinking that it would be useful with the Linnstrument.  It has been interesting, but several of the sounds no longer work with version 7, throwing errors that I cannot fix. When I try to use “violin” for example, I get errors like:

***
into: expressions can only index constant (non-hot) Arrays of points.

The expression in error is:
    ((`Index * 5) into #(  {0 @ !Amp1} ))
***
 

I tried emailing him, to no avail.

This is thus both a question (anyone else had luck with getting through to him??) and a bit of a warning ...

 

asked Jan 6, 2016 in Sound Design by robert-efroymson (220 points)

1 Answer

+1 vote

Try replacing the expression:

    ((`Index * 5) into: #(  {0 @ !Amp1} ))

with

!Amp1

since that is all that it could return in any case (being an Array with only that one element in it).

answered Jan 6, 2016 by ssc (Savant) (126,620 points)
I think that the problem is a bit more difficult than that.  The original code seems* to be more like this: {(5 * !Index into: #( {(Point x: 0 y: !Amp1)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp2)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp3)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp4)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp5)} )) dB}

and there is something similar for the ModeFreqs and ModeBWs:
{5 * !Index into: #( {(Point x: 0 y: !FM1)} )}
{5 * !Index into: #( {(Point x: 0 y: !FM2)} )}
{5 * !Index into: #( {(Point x: 0 y: !FM3)} )}
{5 * !Index into: #( {(Point x: 0 y: !FM4)} )}
{5 * !Index into: #( {(Point x: 0 y: !FM5)} )}
and
{(5 * !Index into: #( {(Point x: 0 y: !BW1)}  )) *
0.005 + 50 / (5 * !Index into: #( {(Point x: 0 y: !BW1)} ))}

{(5 * !Index into: #( {(Point x: 0 y: !BW2)}  )) *
0.005 + 50 / (5 * !Index into: #( {(Point x: 0 y: !BW2)}  ))}

{(5 * !Index into: #( {(Point x: 0 y: !BW3)}  )) *
0.005 + 50 / (5 * !Index into: #( {(Point x: 0 y: !BW3)} ))}

{(5 * !Index into: #( {(Point x: 0 y: !BW4)} )) *
0.005 + 50 / (5 * !Index into: #( {(Point x: 0 y: !BW4)} ))}

 {(5 * !Index into: #( {(Point x: 0 y: !BW5)} )) *
0.005 + 50 / (5 * !Index into: #( {(Point x: 0 y: !BW5)} ))}

Looks to me like the intent is for !Index to select a value (or a point?) between 0 and !Ampx etc., though I confess the #( {( ... syntax eludes my comprehension.

I say "seems" because I can't find any code like what is presented in the error dialog, and I am assuming that the code I've pasted in above is somehow being translated into the form in that error message, perhaps as the sound is being compiled ...
So his code doesn't make sense as written (maybe he copied it from a more complicated example?) In any case, this example doesn't make sense because each point in the into: array starts with 0. An into: array is supposed to be a mapping from input value to output value {in@out}. So the first element is the "IN" value and the second element is the "OUT" value.  For example if you had:

!Index into: #({0@0} {0.125@0.5} {0.25@0.75} {0.5@1} {1@1})

then when !Index is 0.125, the output value is 0.5; when !Index is 0.25 the output value is 0.75 and so on.

Suspect that this:

{(5 * !Index into: #( {(Point x: 0 y: !Amp1)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp2)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp3)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp4)} )) dB}
{(5 * !Index into: #( {(Point x: 0 y: !Amp5)} )) dB}

could be rewritten as this:

{!Amp1 dB} {!Amp2 dB} {!Amp3 dB} {!Amp4 dB} {!Amp5 dB}

since the ModalFilter is expecting an array of amplitudes.  Similar rewriting should work for the bandwidth and frequency arrays.
Am interested to know if you made any headway with this?

Can the errors be worked around?

And roughly what percentage of the patches worked?
As far as I remember roughly half the Sounds were not compatible with Kyma 7... Therefore I returned and deleted it. Harm Visser was not very fruendly, accusing me of stealing his stuff... Anyway, I don't think it changed for good till now
OK thanks....useful info....a shame though.
...