Searching \ for '[PIC]: CSVD or other on PIC (compress audio)' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=audio
Search entire site for: 'CSVD or other on PIC (compress audio)'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: CSVD or other on PIC (compress audio)'
2001\11\18@232052 by Richard Sloan

flavicon
face
Anyone implemented any simple audio compression on a PIC, and good links out there, can not see much.
I would like to output stereo 44.1khz for 5 seconds or so but need to get my memory usage down from 1Mx8! (882k)

Does CVSD work only for voice, or can it do music? tones?

Richard.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\11\19@014058 by Jinx

face picon face
> Does CVSD work only for voice, or can it do music? tones?

CVSD works excellently for any sound. I use a now-obsoleted
DSP for sound reproduction. They are hungry little monkeys
though, and as you say it's easy to gobble up memory. I'm in,
or will be in, the same position as you. One of these days I'll
have to implement CVSD without the DSP as I use up the last
of those available. To keep the fidelity I'm used to I don't see
a way around using a lot of external RAM. The system of CVSD
I'm familiar with is 1-bit serial, which may be difficult to compress.
If it were 8-bit parallel there may be some hope

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\11\19@092153 by Gordon Varney

flavicon
face
Yes, CVSD will work for Music, but you will need 4X the niquist rate sampling. You can't get much smaller data storage
than CVSD, however CVSD is a companding algorithm. If you want an auto leveling type of music your ok. If you are
looking for a full range of sound levels you won't like the quality. Hence 4X sampling will help allot.

There are no know PIC, algorithms for CVSD. (I would love to have a copy)

Gordon Varney



{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\11\19@162319 by Russell McMahon

picon face
> > Does CVSD work only for voice, or can it do music? tones?
>
> CVSD works excellently for any sound. I use a now-obsoleted
> DSP for sound reproduction. They are hungry little monkeys
> though, and as you say it's easy to gobble up memory. I'm in,
> or will be in, the same position as you. One of these days I'll
> have to implement CVSD without the DSP as I use up the last
> of those available. To keep the fidelity I'm used to I don't see
> a way around using a lot of external RAM. The system of CVSD
> I'm familiar with is 1-bit serial, which may be difficult to compress.
> If it were 8-bit parallel there may be some hope


I would imagine (but I sometimes have an active imagination) that CVSD would
be quite easy to implement on any PIC with an A2D (depending of course on
desired audio bandwidth). For 5 kHz bandwidth (arguably better than an AM
radio station) a sampling rate of 10 kHz+ or 100 uS / sample is required.
Processing should be simple enough. Serial ROM access may be a bottleneck.

       RM

.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\11\19@175323 by Jinx

face picon face
> I would imagine (but I sometimes have an active imagination) that
> CVSD would be quite easy to implement on any PIC with an A2D
> (depending of course on desired audio bandwidth). For 5 kHz
> bandwidth (arguably better than an AM radio station) a sampling
> rate of 10 kHz+ or 100 uS / sample is required. Processing should
> be simple enough. Serial ROM access may be a bottleneck.
>
>         RM

The CVSD (Continuously Variable Slope Delta-Modulation) in the
DSP I use is a 10-bit sampler at up to 64kHz, although you can
speed the chip clock to increase (with no real audible benefit) the
sampling to 80kHz. The block diagram shows an Estimate Integrator
and Syllabic Integrator, which together find the difference between
samples. The difference is what is stored, not the absolute value of
the sample. Therefore you are already better off in memory consumption
than by storing the absolute value of the samples. 10-bit samples would
be awkward to store easily or economically so they are buffered and
compressed to 8-bit during recording and decompressed on playback.
If you look at the maths I'm sure you'd find a PIC is up to the job

In this DSP the comparisons and data output are accomplished in
h/w with a chip clock of around 800kHz. Typically a tape quality sound
needs around 128k x 8 for 10 seconds. The sampling can be done
at a much lower rate for speech to give a couple of minutes recording
time, which can be filtered to get a reasonable quality, comparable to
the ISD chips. The major difference is that the ISDs cannot, because
of the storage medium they use (AFAIK) be run fast enough to capture
mid- to high- fidelity sound like music. They have the attraction of being
easy to use though

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\11\21@132803 by Philip Galanter

flavicon
face
What DSP are you using and what is the part price?  Did you have to
write the DSP code, or is this a hardwired function of the chip?  Do
you know of any contemporary chips that might be similar?

thanks!  Phil

p.s. in the brief time I've been on this and similar lists finding an
alternative to the ISD chips seems to be a popular topic...without an
obvious response!

At 11:51 AM +1300 11/20/01, Jinx wrote:
{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\11\21@141835 by Jinx

face picon face
> What DSP are you using and what is the part price?

Both are now obsolete, and the price when they were alive was
around NZ$7. I considered getting in touch with Rochester (???), a
US company that takes the original manufacturer's masks and
makes new chips for you, but the time I think would be better
spent on developing a s/w alternative on a fast micro like PIC
or AVR. As the original parts were designed for DRAM (in those
days when power consuption was not the issue it is now and
micros were a glint in an engineer's eye) an obvious enhancement
is to design for the modern micro-power mega-SRAMs. Although
the circuit I use currently is a DSP/PIC hybrid and works very well, it
would be fairly easy to dispense with the DSP in a new design.
Having PCBs and DSPs to hand makes that unnecessary right now

> Did you have to
> write the DSP code, or is this a hardwired function of the chip?  Do
> you know of any contemporary chips that might be similar?

There is no coding, apart from a a couple of lines to send commands.
The DSP handles the rest. I would luuurve to find a replacement but
AFAICT there is nothing available in a single chip. Everything I've
looked at so far is at the "scruffy" end of the market (eg ISD) and is
good only for speech frequency bandwidth. For anything else the
sound is so treble-less I can't use them

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\11\21@175317 by Philip Galanter

flavicon
face
I am mostly a software guy, and I've done a lot of reading about PICs
but am just now getting my hands dirty.

I may end up using ISD's but I keep thinking there must be a better
way.  I need to build about 100 identical circuit boards, so every $
will add up.

I've thought about using a dedicated PIC which would just read sound
data from memory and send it out via PCM or a D2A chip...but most of
the memory chips for use with a PIC seem quite small.

One think I don't like the ISD's is the busy work it will take to
program 100  of them.  Storing sound data in 100 flash memory chips
seems a bit more elegant.

But how much memory can you really interface to a PIC?  And how much
will it cost?

Maybe the ISD turns out to be the crude but effective solution to the problem?

Phil


{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\11\21@190559 by Brent Brown

picon face
On the subject of voice recording etc, I'm looking at using a
PIC16F87x and 24C512 I2C EEPROM to playback voice samples. I
only need a few characters (possibly only one) like "A", "B," "C" etc,
os I think I will have enough memory to play with. I'm going to use
the PWM output for playback and try different sample rates/filter
networks etc to see what's good enough for this job.

For those wanting more storage the Atmel Serial DataFLASH chips
are worth taking a look at. Only need a handful of I/O lines. I got
some 2MByte ones for about NZ$22.00 (US$11.00). Haven't used
them yet as that project kind of stalled.

Sorry I don't have many ideas about compression, except perhaps
using an MP3 decoder chip and do the compression on a PC.

Brent Brown
Electronic Design Solutions
16 English Street
Hamilton, New Zealand
Ph/fax: +64 7 849 0069
Mobile/text: 025 334 069
eMail:  EraseMEbrent.brownspam_OUTspamTakeThisOuTclear.net.nz

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body



'[PIC]: CSVD or other on PIC (compress audio)'
2001\12\11@144639 by Richard Sloan
flavicon
face
We are a design house and have much experience in this field?

Can we be of assistance?

Richard Sloan

>>  I am mostly a software guy, and I've done a lot of reading about PICs
>>  but am just now getting my hands dirty.

>>  I may end up using ISD's but I keep thinking there must be a better
>>  way.  I need to build about 100 identical circuit boards, so every $
>>  will add up.

>>  I've thought about using a dedicated PIC which would just read sound
>>  data from memory and send it out via PCM or a D2A chip...but most of
>>  the memory chips for use with a PIC seem quite small.

>>  One think I don't like the ISD's is the busy work it will take to
>>  program 100  of them.  Storing sound data in 100 flash memory chips
>>  seems a bit more elegant.

>>  But how much memory can you really interface to a PIC?  And how much
>>  will it cost?

>>  Maybe the ISD turns out to be the crude but effective solution to the
>>  problem?

>>  Phil


>>  >  > What DSP are you using and what is the part price?
>>  >
>>  >Both are now obsolete, and the price when they were alive was
>>  >around NZ$7. I considered getting in touch with Rochester (???), a
>>  >US company that takes the original manufacturer's masks and
>>  >makes new chips for you, but the time I think would be better
>>  >spent on developing a s/w alternative on a fast micro like PIC
>>  >or AVR. As the original parts were designed for DRAM (in those
>>  >days when power consuption was not the issue it is now and
>>  >micros were a glint in an engineer's eye) an obvious enhancement
>>  >is to design for the modern micro-power mega-SRAMs. Although
>>  >the circuit I use currently is a DSP/PIC hybrid and works very well, it
>>  >would be fairly easy to dispense with the DSP in a new design.
>>  >Having PCBs and DSPs to hand makes that unnecessary right now
>>  >
>>  >>  Did you have to
>>  >>  write the DSP code, or is this a hardwired function of the chip?  Do
>>  >>  you know of any contemporary chips that might be similar?
>>  >
>>  >There is no coding, apart from a a couple of lines to send commands.
>>  >The DSP handles the rest. I would luuurve to find a replacement but
>>  >AFAICT there is nothing available in a single chip. Everything I've
>>  >looked at so far is at the "scruffy" end of the market (eg ISD) and is
>>  >good only for speech frequency bandwidth. For anything else the
>>  >sound is so treble-less I can't use them
>>  >
>>  >--
>>  >http://www.piclist.com#nomail Going offline? Don't AutoReply us!
>>  >email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

>>  --
>>  http://www.piclist.com#nomail Going offline? Don't AutoReply us!
>>  email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body








__________________________________________________________
The Mind Factory INC                Richard Sloan                       (613) 825-4758 phone                (613) 825-7758 fax
RemoveMErsloanTakeThisOuTspamthemindfactory.com

* Custom MP3 Development * Custom Smart Cards
* Electronic Manufacturing
* Hardware / Firmware / Software Design
* Schematic and PCB layout
* 8051, 68HC11, PIC, AVR
* MP3, FAT16/32, IR, IRDA, USB, X10, VIDEO, TCP/IP, LCD

* ALL PRICES QUOTED IN US$ UNLESS OTHERWISE NOTED

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


2001\12\11@152513 by Bob Ammerman

picon face
If anyone knows of _ANY_ software implementation of CVSD (for any machine)
for which source is available I would be EXTREMELY appreciative.

Bob Ammerman
RAm Systems

{Original Message removed}

2001\12\11@153718 by Scott Newell

flavicon
face
>If anyone knows of _ANY_ software implementation of CVSD (for any machine)
>for which source is available I would be EXTREMELY appreciative.

Doesn't sox have an option to handle CVSD files?  It's open source, so
you'd probably be able to dig something useful out of it..


newell

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\12\11@165738 by Jinx

face picon face
part 1 1981 bytes content-type:text/plain; (decoded 7bit)

> If anyone knows of _ANY_ software implementation of CVSD
> (for any machine) for which source is available I would be
> EXTREMELY appreciative.
>
> Bob Ammerman
> RAm Systems

This is the block diagram of a DSP I hope to emulate in s/w

In record mode, the input comparator is compared to the output
of the 10-bit DAC at the sample moment, and the output of the
comparator (0 or 1) is stored in RAM. The output of the DAC
can be monitored audibly, so that the sampling speed can be
optimised for length of sample vs fidelity. 12 seconds of audio
at tape quality (16kHz) can be stored in 1Mbit RAM. I've found
that with a slow chip clock and external filtering to remove
sampling alias it's possible to record 2 minutes of speech at
acceptable fidelity in 1Mbits

In playback mode, the 8-bit data stored in RAM is left-shifted
twice into a 10-bit register (the 2 LSBs are padded with 0s)
and fed into the Estimate Integrator & Syllabic Integrator. Here
it gets a little hazy, as overall the poor Japanese-English translation
is not very detailed. I quote - "The output of the D/A convertor is
produced by the estimate integrator and sillabic integrator based
on the previous sampling data value". The serial data stream is a
sequence of differences. For example, shorting the input (or holding
it at any DC level) produces stored values of $55 and $AA (or binary
01010101 and 10101010). What I have not been able to find are
satisfactory explanations of "Estimate Integrator" and "Syllabic
Integrator". Because the DSP is h/w only I assume that there is
some process inside that uses an RC set-up. If anyone has an
idea of whether this is a mathematical or engineering function I'd
love to know about it

I'm confident that the impressive functions of a 15 year old DSP
running at typically 600kHz-700kHz can be implemented on a
mid-range PIC at 20MHz. The 10-bit DAC may need to be external


part 2 3851 bytes content-type:image/gif; (decode)


part 3 136 bytes
--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\12\11@170947 by Dal Wheeler

flavicon
face
I remembered a circuit cellar article on CSVD a few years ago (1993).
http://www.dtweed.com/circuitcellar/caj00033.htm#473

I'll look at my past issues and if it's of interest to you I can scan & send
you a copy.

-Dal
{Original Message removed}

2001\12\11@202327 by Jinx

face picon face
After wondering about the compression procedure of the audio
DSP, I got to thinking "Eh ?". If each block of 8 bits of data is
expanded to 10 bits by left shifting and 0 padding, then are the
functions of the Estimate and Syllabic Integrators to sense trends
in the waveform and replace the LSB "00" bits with fill-in values ?
It's the only way I can see to get 10-bit quality sound from 8 bits
of data. 8 bit audio does not sound very nice at 16kHz (which is
originally sampled at 64kHz), and the DSP's output is definitely OK

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservEraseMEspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\12\11@211215 by Bob Ammerman

picon face
CVSD is a scheme that uses 1-bit samples at a relatively high sample rate.

Rather good quality voice can be had at 32 kbits/sec. 16 kbits/sec is quite
usable.

CVSD stands for "Continuously Variable Slope Delta" modulation. It works by
having the transmitter and receiver both maintain a model of the signal. If
the instantaneous value of the signal is higher than the transmitters
understanding of what the receiver will think it is (based on tracking the
model), the transmitter will send a zero, otherwise it will send a one.
Whats makes it 'Variable' is that the step size is increased whenever the
the transmitter finds itself sending a sequence of more than a couple of
consecutive zeros (or ones), which indicates the transmitted bit stream
isn't 'keeping up' with the changes in the signal. When the signal isn't
repeated zeros (or ones) then then step size is reduced to hopefully allow
the ouput to track small signals more acccurately.

Bob Ammerman
RAm Systems


{Original Message removed}

2001\12\11@225718 by Jinx

face picon face
> isn't 'keeping up' with the changes in the signal. When the signal
> isn't repeated zeros (or ones) then then step size is reduced to
> hopefully allow the ouput to track small signals more acccurately

The DSP outputs a "dithering" stream of 01010101 when the input
is unchanging. A simpler scheme would imply that 00000000 would
be outputted, and I wonder if this is a result of the expansion of the
stored data as it goes through the integrators and the DAC. As you
say, the slope of the wave, whether up or down, is indicated by the
number of consecutive 1s or 0s. So the question still is (for me any
way) what exactly is the definition of those two integrators and from
there, how would their functions be accomplished in s/w ? I have
asked the list this some time ago and haven't had any bites, so I'm
assuming that no one knows

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspammitvma.mit.edu with SET PICList DIGEST in the body


2001\12\12@022825 by Russell McMahon

picon face
> > isn't 'keeping up' with the changes in the signal. When the signal
> > isn't repeated zeros (or ones) then then step size is reduced to
> > hopefully allow the ouput to track small signals more acccurately
>
> The DSP outputs a "dithering" stream of 01010101 when the input
> is unchanging. A simpler scheme would imply that 00000000 would
> be outputted, and I wonder if this is a result of the expansion of the
> stored data as it goes through the integrators and the DAC. As you
> say, the slope of the wave, whether up or down, is indicated by the
> number of consecutive 1s or 0s. So the question still is (for me any
> way) what exactly is the definition of those two integrators and from
> there, how would their functions be accomplished in s/w ? I have
> asked the list this some time ago and haven't had any bites, so I'm
> assuming that no one knows


1.    Normal" telephone systems convert from 8 bits to "more" bits using a
companding curve which fits the available 8 bits to a curve which would take
more bits to describe. Lopwer amplitude variations have more samples mapped
while higher amplitude values are "sparse"  (AFAIR). Their are two main
curves. CCITT use "mu law" and US uses "A law" - I guess this means US and
Europeans have different ear characteristics :-).

2.    I belive there is a Master's thesis (or ? PhD by Chris Bowman in Ak
engineering school library around ? 1980 covering this in some detail.
Liable to be much on web too though.


3.    The CVSD laws can be made up to suit but basically the system
maintains a certain step size for a certain number of samles then, if the
curve is going in the same direction for N samples it increases (typically
doubles?) the value of each step. As soon as it stops consistently going in
the same direction it reduces the value of each step again using some law.
As long as both ends follow the same law all is well.
Suimpler - if the converter has chased the input for N steps and not caught
it then it increases the step size and continues. If it has still not caught
it after M more steps it will increase again etc. The steps at a given step
size do not have to be linear - ie if it gets VERY behind it may decide to
double the step size every time until it overshoots in style. How it then
"ramps down" is also not simple..

Having  a 00000 stream would cause the output to drive one way continually.
With a 1 bit output it will always be chasing its tail and hunt +/- one bit
around the proper value..

eg say we say that step size is 1 for 4 samples in the same direction then
doubles and that it will halve every time it has NOT gone on the same
direction for 2 samples. (I'm making this law up but it may be OK)
1 means go up
0 means go down

So
Input    Signal     Result
                               0
1            1                1    )
1            0                0    ) Correct value so 1010 hunting occurs
1            1                1    )
2            1                2        Step up by 1 is able to be tracked
3            1                3
3            0                2  ) hunts again
3            1                3
3            0                2
8            1                 3 ) big step so ramp up - by 1 at first
8            1                 4
8            1                 5
8            1                6        4 x 1's sent so step size now doubles
9            1                8        Goes up 2
9            1                10       Goes up 2
7            0                 8        Down 2
5            0                6        <-- ****
5            0                4
5            1                6        Changes to 1 step after this 2 step
up
3            0                5
3           0                4
3           0                3
3            0                2    Oh dear - just got there and now our down
step has doubled ! -)

etc -

I see I didn't quite follow my laws after <-- **** but the idea will eithe
rbe clear enough or totally obscure by then.

In the absenmce of real algorithms you can have endles hours of fun
simulating this in a spreadsheet or in high level code with graphical
output.
I find Excel is often good for this sort of simulation as it is easy to see
patterns in the data etc.




              Russell McMahon

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu


2001\12\12@081813 by Vasile Surducan

flavicon
face
On Tue, 11 Dec 2001, Richard Sloan wrote:

>
>  >>  I am mostly a software guy, and I've done a lot of reading about PICs
>  >>  but am just now getting my hands dirty.
>
  So, a hardware guy will dirt his brain then, by writting software for
pics?

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...