< Back to IRCAM Forum

ERROR: pitch-adjustment parameter invalid for this object type

Hello everybody,
I’m trying to learn Modalys and I have watched the tutorials by Jonathan JACOBS. Very helpful and very appreciated !
I have a problem that occours when using the variable
(set-pitch my-string 'lenght (midi-to-freq 69))
I have copied the same code from the tutorial and gives me the error:
Error [t 0.00, step o]
ERROR: pitch-adjustment parameter invalid for this object type
Beside this, everything else works fine, so it seems strange.
I have tried to restart Modalys but nothing changes.

Thank you!
I can’t test it right now, because I have a problem with my mac, but it works

Just a dummy question:
Did you change the parameters in the line
(setf my-soundfile-ctrl (make-controller 'sound-file 2 0 (const 44100) "/Users/sea-ack/Desktop/jongly.aif; 0 4 30))

You have to change by /Users/YOUR_USER_NAME/Desktop/YOUR SOUND FILE.aif; if your file is on the desktop

Hello Jonathan, I am talking about the tutorial 2 - a golden string, which doesn’t have that line. It works perfectly if I remove the line:

(set-pitch my-string 'lenght (midi-to-freq 69))

Neither
(set-pitch my-string 'lenght 440)
works

I’m sure this is a problem of my system but I can’t figure out what is it.

Can you copy-paste your script

sure:

(new)

(setf my-string (make-object 'mono-string

	(modes 160)  

     	(length 1)  

     	(tension 100)  

     	(density 19300)  

     	(radius .001)  

     	(young 7.9e10)  

     	(freq-loss 1)  

     	(const-loss 1)))  

(set-pitch my-string 'lenght 440)

(setf my-string-access (make-access 1d-string .5 'trans0))

(setf my-string-access-out (make-access 1d-string .5 'trans0))

(setf my-envelope (make-controller 'envelope 1
'((0 0)
(0.01 1 )
(0.02 0))))

(make-connection 'force my-string-access my-envelope)

(make-point-output my-string-access-out)

(run 2)
(play)

The script looks OK
I can’t test it right now, I’ll have my computer (hopefully) on monday then I’ll try to see what is going wrong

Hi,

The problem comes from the set-pitch line : you have to write “length” instead of “lenght” :

(set-pitch my-string ‘length 440)

Best,

Jean

Of course. Thank you Jean !