fft 0.2.0

dart #

An implementation of Cooley-Tukey. Also included are the windowing functions Hann and Hamming

Usage #

A simple usage example:

import 'package:fft/fft.dart';

main() {
	   var data = [1.0, 0.0, -1.0, 0.0];
   var windowed = Window.Hann(data);
	   var fft = new FFT().Transform(windowed);
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.1 #

  • Initial version, created by Stagehand

0.0.5 #

  • Corrected phase problem

0.0.6 #

  • Added FFT.TransformAsComplexPolar, ComplexPolar.invert()

0.0.7 #

  • Changed algorithm to use Complex rather than ComplexPolar

0.0.8 #

  • made WindowType visible

0.0.10 #

  • removed ComplexPolar and replaced with new Complex type

0.0.11 #

  • added inverse and conjugate()

0.0.12 #

  • bug fixes

0.0.13 #

  • added clone() method to complex numbers

0.0.14 #

  • moved complex numbers to new library

0.2.0 #

  • dart2 compatibility

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  fft: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:fft/fft.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
48
Overall:
Weighted score of the above. [more]
62
Learn more about scoring.

We analyzed this package on Feb 13, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Document public APIs. (-1 points)

37 out of 37 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/fft.dart. (-6.31 points)

Analysis of lib/fft.dart reported 13 hints, including:

line 19 col 17: Unnecessary new keyword.

line 20 col 32: Unnecessary new keyword.

line 27 col 14: Unnecessary new keyword.

line 82 col 19: Unnecessary new keyword.

line 89 col 19: Unnecessary new keyword.

Fix lib/window.dart. (-5.84 points)

Analysis of lib/window.dart reported 12 hints, including:

line 7 col 28: Unnecessary new keyword.

line 8 col 31: Unnecessary new keyword.

line 9 col 28: Unnecessary new keyword.

line 22 col 19: Unnecessary new keyword.

line 25 col 7: DO use curly braces for all flow control structures.

Maintenance suggestions

Package is getting outdated. (-52.05 points)

The package was last published 79 weeks ago.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and fft.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <3.0.0
my_complex >=0.1.0 <1.0.0 0.1.0
tuple >=1.0.1 <2.0.0 1.0.3
Transitive dependencies
matcher 0.12.6
meta 1.1.8
path 1.6.4
quiver 2.1.2+1
stack_trace 1.9.3
Dev dependencies
test >=0.12.0 <2.0.0