Maker Pro
Maker Pro

Simple audio encoding... how?

Hi,

I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.

It's easy enough to clip the audio to get the right repitition
frequency, but I'm not sure about the amplitude encoding. Something
simple with 555s or similar would be great...

Ideas welcome.

Thanks

Mike
 
P

Phil Allison

Jan 1, 1970
0
I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.


** That is a total self contradiction.

Piss off you clueless fucking ass.





... Phil
 
M

MooseFET

Jan 1, 1970
0
Hi,

I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.

It's easy enough to clip the audio to get the right repitition
frequency, but I'm not sure about the amplitude encoding. Something
simple with 555s or similar would be great...

This almost works:

I assume that this is a one frequency at a time sort of thing.
You already know how to make a square wave with a comparator.

(1) Sync rectify the input

(2) Filter the rectified to make smoothish voltage.

(3) Use a few more comparators to make a voltage dependent oneshot.

The pulse width and not the duty cycle is controlled by the signal
amplitude.
 
O

oopere

Jan 1, 1970
0
Hi,

I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio,

This could be FM, if you mean that the repetition frequency is
proportional to the instantaneous value of the audio signal...
and the pulse width is proportional to the amplitude.

This could be PWM...

So, you want _simultaneous_ FM and PWM? Why?
It's easy enough to clip the audio to get the right repitition
frequency, but I'm not sure about the amplitude encoding. Something
simple with 555s or similar would be great...

It seems your question needs some further clarification.

Pere
 
This could be FM, if you mean that the repetition frequency is
proportional to the instantaneous value of the audio signal...


This could be PWM...

So, you want _simultaneous_ FM and PWM? Why?

Good question. The resultant FM & PWM pulse train will be used to gate
a high frequency pulse train, probably in the order of 400kHz. I want
a recognisable form of the original audio, very much NOT hi-fi but
recognisable none-the-less, to be recoverable from the final, gated,
high-frequency pulse train.
It seems your question needs some further clarification.

My bad - I should have been more explicit - part of the issue is that
I wasn't too sure of the final requirement myself.

many thanks for all your comments so far - very helpful.

Assuming now that I'm after FM & PWM, and I'm not worried too much
about nyquist or hi-fidelity, can anyone recommend a simple approach
using say a PWM controller like the TL494 or whatever?

Cheers
 
B

BobG

Jan 1, 1970
0
You can sort of understand the output of audio fed into a zero
referenced comparator... sort of a 1 bit digitizer that roughly
follows the zero crossings, so it has a lot of fundamental in it.
 
E

Eeyore

Jan 1, 1970
0
I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio,

Audio doesn't have a 'repetition fequency'. Do you mean the frequency of
the audio ? There's a problem there, music isn't a single frequency.
Squaring it sort of works I suppose except you'll see mostly LF content
as a rule.

and the pulse width is proportional to the amplitude.

Averaged amplitude ? If so what time constant ?

What are you actually trying to do ?

Graham
 
D

Doug B.

Jan 1, 1970
0
You can sort of understand the output of audio fed into a zero
referenced comparator... sort of a 1 bit digitizer that roughly
follows the zero crossings, so it has a lot of fundamental in it.

If you can live with a course-grained view of your audio how about
feeding it into a network of comparators similar to the level meter
here? http://ourworld.compuserve.com/homepages/Bill_Bowden/page11.htm#vumeter.gif.

Hook each output to a resistor in a voltage divider network and use
the resulting voltage to control the PWM function of a 555. See here
http://www.fairchildsemi.com/ds/LM/LM555.pdf for an idea.

doug
 
R

Rich Grise

Jan 1, 1970
0
I want to encode a mono audio signal into a digital squarewave where the
repitition frequency is the same as the instantaneous incoming audio, and
the pulse width is proportional to the amplitude.

It's easy enough to clip the audio to get the right repitition frequency,
but I'm not sure about the amplitude encoding. Something simple with 555s
or similar would be great...
Boy! You've sure accumulated a bunch of crap anwsers! Ignore them. Send
the audio to a zero-crossing detector, and log the time interval between
zero crossings.

Send the resulting data stream to any ol' buffer, and it will sound
surprisingly accurate, but with a lot of high frequency artifacts, which
should be fairly easy to filter out.

Back before the days of sound cards, I heard a herald trumpet fanfare on
my computer's own speaker on some vendor's ad CD.

Good Luck!
Rich
 
P

Phil Allison

Jan 1, 1970
0
<[email protected]
"Phil Allison"


** DON'T YOU DARE TRIM THE CONTEXT !!

** That is a total self contradiction.

Not really - the resultant pulse train is frequency modulated by the
audio stream, and width modulated by the amplitude.


** Makes no sense whatsoever.

There is no such thing as a "digital square wave".

An "audio signal" contains multiple frequency and amplitude components.

Piss off you clueless fucking ass.

** Why don't you get totally fucked -


You IDIOTIC DAMN TROLL.




....... Phil
 
J

Jamie

Jan 1, 1970
0
Hi,

I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.

It's easy enough to clip the audio to get the right repitition
frequency, but I'm not sure about the amplitude encoding. Something
simple with 555s or similar would be great...

Ideas welcome.

Thanks

Mike
SWP/VSM
Space width modulation/Variable Space Modulation.

A known trick used in simply things like RC control
toys.. some types of remotes etc.

Pulse rate is detected at the receiver to select a channel
of control while the duty cycle (width) is used for proportional
control of that channel.

for basic application of, use a PIC/AVR or what ever to sample
a complete transition onto the start of the next. Sample the time
window as the frequency and the duty cycle as the proportional scale.

Have a good day! :)
 
Boy!  You've sure accumulated a bunch of crap anwsers! Ignore them. Send
the audio to a zero-crossing detector, and log the time interval between
zero crossings.

Send the resulting data stream to any ol' buffer, and it will sound
surprisingly accurate, but with a lot of high frequency artifacts, which
should be fairly easy to filter out.

Back before the days of sound cards, I heard a herald trumpet fanfare on
my computer's own speaker on some vendor's ad CD.

Good Luck!
Rich

I think Eeyore had the right answer. You only get one frequency with
this scheme.

Probably the PC trumpet sound you heard was done via PWM. The early
voice synthesis chips used this technique.
 
<[email protected]
 "Phil Allison"

** DON'T  YOU DARE  TRIM  THE...

Indeed - as I mentioned elsewhere, I'm not after hi-fi - LF components
only would be fine.
**  Why don't you get totally fucked -
My. Aren't we angy! Limited command of the vernacular too...
 You   IDIOTIC   DAMN     TROLL.
Medication, Phil. Don't forget the medication!

In comp.os.vms, years ago, we had a similar nutter by the name of Carl
Lydick (look him up). He imploded and died of a heart attack or drug
everdose (whatever). Noone cared...

Cheers!
 
Boy!  You've sure accumulated a bunch of crap anwsers! Ignore them. Send
the audio to a zero-crossing detector, and log the time interval between
zero crossings.

Send the resulting data stream to any ol' buffer, and it will sound
surprisingly accurate, but with a lot of high frequency artifacts, which
should be fairly easy to filter out.

Back before the days of sound cards, I heard a herald trumpet fanfare on
my computer's own speaker on some vendor's ad CD.

Thanks for the help. It's appreciated - I'll try this approach and see
what happens. Not being an EE, it's sometimes tricky knowing where to
start. I'm happier with s/w than h/w...

I've got an AVR in the circuit - I'l also try digitising the stream
with a free-running ADC (8 bits would be fine), using the zero
crossing to determine the pulse interval, and take the peak amplitude
in the interval to determine the pulse length. Though this is crude,
it should give me roughly what I need. I could always perform a faily
short FFT (say 1024 bit) on the input stream, extract the fundamental/
peak energy frequency and its power, and use that, though in this
instance it may be overkill...

Many thanks
 
J

Jasen Betts

Jan 1, 1970
0
Hi,

I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.

suppose your audio cosists of a 1Khz sine wave as 0.5V
superimposed with a 3.141 khz sine wave at 0.321v

what should the "square wave" look like?
 
P

Phil Allison

Jan 1, 1970
0
<[email protected]>

"Phil Allison"


** DON'T YOU DARE TRIM OUT THE CONTEXT !!

YOU CRIMINAL PSYCHO PILE OF DOG SHIT



Indeed - as I mentioned elsewhere,


** TOTAL BOLLOCKS you ever did.


YOU CRIMINAL PSYCHO PILE OF DOG SHIT



** Why don't you get totally fucked -

My. Aren't we angy!


** Autistic, lying, bullshitting, fuckwit, PITA scum like

YOU - need shooting.

But I favour a much slower and more painful solution.




...... Phil
 
P

Phil Allison

Jan 1, 1970
0
"Jasen Betts"
[email protected]
suppose your audio cosists of a 1Khz sine wave as 0.5V
superimposed with a 3.141 khz sine wave at 0.321v

what should the "square wave" look like?


** Don't bother -

the OP is a retarded & totally autistic fucking nut.




...... Phil
 
P

Phil Allison

Jan 1, 1970
0
I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.


** Wot insane, pseudo technical, verbal diarrhoea.

At very best.

Demented ravings of a congenitally autistic, narcissistic freakoid is what
it really is.

DO NOT ANSWER THIS TROLL !!



..... Phil
 
P

Phil Allison

Jan 1, 1970
0
I want to encode a mono audio signal into a digital squarewave where
the repitition frequency is the same as the instantaneous incoming
audio, and the pulse width is proportional to the amplitude.


** Wot insane, pseudo technical, verbal diarrhoea.

At very best.

Demented ravings of a congenitally autistic, narcissistic freakoid is what
it really is.

DO NOT ANSWER THIS TROLL !!




..... Phil
 
Top