Musical Steganography On a Pico

Posted on
  • Musical Steganography

    This uses a Pico with PWM outputs connected to a point using 10 k resistors. The point connects to ground through a parallel combination of a 10k resistor and 1 1.0 uf Capacitor.
    An isolated amplifier input is connected beween the point and ground.
    A USB microphone and Audacity was used to record the resulting music link is here:



    1 Attachment

  • Oops

    The Rests in the melody seemed to be missing. This is the fix. Relocate the getTime().{
    // console.log(note,this.Spkr);
     if (this.onoff>0) return;
     var octave=Math.log(2);
     var halftone=octave/12;
     this.start=getTime(); //moved this from below
     if(note===null)return; // a rest
     var tone=Math.exp(note*halftone);
     this.freq(261.63*tone); //C4 Middle C Midi note 60
    // this.start=getTime(); //move this from here
    };//end play
  • Thanks for posting this up! I kind of wish I was more musical - I think there's a lot of fun stuff you can do with Espruino.

    Just to add - if you're using a piezo speaker then you can connect it between two PWM outputs to get two different frequencies at the same time. Obviously what you've done is much better for more channels or an amplified output though!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Musical Steganography On a Pico

Posted by Avatar for ClearMemory041063 @ClearMemory041063