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?
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".
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..
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)
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.
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.
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!!
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.
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