forked from tkzic/audiograph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
180 lines (128 loc) · 7.37 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
audioGraph:
README.txt
12/12/2011
iOS audio processing graph demonstration
"An audio processing graph is a Core Foundation opaque type, AUGraph, that you use to construct and manage an audio unit processing chain. A graph can leverage the capabilities of multiple audio units and multiple render callback functions, allowing you to create nearly any audio processing solution you can imagine." - From Apple's "Audio Unit Hosting Guide For iOS"
AudioGraph is a superset of Apple's MixerHost application.
Features include:
* Mono and stereo mic/line input
* Audio effects including:
o Ring modulator
o FFT passthrough using the Accelerate vDSP framework.
o Real-time variable pitch shifting and detection using STFT
o Simple variable speed delay using a ring buffer
o Recursive moving average filter with variable number of points
o Convolution example with variable filter cutoff frequency
* Stereo level meter
* Synthesizer example - sine wave with an envelope generator
* iOS 5 features including:
o MIDI sampler audio unit
o file player audio unit
o audio unit effects
* Runs on iPad, iPhone, and iPod-Touch
* Open source
* Available as free download from iTunes App Store
* Music by Van Lawton
* Plus everything from MixerHost
Requirements:
* A device that runs iOS 5.x
* Headphones.
Instructions:
Launch the app and press Play.
Source code, documentation, support, downloads:
http://zerokidz.com/audiograph (website)
https://github.com/tkzic/audiograph (github)
[email protected] (support/questions)
http://itunes.apple.com/app/audiograph/id486193487 (app)
Credits:
This project is derived from work by:
Chris Adamson
Stephan M. Bernsee
Michael Tyson
Stephen Smith
Apple Core-Audio mailing list
stackoverflow.com
Apple's IOS developer program
Thank you.
- Tom Zicarelli 12/12/2011
Here is the original README file for MixerHost
----------------------------------------------
===========================================================================
DESCRIPTION:
MixerHost demonstrates how to use the Multichannel Mixer audio unit in an iOS application. It also demonstrates how to use a render callback function to provide audio to an audio unit input bus. In this sample, the audio delivered by the callback comes from two short loops read from disk. You could use a similar callback, however, to synthesize sounds to feed into a mixer unit.
This sample is described in Audio Unit Hosting Guide for iOS.
The code in MixerHost instantiates two system-supplied audio units--the Multichannel Mixer unit (of subtype kAudioUnitSubType_MultichannelMixer) and the Remote I/O unit (of subtype kAudioUnitSubType_RemoteIO)--and connects them together using an audio processing graph (an AUGraph opaque type). The app functions as an audio mixer, letting a user control the playback levels of two sound loops.
The sample provides a user interface for controlling the following Multichannel Mixer unit parameters:
* input bus enable
* input bus gain
* output bus gain
This sample shows how to:
* Write an input render callback function
* Locate system audio units at runtime and then load, instantiate, configure,
and connect them
* Correctly use audio stream formats in the context of an audio processing
graph
* Instantiate, open, initialize, and start an audio processing graph
* Control a Multichannel Mixer unit through a user interface
This sample also shows how to:
* Configure an audio application for playing in the background by adding the
"app plays audio" key to the info.plist file
* Use the AVAudioSession class to configure audio behavior, set hardware
sample rate, and handle interruptions
* Make the app eligible for its audio session to be reactivated while in the
background
* Respond to remote-control events as described in Event Handling Guide for
iOS
* Allocate memory for an AudioBufferList struct so that it can handle more
than one channel of audio
* Use the C interface from Audio Session Services to handle audio hardware
route changes
* Use Cocoa notifications to communicate state changes from the audio object
back to the controller object
To test how this app can reactivate its audio session while in the background in iOS 4.0 or later:
1. Launch the app and start playback.
2. Press the Home button. MixerHost continues to play in the background.
3. Launch the Clock app and set a one-minute countdown timer. Leave the
Clock app running in the foreground.
4. When the timer expires, an alarm sounds, which interrupts MixerHost and
stops its audio.
5. Tap OK to dismiss the Timer Done alert. The MixerHost audio resumes
playback while the app remains in the background.
To test how this app responds to remote-control events:
1. Launch the app and start playback.
2. Press the Home button. MixerHost continues to play in the background.
3. Double-press the Home button to display the running apps.
4. Swipe right to expose the audio transport controls.
5. Notice the MixerHost icon at the bottom-right of the screen. This
indicates that MixerHost is the current target of remote-control
events.
6. Tap the play/pause toggle button; MixerHost stops. Tap it again;
MixerHost resumes playback. Tap the MixerHost icon; MixerHost
comes to the foreground.
===========================================================================
RELATED INFORMATION:
Audio Unit Hosting Guide for iOS, May 2010
Audio Session Programming Guide, April 2010
===========================================================================
BUILD REQUIREMENTS:
Mac OS X v10.6.4, Xcode 3.2, iOS 4.0
===========================================================================
RUNTIME REQUIREMENTS:
Simulator: Mac OS X v10.6.4
Devices: iOS 4.0
===========================================================================
PACKAGING LIST:
MixerHostAppDelegate.h
MixerHostAppDelegate.m
The MixerHostAppDelegate class defines the application delegate object, responsible for instantiating the controller object (defined in the MixerHostViewController class) and adding the application's view to the application window.
MixerHostViewController.h
MixerHostViewController.m
The MixerHostViewController class defines the controller object for the application. The object helps set up the user interface, responds to and manages user interaction, responds to notifications from the MixerHostAudio object to handle audio interruptions and audio route changes, and handles various housekeeping duties.
MixerHostAudio.h
MixerHostAudio.m
The MixerHostAudio class encapsulates all of the audio capabilities for the application. It handles audio session configuration, use of the ExtAudioFileRef opaque type for reading audio files from disk into memory, and construction and management of the audio processing graph. It detects interruptions and audio route changes and uses notifications to communicate audio state changes back to the MixerHostViewController object.
===========================================================================
CHANGES FROM PREVIOUS VERSIONS:
Version 1.0. New sample application that demonstrates how to host a Multichannel Mixer unit.
================================================================================
Copyright (C) 2010 Apple Inc. All rights reserved.