Flutter 패키지로, 애플리케이션에 오디오 웨이브폼을 통합하는 것을 단순화하고 음악 및 오디오 재생을 위한 사용자 정의 가능한 시각화를 제공합니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 오디오 앱에 이상적입니다. 개발자는 다양한 스타일링 옵션을 통해 실시간 또는 사전 로드된 웨이브폼 데이터를 쉽게 표시할 수 있습니다. 간결함과 성능을 고려해 설계되었으며, 큰 오디오 파일에서도 부드러운 렌더링을 가능하게 합니다. 음악 플레이어, 음성 녹음 앱, 오디오 분석 도구 등에 특히 유용합니다.
사용 사례
음악 플레이어 인터페이스
음성 녹음 시각화
오디오 분석 도구
실시간 오디오 모니터링
소리 파동을 위한 교육 앱
팟캐스트 재생 UI
주요 기능
사용자 정의 파형 모양
실시간 오디오 렌더링 지원
크로스 플랫폼 호환성
오디오 플레이어와의 간편한 통합
사용자 정의 가능한 선 두께 및 색상
모든 플랫폼에서 부드러운 성능
적합한 대상
오디오 중심 앱을 개발하는 개발자
동적 파형 시각화가 필요한 UI 디자이너
소리 물리학을 위한 교육용 소프트웨어
모바일 및 데스크톱 오디오 애플리케이션
실시간 오디오 피드백이 필요한 앱
고려 사항
비실시간 사용을 위해 오디오 데이터 전처리가 필요합니다
매우 긴 오디오 파일과 함께 성능에 영향을 줄 수 있습니다
파형 시각화에 제한됨(오디오 처리 없음)
중간에서 높은 오디오 데이터 주파수를 가진 앱에 가장 적합
매우 높은 해상도의 파형에 최적화되지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
A UI library for easily adding audio waveforms to your apps, with several customization options.
You can use the following available waveform types.
Polygon
Rectangle
Squiggly
Curved Polygon
Need to add some gradient to your waveform? Say no more! You get it along with other customization options.
Want an active track for your audio out of the box?
You get that too!
Check out the short demo of what package offers here
Getting started
The package gives you the ability to add waveforms and customize them.
It's mostly like a UI library for waveforms with an additional ability to show active track for playing audio.
So it relies on you to provide the necessary audio data which it needs to draw the waveform.
The data we need is basically a list of points/samples that represents that audio.
You can use this audiowaveform program to get the audio json file which will provide us the samples.
After installing this program on your machine, generate the json file for an audio by using this command in your terminal.
audiowaveform -i test.mp3 -o test.json
The generated data needs to be processed following some rules which are necessary to get the waveforms drawn properly. To process the data use this processor.
Once you have the processed data points list then you can just pass it down to any of the waveforms available and get started using them.
Check out this article for detailed introduction on this section.
Usage
Usage of all waveforms available is the same with only exception of having more/less customization options for different waveforms.
// For a regular waveformPolygonWaveform(
samples: [],
height: height,
width: width,
)
// If you want active track for playing audio, pass [maxDuration] and [elapsedDuration]PolygonWaveform(
samples: [],
height: height,
width: width,
maxDuration: maxDuration,
elapsedDuration: elapsedDuration,
)
Check the Getting Started section on how to generate this.
height :
Waveform height.
width :
Waveform width.
Customization Options
inactiveColor :
Color of the inactive waveform.
activeColor :
Color of the active waveform.
inactiveGradient :
Gradient of the inactive waveform.
activeGradient :
Gradient of the active waveform.
absolute :
Waveform drawn is one sided either above x-axis or below it depending on what invert is set to.
Defaults to false.
invert :
Flips/inverts the waveform upside down.
Defaults to false.
borderWidth :
Width of the border around waveform.
Available only for RectangleWaveform.
isRoundedRectangle :
If true then rounded rectangles are drawn instead of regular rectangles.
Available only for RectangleWaveform.
isCentered :
If true then rectangles are centered along the Y-axis with respect to their center along their height.
If [absolute] is true then this would've no effect.
Available only for RectangleWaveform.
strokeWidth :
Waveform stroke width.
Available only for SquigglyWaveform, CurvedPolygonWaveform.
inactiveBorderColor:
Border color for inactive waveform.
Available only for RectangleWaveform.
activeBorderColor:
Border color for active waveform.
Available only for RectangleWaveform.
showActiveWaveform:
Whether to show active waveform or not.
Defaults to true.
More customization options coming soon!
Contributing Guide
Feature request : If you have any new feature in mind from which this package can benefit then please let me know by filing an issue here.
Improvements : Got any suggestions on improving the package, anything from API to performance then let me know by filing the issue here.
Bugs: If you happen to come across anything that shoudln't be happening then please file an issue here describing what the bug is and how to reproduce it with attached code and preview if possible.
Additional information
What started as a challenge out of curiosity, is now a package that I hope will be helpful to many of you and it was actually really fun building it.
Learned some good stuff while working on it and I hope to make it much more going forward.
If this package helped you then I would appreciate if you ⭐️ the repo which would be enough for me to keep continue working on it 🤓 and feel free to drop by and say hi anytime.