meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ssotc_2011:grp4:start [2011/08/19 12:19]
grp4 [Presentation]
ssotc_2011:grp4:start [2011/08/22 02:23] (current)
grp4
Line 2: Line 2:
   - Esa-Petri Tirkkonen   - Esa-Petri Tirkkonen
   - Hilmi Abdullah   - Hilmi Abdullah
 +
 +  
 +===== Final Report=====
 +
 +{{:ssotc_2011:grp4:mehearreport.pdf|MeHear Report}}
 +
  
 ===== Idea ===== ===== Idea =====
Line 7: Line 13:
 Using phone as hearing aid for old people (and not so old). Using phone's microphone and ear plugs. Basic idea is to amplify sound to make it audible for people with hearing proplems. Program will have volume control and some basic compressor and equaliser in it.   Using phone as hearing aid for old people (and not so old). Using phone's microphone and ear plugs. Basic idea is to amplify sound to make it audible for people with hearing proplems. Program will have volume control and some basic compressor and equaliser in it.  
  
-===== Presentation===== 
  
-{{:ssotc_2011:grp4:amplifier.pdf|Introduction - welcome to codecamp}} 
 ===== Result ===== ===== Result =====
  
Line 84: Line 88:
         """         """
         @attention: this is important it initializes softfare playtrought (audioconvert is not nesesity)         @attention: this is important it initializes softfare playtrought (audioconvert is not nesesity)
-        @summary: takes stream from mic to autosink+        @summary: takes stream from mic to autosink notice volume or compression ratio is not changable after program strats as they aare in constructor of main window(MeHear)
         """         """
         self.pipeline = gst.parse_launch("""alsasrc device=hw:%d  ! volume %d !audiodynamic ratio=%d ! autoaudiosink location=%s""" % (self.mic, Volume, Cratio, sink))         self.pipeline = gst.parse_launch("""alsasrc device=hw:%d  ! volume %d !audiodynamic ratio=%d ! autoaudiosink location=%s""" % (self.mic, Volume, Cratio, sink))
Line 120: Line 124:
                  
         self.audiosink = gst.element_factory_make("autoaudiosink", "audio-output")         self.audiosink = gst.element_factory_make("autoaudiosink", "audio-output")
 + """
 +        @attention: intance of record class is created here and gstreamer started.
 +        """
         self.recorder=Record(self.audiosink)         self.recorder=Record(self.audiosink)
         """         """
Line 162: Line 169:
 class MeHear(hildon.Program): class MeHear(hildon.Program):
     def __init__(self):     def __init__(self):
 +        """
 +        @summary: creates an intance of pleyer class and that why starts also gsteamer
 +        """  
         self.pl= player()         self.pl= player()
-#    def record_button_clicked(self,button, label): + 
-#        buttontext = button.get_label() +
-#        text =  buttontext +
-#        if text == "Record"+
-#            label.set_text(text+"ing..."+
-#            button.set_label("Stop"+
-#            print "Record button pressed" +
-#             +
-#        if text == "Stop"+
-#            button.set_label("Record"+
-#            print "Stop button pressed"+
  
     def addvol_button_clicked(self, button, label, sm):     def addvol_button_clicked(self, button, label, sm):
 + #this changes the value of adjustment and thats why changes also progress bars value as it is linked to adjesment
         a=self.adjus.get_value()         a=self.adjus.get_value()
         self.adjus.set_value(a+10)         self.adjus.set_value(a+10)
Line 181: Line 183:
         print "volume %d"%(a+10)         print "volume %d"%(a+10)
                      
- 
-         
     def decvol_button_clicked(self, button, label, sm):     def decvol_button_clicked(self, button, label, sm):
 + #this changes the value of adjustment and thats why changes also progress bars value as it is linked to adjesment
         a=self.adjus.get_value()         a=self.adjus.get_value()
         self.adjus.set_value(a-10)         self.adjus.set_value(a-10)
Line 235: Line 236:
         buttonGTK = gtk.ToggleButton("AMPlify")         buttonGTK = gtk.ToggleButton("AMPlify")
         buttonGTK.connect("clicked", self.amplify_button_clicked, labelSubHeader)         buttonGTK.connect("clicked", self.amplify_button_clicked, labelSubHeader)
-      
-      
- 
-         
-        #this changes the value of progres bar 
-        #adjus.set_value(30)  
- 
-         
-         
-         
-        #a= gtk.CheckButton("check button 1") 
-        #hbox.pack_start(a, True, True, 0) 
-         
-        #b= gtk.ToggleButton("check button 1") 
-        #hbox.pack_start(b, True, True, 0) 
-         
-        #c = gtk.RadioButton(None, "radio button1") 
-        #hbox.pack_start(c, True, True, 0) 
-         
-        #adjus = gtk.Adjustment(value=60, lower=0, upper=100, step_incr=1, page_incr=0, page_size=0) 
-        #d = gtk.SpinButton(adjustment= adjus, climb_rate=0.1, digits=5) 
-        #hbox.pack_start(d, True, True, 0) 
-        #hscrollbar = gtk.HSscrollbar(adjustment) 
                  
         self.ratiotext= gtk.Label("Ratio:")         self.ratiotext= gtk.Label("Ratio:")
Line 273: Line 251:
                  
         self.volumetext= gtk.Label("Volume:")         self.volumetext= gtk.Label("Volume:")
-        # Create a centering alignment object 
-        #align = gtk.Alignment(0.5 ,0.5, 0, 0) 
-        #vbox.pack_start(align, False, False, 5) 
-        #align.show() 
-        #align.add(self.pbar) 
-        #self.pbar.show() 
         hbox3.pack_start(self.ratiotext, True, True, 0)         hbox3.pack_start(self.ratiotext, True, True, 0)
         hbox3.pack_start(combo, True, True, 0)         hbox3.pack_start(combo, True, True, 0)
Line 303: Line 275:
          
          
-if __name__ == "__main__":   +if __name__ == "__main__":     
-    +
     app = MeHear()      app = MeHear() 
     app.main()     app.main()
 +#EOF
 </file> </file>
  
- +Cleaned code whit some examples 
-Upload and attach your project **source code** package here. +{{:ssotc_2011:grp4:mehear.zip|}}
-  * Clean up compiled binary files before making package +
-  * Use .zip format+
      
 +===== Presentation=====
 +
 +{{:ssotc_2011:grp4:amplifier.pdf|MeHear}}
 +
 ===== Conclusion ===== ===== Conclusion =====