{"id":10394,"date":"2015-05-13T22:06:06","date_gmt":"2015-05-13T22:06:06","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=10394"},"modified":"2015-05-13T22:06:06","modified_gmt":"2015-05-13T22:06:06","slug":"linux-ubuntu-aplay-and-arecord","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/linux-ubuntu-aplay-and-arecord\/","title":{"rendered":"Linux:  Ubuntu:  aplay and arecord"},"content":{"rendered":"<h1>The tutor shares some discoveries he made while producing a sound file.<\/h1>\n<p>&nbsp;<br \/>\nIn my <a href=\"?p=8177\">Feb 2<\/a> post I mentioned that the bell (&#8216;\\a&#8217;) is apparently disabled in my flavour of Ubuntu (14.04).  Yet, I want a bell-like sound for an upcoming experiment.<\/p>\n<p>Today, I decided to create a little &#8220;bell sound&#8221; file which will be played by Perl&#8217;s <code>exec<\/code> function.  (Once again:  my <a href=\"?p=8177\">Feb 2<\/a> post for details.)<\/p>\n<p>From <code>man aplay<\/code> I learned about the <code>arecord<\/code> function.  From the terminal I keyed in<\/p>\n<p><code>arecord sounds\/beep0.wav<\/code><\/p>\n<p>then the terminal would message back that recording had started.  I&#8217;d make the &#8220;bell&#8221; noise for around ten seconds, then kill the process with <code>Ctrl+c<\/code>.  Next I&#8217;d key in<\/p>\n<p><code>aplay sounds\/beep0.wav<\/code><\/p>\n<p>to hear the result.<\/p>\n<p>While the laptop had a built-in microphone, I also had two old headsets that each had one.  The jack one didn&#8217;t work, but the USB one did, and conveyed a nice clear recording.<\/p>\n<p>To make the actual sound, I didn&#8217;t have a bell.  I settled on clinking a spoon against a large coffee cup.<\/p>\n<p>Everything seemed to work out fine;  I&#8217;ll share the implementation soon:)<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor shares some discoveries he made while producing a sound file. &nbsp; In my Feb 2 post I mentioned that the bell (&#8216;\\a&#8217;) is apparently disabled in my flavour of Ubuntu (14.04). Yet, I want a bell-like sound for &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/linux-ubuntu-aplay-and-arecord\/\"> <span class=\"screen-reader-text\">Linux:  Ubuntu:  aplay and arecord<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105,181,637],"tags":[788,787,789,790,482],"class_list":["post-10394","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-lifestyle","category-linux","tag-aplay","tag-arecord","tag-making-a-short-sound-file-on-ubuntu","tag-recording-a-sound-file-on-ubuntu","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/10394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=10394"}],"version-history":[{"count":18,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/10394\/revisions"}],"predecessor-version":[{"id":10412,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/10394\/revisions\/10412"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=10394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=10394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=10394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}