Music 147 assignment for Tuesday April 29, 2014

To review the topic of sampling synthesis that we discussed in class, read the sections from Puckette’s The Theory and Technique of Electronic Music that deal with the topic of Wavetables and Samplers, including four of its first five subsections: The Wavetable Oscillator, Sampling, Enveloping Samplers, (you may skip the subsection on Timbre Stretching,) and Interpolation.

Study the API provided by either Java (Oracle) or Apple or Microsoft for assisting the programming of audio and music applications. In Java it’s known as the Java Sound API. In the MacOS and iOS it’s known as Core Audio. In Windows it’s the Core Audio APIs. In this class we will focus primarily on Java for cross-platform development and Objective C for MacOS/iOS development. Choose whichever is most familiar and useful to you, and teach yourself as much as possible about how basic audio functionality is handled, especially audio file I/O and audio stream I/O. Try to write a simple program that performs a basic I/O task such as a) opening and examining a file, b) generating a sound and playing it or storing it, c) copying input to output, etc.

Most importantly, come to class prepared to give a presentation on what you learned, and to engage in a discussion with others about best practices for basic audio programming with Java and/or Objective C. You’ll be called on to lead the class for at least a few minutes teaching something you know, or at the least, asking informed questions of others regarding what you don’t know.

Music 147 assignment for Thursday April 24, 2014

Keep working on your simple MIDI synthesizer. If you have not yet got it working to your satisfaction, make the modifications necessary to get it working, and resubmit it to the EEE DropBox folder “SimpleSynth1”. If you did already successfully complete the assignment, see if you can improve it by adding some additional functionality or some means of expressive control via MIDI. For example, you could try to implement pitch bending using MIDI pitchbend messages, or use the modulation wheel data—continuous controller number 1—to alter vibrato depth, tremolo depth (or rate), filter cutoff frequency, etc.

Music 147 assignment for Tuesday April 22, 2014

1. Teach yourself about the MIDI software protocol by reading as many as possible of the following articles. Start with this essay on MIDI that I wrote for another class. Then proceed to this page of Tutorials on MIDI provided by the MIDI Manufacturers Association. It contains a readable and not-too-technical Introduction to MIDI, as well as a 4-part explanation of the technical aspects of the Technology of MIDI. The article on MIDI and Music Synthesis by Jim Heckroth is pretty dry and technical, and mostly gives the same sort of information about the MIDI protocol, but toward the end of the article it contains some useful information about how sampling synthesis works.

2. In Max, use pitch and velocity information to control the frequency and amplitude of a simple software synthesizer you design. If you have access to a MIDI keyboard, either in the Arts Media Center or elsewhere on your own, use the MIDI object notein to get the vital information of the MIDI note data coming from the keyboard. If you don’t have access to a MIDI instrument, you can simulate note-on pitch and velocity information from a keyboard using the Max kslider object, and you can turn notes off with the makenote object or the flush object. Most commercial synthesizers are polyphonic—able to play multiple notes simultaneously—but for this exercise you only need to make a monophonic synthesizer capable of playing a single note at a time. The method of tone generation is up to you; you can use additive synthesis, or frequency modulation (FM) synthesis, or any other technique you want to try. Once you have figured out the basic mechanics of how to play notes on your synthesizer, spend some time trying to make it actually sound good. (Analyze what characteristic would make it sound better than it does, and see if you can figure out how to implement that characteristic.) Place your completed Max patch in the EEE DropBox called “SimpleSynth1”.

Music 147 assignment for Thursday April 17, 2014

Interpolation, the means of getting smoothly from one point to another, is an important topic in computer audio and music. We’ll start by studying linear interpolation.

For simple discussion and explanation, study MSP Tutorial 2: Adjustable Oscillator, and my articles on Linear change and Fading by means of interpolation. (Don’t worry if you don’t understand the visual part of the example Max patch in that latter article.)

Miller Puckette’s text discusses the same topic, in the sections on Smoothed amplitude control with an envelope generator and his more technical discussion of Interpolation. In that latter article, he’s comparing different methods of interpolation for calculating an intermediate point between two known points. (We’ll leave discussion of cubic interpolation for later.)

Music 147 assignment for Tuesday April 15, 2014

Participation on the Q&A site is required at least once a week. Ask questions there. Answer questions there.

If you haven’t done it yet, in The Theory and Technique of Electronic Music by Miller Puckette, read the section on “Sinusoids, Amplitude, and Frequency” and its first five subsections, “Measures of Amplitude” through “Synthesizing a Sinusoid”. If you have already read it, re-read it anyway, to reinforce your understanding of it.

Read the blog posts you haven’t read yet.

In the programming language of your choice (C, C++, Objective C, Java), write a program that plots a waveform, or even one that plays a waveform if you’re able. Make a periodic but non-sinusoidal waveform via additive synthesis. (That is, add sinusoids together to create a more complex tone.) Of course you are encouraged to go beyond this basic assignment if you want to and are able to. If you can’t program in any of those languages, build it in MSP and study the plot~ object to see how you can best plot it.

Turn in your assignment in the EEE DropBox called “Sinusoid1”.

Music 147 assignment for Thursday April 10, 2014

In Thursday’s class we’ll discuss some fundamentals of managing audio data within a program as an array or stream of samples. In preparation for that:

1) In The Theory and Technique of Electronic Music by Miller Puckette, read the section on “Sinusoids, Amplitude, and Frequency” and its first five subsections, “Measures of Amplitude” through “Synthesizing a Sinusoid”. It’s presented in general mathematical/conceptual terms rather than in any actual programming language; in class we’ll work to clarify and apply what he has written.

2) Think about how you would compute a sinusoid, in whatever programming language you’re most comfortable. If you have the time, try actually doing it. You don’t have to write a program that both computes and plays the sound, but at least try to make a program that presents the data as some form of output, either a list of numbers, plotted as a graph, or whatever you know how to do. You don’t have to hand that in (unless you’d like to), but trying to do it yourself will definitely solidify the concepts in your mind. If you do want to hand it in, you can use the EEE DropBox called “Sinusoid1”.

Music 147 assignment for Tuesday April 8, 2014

Begin to teach yourself the Max programming environment, especially the objects for audio known collectively as MSP (Max Signal Processing). The following paragraphs will give you some suggestions about how best to do that.

Then look below that for the specific project assignment.


Resources for Learning Max

There are many resources for learning Max, including (but certainly not limited to):
1) The tutorials that are provided as part of the application, each of which is accompanied by an example program. You can access those tutorials via the Help menu within the Max application, or you can read the Max Tutorials and MSP Tutorials online.
2) You can open a help file for any Max object, which itself is a working Max program demonstrating the object in action, by Alt-Clicking or Option-Clicking on the object in a Max patcher window.
3) For a super basic introduction to the rudimentary concepts and conventions of Max, you can read this excerpt from an old version of the Max documentation. The graphics are antiquated but the information is still largely correct.
4) You can find online many of the professor’s examples made for prior classes that involved Max.
5) As you work in Max, you can consult the extensive reference documentation via the Help menu or on the Web.
6) You can find many video tutorials about Max on YouTube.


The MSP Tutorials are written in a way that assumes you already know the basics of Max programming for non-audio events. But rather than you actually spending a whole lot of time on the non-MSP Max Tutorials, for the most part I think you’ll do OK by jumping right into the MSP Tutorials and then looking up aspects of Max that those tutorials don’t explain. So I suggest:
1) Read the pages of information about the Rudiments of Max excerpted from an old version of the Max documentation
2) Read the introductory chapters of the MSP Tutorials titled “Introduction” and “How MSP Works“.
3) Work through MSP Tutorials 1, 2, and 3 (plus 6 if you feel like testing what you’ve learned).
4) Study the following examples online:
– Example 1: Open a sound file and play it.
– Example 2: Preload and play sound cues.

Then you will know enough to do the following project assignment.

Project

Try out the online Drum Kit program by Ron Winter. Think about how the program works. Could you make a program in Max that works similarly? Try to build a Max patch that duplicates as much of the capability of that program as possible (although your program can be a much smaller and simpler version with fewer sounds and less stunning graphics). Here are some hints of Max objects that you might need: dac~, sfplay~, key, select, message, fpic (or the Paste Picture command in the Edit menu), ubutton, comment, loadbang. You’ll also need some sound files. Use AIFF or WAVE soundfiles; sfplay~ doesn’t know what to do with MP3 files. Download them from the web (e.g. www.freesound.org) or borrow them from other programs or sources, or record them yourself. You don’t need to use the same sounds or graphics as are used in the model program; feel free to create your own library of interesting sounds for this purpose if you’d like. Note that the model program can play polyphonically (i.e., can play multiple simultaneous sounds); that’s a moderately complicated thing to program successfully in Max, so don’t feel obliged to try to implement that capability (unless, of course, you want to take on the challenge). If you think of improvements or elaborations or new ideas to change or extend the program, that’s fine, but make a basic imitation of the model program first. Be prepared to demonstrate your program in class.

Deposit your solution in the EEE DropBox called “SamplePlayer1”. Since your project probably needs to reference specific sound files, save your .maxpat Max patch(es) and your .wav or .aif sound files in the same folder, compress that folder as a .zip archive, then upload the .zip file to the DropBox.

Music 147 assignment for Thursday April 3, 2014

Read the article by Christopher Dobrian on Digital Audio.

Make sure you understand the meaning of the following terms:
simple harmonic motion, amplitude, frequency, fundamental mode of vibration, harmonics (overtones, partials), harmonic series, spectrum, amplitude envelope, loudness/amplitude, pitch/frequency, decibel, analog-to-digital converter, digital-to-analog, converter, digital sampling, Nyquist theorem/rate/frequency, sampling rate, aliasing/foldover, quantization, quantization precision, signal-to-quantization noise ratio, clipping.

If you don’t fully understand the explanation of those terms in the article, you’ll need to do some research to learn more about the things you don’t understand. Come to class with specific questions regarding any topics, italicized terms, or concepts discussed in the article that are unclear to you. You can also posts questions or comments about the article on the class MessageBoard. Check the MessageBoard on Wednesday evening to see if there are any questions by others there that you can help by answering.