Page 2 sur 3

Re: signal processing commands

Publié : jeu. sept. 20, 2018 12:09 pm
par parisse
Sorry, I should have been more precise, I added sound_ as prefix, not sound, please replace {sound by {sound_

[Edit] Details now works!
I think it's time to release a 1.5.0-3, I hope tomorrow.

Re: signal processing commands

Publié : jeu. sept. 20, 2018 12:20 pm
par lukamar
No problem, here's the corrected file.

Re: signal processing commands

Publié : sam. déc. 08, 2018 7:58 pm
par symphorien
When building giac 1.5.0-21 with libsamplerate 0.1.9 and gcc 7.3 I get this error:

Code : Tout sélectionner

signalprocessing.cc: In function 'giac::gen giac::_resample(const giac::gen&, const giac::context*)':
signalprocessing.cc:637:77: error: assignment of read-only location '*(data.SRC_DATA::data_in + ((sizetype)(((long unsigned int)((i * nc) + j)) * 4)))'
             data.data_in[i*nc+j]=_evalf(chdata[j][i],contextptr).DOUBLE_val();
                                                                             ^
maybe because data.data_in is declared as a const float*.

Re: signal processing commands

Publié : lun. déc. 10, 2018 4:38 pm
par lukamar
Indeed, const was missing in version 0.1.8. It's not data_in that should be allocated but a temporary float* instead. I'll fix that.

Re: signal processing commands

Publié : lun. déc. 10, 2018 10:29 pm
par lukamar
I committed a fix in my source at github here: https://github.com/marohnicluka/giac (the changed file is signalprocessing.cc, but the last revision also contains some fixes to graph theory manual and graphtheory.cc).
It should work now.

Re: signal processing commands

Publié : mer. déc. 12, 2018 10:03 am
par parisse
Hi!
You forgot to remove the code parts that are now in desolve.cc
cascmd_en.tex has changed, with the addition of Jay new 2d graphic section, I have merged the 2 files. Same for aide_cas.
Unstable tarball updated.

Re: signal processing commands

Publié : jeu. déc. 13, 2018 8:00 pm
par lukamar
Indeed, thanks for the reminder! I have updated my source just now (optimization .cc/.h, cascmd_en.tex, aide_cas). Please let me know if there's anything else to update.

Re: signal processing commands

Publié : sam. déc. 15, 2018 6:35 am
par parisse
Everything seems synchronized, thanks!

Re: signal processing commands

Publié : jeu. janv. 24, 2019 4:57 pm
par lukamar
Hello,
I fixed several examples for some of my commands in aide_cas, there were some leading spaces missing so they weren't pasted correctly when clicked on. Fixes committed to my source.

Re: signal processing commands

Publié : ven. août 30, 2019 6:55 pm
par lukamar
Hello Bernard,
I have coded some new commands for signal processing:
1. boxcar, rect (rectangular function), tri (triangular function) and sinc (cardinal sine function), since they are often used;
2. fourier and ifourier, which compute continuous Fourier transforms;
3. convolution command can now accept real functions too, in which case it computes continuous convolution by integrating over the real line.
To enable computing Fourier transforms of unknown functions, I have added the command addtable which allows storing Fourier/Laplace transform pairs, such as f(x) -> F(s). I will also try to modify laplace command in that respect.
Changed files are signalprocessing.cc/h.
The updated aide_cas and cascmd_en.tex are in doc directory. I have put entries for fourier/ifourier in the "Fourier Transformation" chapter, the other commands are described in "Signal processing".
Finally, I have fixed some more bugs in extrema command, it is now prone to segfaults. Please update optimization.cc too.

Re: signal processing commands

Publié : sam. août 31, 2019 10:55 am
par parisse
Thanks! It's now integrated in giac unstable.

Re: signal processing commands

Publié : sam. août 31, 2019 5:16 pm
par lukamar
Thank you! I have just added two more files in my repository, markup.cc/h. These contain routines for exporting to LaTeX and to presentation/content MathML. I'm aware that these features already exist in Giac, but I tried to improve them. These routines try to export to standard mathematical notation and typesetting whenever possible, keeping usage of parentheses at minimum. Could you please include these files to the Giac source tree in unstable version (I don't know how to do it) and use export_latex routine in _latex command (tex.cc) for inputs other than graphics and spreadsheets? That way I could easily test these algorithms and fix bugs if any.
Some details:
1. export_latex produces a string representing a math expression in LaTeX. amsmath and amssymb are required to typeset it. Using it as the standard LaTeX export would improve typesetting for interactive sessions in TeXmacs, for example.
2. export_mathml_presentation should work as an improved version of _mathml routine.
3. export_mathml_content exports to content MathML using OpenMath content dictionaries when possible. This could help applications which communicate with Giac through pipes to understand Giac expressions.
4. export_mathml produces a MathML block containing:
<semantics><PRESENTATION MATHML><annotation-xml><CONTENT MATHML></annotation-xml><annotation><GIAC PRINT></annotation></semantics>

Re: signal processing commands

Publié : dim. sept. 01, 2019 10:00 am
par parisse
Could you replace front() and back() call on strings with [0] and [s.size()-1]? Otherwise it does not compile with old gcc.

Re: signal processing commands

Publié : dim. sept. 01, 2019 10:13 am
par parisse
For inclusion in _latex, the best is probably that you declare a function returning false if you have some unsupported object (like a symbolic of sommet at_pnt), something like
bool has_improved_latex_export(const gen &g, string & s, GIAC_CONTEXT);
then I can insert in latex
...
if (has_improved_latex_export(g,s,contextptr)) return gen2string(s,false);
// old code
return string2gen(gen2tex(g,contextptr),false);

Re: signal processing commands

Publié : dim. sept. 01, 2019 8:10 pm
par lukamar
Done! I have also renamed markup.cpp to markup.cc.