1 Star 0 Fork 28

宋壮豪 / 信号实验箱

forked from ZZH-Finalize / 信号实验箱 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
GPL-2.0

信号实验箱

本软件为一个基于表达式的信号计算、绘图软件, 主要功能为对输入的信号进行采样, 然后对采样序列进行各种运算, 并将运算结果绘制为波形, 支持使用动态库扩充软件内可调用的函数

For native English speaker, please check out English Version Readme

That Document have the same content as this one, but write in English.

本软件支持跨平台部署, 这主要得益于QT的跨平台API以及CMake的跨平台构建能力, 你可以在一个宿主机上编译出不同平台的目标, 目前已测试过Ubuntu 22.04(基于Win11 WSL2)、Win7/Win10/Win11、Android x86/Android armeabi-v7a(基于Win11 WSA和Realme X2 pro)

本软件支持国际化, 使用QT的国际化机制实现, 目前拥有简体中文翻译数据(软件内默认使用英文作为原始语言, 然后再添加其他语言的翻译文件实现国际化, 这也是QT翻译机制的推荐做法), 如果你希望添加新的语言, 可以使用QT语言家工具生成当前工程的.ts文件, 例如本工程现有的中文翻译文件ui/zh_CN.ts, 然后再为生成的ts文件内的英文原文添加目标语言的译文, 添加完成后保存文件, 将ts文件发布为qm文件即可

目前软件在启动时会获取操作系统使用的语言设置, 因此会自动适配语言, 如果操作系统的语言是中文简体和英文之外的语言, 会默认使用英文(如果你自行添加了其他语言的翻译文件就可以显示翻译后的语言, 总的来说就是翻译不了的一律不翻译)

由于本软件的支持库是以git submodule形式引入的, 所以请在克隆仓库时, 使用git clone --recursive命令递归将子模块一起克隆下来, 如果克隆时忘记, 也可以在克隆完成之后在源码路径下执行git submodule initgit submodule update两条指令来补救

如果你使用Download ZIP功能而不是git clone, 那么请将z-fft一同下载, 并解压到external_libs路径下, 最终应该形成这样的文件目录结构

子模块

如果你在使用、阅读源码、构建等方面有任何疑问, 均可在仓库内提交Issues, 我看到会处理

1. 简单示例

在信号列表框内右键单击(安卓平台为长按), 在弹出的菜单内选择新增信号, 然后输入信号表达式, 设置采样率和采样点数后点击计算当前信号即可看到波形
信号0
信号1

信号可以嵌套使用, 方便拿两个信号做运算, 最大可嵌套32层
信号2

除正余弦以外, 内置还有一些其他的函数可供使用, 例如软件随机rand和硬件随机hrand
信号3
信号4

傅立叶变换, 对变换结果调用length是因为fft函数输出为复数, 而length函数为向量求模函数, 因此可求出幅度谱
输入信号
幅度谱

软件自带的filters库内带有几个滤波函数, 其中lpfhpf为IIR滤波器, 分别为低通滤波器与高通滤波器, 接收采样序列和截止频率作为参数, fir为FIR滤波器, 接收采样序列、滤波器阶数和滤波器系数(可使用matlab导出)作为参数

这里给出1阶IIR低通滤波器、3阶IIR低通滤波器和32阶FIR低通滤波器的示例效果, 关于滤波器的更多信息, 请阅读10. 滤波器指南

OrigSig
IIR_filter1
IIR_filter2
FIR_filter

查看滤波之后的频谱图可以发现, 高阶数的滤波器可达到较好的滤波效果

IIR_freq1
IIR_freq2
FIR_freq

2. 工作原理

  1. 一个信号可用一个表达式 f 进行描述, 在任意的 t 时刻, 信号的强度为 f(t)
  2. 若给定某时刻 t , 则表达式 f(t) 的运算结果即为信号 ft 时刻的信号强度采样值
  3. t 可根据软件内设置的采样频率计算得出, 然后重复采样 N 次, N 为软件内设置的采样点数
  4. 软件在计算前会将要计算的信号的表达式编译为语法树
  5. 语法树内每个节点在计算自身的值之前, 会先将子节点的值计算出来, 因此根节点的计算值即为表达式整体的值
  6. 若自定义信号之间存在相互引用, 则内层信号将会先运算得到运算值, 然后再进行外层信号的运算
  7. 信号存在最大嵌套层数限制, 防止某信号引用自身或者多个信号交叉引用造成无限递归的情况

3. 信号定义

在软件内所有的信号定义均为表达式形式, 例如sin(t)便是代表了经过数字采样的 sin 信号, sin(100*t) + sin(200*t)便是将两个频率不同的信号叠加

信号间可以相互引用, 例如sig0 = sin(100*t) sig1 = sin(200*t) sig2 = sig0+sig1

信号自身引用自身或交叉引用均会触发最大嵌套限制

4. 频谱模式

在使用fft函数计算信号的傅里叶变换后, 如果只使用length函数求出幅度谱的话, 图表的X轴坐标为点数, 例如下图

fir_freq_index

可以看到十字光标所在位置X坐标为5, 这表示的是此数据在采样序列里的下标, 如果想要知道此点对应的频率值是多少就需要自己计算, 上图中X=5, 采样率5KHz, 采样点数为256点, 因此此处的频率为5000/(256/2)*5=195.3Hz, 也就是原信号里的200Hz频率成分. 进行这样的计算虽然简单, 但是却很麻烦, 而且计算所需的所有参数在软件内都有, 所以, 可以通过勾选右下角的频谱模式复选框来让软件去计算

勾选频谱模式之后, 横坐标的含义将变为实际的频率值, 例如下图中, 这里还是用的一样的信号去绘图, 只是打开了频谱模式而已, 可以看到十字光标所在位置的X值为195.313, 与我们的计算结果一致

IIR_freq1

需要注意的是, 频谱模式实际上只会显示一半的实际计算数据, 即采样点数为1024点时, 图表内实际上只会显示前512个数据点, 这是由于频谱具有对称性, 因此只需要前一半的频谱就足够分析了

另外一个需要注意的就是, fft函数的输出实际上只有一半的频谱, 这同样是利用频谱的对称性, 比如我们假定采样点数为1024, 那么1024个实数输入后得到512个复数(依然是1024个float变量, 但是一半实部一半虚部), 并且在调用length函数计算每个复数的模长之后, 会得到512个实数模长, 因此如果不用频谱模式显示的话, 你会发现图表的右侧(即后512个数据点)全是0, 因为不在频谱模式下的图表会显示1024个数据, 如果你打开频谱模式, 结合上面说的频谱模式的特性, 图表只会显示512个数据点, 这样就可以最大利用显示区域去显示有用的数据

5. 内置编译器

软件内置一个简单的编译器, 支持常用的数学表达式文法、双斜杠单行注释文法和 if 条件文法

数学表达式文法即最常用最简单的数学表达式, 例如(sin(t)+cos(t+3))*6

双斜杠单行注释与C语言的单行注释相同, 例如sin(t)//sin of t, 双斜杠后的所有字符均被忽略

if条件文法的执行逻辑与C语言的三目运算符相同, 但是并不使用?:符号而是使用ifelse关键字, 并且语法顺序也略有不同, 实际上这里的语法和python的设计一致, 语法规则为数学表达式+if关键字+比较表达式[+else+数学表达式], 方括号内的部分是可省略的, 例如:

  1. 5 if index > 15 else 3//等价于C语言 index > 15 ? 5 : 3
  2. 5 if index > 15//省略else子语句的写法, 等价于 index > 15 ? 5 : 0

if条件语法搭配 index 变量可非常方便的产生阶跃信号和冲激信号, 例如:

  1. 1 if index >= 0//单位阶跃信号
  2. 1 if index == 0//单位冲激信号
  3. 1 if index >= 5//向右移动5的单位阶跃信号
  4. 1 if index == 5//向右移动5的单位冲激信号
  5. 5 if index >= 0//幅值为5的阶跃信号
  6. 5 if index == 0//幅值为5的冲激信号

编译器支持如下特殊变量:

  1. t , 代表当前的时间, 也就是第 n 次采样除以采样频率 fs, t = n/fs
  2. index , 代表当前是第几次采样, 也就是所谓的 n, 例如采样点数1024, 那么 index 就是[0-1023]的序列

编译器支持一个常量 pi , 代表圆周率

编译器对于符号的处理和解析是大小写无关的, pi等价PI Pi pI, t也等价于T

6. 函数库

所有的函数均为外部函数库解析得到, 每个函数库均需要提供pLibFunction_t lib_init(void)函数, 可用于库被载入时执行一些初始化动作, 并且此函数需要返回函数注册表, 用于描述需要加载动态库文件里面的哪些符号, 以及这些函数所需要的参数数量(用于信号编译时的参数检查)

除此之外, 函数库还可以导出void lib_exit(void)函数用于在库被卸载时做一些收尾清理工作, 此函数是可选函数, 如果没有导出则不调用, 不影响库的导入

如果没有初始化动作的需求, 则lib_init函数可被宏register_function_lib替换, 此宏定义相当于定义lib_init函数, 并返回参数指定的函数注册表, 节去使用者编写定义函数库的代码

目前软件内置了4个库, 即basicfiltersiotransform, 分别是常用的数学函数库, 数字滤波器库, IO访问库和信号变换库

数学库包括了sincoslengthmin/maxrand/hrandabs等常用函数, 可用于产生信号或者数值计算

滤波器库包括了常见的数字滤波器, 例如低通滤波器lpf、高通滤波器hpf和均值滤波器average

变换库目前只有fft这一个函数, 调用z-fft完成傅里叶变换

IO访问库目前只实现了read_filewrite_file两个读写文件的接口, 可用于导入信号, 导入滤波器系数或者保存信号

同样的, 如果你自己构建了动态库, 你可以把他们放置在安装目录的lib子目录下, 然后在信号表达式内调用即可

7. 工作区

软件内所有的信号、当前的采样率和采样点数的设置共同构成了一个工作区, 而软件可以将这个工作区保存为一个json文件, 并且可从json文件恢复一个工作区, 此json文件的结构是简洁明了的, 很容易看懂其结构, 也很方便手写, 所以你也可以手写一个工作区文件然后直接导入到软件内, 目前此仓库的workspace_demo目录下提供了一些用于验证软件功能或验证库功能的demo工作区, 你可以直接导入使用

关于工作区以及工作区文件的详细说明, 请参阅workspace_demo/readme.md

8. 发行版

为了避免使用者自行构建的麻烦, 你可以在仓库右侧, 简介的下方找到发行版一栏, 在这里是编译并打包好的软件, 可直接下载使用. 但是请注意, 只有较大版本更新之后才会发布发行版, 因此你所下载到的发行版的功能可能是不如源码强的, 如果要体验最新版软件请参考9. 构建源码自行构建最新版软件

9. 构建源码

本工程使用CMake作为顶层构建系统, CMake可产生多种下层构建系统所需文件, 例如Makefile

除此之外, 本工程的内置编译器并非纯手写完成, 词法分析器和语法分析器基于flex/bison构建, 因此在构建时需要用户的开发环境内有可用的flexbison

9.1. 首选方式

本人使用vscode开发本工程, 所使用到的工作区文件也在源码目录下, 完整下载源码后双击tiny-signal-box.code-workspace文件即可自动打开vscode对代码进行编辑和浏览.工作区文件内包括了vscode的设置项, 构建所用的task以及调试所需要的launch配置, 因此一般来说无需使用者再次配置, 只要你是通过工作区文件打开的工程, 那么你所使用的配置就和我的是一样的

构建之前, 请先安装CMakeNinja, 前者用于产生后者所需的文件, 后者则负责执行文件中的规则, 调用编译器编译和链接程序

然后是QT, 本软件使用了QT 5.15, 安装时请注意不要安装MSVC编译器版本的, 要安装GCC编译器版本的QT, 同时也要选中Charts模块和GCC 8.1.0编译器本身

为了能让CMake找到QT, 还需要将QT安装目录下的Qt5Config.cmake文件所在的文件夹配置到CMAKE_PREFIX_PATH环境变量下, 否则CMake在配置工程的时候会在find_package语句上报错, 此文件位于QT安装目录\版本号\mingw81_32或者mingw81_64\lib\cmake\Qt5

除此之外, 还需要安装flexbison, 推荐的方式是安装虚拟的linux环境, 比如Cygwin, 在安装Cygwin时, 选择flexbison的软件包即可, 在Cygwin安装完成后, 将vscode的内置终端替换为Cygwin所使用的bash.exe, 并且将Cygwinbin目录的路径加入到PATH环境变量中

如果安装Cygwin时没有选择flexbison, 可以在安装完成后再次运行安装程序重新选择, 实际上这并不会重新安装, 只会把你对软件包的各种修改应用到已装好的Cygwin

关于如何配置vscode的内置终端, 请查看Terminal profiles

如果要在vscode内构建, 请按照工作区文件给出的推荐, 安装推荐的扩展程序(打开工作区时, 如果有一些推荐扩展你没有安装, vscode也会弹窗提示), 此处列出的是扩展程序的ID, 在搜索时可以唯一确定到某个具体的扩展程序而不会出现重名的问题

推荐的扩展程序的ID

安装好后再次打开工作区文件, 在左下角选择QT提供的工具链然后在vscode内按下Ctrl+Shift+B快捷键即可开始编译, 若你的生成任务默认快捷键不是这个, 也可以手动执行

选择工具链的方式如下:
选择工具链
选择工具链

如果你之前没有使用过cmake扩展程序, 这里的列表应该是空的, 你可以选择[scan for kits]来让它扫描PATH环境变量里已有的编译器, 也可以手动配置%HOMEPATH%\AppData\Local\CMakeTools\cmake-tools-kits.json文件, 在此文件里你可以配置编译器路径或工具链文件, 两种方式均可向cmake扩展程序提供一个工具链使用, 配置完成之后, 选择工具链的列表就会出现已配置的工具链, 选择QT 5.15安装目录下的GCC8.1.0工具链即可, 下方是我的配置, 包括了QT的Windows工具链和安卓工具链

windows工具链
安卓工具链

编译完成后, 按下Crtl+Shift+T快捷键运行测试任务即可看到程序运行效果

若运行中出现问题, 直接在vscode内调试即可(快捷键F5), 但是请确保工作区文件内的gdb可执行文件的路径配置正确

如果你想编译出apk文件并在安卓平台上运行本软件, 请参阅安卓平台编译指南

9.2. 手动方式

首选方式的本质实际上只不过是把命令的调用交给了vscode的扩展程序来做而已, 本质上依然是在控制台执行命令, 因此这个过程我们可以手动来做, 这样就不再依赖于vscode及其扩展程序

cmake的编译过程分为配置(configure)和构建(build)两步, 配置的步骤会生成底层构建系统所需的文件, 例如Makefile或ninja.build, 而构建的步骤实际上就是调用make或ninja去编译工程

本软件在Windows下编译exe的的配置命令为cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=你的QT GCC编译器路径 -DCMAKE_CXX_COMPILER:FILEPATH=你的QT G++编译器路径 -B build -G Ninja

配置完成之后的构建命令为cmake --build build --target all

两条命令执行完成之后, 就可以在build目录下看到可执行文件了

安卓平台的配置命令过于冗长, 因此不推荐手动执行, 源码内已提供编译脚本和工具链文件, 两种方式可二选一使用, 详细请参阅安卓平台编译指南

10. 滤波器指南

软件自带的滤波库内的函数, 主要分为两种, 即IIR滤波器和FIR滤波器, 其中lpfhpf属于IIR滤波器, averagefir属于FIR滤波器, 两种滤波器的使用方法是不一样的

lpfhpf本身都是一阶的IIR滤波器, 并且无需使用者提供系数, 只需要提供采样序列和截止频率即可, 由于所有的函数的输出都是采样序列, 因此可以嵌套使用构成任意阶数的IIR滤波器

average内部使用滑动均值滤波, 参数为采样序列和窗口大小, 它可看做系数为1/窗口大小的FIR滤波器, 也是最简单的一种fir滤波器

fir为直接型FIR滤波器, 参数为采样序列、滤波器阶数和滤波器系数, 内部对信号和滤波器系数做卷积运算, 因此改变系数就可以变为任何一种FIR滤波器, 此系数可由matlab计算导出保存为文件, 再使用read_file函数将系数读入为采样序列, 通过传参的方式让fir函数使用

目前此仓库的matlab_coefficient_demo目录下提供了一些用matlab设计好的系数, 可以在信号表达式内直接使用, 这些demo参数文件的命名方式为: 类型_截止频率_采样率, 系数的采样率和软件设置的采样率一致才可使用

关于如何使用matlab设计FIR滤波器, 如何使用导出的系数, 请参阅matlab_coefficient_demo/readme.md

11. 安卓平台编译指南

在进行安卓的编译之前, 首先要配置安卓的开发环境, 包括JDK安卓SDK安卓NDK以及QT For Andriod, 这些环境的配置方式网络上有许多教程, 此处不再赘述

你可能已经注意到本软件的源码路径下已经有了一个名为android_build.sh的shell脚本文件, 此文件的确是用于编译安卓apk的脚本文件, 如果你的环境配置正确, 那么此脚本就可以顺利编译出apk文件, 需要注意的是, 一些路径是直接写在此脚本内的, 所以你可能需要手动修改其中的一些路径才能正确执行此脚本

上述脚本可被bash程序正确执行, 在Windows下你可以用前文提到的Cygwin环境提供的bash, Linux环境下执行此脚本就更简单了

除了在控制台手动调用脚本编译apk以外, 还有一种更为优雅的方式, 你可以将源码路径下的android_build.cmake文件按照上述脚本的配置方式配置其中的路径, 然后将此文件拷贝到源码路径之外的任何位置 , 推荐拷贝到QT安装目录\版本号\android\lib\cmake路径, 并在cmake-tools-kits.json文件内添加一项, 使用工具链文件的方式指定到刚才拷贝过去的工具链文件, 再回到vscode, 删除掉build文件夹, 重新选择工具链之后再次按下Ctrl+Shift+B快捷键或手动执行build任务, 然后你会发现控制台里已经在跑安卓的构建流程了, 这样一来切换不同的目标平台就会非常容易

需要注意的是QT 5.15的安卓提供了四种不同的体系结构的库, 源码路径下的.cmake文件指定的目标平台是x86, 如果你需要在手机上跑请把set(ANDROID_ABI x86)语句改为set(ANDROID_ABI armeabi-v7a)即可, shell脚本也是同理, 但是shell脚本还需要额外修改-DANDROID_BUILD_ABI_armeabi-v7a:BOOL=OFF \-DANDROID_BUILD_ABI_armeabi-v7a:BOOL=ON \, 并且把-DANDROID_BUILD_ABI_x86:BOOL=ON \修改为-DANDROID_BUILD_ABI_x86:BOOL=OFF \

GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.

简介

基于QT、z-fft实现的微型可视化信号运算/变换/处理工具 展开 收起
C++
GPL-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/calabash-cub/signal-test-box.git
git@gitee.com:calabash-cub/signal-test-box.git
calabash-cub
signal-test-box
信号实验箱
master

搜索帮助