{"id":469,"date":"2017-12-20T20:39:05","date_gmt":"2017-12-21T01:39:05","guid":{"rendered":"http:\/\/magneticpiano.com\/?page_id=469"},"modified":"2017-12-27T09:45:27","modified_gmt":"2017-12-27T14:45:27","slug":"induction-examples-1","status":"publish","type":"page","link":"https:\/\/magneticpiano.com\/?page_id=469","title":{"rendered":"Induction Examples"},"content":{"rendered":"<p>The following audio examples demonstrate some of the sonic possibilities available through the use of the Induction Connection. The files were initially generated for a presentation I gave at the IRCAM Forum Workshop in Santiago de Chile in 2017.<\/p>\n<p>In all of the examples below, a bichord is created, attached to a cello bridge, and tuned to 55 Hz (set-pitch &#8216;tension). The bichord corresponds to a group of 2 strings in the lower range of a piano, normally struck by a single piano hammer. These strings are tuned to the same frequency, with a slight random discrepancy introduced (between .4 and 20 cents).<\/p>\n<p>In the first set of examples (1-4), white noise is used as the control signal for the electromagnet.<\/p>\n<p>Example 1: Generic white noise.<br \/>\n<!--[if lt IE 9]><script>document.createElement('audio');<\/script><![endif]-->\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/32-noise-55Hz-string.mp3?_=1\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/32-noise-55Hz-string.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/32-noise-55Hz-string.mp3<\/a><\/audio><\/p>\n<p>Example 2: White noise, with a gap setting such that there is intermittent contact between electromagnet and string.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-2\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/33-noise-intermit-contact.mp3?_=2\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/33-noise-intermit-contact.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/33-noise-intermit-contact.mp3<\/a><\/audio><\/p>\n<p>Example 3: White noise, with a gap setting such that there is fairly heavy contact between electromagnet and string.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-3\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/34-noise-medium-contact.mp3?_=3\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/34-noise-medium-contact.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/34-noise-medium-contact.mp3<\/a><\/audio><\/p>\n<p>Example 4: White noise, with a gap that changes over time. An initially wide gap (0.001 m) gradually narrows until the string is crushed against the electromagnet (0.0001 m), then widens again to its original distance.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-4\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/35-noise-moving-magnet.mp3?_=4\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/35-noise-moving-magnet.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/35-noise-moving-magnet.mp3<\/a><\/audio><\/p>\n<p>In the next set (5-9), the control signal is a recording of a narrator reading from Camus&#8217; novel <em>The Plague<\/em>.<\/p>\n<p>Example 5: Voice.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-5\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/36-voice1.mp3?_=5\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/36-voice1.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/36-voice1.mp3<\/a><\/audio><\/p>\n<p>Example 6: Voice, with a gap size (0.0009 m) such that heavy contact occurs between electromagnet and string (watch out for volume).<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-6\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/37-voice2-heavy-contact.mp3?_=6\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/37-voice2-heavy-contact.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/37-voice2-heavy-contact.mp3<\/a><\/audio><\/p>\n<p>These last couple of examples take advantage of the ability to create fantastic physical parameters, such as strings that are impossibly short or thin.<\/p>\n<p>Example 7 (short string): Again using the voice audio file as input, string length is reduced from initial length of 2m to .5 m, while maintaining pitch of 55 Hz.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-7\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/38-voice3-short-string.mp3?_=7\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/38-voice3-short-string.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/38-voice3-short-string.mp3<\/a><\/audio><\/p>\n<p>Example 8 (short string with strike): Same as above (voice input, string length=0.5m), with a gap size allowing for contact between objects. Note the variation in the timbre of the resulting strikes due to string length.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-8\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/39-voice4-short-string-close.mp3?_=8\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/39-voice4-short-string-close.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/39-voice4-short-string-close.mp3<\/a><\/audio><\/p>\n<p>Example 9 (thin string): Voice input, normal length (2m), with string radius (as set in string object) reduced from 0.004m to 0.002m.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-9\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/40-voice5-thin-string.mp3?_=9\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/40-voice5-thin-string.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/40-voice5-thin-string.mp3<\/a><\/audio><\/p>\n<p>Example 10: Original recording of narrator, used as the control signal for examples 5-9 above.<br \/>\n<audio class=\"wp-audio-shortcode\" id=\"audio-469-10\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/41-everybody-knows.mp3?_=10\" \/><a href=\"http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/41-everybody-knows.mp3\">http:\/\/www.perbloland.com\/userfiles\/media\/audio\/magnetic-piano\/41-everybody-knows.mp3<\/a><\/audio><\/p>\n<h2>Code<\/h2>\n<p>The above examples were all generated from the base code below. Note that both horizontal and vertical string motion are controlled and audible. <a href=\"http:\/\/www.perbloland.com\/userfiles\/file\/magnetic-piano\/32-bichord23.lisp\" target=\"_blank\" rel=\"noopener\">Download<\/a>.<\/p>\n<pre><span class=\"inner-pre\" style=\"font-size: 10px;\">\n;;;-*-Mode: Lisp; Package: MODALYS -*-\n\n;;;----------------------------------------------------------------------\n;;; Induction example.\n;;; single bichord (2 strings at nearly the same frequency) connected to \n;;; a cello bridge, vibrated through induction\n;;;----------------------------------------------------------------------\n\n(new)\n\n;; output - 1=output audio file\/input from sine, 2=output audio file\/input from audio-file, 3=generate mlys script\n(defparameter *env* 3)\n\n;; parameter defaults\n(setf *default-string1-freq* 55)\n(setq *detune-range* (list .4 20)); (min max) detune in cents\n\n;; access-locations on strings\n(setf *action-point* .1)\n(setf *bridge-point* .95)\n(setf *listen-point* .75)\n\n; induction settings - power vertical and power horizontal\n(setf *power-vert* 380)\n(setf *power-horiz* 38)\n(setq *gap-init* .005)\n\n;;;\n;;; create objects\n;;;\n\n;; make bridge\n(setq bridge (make-object 'cello-bridge\n                          (m1-mass .0046)\n                          (m2-mass .0059)\n                          (m12-mass .0024)\n                          (d-distance .032)\n                          (d20-distance .011)\n                          (h1-distance .052)\n                          (a-distance .035)\n                          (i20-distance .026)\n                          (d2-stiffness 1); 716.8)\n                          (s1-stiffness 360000)\n                          (freq-loss 10)\n                          (const-loss 10)\n                          ))\n\n;; make strings\n\n;; frequencies\n(setq string1-freq (make-controller 'dynamic 1 -1 *default-string1-freq* \"string1-freq\"))\n;(setf string1-freq (make-controller 'arithmetic 1 '* (list string1-freq-raw (const *bridge-point*)))) \n   ;because attaching the string to the bridge shortens it, raises the pitch. this compensates\n(defun detune (pitch)\n  (let* ((min (float (first *detune-range*)))\n         (max (second *detune-range*))\n         (range (- max min)))\n    (midi-to-freq (+ (freq-to-midi pitch)\n                     (\/ (+ min \n                           (if (= 0 range) 0 ; if min=max, just add min to freq\n                             (random range))) ; otherwise, pick a random # w\/in range and add it\n                        100)))))\n\n\n; freq for 2nd slightly detuned string\n(setf string2-freq (make-controller 'dynamic 1 -1 (detune *default-string1-freq*) \"string2-freq\"))\n;(setf string2-freq (make-controller 'arithmetic 1 '* (list string2-freq-raw (const *bridge-point*))))\n\n(setf highest-mode (make-controller 'arithmetic 1 '\/ (list (const 22050) string1-freq)))\n\n(setf str-len-ctl (make-controller 'dynamic 1 -1 2 \"str-len-ctl\"))\n(setf str-den-ctl (make-controller 'dynamic 1 -1 7850 \"str-den-ctl\"))\n(setf str-rad-ctl (make-controller 'dynamic 1 -1 0.004 \"str-rad-ctl\"))\n(setf str-you-ctl (make-controller 'dynamic 1 -1 1.0 \"str-you-ctl\"))\n(setf str-yo2-ctl (make-controller 'arithmetic 1 '* (list str-you-ctl (const 10000000000))))\n;(setf str-yo2-ctl (make-controller 'dynamic 1 -1 1.0e10 \"str-you-ctl\"))\n\n;; string 1\n(setq string1 (make-object 'bi-string\n                           (modes      highest-mode)\n                           (length      str-len-ctl) ; 1\n                           (density str-den-ctl) ; 7700\n                           (radius str-rad-ctl) ; 0.0009\n                           (young str-yo2-ctl) ; 2.0e10\n                           (freq-loss  0.001) ; .01\n                           (const-loss  0.3) ; .4\n                           ))\n\n;; string 2\n(setq string2 (make-object 'bi-string\n                           (modes      highest-mode)\n                           (length      str-len-ctl) ; 1\n                           (density str-den-ctl) ; 7700\n                           (radius str-rad-ctl) ; 0.0009\n                           (young str-yo2-ctl) ; 2.0e10\n                           (freq-loss  0.001) ; .01\n                           (const-loss  0.3) ; .4\n                           ))\n\n\n(set-pitch string1 'tension string1-freq)\n(set-pitch string2 'tension string2-freq)\n\n;; make electromagnet\n\n(setf magnet (make-object 'mono-two-mass\n                          (small-mass 0.1)\n                          (large-mass .1)\n                          (stiffness0 5000)\n                          (freq-loss0 100)\n                          (const-loss0 50)))\n\n;;;\n;;; make input controllers and gap controllers, one each per bichord \n;;;\n(setf *file-name* \"\/Users\/mus\/Documents\/Data\/-in\\ progress\/ircam-Project\/Ircam-Santiago\/from-paris\/bichord\/examples\/induction-exploration\/everybody-knows.aif\")\n;(setf *file-name* \"\/Users\/mus\/Documents\/Data\/-in\\ progress\/ircam-Project\/Ircam-Santiago\/from-paris\/bichord\/examples\/everything\/square-55.aiff\")\n(defun ctl-gen-file ()\n  (make-controller 'sound-file 1 0 (const 44100) *file-name* 0 5 30))\n\n; output - 1=generate audio (sine), 2=generate audio (square), 3=generate mlys scrips\n; string 1 vertical is labeled string10, string 1 horizontal is labeled string 11, etc.\n(Cond ((= *env* 1)\n       (list (setf string10-ctl (make-controller 'arithmetic 1 \"*\" (const *power-vert*) (make-controller 'sine 1 string1-freq 45)))\n             (setf string11-ctl (make-controller 'arithmetic 1 \"*\" (const *power-horiz*) (make-controller 'sine 1 string1-freq 45)))\n             (setf string20-ctl (make-controller 'arithmetic 1 \"*\" (const *power-vert*) (make-controller 'sine 1 string2-freq 45)))\n             (setf string21-ctl (make-controller 'arithmetic 1 \"*\" (const *power-horiz*) (make-controller 'sine 1 string2-freq 45)))\n             (setq gap-ctl (make-controller 'envelope 1 (list (list 0.0 *gap-init*)\n                                                              ;(list 2 .0001)\n                                                              (list 5 *gap-init*))))))\n      ((= *env* 2)\n       (list (setf string10-ctl (make-controller 'arithmetic 1 \"*\" (const *power-vert*) (ctl-gen-file)))\n             (setf string11-ctl (make-controller 'arithmetic 1 \"*\" (const *power-horiz*) (ctl-gen-file)))\n             (setf string20-ctl (make-controller 'arithmetic 1 \"*\" (const *power-vert*) (ctl-gen-file)))\n             (setf string21-ctl (make-controller 'arithmetic 1 \"*\" (const *power-horiz*) (ctl-gen-file)))\n             (setq gap-ctl (make-controller 'envelope 1 (list (list 0.0 *gap-init*)\n                                                              ;(list 2 .0001)\n                                                              (list 5 *gap-init*))))))\n      ((= *env* 3)\n       (list (setf string10-ctl (make-controller 'signal 1 (make-point-input 0 (const 1))))\n             (setf string11-ctl (make-controller 'signal 1 (make-point-input 1 (const 1))))\n             (setf string20-ctl (make-controller 'signal 1 (make-point-input 2 (const 1))))\n             (setf string21-ctl (make-controller 'signal 1 (make-point-input 3 (const 1))))\n             (setf gap-ctl (make-controller 'dynamic 1 0 *gap-init* \"gap-ctl\"))))\n  )\n\n\n;;;\n;;; create all accesses;\n;;;\n\n; set interaction point on string\n(setq string1-act0 (make-access string1 (const *action-point*) 'trans0)) ; treated as vertical motion\n(setq string1-act1 (make-access string1 (const *action-point*) 'trans1)) ; treated as horizontal motion\n(setq string2-act0 (make-access string2 (const *action-point*) 'trans0))\n(setq string2-act1 (make-access string2 (const *action-point*) 'trans1))\n; set point of connection on string with bridge\n(setq string1-bridge0 (make-access string1 (const *bridge-point*) 'trans0))\n(setq string1-bridge1 (make-access string1 (const *bridge-point*) 'trans1))\n(setq string2-bridge0 (make-access string2 (const *bridge-point*) 'trans0))\n(setq string2-bridge1 (make-access string2 (const *bridge-point*) 'trans1))\n; listening point\n(setq string1-out0 (make-access string1 (const *listen-point*) 'trans0))\n(setq string1-out1 (make-access string1 (const *listen-point*) 'trans1))\n(setq string2-out0 (make-access string2 (const *listen-point*) 'trans0))\n(setq string2-out1 (make-access string2 (const *listen-point*) 'trans1))\n; graphing points as well\n(setq string1-pos0 (make-controller 'access-position 1 string1-out0)) ; for graph\n(setq string1-pos1 (make-controller 'access-position 1 string1-out1))\n(setq string2-pos0 (make-controller 'access-position 1 string2-out0)) ; for graph\n(setq string2-pos1 (make-controller 'access-position 1 string2-out1))\n; bridge for strings\n(setq bridge-access0 (make-access bridge (const .2) 'top-horizontal))\n(setq bridge-access1 (make-access bridge (const .2) 'top-vertical))\n(setq bridge-access2 (make-access bridge (const .24) 'top-horizontal))\n(setq bridge-access3 (make-access bridge (const .24) 'top-vertical))\n\n; electromagnet\n(setf magnet-access (make-access magnet (const 1) 'trans0)) ; small-mass - connected to the strings via induction\n(setq magnet-handle (make-access magnet (const 0) 'trans0))  ; large-mass - held in place with position controller\n\n\n;;;\n;;; create connections\n;;;\n\n; string to bridge\n(make-connection 'adhere string1-bridge0 bridge-access0)\n(make-connection 'adhere string1-bridge1 bridge-access1)\n(make-connection 'adhere string2-bridge0 bridge-access2)\n(make-connection 'adhere string2-bridge1 bridge-access3)\n; electromagnet large-mass - held in place with position controller\n(make-connection 'position magnet-handle (const 0))\n\n;; induction controllers\n(setf em-rad-ctl (make-controller 'dynamic 1 0 0.01 \"em-rad-ctl\")) ; 0.01\n(setf em-len-ctl (make-controller 'dynamic 1 0 0.02 \"em-len-ctl\")) ; 0.02\n(setf em-perm-ctl (make-controller 'dynamic 1 0 8.737434 \"em-perm-ctl\")) ; 8.737434\n(setf em-per2-ctl (make-controller 'arithmetic 1 '\/ (list em-perm-ctl (const 10000)))) ; 8.737434e-4\n(setf em-str-rad-ctl (make-controller 'dynamic 1 0 0.0004 \"em-str-rad-ctl\")) 0.0004\n\n; induction connections\n\n(make-connection 'induction string1-act0 magnet-access string10-ctl gap-ctl\n                                     em-rad-ctl        ;electromagnet radius\n                                     em-len-ctl        ;electromagnet length\n                                     em-per2-ctl ;string permeability\n                                     em-str-rad-ctl      ;string radius\n                                     )\n(make-connection 'induction string1-act1 magnet-access string11-ctl gap-ctl\n                                     em-rad-ctl        ;electromagnet radius\n                                     em-len-ctl        ;electromagnet length\n                                     em-per2-ctl ;string permeability\n                                     em-str-rad-ctl      ;string radius\n                                     )\n(make-connection 'induction string2-act0 magnet-access string20-ctl gap-ctl\n                                     em-rad-ctl        ;electromagnet radius\n                                     em-len-ctl        ;electromagnet length\n                                     em-per2-ctl ;string permeability\n                                     em-str-rad-ctl      ;string radius\n                                     )\n(make-connection 'induction string2-act1 magnet-access string21-ctl gap-ctl\n                                     em-rad-ctl        ;electromagnet radius\n                                     em-len-ctl        ;electromagnet length\n                                     em-per2-ctl ;string permeability\n                                     em-str-rad-ctl      ;string radius\n                                     )\n\n;;;\n;;; output points\n;;;\n\n; listening to the string\n(make-point-output string1-out0 0 1)\n(make-point-output string1-out1 0 1)\n(make-point-output string2-out0 1 1)\n(make-point-output string2-out1 1 1)\n\n\n;; output - 1=generate audio (sine), 2=generate audio (square), 3=generate mlys scrips\n(cond ((= *env* 3)  \n       (save-script \"\/Users\/mus\/Documents\/Data\/-in\\ progress\/ircam-Project\/Ircam-Santiago\/from-paris\/bichord\/examples\/induction-exploration\/bichord.mlys\"))\n      (t (list (setq graph (make-plot))\n               (plot-value graph \"string1-v\" string2-pos0)\n               (plot-value graph \"string1-h\" string2-pos1)\n               ;(plot-value graph \"magnet-loc\" gap-ctl)\n               (run 5)\n               (plot graph \"My Plotted Controller Data\")\n               (play))))\n<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following audio examples demonstrate some of the sonic possibilities available through the use of the Induction Connection. The files were initially generated for a presentation I gave at the IRCAM Forum Workshop in Santiago de Chile in 2017. In all of the examples below, a bichord is created, attached &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":46,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"template-full-width.php","meta":{"jetpack_post_was_ever_published":false},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P41WFm-7z","_links":{"self":[{"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/pages\/469"}],"collection":[{"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/magneticpiano.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=469"}],"version-history":[{"count":14,"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/pages\/469\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/pages\/469\/revisions\/509"}],"up":[{"embeddable":true,"href":"https:\/\/magneticpiano.com\/index.php?rest_route=\/wp\/v2\/pages\/46"}],"wp:attachment":[{"href":"https:\/\/magneticpiano.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}