Difference between revisions of "256b-winter-2010/hw1"
From CCRMA Wiki
(→Specification (part 3 of 3): Interaction) |
|||
Line 5: | Line 5: | ||
<div style="text-align: left;">[[Image:JoyOfCooking.png]]</div> | <div style="text-align: left;">[[Image:JoyOfCooking.png]]</div> | ||
− | The goal of the first homework is to | + | The goal of the first homework is to set up real-time audio on the phone, and explore basic interactions with input from the accelerometer, multi-touch, or GUI elements. Let's get cookin'. |
=== Specification (part 1 of 3): Get Set Up === | === Specification (part 1 of 3): Get Set Up === | ||
− | * | + | * set up your development environment (XCode, have your development device provisioned, installed the provision, etc.) |
− | ** | + | * compile and run a standalone program and install it on your physical iPhone device: |
− | ** | + | ** create a new "View-based Application" project for iPhone (OS File-> New Project -> View-based Project) - name it as you like |
− | * | + | ** compile and run on the device (not just in the simulator). Make sure the .plist file is correct (Bundle identifier= edu.stanford.ccrma.${PRODUCT_NAME} |
− | ** | + | * make basic audio I/O work (this will be covered in class and in tutorial) |
− | ** | + | ** use mo_audio.* to set up an audio callback, and initialize it. |
+ | ** create the audio callback, and populated the buffer, e.g., synthesize a simple sine wave to fill in the output buffer (if you do not do anything in the audio callback loop, feedback will most likely result.) | ||
+ | ** test it | ||
+ | ** this should be covered in class, and reviewed from the tutorial. | ||
− | === Specification (part 2 of 3): | + | === Specification (part 2 of 3): Real-time Audio Synthesize === |
− | * | + | * modify your code from above to synthesize each of the following: |
− | + | ** a sine wave | |
− | ** | + | ** white noise |
+ | ** FM synthesis tone | ||
+ | ** a delayed version of the audio input (set up a circular buffer, as in hw2 from 256a) | ||
+ | ** (for now, hardcode the selection of which type of sound to synthesis - we'll add UI elements to control this in section 3 below) | ||
+ | * be mindful of the parameters for each of these synthesis methods (and be ready to expose and chance them in section 3 below). | ||
− | === Specification (part 3 of 3): Interaction === | + | === Specification (part 3 of 3): Exploring Interaction === |
− | * | + | * first, add some basic controls to select the synthesis on-the-fly |
− | ** | + | * next connect synthesis parameters to interactions as follows: |
− | * | + | ** '''sine wave''': connect the first axis of the accelerometer to the frequency |
− | + | ** '''FM synthesis''': | |
+ | *** connect the first two axes to carrier and modulator frequencies (you determine the ranges), and add a GUI element (e.g., slider) to control the modulation index. | ||
+ | *** add a toggle between a) continuous audio output and b) manually triggered notes | ||
+ | *** for the latter (manually triggered notes), add a GUI button to trigger the notes. | ||
+ | ** '''delayed input''': use multi-touch and the two-point pinch gesture to control delay length (you may add another slider to control the feedback coefficient, and a label to output the current delay length) | ||
+ | * even though this assignment is intended to familiarize you with audio + interaction on the phone, consider the aesthetic and user experience. | ||
=== Note === | === Note === | ||
Line 32: | Line 44: | ||
* choose your own coding conventions - but '''be consistent''' | * choose your own coding conventions - but '''be consistent''' | ||
* you are welcome to work together, but you must do/turn in your own work | * you are welcome to work together, but you must do/turn in your own work | ||
− | |||
Revision as of 04:09, 5 January 2010
Contents
Homework #1: iPhone: Get Set, Synthesis, Interact
Due date: 2009.1.13 11:59:59pm (or thereabout), Wednesday.
The goal of the first homework is to set up real-time audio on the phone, and explore basic interactions with input from the accelerometer, multi-touch, or GUI elements. Let's get cookin'.
Specification (part 1 of 3): Get Set Up
- set up your development environment (XCode, have your development device provisioned, installed the provision, etc.)
- compile and run a standalone program and install it on your physical iPhone device:
- create a new "View-based Application" project for iPhone (OS File-> New Project -> View-based Project) - name it as you like
- compile and run on the device (not just in the simulator). Make sure the .plist file is correct (Bundle identifier= edu.stanford.ccrma.${PRODUCT_NAME}
- make basic audio I/O work (this will be covered in class and in tutorial)
- use mo_audio.* to set up an audio callback, and initialize it.
- create the audio callback, and populated the buffer, e.g., synthesize a simple sine wave to fill in the output buffer (if you do not do anything in the audio callback loop, feedback will most likely result.)
- test it
- this should be covered in class, and reviewed from the tutorial.
Specification (part 2 of 3): Real-time Audio Synthesize
- modify your code from above to synthesize each of the following:
- a sine wave
- white noise
- FM synthesis tone
- a delayed version of the audio input (set up a circular buffer, as in hw2 from 256a)
- (for now, hardcode the selection of which type of sound to synthesis - we'll add UI elements to control this in section 3 below)
- be mindful of the parameters for each of these synthesis methods (and be ready to expose and chance them in section 3 below).
Specification (part 3 of 3): Exploring Interaction
- first, add some basic controls to select the synthesis on-the-fly
- next connect synthesis parameters to interactions as follows:
- sine wave: connect the first axis of the accelerometer to the frequency
- FM synthesis:
- connect the first two axes to carrier and modulator frequencies (you determine the ranges), and add a GUI element (e.g., slider) to control the modulation index.
- add a toggle between a) continuous audio output and b) manually triggered notes
- for the latter (manually triggered notes), add a GUI button to trigger the notes.
- delayed input: use multi-touch and the two-point pinch gesture to control delay length (you may add another slider to control the feedback coefficient, and a label to output the current delay length)
- even though this assignment is intended to familiarize you with audio + interaction on the phone, consider the aesthetic and user experience.
Note
- have fun with it!!!
- comment your code!
- choose your own coding conventions - but be consistent
- you are welcome to work together, but you must do/turn in your own work
Deliverables
turn in all files by putting them in your Library/Web/256b/hw1/ directory, and concise online documentation + readme
- 1) source code to the project (*.h, *.cpp, *.m *.mm *.c makefile, project files, etc.)
- 2) online page for your project (should be viewable at http://ccrma.stanford.edu/~YOURID/256b/hw1/). It should include:
- links to your files of various kinds (or to a zip/tar archive)
- instructions on building the project (for example, anyone in the class should be able to download and run)
- a short README text section that:
- conveys your ideas/comments in constructing each program
- describes any difficulties you encountered in the process
- lists any collaborators
- 3) email Ge and Nick with the link to your web page, as a confirmation that you are submitting the assignment