I want to transform my voice into robot voice( ex : goliath voice of starcraft game) using SoX library.
I found the following sequence for robot voice on the web,
but it doesn't make robot voice.
Overdrive 10
echo 0.8 0.8 5 0.7
echo 0.8 0.7 6 0.7
echo 0.8 0.7 10 0.7
echo 0.8 0.7 12 0.7
echo 0.8 0.88 12 0.7
echo 0.8 0.88 30 0.7
echo 0.6 0.6 60 0.7
What effects are needed to make robot voice?
Could you tell me a sequence of effects and options?
Thanks in advance.
To implement the settings the OP had found, all you need to do is to type thusly:
play INPUTFILE overdrive 10 echo 0.8 0.8 5 0.7 \
echo 0.8 0.7 6 0.7 echo 0.8 0.7 10 0.7 echo 0.8 0.7 12 0.7 \
echo 0.8 0.88 12 0.7 echo 0.8 0.88 30 0.7 echo 0.6 0.6 60 0.7
I don't know anything about Star Trek, so I can't say if it fits the bill in that regard, but it produces a thin metallic, clearly alien voice.
I also played around a bit trying to recreate the Dalek voice (yes I know, not really robots, but what a voice!). As luator noted, for a properly robotic sound you'd use some text-to-speech software, so I implemented that as well:
say -v Albert -o exterminate.aiff --data-format=BEI16#44100 \
exterminate, exterminate, exterminate!
play exterminate.aiff stretch 1.2 133.33 lin 0.2 0.4 \
overdrive 30 30 echo 0.4 0.8 15 0.8 \
synth sine fmod 30 echo 0.8 0.8 29 0.8
The say command will of course only work in OSX, but there might be other, and hopefully better solution out there. All the Apple voices have a pretty heavy american accent, it just doesn't sound right when coming from a Dalek.
The stretch option is purposely badly implemented, especially the window length of 133ms has a really good effect. Overdrive gives a lot of nice non-linear distortion. I read that in reality the Dalek voice is created by the use of a Moogerfooger ring modulator using a 30Hz carrier tone, and that's essentially what I've done with the synth sine fmod 30 option. On top of that a few moderately short echoes has been added, just to flesh it out a bit.
Edit:
I've found out that the ring modulation was done by a VCS 3, rather than a Moogerfooger, at least in the early days. And the 30Hz carrier wave was supplied by a pre-recorded tape loop.
BBC Radiophonic Workshop
Also, the digital implementation in SoX is much cleaner that what you get in an analogue implementation with diode distortion. The pre modulation overdrive in the above code goes some way to remedy this, but for a more authentic effect a digital model, like the one created by Julian Parker, can be used.
Related
I am just in the beginnings of learning how to make vtk files. I was trying to start really simple and just made a 1D structured points vtk file. Below is an extremely simple attempt:
# vtk DataFile Version 2.0
Vis Project Data
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 2 1 1
ORIGIN 0 0 0
SPACING 1 1 1
POINT_DATA 2
SCALARS phi float 1
LOOKUP_TABLE default
0.1
0.2
However, whenever I try to load in the file on paraview I get the error "Incorrect Dimensionality"
This is probably a really stupid question but I will be forever grateful for an answer.
Thanks!
kitty#mypad:~$ awk 'BEGIN{for(i=0.01;i<=0.1;i=i+0.01) print i}'
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
kitty#mypad:~$ awk 'BEGIN{for(i=0.01;i<=0.2;i=i+0.01) print i}'
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
0.11
0.12
0.13
0.14
0.15
0.16
0.17
0.18
0.19
you see, for i<=k, when k is 0.1, it produces as expected, but when k is 0.2, or 0.3, blabla, the last number (0.2 or 0.3) is not produces
why?
Floating point imprecision. Neither 0.1 nor 0.2 nor 0.3 can be represented exactly by a finite binary float -- only fractions with powers of two in the denominator can (up to a point) -- so awk is doing its calculations with approximate values. Sometimes these will be a little larger than what you expect, sometimes a little smaller. When they are a little larger, the test i <= 0.2 is false an iteration earlier than it would otherwise be.
The usual way to deal with this is to use a small epsilon to offset it, i.e.
# v-- here
awk 'BEGIN{for(i=0.01;i<=0.2+1e-9;i=i+0.01) print i}'
Note that the epsilon value should be so chosen that it is small enough to not fudge the results but large enough to offset the floating point rounding error. In this case, that means that it should be much smaller than 0.01 and, assuming ieee-754 doubles, not smaller than, say, 0.2 * 1e-12.
The reason for the latter is that because of the finite mantissa of a floating point, at some point adding a very small epsilon to a number does not change its value even though the epsilon is not zero. For example, I get
$ echo | awk '{ print 0.2 + 1e-30 == 0.2 }'
1
The estimation of a good epsilon value is not trivial and highly dependent on the calculation in question, so it is difficult to give a general answer to the follow-up question.
Keeping in mind that this pound of salt has to be taken with such recommendations: for simple comparisons of the results of simple calculations like this, you'll want to take no less than something on the order of, say, value * 1e-12 for calculations with double-precision floats (which is what you'll usually have) or value * 1e-5 for single-precision floats. This is because the mantissa of a double-precision float in ieee-754 (which everyone uses) is 53 binary digits long, which correlates roughly to 16 decimal ones, whereas the single-precision float has 24 binary/7 decimal. You want to stay safely away from that margin by two or three orders of magnitude.
For complex calculations, I have no general advice. Sometimes rounding errors accumulate, so a larger epsilon may be required to offset them. In some calculations -- for example numeric differentiation through a difference quotient -- what the best epsilon value would be depends on values you do not know before calculating the quotient, since you have to consider the effects of catastrophic cancellation when subtracting two floating point numbers in the numerator against the mathematical implications of a large secant step. In such cases, you need an understanding of both floating points and the problem you're working on.
To get an understanding of the way floating points work and what to expect of them, this is as good a place to start as any.
How do I smooth the data presented in the form x(y)? Gnuplot smoothing function of to invalid handles such cases.
As an example:
File(T-L.dat):
0.00 0.0
0.10 0.1
0.15 0.2
0.40 0.3
0.60 0.4
0.50 0.5
0.60 0.6
0.40 0.7
0.15 0.8
0.10 0.9
0.00 1.0
What I want.
Gnuplot session:
knkd#SCP71:~/MEAS/HEAT$ gnuplot
G N U P L O T
Version 4.6 patchlevel 4 last modified 2013-10-02
Build System: Linux x86_64
Copyright (C) 1986-1993, 1998, 2004, 2007-2013
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'wxt'
gnuplot> plot "T-L.dat" with lines
What I have.
Add smooth:
gnuplot> plot "T-L.dat" with lines smooth csplines
Result not good too (only 2 links, sorry).
Other features also not give the result that I wanted to.
But really I need a spline.
Correct, gnuplot can smooth with splines only data of the form y(x). For this, the data is rendered monotonic in x before smoothing it. You data is symmetric with respect to y, this is why you get a straight line as result of the smoothing.
In order to smooth your data with respect to y, you must first exchange the axes and save the result of the smoothing to a temporary file. This is then plotted with the correct axis selection:
set table 'T-L-smoothed.dat'
plot 'T-L.dat' using 2:1 smooth csplines
unset table
plot 'T-L-smoothed.dat' using 2:1 with lines, 'T-L.dat' with points pt 7
I need to prepare such diagrams:
I think it's quite intuitive how to read this diagram and this is why I want to create a few of them for my project.
I am quite confused how to create them efficiently; I've painted the one above in Paint just to quickly visualize my idea and it took too long imo. Moreover the time axis is not accurate.
I have precise data with event times (eg. loading start in process 1, loading end in process 1, algorithm start in process 2 etc.) e.g.
Process 1:
00.0 - 40.0 - Loading
40.0 - 45.0 - Preparing and launching process 2
45.0 - 50.0 - Preparing and launching process 3
50.0 - 90.0 - Sleep
90.0 - 95.0 - Joining process 2
...
Process 2:
45.0 - 90.0 - Algorithm execution
...
How to generate such timeline diagrams?
I am using MS Windows 7 and have Office 2010 installed, but am willing to use anything that gets the job done..
Efficiently? Can't be done. But once you get it setup, it's not too bad. They key is laying out your data appropriately. And it won't be just your data. Every red bar is a piece of data, obviously. But the blank spaces aren't really blank, they're invisible bars against a white background.
The base chart will be a stacked bar chart. Process 1 might have data that looks like
39 1 5 1 5 40 2 135 10 1 10
And those would alternate red and white. What will probably be better is to get rid of the "1" data points and use white gridlines that cross through the data (or error bars or something like that).
See http://dailydoseofexcel.com/archives/2012/02/10/income-statement-waterfall-chart/ for an example of a waterfall chart. It's not identical to your situation, but it uses a lot of the same techniques.
Also, Peltiertech has some waterfall tutorials, like http://peltiertech.com/WordPress/excel-waterfall-charts-bridge-charts/
Basically, use a stacked bar chart:
To explain all the steps in detail would be a nightmare but in outline, the data is roughly as shown A1:H4. Format the data series white where required to blend into the background. Add data labels and change their text as required ('merge 1' etc).
I cheated and drew lines (eg within 'Loading') and formatted them white but extra 'connectors' of 1 ms should serve (and would then scale, unlike the drawn lines). Adjust the separation and height of the bars with Series Options.
Edit:
The column labels more-or-less match up with #Jon Peltier but are not important here. They can be taken as merely increments in order. Based on the more specific values provided by comment:
I'm now gonna plot a 10-category histogram with GNUPLOT. Since number of categories is relative large, I want to specify patterns for different categories myself instead of applying the default pattern setting making different categories easy distinguished, e.g. fill the first category with dash-line while the second shaded, etc.
Is there any parameter can be employed to specify a pattern in the plot command? Any hints/advice will be highly appreciated. Thanks in advance.
Best Regards!
You can use with boxes fs [pattern|solid] <style-id>.
0 0.0 0.0
1 0.3 0.6
2 1.6 1.6
3 0.3 1.5
4 0.6 3.6
5 0.3 4.3
6 0.3 0.7
7 5.5 5.5
8 6.6 6.6
9 5.2 5.2
10 8.3 8.3
11 2.7 5.0
12 2.8 8.3
13 3.3 2.8
14 7.9 3.9
15 9.9 7.9
16 15.3 15.3
17 14.7 14.7
18 3.8 18.1
19 18.1 12.1
Gnuplot script:
set style data hist
set style histogram rowstacked
plot 'test.dat' us 2:xtic(1) fs solid 1 ls 3, '' us 3 fs pattern 1
See this link for more detail:
http://t16web.lanl.gov/Kawano/gnuplot/plot5-e.html
gnuplot fillstyle demo
It is an interesting problem. After read your question I wrote a blog to talk about it. May be you can have a look. The link is here:
http://gnuplot-surprising.blogspot.com/2011/09/plot-histograms-using-boxes.html