Group Admins

  • Profile picture of Robert P.

Modalys

Public Group active 2 weeks, 6 days ago

Modalys physical modeling sound synthesis user group

bow a plate

Author 2 Subscribed Users |
Profile photo of coraliediatkine
coraliediatkine

Hi

I might be wrong but there seems to be some incompatibility between the bowing connection which requires 2 accesses, and the free circular plate object, which requires only one access.
I get the following error message:
“access controler doesn’t have the right dimension”.
Here is my code. Thanks!



(new)

(load-component "connection")

(defvar my-bow)
(setq my-bow (make-object 'bi-two-mass 
                          (small-mass .05)
                          (large-mass .05)
                          (stiffness0 50000)
                          (stiffness1 50000)
                          (freq-loss0 100)
                          (freq-loss1 100)
                          (const-loss0 0)
                          (const-loss1 0)))

(defvar my-plate-A)
(setq my-plate-A
      (set-pitch 
       (make-object 'free-circ-plate 
                    (modes 150)
                    (thickness .1)
                    (freq-loss .05) ;.01  .1 .05
                    (const-loss .05) ; .5

;; parametres plaque
                    (young 7.9e10)
                    (poisson .43)
                    (density 19300))

;; variable frequence
       'radius (/ 220 2))) ; 0.30898876

;;;
;;; make bowed connection
;;;

(defvar my-bow-h-bpt)
(setq my-bow-h-bpt (make-access my-bow 1 'trans0))

(defvar my-bow-v-bpt)
(setq my-bow-v-bpt (make-access my-bow 1 'trans1))

(defvar my-plate-A-v-bpt)
(setq my-plate-A-v-bpt (make-access my-plate-A (const 1.) 'normal))

(defvar bc)
(setq bc (make-connection 'bow
                          my-bow-v-bpt my-bow-h-bpt .01
                          my-plate-A-v-bpt  1
                          '(2 10 5 4)))
;;;
;;; push the bow
;;;

(defvar my-bow-h-mov)
(setq my-bow-h-mov (make-access my-bow (const 0) 'trans0))

(defvar my-bow-v-mov)
(setq my-bow-v-mov (make-access my-bow (const 0) 'trans1))

(make-connection 'speed my-bow-h-mov
                 (make-controller 'envelope 1
                                  (list (list 0.00  1)
                                        (list 0.10  4)
                                        (list 3.9 1))))

(make-connection 'position my-bow-v-mov
                 (make-controller 'envelope 1
                                  (list (list 0.0  0.010)
                                        (list 0.2 -0.001)
                                        (list 0.4 -0.001)
                                        (list 0.5  0.010)
                                        (list 0.6  0.010)
                                        (list 0.7 -0.001)
                                        (list 1.2 -0.001)
                                        (list 1.3  0.010)
                                        (list 3.9  0.010))))

(setq my-plate-A-out.l (make-access my-plate-A (const 0.08 90) 'normal))
(setq my-plate-A-out.r (make-access my-plate-A (const 0.08 90) 'normal))

(make-point-output my-plate-A-out.l 0 (make-controller 'envelope 1
                               (list   	(list  0.   0)
                                        (list  .2   .5) ;.4!
                                        (list  3.  .5)
                                       (list  3.9  0))))

(make-point-output my-plate-A-out.r 1 (make-controller 'envelope 1
                               (list   	(list  0.   0)
                                        (list  .2   .5)
                                        (list  3.  .5)
                                        (list  3.9  0))))

(run 4)

(play)
July 6, 2016 at 11:56 #18465
lochard
lochard

Hi Coralie,

You forgot an angle to define the position of the access on a plate.
You also forgot to declare a second access on your plate in order to have four access in the bow connection.

Find the correction in the following file !

Jean

July 6, 2016 at 13:33 #18469
Profile photo of coraliediatkine
coraliediatkine

Hi Jean,

It might be useful to explain my mistake: the manual says that the angle has to be specified only if more that one access point is used to strike the plate. As it usually takes only one direction (‘normal), I assumed I didn’t need two. I had tried using two accesses, but forgot the angle then. Hope explaining the confusion will be useful.

Your example works perfectly. I do have an artefact at very low frequencies though, some sort of buzz.

I’ll try and play with the bow parameters and speed.

Thanks!

July 6, 2016 at 17:37 #18472

You must be logged in to reply to this topic.

Log in now