A question.. I am making a guitar tuner. When I launch the app, the sound recognition starts using a SoundRecorder.
Next, I have added a label in screen1. I can change the colors if it is the correct note or not. But, I am stuck in the part to recognize the string note when the string produces a sound.
For instance if I press the 6th string, it will show the note as E, but if the 6th string produces an unusual sound, the note will change to D# or Eb (or any other note). Is this possible? This should apply to all the other strings as well. I am creating this app for myself only.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                TIMAI2  
                
               
               
              
                  
                    October 20, 2022,  8:08am
                   
                   
              2 
               
             
            
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
            
              I don't want to generate the tone, but rather get the note of the tone from the mic using a soundRecorder.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              There is something called a SoundSensor in AppyBuilder that was long abandoned long ago. Maybe an extension developer may want to revisit this.
  
  
    
    // Copyright 2016-2018 AppyBuilder.com, All Rights Reserved - Info@AppyBuilder.com
// https://www.gnu.org/licenses/gpl-3.0.en.html
package com.google.appinventor.components.runtime;
// https://code.google.com/p/android-labs/source/browse/trunk/NoiseAlert/src/com/google/android/noisealert/SoundMeter.java
import android.media.MediaRecorder;
import android.util.Log;
import com.google.appinventor.components.annotations.*;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.runtime.util.TimerInternal;
@DesignerComponent(category= ComponentCategory.SENSORS,
        description="<p>Physical world component that can detect such data as: " +
                "sound amplitude (measurement of the degree of change [positive or negative] ).</p>",
        iconName="images/soundsensor.png", nonVisible=true, version=1)
@SimpleObject
@UsesPermissions(permissionNames="android.permission.RECORD_AUDIO")
public class SoundSensor extends AndroidNonvisibleComponent
        implements AlarmHandler, OnStopListener, OnResumeListener, Deleteable
 
  This file has been truncated. show original 
   
  
    
    
  
  
 
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
            
              This doesn't include a note detector as I suspect. I failed to find one. Good recommendation though! Some of those features I can use in my app also.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              Of course it doesn't. But we may work out the frequency of the sounds, then get the note from the frequency.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              Nice approach. But I can't understand how to work with this. Can you please demonstrate this via diagram? Since this component was abandoned long ago.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                Anke  
                
               
               
              
                  
                    October 20, 2022,  8:44am
                   
                   
              8 
               
             
            
              
I don't think this will succeed - especially since this also depends on the instrument (guitar, bass, ukulele, violin, ...) and the pitch etc. that produces the sound (note). 
But good luck.  
             
            
               
               
              2 Likes 
            
            
                 
                 
              
           
          
            
            
              
 Anke:
 
But good luck. 
 
 
I need an example of how to work out this. Please help.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              
 Anke:
 
instrument (guitar, bass, ukulele, violin, ...)
 
 
Only guitar, not learning bass, violin or ukulele, so no bass, ukulele or violin
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              It hasn't been achieved yet currently, as I am working on other assignments as well. But you can try that out yourself and find other methods as well.
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
              
                Anke  
                
               
               
              
                  
                    October 20, 2022,  9:19am
                   
                   
              12 
               
             
            
              
I'm curious... but pretty sure it won't be successful. Anyway - as I said - "good luck". 
I'm a musician and would love something like this...  
             
            
               
               
              2 Likes 
            
            
                 
                 
              
           
          
            
              
                TIMAI2  
                
               
               
              
                  
                    October 20, 2022,  9:27am
                   
                   
              13 
               
             
            
              See this SO question/answers
             
            
               
               
              2 Likes 
            
            
                 
                 
              
           
          
            
            
              But what about Guitar notes? Pianos and guitar sounds have different style of soundings.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              But it is Python, and not Java.
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                TIMAI2  
                
               
               
              
                  
                    October 20, 2022,  9:33am
                   
                   
              17 
               
             
            
              You will be returning the frequency of the sound (if you get it working)
A middle C on a piano is the same frequency as a middle C on a guitar
             
            
               
               
              1 Like 
            
            
                 
                 
              
           
          
            
            
              I have very little idea about frequencies and all those things .. Please tell me how do you get the frequency? I apologize If I have asked many questions multiple times. Please guide me. 
             
            
               
               
               
            
            
                 
                 
              
           
          
            
            
              Any extension required, or we could do this via built-in blocks?
             
            
               
               
               
            
            
                 
                 
              
           
          
            
              
                TIMAI2  
                
               
               
              
                  
                    October 20, 2022,  9:50am
                   
                   
              20 
               
             
            
              You would need to create an extension