GithubHelp home page GithubHelp logo

Comments (4)

SKKbySSK avatar SKKbySSK commented on June 6, 2024

@Nayuta403
Oops, can you try switching to feature/refactor branch instead?
This branch has one example Flutter app which can play music.

from coast_audio.

Nayuta403 avatar Nayuta403 commented on June 6, 2024

@SKKbySSK
Thanks, this problem no longer exists, but there are no examples of fft usage in the examples. In fact, I mainly want to see the use of fft here, there are other materials can refer to ?

from coast_audio.

SKKbySSK avatar SKKbySSK commented on June 6, 2024

@Nayuta403
FFT is not supported by this package yet.
But you can combine this package and other fft libraries to run FFT. (such as https://pub.dev/packages/fftea)

This program will run the FFT on 440 Hz sine wave

// define the audio format with 48khz sample rate and stereo channels.
final format = AudioFormat(sampleRate: 48000, channels: 1, sampleFormat: SampleFormat.int16);

// create a sine wave function node with 440hz frequency.
final functionNode = FunctionNode(
  function: const SineFunction(),
  frequency: 440,
);

AllocatedAudioFrames(length: 1024, format: format).acquireBuffer((buffer) {
  // read the audio data from the function node to the buffer.
  functionNode.outputBus.read(buffer);

  // floatList contains sine wave audio data.
  final floatList = buffer.asFloat32ListView();

  // Run FFT on the floatList here
  final fft = FFT(floatList.length);
  final freq = fft.realFft(floatList);
});

from coast_audio.

Nayuta403 avatar Nayuta403 commented on June 6, 2024

@SKKbySSK Thank you very much for the information you provide. Maybe I can run it based on the refactor branch first, and refer to the content of the main branch for related use.

from coast_audio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.