{"id":1209,"date":"2018-01-10T15:04:05","date_gmt":"2018-01-10T23:04:05","guid":{"rendered":"http:\/\/tre.ucsd.edu\/wordpress\/?p=1209"},"modified":"2021-01-11T10:00:38","modified_gmt":"2021-01-11T18:00:38","slug":"mus271a-max-w1-starting-point","status":"publish","type":"post","link":"https:\/\/tre.ucsd.edu\/wordpress\/?p=1209","title":{"rendered":"MUS271A (Max w1) &#8211; starting point"},"content":{"rendered":"<p>The focus in 271A will be sound generation with Max\/MSP. In the first two weeks\u00a0I\u00a0will go over any concepts people are unfamiliar with, so there will be less standard material. However, here are some patches we will use as a jumping off point. The patches can be downloaded here\u00a0<a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/00-maxbasics.zip\">00-maxbasics. \u00a0<\/a>I have also created a (somewhat similar) PD version of these examples, download here: <a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2021\/01\/00-pdbasics.zip\">00-pdbasics<\/a>.<\/p>\n<hr \/>\n<p><a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.10.30-PM.png\"><img loading=\"lazy\" class=\"alignleft wp-image-1210 size-medium\" src=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.10.30-PM-248x300.png\" alt=\"Screen Shot 2018-03-15 at 3.10.30 PM\" width=\"248\" height=\"300\" srcset=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.10.30-PM-248x300.png 248w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.10.30-PM.png 479w\" sizes=\"(max-width: 248px) 100vw, 248px\" \/><\/a>Here is a patch showing a square -saw oscillator as an abstraction (a patch which shows up as an object within Max). Frequency is converted from MIDI note number with\u00a0<strong>mtof<\/strong>, The\u00a0<strong>toggle<\/strong> button selects the square or saw wave (this is not a true saw wave).\u00a0<strong>live.gain~<\/strong> is used as an output volume control and meter.\u00a0<strong>ezdac~\u00a0<\/strong>is used to send the audio to the computer sound output. Finally\u00a0<strong>scope~<\/strong> is used to display the waveform. We will look at how to modify the\u00a0<strong>scope~<\/strong> display using the info panel (clicking the &#8220;i&#8221; in the right column.<a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.11.49-PM.png\"><img loading=\"lazy\" class=\"alignright wp-image-1211 size-medium\" src=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.11.49-PM-242x300.png\" alt=\"Screen Shot 2018-03-15 at 3.11.49 PM\" width=\"242\" height=\"300\" srcset=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.11.49-PM-242x300.png 242w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/03\/Screen-Shot-2018-03-15-at-3.11.49-PM.png 374w\" sizes=\"(max-width: 242px) 100vw, 242px\" \/><\/a><\/p>\n<p>The\u00a0<strong>02-squaresaw<\/strong> patch makes up the abstraction. The <strong>inlet<\/strong>s and <strong>outlet<\/strong> are labelled &#8220;1&#8221;, &#8220;2&#8221; on the top and &#8220;1&#8221; on the bottom. Both signals and messages can pass through these ports. The rest of the patch is a simple combination of a\u00a0<strong>rect~<\/strong> generator and a\u00a0<strong>cycle~<\/strong> generator (making square and sine waves).<\/p>\n<hr \/>\n<p><a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.24.12-PM.png\"><img loading=\"lazy\" class=\"alignleft wp-image-1214 size-medium\" src=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.24.12-PM-300x281.png\" alt=\"Screen Shot 2018-03-15 at 3.24.12 PM\" width=\"300\" height=\"281\" srcset=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.24.12-PM-300x281.png 300w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.24.12-PM-321x300.png 321w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.24.12-PM.png 713w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>This next patch shows the many MIDI messages and the objects which receive them. The simplest is probably\u00a0<strong>bendin\u00a0<\/strong>which receives pitch bend information. Pitch bend has a range from -64 to 63, with 0 in the center. I am dividing the lower range by 64 and the upper range by 63 so that bend up and down are symmetrical.<\/p>\n<p><strong>ctlin<\/strong>\u00a0receives all other MIDI controllers (knobs, switches, sliders, pedals). The value (0-127) comes out the left outlet, and reflects the control parameter value. The center outlet is the controller number (also 0-127). Finally the right outlet is the MIDI channel. This allows a\u00a0keyboard or other MIDI device to target 16 different MIDI destinations (typically different synthesizers).<\/p>\n<p><strong>notein<\/strong> receives both note down and note up messages. The left outlet is the note number (0-127, C4 = 60), the\u00a0center outlet is the velocity or pressure (0-127), and again the right outlet is the MIDI channel. A velocity of 0 indicates a note up or release.<\/p>\n<p>In this patch I am using\u00a0<strong>poly\u00a0<\/strong>to <strong>pack<\/strong>\u00a0a voice number with\u00a0the MIDI note and velocity. This voice number is used by\u00a0<strong>route<\/strong> to direct the note and velocity to one of three sound generators. The outputs of the sound generators are all sent to &#8220;sum&#8221; with\u00a0<strong>send~<\/strong> and\u00a0<strong>receive~<\/strong>.<\/p>\n<p>Another patch in the class one zip archive shows how to use the computer keyboard to generate &#8220;note&#8221; messages.<\/p>\n<hr \/>\n<p><a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.47.26-PM.png\"><img loading=\"lazy\" class=\"alignleft wp-image-1216 size-medium\" src=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.47.26-PM-300x227.png\" alt=\"Screen Shot 2018-03-15 at 3.47.26 PM\" width=\"300\" height=\"227\" srcset=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.47.26-PM-300x227.png 300w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.47.26-PM-396x300.png 396w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.47.26-PM.png 578w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>This patch is a simple use of\u00a0<strong>metro.<\/strong> A BPM value is converted into milliseconds per beat by dividing 60000 by the BPM.\u00a0<strong>metro<\/strong> then sends &#8220;bang&#8221; messages to two messages which control the amplitude and frequency of a sine wave (<strong>cycle~<\/strong>), which gives a sort of kick drum sound.<\/p>\n<hr \/>\n<p><a href=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.52.13-PM.png\"><img loading=\"lazy\" class=\"alignleft wp-image-1218 size-medium\" src=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.52.13-PM-300x242.png\" alt=\"Screen Shot 2018-03-15 at 3.52.13 PM\" width=\"300\" height=\"242\" srcset=\"https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.52.13-PM-300x242.png 300w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.52.13-PM-372x300.png 372w, https:\/\/tre.ucsd.edu\/wordpress\/wp-content\/uploads\/2018\/01\/Screen-Shot-2018-03-15-at-3.52.13-PM.png 705w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>This patch uses <b>qlist<\/b> as a sequencer.It will be explained more throughly in class. When\u00a0<strong>metro<\/strong> is started, the time is incremented 10 ms at a time\u00a0by\u00a0<strong>counter.<\/strong> This time is used whenever one of the note messages (56, 55, 59, 58) is clicked. This information is collated into an\u00a0<strong>append<\/strong> message and recorded by the <strong>qlist.<\/strong>\u00a0A &#8220;bang&#8221; message causes the <strong>qlist\u00a0<\/strong>to replay the note messages and send them to the simple synthesizer voice.\u00a0<strong>qlist<\/strong> restarts playback after finishing by triggering another &#8220;bang&#8221; at the end.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The focus in 271A will be sound generation with Max\/MSP. In the first two weeks\u00a0I\u00a0will go over any concepts people are unfamiliar with, so there will be less standard material. However, here are some patches we will use as a &hellip; <a href=\"https:\/\/tre.ucsd.edu\/wordpress\/?p=1209\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[],"_links":{"self":[{"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1209"}],"collection":[{"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1209"}],"version-history":[{"count":5,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1209\/revisions"}],"predecessor-version":[{"id":1796,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1209\/revisions\/1796"}],"wp:attachment":[{"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tre.ucsd.edu\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}