chipweinberger / dart_melty_soundfont

A port of Melty Synth by Nobuaki Tanaka (C#) to Dart
Other
33 stars 8 forks source link

Example project For Web #8

Closed nathanblanchard12 closed 2 years ago

nathanblanchard12 commented 2 years ago

Hello can you add an example to the project. It would be easier to figure out if it works. I might be using it wrong but I hear no audio. I am not sure if it is my sf2 file or computer or settings

chipweinberger commented 2 years ago

This library does not output audio. It generates waveforms. There is an example in the readme for generating the waveforms.

If you want to hear it, you need to pass the waveform to a plugin with PCM sound output (android & iOS) like: https://pub.dev/packages/raw_sound

You said you are on web, maybe you can use this. not sure. https://api.dart.dev/stable/2.16.1/dart-web_audio/dart-web_audio-library.html

docs: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API