voice like a pilot...(

Status
Not open for further replies.

otomas

Member
Hello everyone
I am new to audio.
I have teensy 3.2 and the audio shield and I would like to change my voice to make it sound like aeronautical pilots, radio sound ...
Can anyone help me with this mini project?
 
Learn the wording, the slang and the tonality.
That's about it.
If you want that AM sound, a bandpass filter could do. Or a cascade of highpass and lowpass.
BTW: The bandwith of the audio signal is between 300Hz and 3kHz
Also, there is distortion, so the waveshape block may be needed and a bit of pink noise added
 
Hello
Thanks for answering...
I'm a novice and I have no idea what you are telling me you say ... wording, slang, tonality .... :(
Do you have an example from which I can start or follow?

thanks....
 
Pilots and ATC use specific procedure words and follow rules how conversations are established, followed and ended. There is no such thing like Hollywood's "over and out" for instance.
Also, there is a special way to pronounce words, to make them better understandable over this bandwidth-limited medium, while maintaining a reasonable speed. This may sound a bit like a monotone foreign dialect.
https://en.wikipedia.org/wiki/Aeronautical_phraseology
https://www.liveatc.net/
 
hi
Hello
I know the aeronautical world very well, I have been flying (in real and in virtual) for more than 20 years and I know the procedures and phraseology.

I have developed several plugins for x-plane. (.net, using teensy and arduino uno/mega)

my intention is to use teensy 3.2 and the audio shield so that my voice is heard as if it were speaking on the radio

thanks
 
Use the Teensy Audio Library. https://www.pjrc.com/teensy/td_libs_Audio.html
This as a starting point for the audio tool https://www.pjrc.com/teensy/gui/
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=126,160
AudioSynthNoiseWhite     noise1;         //xy=135,210
AudioMixer4              mixer1;         //xy=288,201
AudioFilterStateVariable filter1;        //xy=419,209
AudioFilterStateVariable filter2;        //xy=551,210
AudioSynthNoisePink      pink1;          //xy=552,293
AudioEffectWaveshaper    waveshape1;     //xy=691,210
AudioMixer4              mixer2;         //xy=710,301
AudioOutputI2S           i2s2;           //xy=871,299
AudioConnection          patchCord1(i2s1, 0, mixer1, 0);
AudioConnection          patchCord2(i2s1, 1, mixer1, 1);
AudioConnection          patchCord3(noise1, 0, mixer1, 2);
AudioConnection          patchCord4(mixer1, 0, filter1, 0);
AudioConnection          patchCord5(filter1, 1, filter2, 0);
AudioConnection          patchCord6(filter2, 1, waveshape1, 0);
AudioConnection          patchCord7(pink1, 0, mixer2, 1);
AudioConnection          patchCord8(waveshape1, 0, mixer2, 0);
AudioConnection          patchCord9(mixer2, 0, i2s2, 0);
AudioConnection          patchCord10(mixer2, 0, i2s2, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=132,42
// GUItool: end automatically generated code
Edit: I've made a workaround so this code can be imported in the buggy tool.
Editagain: No, the workaround is not stable. So here is the original code and a screenshot to rebuild the connections in the following post
 
Last edited:
thank you..
i need to make any special config o use any previous code o juste pasting the code in gui ?
thanks and sorry.... i m newbie... :(
 
Sorry for being a bit ignorant at the beginning. My partner used to chaff with imitating me in his comical way. Now I'd be happy to hear that once more.

Yes, just read the links I've posted. There is a nice tutorial as well.
Use the code and the image to rebuild the flow in the audio tool. If you click on the blocks, you get information on how they work. Also, look at the examples given in Teensyduino. I see no point in prefabricating the complete code for you, because then you would not learn.
If you have a specific question, I'll see if I can help.
 
Use the Teensy Audio Library. https://www.pjrc.com/teensy/td_libs_Audio.html
This as a starting point for the audio tool https://www.pjrc.com/teensy/gui/
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=126,160
AudioSynthNoiseWhite     noise1;         //xy=135,210
AudioMixer4              mixer1;         //xy=288,201
AudioFilterStateVariable filter1;        //xy=419,209
AudioFilterStateVariable filter2;        //xy=551,210
AudioSynthNoisePink      pink1;          //xy=552,293
AudioEffectWaveshaper    waveshape1;     //xy=691,210
AudioMixer4              mixer2;         //xy=710,301
AudioOutputI2S           i2s2;           //xy=871,299
AudioConnection          patchCord1(i2s1, 0, mixer1, 0);
AudioConnection          patchCord2(i2s1, 1, mixer1, 1);
AudioConnection          patchCord3(noise1, 0, mixer1, 2);
AudioConnection          patchCord4(mixer1, 0, filter1, 0);
AudioConnection          patchCord5(filter1, 1, filter2, 0);
AudioConnection          patchCord6(filter2, 1, waveshape1, 0);
AudioConnection          patchCord7(pink1, 0, mixer2, 1);
AudioConnection          patchCord8(waveshape1, 0, mixer2, 0);
AudioConnection          patchCord9(mixer2, 0, i2s2, 0);
AudioConnection          patchCord10(mixer2, 0, i2s2, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=132,42
// GUItool: end automatically generated code
Edit: I've made a workaround so this code can be imported in the buggy tool.
Editagain: No, the workaround is not stable. So here is the original code and a screenshot to rebuild the connections in the following post

Deleted User:

In the early design of my TeensyMIDIPolySynth (https://forum.pjrc.com/threads/60690-TeensyMIDIPolySynth?p=237404&viewfull=1#post237404), I ran into the same GUI bug. I found that if you throw in extra mixer(s) (as many as needed) to "sink" the unused low-pass filter outputs (e.g. using your layout, add mixer3_1 in the listing below, with patch cords 5 & 8), then you can bypass the GUI bug. In my final layout for the TeensyMIDIPolySynth, I eventually ended up using all of the filter outputs, so I did not need to make use of this workaround. Give it a try & see if it works for you (& maybe it will give some useful clue(s) to ultimately resolving the GUI bug !!) . . .

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1_1;         //xy=145,240
AudioSynthNoiseWhite     noise1_1;       //xy=145,290
AudioMixer4              mixer1_1;       //xy=315,240
AudioFilterStateVariable filter1_1;      //xy=460,240
AudioSynthNoisePink      pink1_1;        //xy=565,355
AudioFilterStateVariable filter2_1;      //xy=630,240
AudioMixer4              mixer2_1;       //xy=770,370
AudioEffectWaveshaper    waveshape1_1;   //xy=795,240
AudioMixer4              mixer3_1;       //xy=810,105
AudioOutputI2S           i2s2_1;         //xy=920,370
AudioConnection          patchCord1(i2s1_1, 0, mixer1_1, 0);
AudioConnection          patchCord2(i2s1_1, 1, mixer1_1, 1);
AudioConnection          patchCord3(noise1_1, 0, mixer1_1, 2);
AudioConnection          patchCord4(mixer1_1, 0, filter1_1, 0);
AudioConnection          patchCord5(filter1_1, 0, mixer3_1, 0);
AudioConnection          patchCord6(filter1_1, 1, filter2_1, 0);
AudioConnection          patchCord7(pink1_1, 0, mixer2_1, 1);
AudioConnection          patchCord8(filter2_1, 0, mixer3_1, 1);
AudioConnection          patchCord9(filter2_1, 1, waveshape1_1, 0);
AudioConnection          patchCord10(mixer2_1, 0, i2s2_1, 0);
AudioConnection          patchCord11(mixer2_1, 0, i2s2_1, 1);
AudioConnection          patchCord12(waveshape1_1, 0, mixer2_1, 0);
AudioControlSGTL5000     sgtl5000_1_1;   //xy=146,185
// GUItool: end automatically generated code

Mark J Culross
KD5RXT
 
Last edited:
Just to confirm, I was able to reproduce the problem with msg #6. If either patchCord5 or patchCord6 are present, it gives an error importing.

At first it appears nothing happened, but then clicking in the canvas makes the partially imported data appear.
 
Frank B has found a solution, see 1.52 Beta #4 thread.
https://github.com/PaulStoffregen/Au...078b88837cfabe

I've tested it with several projects that were not possible to import before the fix. Now they can be imported, modified and work as expected.
So even if it does cure the symptom of a bug hidden elsewhere, this fix does work and it makes the tool usable and useful at last.

@otomas
Is your project going on?

In the zip you find a new version of the file nodes.js which is part of the audio gui in the audio library. With this file, the error does not prevent re-import of code.
 
Last edited:
Just replied in this thread [url]https://forum.pjrc.com/threads/45216-Two-GUI-related-bugs[/URL]:
------------------------------------------------
Copied Paul's new committed nodes.js over the existing C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ gui\red\nodes.js but still got the "Error: TypeError: Cannot read property 'split' of null" popup when importing the lines from msg #3.
Using Chrome on Windows 7. I closed the browser completely, cleared the browser cache and opened it again. Same popup.
Arduino 1.8.12, Teensyduino 1.51.
------------------------------------------------

Not sure whether we should continue the issue in this thread or in #45216...

Regards,
Paul
 
Hm the website still delivers the old version.
Maybe wait some time (caching somewhere)

Edit:In Firefox it helped to press STRG+F5 (forced local cache to reload)
Edit: On English keyboards it might be CTRL+F5 ;)
 
I have attached an audio example of what I would like to achieve, but I don't know how or where to start, I have read and understand how to achieve the result.
 
To make that "tinny distorted AM radio sound," you need the following pieces in sequence:

1) The sound input.
2) A high pass filter to remove the rumble and microphone proximity bass. Set it at 12 dB/octave (2-pole) with the cut-off frequency at 300 Hz.
3) A compressor with a slow release setting, acting as an automatic gain control. Set it at +20 dB gain, 5:1 compression, -6dB trigger level, fast attack, slow release.
4) A distortion that wave shapes to saturation. Simple gain clipping may do it, but you'll probably want to use something slightly softer.
5) A low pass filter to remove the terrible high-end noise part of what the distortion introduces. Set it at 3-4 kHz cut-off, and 12 dB/octave (2-pole.)
6) Something to play the audio back out.

The specifics of how this will sound comes down to the parameters -- how much gain in the compressor? How steep filters? Where do you cut off? What's the wave shaping function for the distortion?
What I suggest is what I'd start with at a mixing board, and then tweak from there until it sounds like I want it.

How to build this in Teensy Audio?
Well, unfortunately, there is no compressor object built in.
You can kind-of fake it by using a Peak detector and an amplifier.


Code:
#include <Audio.h>

// GUItool: begin automatically generated code
AudioOutputAnalog        dac1;           //xy=615,943
AudioFilterStateVariable filter2;        //xy=616,827
AudioAmplifier           amp1;           //xy=618,580
AudioEffectWaveshaper    waveshape1;     //xy=618,701
AudioFilterStateVariable filter1;        //xy=626,333
AudioInputAnalog         adc1;           //xy=629,206
AudioAnalyzePeak         peak1;          //xy=780,472
AudioConnection          patchCord1(filter2, 0, dac1, 0);
AudioConnection          patchCord2(amp1, waveshape1);
AudioConnection          patchCord3(waveshape1, 0, filter2, 0);
AudioConnection          patchCord4(filter1, 2, amp1, 0);
AudioConnection          patchCord5(filter1, 2, peak1, 0);
AudioConnection          patchCord6(adc1, 0, filter1, 0);
// GUItool: end automatically generated code

You'll want to set the parameters of each object in your init() as per the description above, and then you'll want to detect the peak, and, as a first step, set the gain of the amp to "1.0 / (peak-value + 0.1)" once per buffer processing. This won't give you the right compressor response, but it's better than nothing.

Also, you'll want to set up the wave shaper to give a reasonable distortion signal with some kind of "rounded triangle" wave function.
 
Status
Not open for further replies.
Back
Top