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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-11-2009, 01:48 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default Blow into my iphone...make music

ok, I want to try to make my own "horn-like" blow-into-the-iphone app..just for fun really....I've got alot of audio code...but nothing that can connect windspeed to a musical note variation...anyone have any suggestions?
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 05-11-2009, 02:32 PM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: Atlanta
Posts: 411
Default

Quote:
Originally Posted by m_kaminsky@yahoo.com View Post
ok, I want to try to make my own "horn-like" blow-into-the-iphone app..just for fun really....I've got alot of audio code...but nothing that can connect windspeed to a musical note variation...anyone have any suggestions?
There isn't any way to measure "windspeed". You could try to detect "volume".
funkytaco is offline   Reply With Quote
Old 05-11-2009, 02:34 PM   #3 (permalink)
Registered Member
 
panzeriti's Avatar
 
Join Date: Mar 2009
Posts: 313
Default

Its called an algorithm my friend... have fun
__________________
My Apps
panzeriti is offline   Reply With Quote
Old 05-11-2009, 10:49 PM   #4 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

Quote:
Originally Posted by panzeriti View Post
Its called an algorithm my friend... have fun

Here's what I'm thinking...I was looking at the wave generated by the aurioTouch app...
Perhaps a starting point would be linking a single output wav file to height of wave in aurioTouch, then, maybe linking "wave density" or similar function to an output pitch...Then...having a function which changes the pitch a whole note and linking that to a button...expand button interface...''
'
Right now I'm looking at the first step of that..

set outputyvolume == aurioTouchWave height
play sound..
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 05-12-2009, 05:09 PM   #5 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

For fun, someone help me get started on the following classes...I bet a basic version could be done easily..these are some preliminary ideas for structure...anyone have any ideas?


class InputSoundWavInputmeasurements {
(density, frequency, amplitude, etc)

(create output sound info...)
}

class ListenToSound {

(createinputsound object)

}

class createsound {


(trumpet.inputsoundobjectdatavariable(pitch/volume/style).play)

}

class playsound {

(play createsound)

}





TrumpetAppdelegate


TrumpetAppController
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 05-12-2009, 05:15 PM   #6 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

Helpful terms

Compression: Area of a longitudinal wave where particles are more squished up and pressure is therefore higher than normal.

Frequency: The number of times a vibration occurs in one second (hertz or Hz). Fast vibrations have high frequencies and produce high notes or pitches.

Period: The length of time required to complete one cycle of a wave.

Pitch: The perceptual phenomenon of how high or low a tone seems. The pitch of a tone corresponds to its frequency. High frequencies are perceived as high pitches while low frequencies are heard as low pitches.

Rarefaction: Area of a longitudinal wave where particles are more spread out and pressure is therefore lower than normal.

Sound wave: Longitudinal waves of air pressure differences caused by a vibrating source and travelling outwards from that source.

Sound: The brain's interpretation of sound waves detected by the ear.

Vibration: A single object or particle moving backwards and forwards (or up and down) rapidly.

Wave: A disturbance travelling outwards in all directions from a vibrating source. It is important to note that the individual particles that the wave is travelling through do not travel with the wave, but are disturbed in a local area only.

Wavelength: The distance between one wave crest, trough or matching phase and the next one. Waves with longer wavelengths have slower frequencies.
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 05-12-2009, 05:17 PM   #7 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

Quote:
Originally Posted by funkytaco View Post
There isn't any way to measure "windspeed". You could try to detect "volume".
well, now that I rethink that question, how
would you detect "simulated windspeed" ..
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 05-12-2009, 06:00 PM   #8 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by m_kaminsky@yahoo.com View Post
well, now that I rethink that question, how
would you detect "simulated windspeed" ..
When someone blows on the mic, you'll get that "whoosh" sound from blowing on the mic. So you can use the volume of the wind noise to approximate the wind speed, or the volume of the note you create.

What are you going to use to decide on the pitch of the note, though? The wind noise has no "pitch" - it looks like white noise. That's why apps like ocarina have the "hole" buttons to determine the pitch.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 05-13-2009, 05:50 AM   #9 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

Quote:
Originally Posted by smasher View Post
When someone blows on the mic, you'll get that "whoosh" sound from blowing on the mic. So you can use the volume of the wind noise to approximate the wind speed, or the volume of the note you create.

What are you going to use to decide on the pitch of the note, though? The wind noise has no "pitch" - it looks like white noise. That's why apps like ocarina have the "hole" buttons to determine the pitch.
thinking out loud here..., being a sax player, I know higher notes are only possible when I blow harder, even though a low note can also be loud, actual note determined by finger positions, blowing harder can produce the same note, but one octave higher (not in all cases)..... Fingering determines note, blowing forcefully will often cause an octave jump, but in the same note... This is even more squewed with a 3 buttoned trumpet, where strength of blowing is more important to note determination, considering that different notes have same fingering, blowing harder or softer determines note in more situations than that of the sax...

Someone help me fill in those previously mentioned classes!!
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 08-25-2009, 10:17 AM   #10 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 12
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
Old 09-25-2009, 02:29 AM   #11 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 1
Default

Quote:
Originally Posted by m_kaminsky@yahoo.com View Post
ok, I want to try to make my own "horn-like" blow-into-the-iphone app..just for fun really....I've got alot of audio code...but nothing that can connect windspeed to a musical note variation...anyone have any suggestions?
i have noticed that blowing into the iphone microphone is a measured at around 100-120db (decibels) which is one of the loudest sounds the iphone picks up, so i would use that information to help you whitch your program
Samuel is offline   Reply With Quote
Reply

Bookmarks

Tags
horn, iphone, music, wind

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 158,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0