Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-25-2009, 09:17 AM   #10 (permalink)
RandyInLA
Registered Member
 
Join Date: Aug 2009
Posts: 12
RandyInLA is on a distinguished road
Default

Blowing harder or softer does not change the pitch in a trumpet. It alters the volume. Changing the aperture of the lips changes pitch. Well, that and pressing different combinations of valves which lengthen/shorten the overall length of tube the "buzzed" sound the lips make have to travel. With a sax, blowing harder equals faster moving air across the reed, which can cause the reed to vibrate faster, ie.higher in pitch. One learns how to control this by applying the right pressure, again, with the lips, on the reed.

Where the mic differs from any real horn analogy is that it only hears sound pressure. It doesn't have any indication of how fast your blowing wind is traveling, unlike a reed or brass instrument's mouth piece. The wind would be noise, which is a combination of many many many pitches playing at the same time, not a single pitch. Look up 'white noise' and 'pink noise' online to get a sense of what I mean. If you were to hum or whistle, then you could do some FFT analysis on the incoming sound and detect a pitch. With just wind though, all you can detect is the pressure, or volume of the wind.

Back when Yamaha first introduced their breath adapter for use with the DX7 line of instruments (circa 1986?), all it would control is the volume of the sound. Pitch was still controlled via the keys. You could pretty easily duplicate the attacks/sustains/vibrato (amplitude vibrato, not pitch) of a real breath-based instrument.

Now, having said that, there are plenty of different ways to tell your app which pitch to play. Smule's ocarina and trombone app use buttons/sliders on screen. You could also try detecting changes in rotation/elevation of the iphone to make a sort of theremin where the attack/volume of the note is controlled by blowing into the mic.

Good luck, whatever you end up doing!
RandyInLA is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,172
Threads: 93,917
Posts: 402,134
Top Poster: BrianSlick (7,966)
Welcome to our newest member, myrtaah95
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:44 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.