|
@largeinsd wrote: 3 - create a new file with the byte order reversed
For PCM wave files, this will only work for 8 bit (and below) waveforms. For anything above, you want to reverse the samples not the byte order. For example, a 16 bit PCM waveform monophonic waveform takes two bytes per sample. You don't want to reverse the byte order within the sample but rather reverse the sample order themselves.
So for example say we have the following values for a 16-bit monophonic waveform:
Sample 1
128 - byte 1
64 - byte 2
Sample 2
78 - byte 1
241 - byte 2
To reverse these samples so that they play backwards, we reverse the sample order while leaving the byte order within the samples alone:
Sample 2
78 - byte 1
241 - byte 2
Sample 1
128 - byte 1
64 - byte 2
Make sense?
|
|
|
|
|
leslie,
makes perfect sense. swap the sample order, but preserve the byte order within.
though i don't understand what you're saying with "128 - byte 1" or "78 - byte 1". what are you getting at with the 128, 64, 78, 241.
thanks - @lg
|
|
|
|
|
@largeinsd wrote: though i don't understand what you're saying with "128 - byte 1" or "78 - byte 1". what are you getting at with the 128, 64, 78, 241.
Those were just random numbers I picked for the byte values within the samples.
|
|
|
|
|
ok, cool.
one other question: how is the data encoded for stereo?
thanks - @lg
|
|
|
|
|
@largeinsd wrote: one other question: how is the data encoded for stereo?
Stereo samples are interleaved. What that means is that the samples alternate between the left and right channels. So you have the bytes that make up an individual sample and the block which is made up of two samples, left and right:
( block 1 ) ( block 2 )
left, right, left, right, etc...
|
|
|
|
|
So reversing the samples to get sound backwards effectively switches left and right !
|
|
|
|
|
Luc Pattyn wrote: So reversing the samples to get sound backwards effectively switches left and right !
Switching left and right just switches the channels, so left becomes right and vice versa. I think I may be missing your point.
In the case of a stereo wave file, we'd want to reverse the blocks while leaving the sample order within the blocks the same.
|
|
|
|
|
To state it in a slightly different way, if you do what has been told so far
to play the sound backwards, you also will be switching left and right channels,
with probably is not be what you want.
|
|
|
|
|
Luc Pattyn wrote: To state it in a slightly different way, if you do what has been told so far
to play the sound backwards, you also will be switching left and right channels,
with probably is not be what you want.
Right. So when reversing a stereo wave file, you'd want to reverse the block order while preserving the sample order within the blocks.
|
|
|
|
|
how to plot a graph using any equation like Y=a(1+sinX) on window??
There Is Nothing Right & Wrong
|
|
|
|
|
What is the domain [0, 2pi] or [0,230] ??
What scaling will you use.
First thing I would do is model this in excel then use that model to code with. You can even add a chart in excel as well to get you head round it.
You need a scaling, this is 1 to 360....or .... 1 to 100 (which you use a x)
Then use a free chart plugin to map x to y
|
|
|
|
|
0 to 2pi
There Is Nothing Right & Wrong
|
|
|
|
|
Well, it's a big topic, However, I can suggest you to:
(1) Put a few constrints on the equation (i.e. continuity maybe helpful, any equation is a bit broad concept...).
(2) Compute the range of the plot (i.e. the rectangle having bounds {XMin, Ymin, XMax, YMax}, notice, YMin, YMax depend upon the X-range). This allows you to set up the proper tranformation from curve domain to the drawing area.
(3) Then you have just to sample a certain amount of points in the interval and connect them.
Each of the above points, I Know, requires further details, but again, it is a rather big topic.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
For x=startX+1 to endX
y1=a(1+sin(x-1))
y2=a(1+sin(x))
connect points: (x-1,y1) and (x,y2)
End
<pre>
<div class="ForumSig">Regards,
Arun Kumar.A</div>
|
|
|
|
|
Hi all!!
Is any1 kind enuf to help me out about password security while developing web applications.
any material
any password security algo
any link
kindly do help me
thanx in advance
|
|
|
|
|
have a look at Crypto API [^] or System.Security.Cryptography [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Have you tried google ?
What development platform are you using as this makes a difference.
|
|
|
|
|
thanx for concern
actually I am developing an e-commerce application in asp.net using c#.
During user registration process, password will be taken from textbox and will be stored in SQL Server DB. i want to do encryption while storing password in DB and algorithm is required here.
|
|
|
|
|
lastFarhi wrote: password will be taken from textbox and will be stored in SQL Server DB. i want to do encryption while storing password in DB and algorithm is required here
Generally, storing a password is bad.
Most people hash the password and store that in the database.
When the user logs in you take the password they give, hash it, and compare this hash to what is stored in the database.
Encrypting the password means you can decrypt it (recover it), encryption is 2-way.
Hashing the password is 1-way, you can't recover the password from the hash.
The SHA family are the most common (current) algorithms.
http://en.wikipedia.org/wiki/SHA-1[^]
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Have you tried looking at the Crytopgraphy Application Block within Enterprise Library. Why not download Entperise Library from MSDN and give it a go. Personally, I find the Crytopgraphy Application Block within Enterprise Library to contain more useful routines than what is available within in the .net framework.
|
|
|
|
|
has anyone marshalled the Intel math kernal library to managed code (aka C#)? An example would be excellent. Thx
|
|
|
|
|
These guys have made a wrapper around the MKL:
http://www.dnanalytics.net/doku.php
Might help?
|
|
|
|
|
Hey, I didn't know about this. Looks a bit new and incomplete but certainly interesting to get going with, and perhaps to contribute to.
Thanks.
|
|
|
|
|
|
Hi all,
I haven't had much luck but I was wondering if you would know a good way to take a value assgine it to x then draw a line with a random slope through that point and take two random points off that line.
Ideas
sudo code
code in your favorite lang
alllll welcome
i really need the help.
Thanks
|
|
|
|