• Software
  • RE: Vocoders Galore! Oh and Bela too! Send rations...

Hello,

A while back there was a person chatting w/ me on this forum about the vocoder.cpp file.

I have been reading over the file recently. I read the script, the README.md, and looked over the preamp connections that need to be made to handle this specific instance of music domination!

Anyway, I can build it. This is not an issue. The preamp is easy to build but...

1⃣ Do I use Bela hardware pins to handle the analog like stated in the .png photo of the vocoder example?

2⃣ Where would my other two connections go? For instance, I see a couple outputs and some inputs.

I know this is childlike to not understand to you all but...

I want to make sure I do not get any connections misconfigured to hurt the hardware.

Seth

alt text

    maybe not an answer to your questions at all, but is that included schematic supposed to be the preamp?
    because that schematic contains no amplification whatsoever.
    i would just expect it to add a certain bias voltage to the signal (about 2.2v, actually.)

    i'm not sure i understand your questions, tbh.

    silver2row Do I use Bela hardware pins to handle the analog like stated in the .png photo of the vocoder example?

    the idea is to run the 'main' carrier audio through Bela's dedicated audio inputs.
    in this .png, the modulating signal goes on one of the analog pins. i might be wrong, but i believe the resolution there is lower than the audio channels.
    i should think removing the pass-through channel (audio CH0:in) in favor of running the modulator through that audio channel could also be an option. i would think you'd no longer need the schematic in the lower right corner.

    silver2row 2⃣ Where would my other two connections go? For instance, I see a couple outputs and some inputs.

    what other two connections?

      Remork maybe not an answer to your questions at all, but is that included schematic supposed to be the preamp?
      because that schematic contains no amplification whatsoever.
      i would just expect it to add a certain bias voltage to the signal (about 2.2v, actually.)

      Yup there is no amplification there. That is just a biasing circuit to AC-couple the audio going into an analog in. I'd suggest using 3.3V instead of 5V (as it's less noisy) and use 2k7 instead of 5k, obtaining about 1.95V at the midpoint of the resistor divider, which is close enough to the ideal value of 2.048V.

      silver2row 1⃣ Do I use Bela hardware pins to handle the analog like stated in the .png photo of the vocoder example?

      yes, those will be the Bela analog inputs.

      silver2row 2⃣ Where would my other two connections go? For instance, I see a couple outputs and some inputs.

      It would seem that Audio CH1 OUT and CH0 OUT are the audio out of Bela, those on the white molex-like connector labelled OUT. You'll plug your headphones or external speaker in there.

      As for Audio CH1 IN and CH0 IN , those are the audio inputs, which are next to it. You'd plug your violin or other source in there. Note that CH0 (left) - according to the diagram - is wired as a pass-through: the audio is not processed or modified, it is simply passed to the output. You would therefore want to use CH1 (right) for the signal to be processed, or modify the code so that it sums both input channels and outputs the same signal to both outputs. Or, again, use the Audio CH0 (Left) channel for the modulator channel instead of the Bela analog pint 6 IN, so you avoid the need for the above circuit altogether.

        Hello,

        Thank you guys. I will review this effort from you knowledge on your posts.

        ...

        I should get it up and running soon.

        Seth

        The audio pass-through channel is shown in the diagram simply to make it obvious it is not used by the vocoder. This diagram does not show you how to make connections -- it only shows you how each interface on the Bela is being used by the code and then gives you a hint (in schematic form) about how you might connect an audio signal into ADC Pin 6.

        It was designed to be ported easily into a system in which CH0 is used for other purposes, and I needed a dedicated mic input for the vocoder.

        If you don't intend to use the second audio channel for other purposes then it will be easier to use CH0 for the mic and CH1 for the carrier.

        Here is how you change the code for that in render.cpp, code below starts at line 93

        	for(unsigned int n = 0; n < context->audioFrames; n++) 
        	{
        		//vox[n] = analogRead(context, n/gAudioFramesPerAnalogFrame, gAnalogVoxChannel);
                        vox[n] = ch0[n];  //here you take voice "vox" input from ch0 instead of adc
        		.
                        .
                        .
                }

          ryjobil

          Okay...I need to get some books on these subjects. I am in over my head. I am sorry for trying to make things work when I know too little currently.

          Seth

            a month later

            Remork and ryjobil and giuliomoro ,

            Okay...I got a few books on the subjects at hand. I have been studying!

            ...

            I know some about hardware so far, i.e. so I am not completely blind to the subjects of putting hardware together for circuitry. Outside of those ideas, I found some other libraries that have nothing to do w/ Bela and C++. So, I will keep those ploys to a minimum when discussing things in the chat/forum.

            ...

            Okay, giuliomoro , I will look into making the 'preamp' circuit or what you all are describing as a biasing circuit. 2k ohms instead of 5k ohms resistor. Got it and I will use 3.3v instead of 5v since we are dealing w/ the BBB w/ respect to the processor and pin outputs.

            So, I think I got it so far. Just doing a bit of cheating here, I am going to order a cheap, analog distortion pedal for making low treble, staticky noises blare out of my 15w amp. Ha. My tiny amp never knew what hit it!

            Seth

            P.S. I forgot to show off the info. on the Open Source Music Theory. So, here: https://viva.pressbooks.pub/openmusictheory .