Asee peer logo

Music In Matlab: Programming Challenges For An Introductory Course

Download Paper |

Conference

2006 Annual Conference & Exposition

Location

Chicago, Illinois

Publication Date

June 18, 2006

Start Date

June 18, 2006

End Date

June 21, 2006

ISSN

2153-5965

Conference Session

FPD8 -- Systems, Nanotechnology & Programming

Tagged Division

First-Year Programs

Page Count

12

Page Numbers

11.945.1 - 11.945.12

DOI

10.18260/1-2--1192

Permanent URL

https://peer.asee.org/1192

Download Count

2674

Request a correction

Paper Authors

biography

S. Scott Moor Indiana University Purdue University-Fort Wayne (ET)

visit author page

Scott Moor is an Assistant Professor of Engineering and Coordinator of First-Year Engineering at Indiana University Purdue University† Fort Wayne. He received a B.S. and M.S. in Chemical Engineering from M.I.T. After over a decade in industry he returned to academia at the University of California at Berkeley where he received a Ph.D. in Chemical Engineering and an M.A. in Statistics. He is a registered Professional Chemical Engineer in California. He is active in the development of spaces and activities that encourage "serious play" and cooperative learning.

visit author page

Download Paper |

Abstract
NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

Music in MATLAB: A series of programming challenges for an introductory course.

Abstract

Students often find their first course that includes programming a difficult new world. First-year students may not be inspired by programs that input numbers, perform a calculation and then output a number. To help motivate students there are many examples of courses using robotics or graphics projects and problems to provide a more concrete result for programming exercises. MATLAB’s ability to output a time series to the sound card of a PC provides an opportunity for problems that create sounds and music instead of numbers. This approach requires little or no equipment to implement.

Over the past year and a half, we have developed problems and small projects for an introductory computer tools course where MATLAB is taught. Music and sound form the basis of challenges with a range of topics and difficulties. Problems have been developed that illustrate almost all aspects of the course from a script that plays a very simple tune to a general song player that reads a data file containing the note names, durations and amplitudes. This player illustrates the use of loops, conditionals and several sub-functions.

Other project problems include functions to distort a .wav file illustrating file handling, a stereo player illustrating arrays, graphing a wave file illustrating graphing issues, adding harmony to illustrate array calculations, converting note names to frequencies illustrating the use of a switch structure or a complex calculation. More advanced projects can include adding attack and decay to notes, random generation of notes, developing a wind chime simulator and analysis of sound waves using a preprogrammed FFT function. Problems build over the course of the semester as students develop their ability with the software.

In addition to developing students understanding of computer manipulations they are introduced to a range of important engineering topics including: waves, wave shape, sampling, digital representation of analogue phenomenon, sound, signal processing, analogue/digital conversion and bit resolution.

These projects have added an interesting variation into the course. The students have found these projects challenging, and it has been important to develop aids to help them understand working with sound. Particularly important is providing materials to help students who have little or no musical training. This paper includes a discussion of the various problems and projects used and the lessons learned in implementing them.

Introduction

In a recent assessment of their first-year engineering program, Notre Dame found that their greatest student attrition coincided with a first semester programming module.1 This result is not unusual. First-year students often find programming a challenging topic.2 In addition to

Moor, S. S. (2006, June), Music In Matlab: Programming Challenges For An Introductory Course Paper presented at 2006 Annual Conference & Exposition, Chicago, Illinois. 10.18260/1-2--1192

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2006 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015