Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Waveform Playlist | 1,297 | 4 | 4 | 9 months ago | 54 | February 26, 2022 | 40 | mit | JavaScript | |
Multitrack Web Audio editor and player with canvas waveform preview. Set cues, fades and shift multiple tracks in time. Record audio tracks or provide audio annotations. Export your mix to AudioBuffer or WAV! Add effects from Tone.js. Project inspired by Audacity. | ||||||||||
Dswaveformimage | 817 | 17 days ago | 11 | January 24, 2020 | 1 | mit | Swift | |||
Generate waveform images from audio files on iOS, macOS & visionOS in Swift. Native SwiftUI & UIKit views. | ||||||||||
Videojs Wavesurfer | 327 | 23 | 12 | 10 months ago | 82 | October 03, 2022 | 11 | mit | JavaScript | |
video.js plugin that adds a navigable waveform for audio and video files | ||||||||||
Mpv Scripts | 124 | 4 months ago | 11 | unlicense | Lua | |||||
mpv lua scripts | ||||||||||
Wavesurfer React | 124 | 4 | 2 days ago | 51 | November 28, 2023 | 5 | mit | TypeScript | ||
A simple React wrapper for wavesurfer.js | ||||||||||
Amplituda | 121 | 10 months ago | 4 | apache-2.0 | C | |||||
Amlituda - an android audio processing library, which provides waveform data | ||||||||||
Awesome Web Audio | 83 | 2 years ago | 10 | mit | ||||||
A list of resources and projects to help learn about audio | ||||||||||
Audio Oscilloscope | 48 | 3 | 2 | 3 years ago | 7 | November 14, 2020 | mit | JavaScript | ||
:musical_note: Waveform audio visualizer for the HTML5 canvas. | ||||||||||
Audio Waveform Svg Path | 27 | 2 | 6 years ago | 3 | June 06, 2017 | mit | JavaScript | |||
Building path for SVG element to perform waveform view of audio file | ||||||||||
Waveformviewdemo | 22 | 5 years ago | 2 | apache-2.0 | Kotlin | |||||
Provides a view to display audio waveforms. |
WaveFormView provides a view to display audio waveforms.
Generating waveforms at runtime, you don't have to prepare data in advance.
Note : It takes a few seconds to generate
Add the following dependicity to your build.gradle
file.
dependencies {
repositories {
jcenter()
}
compile 'space.siy:waveformview:1.0.0'
}
You can see full code at MainActivity.kt
//Open From Assets Folder
val afd = assets.openFd("jazz_in_paris.mp3")
//Build WaveFormData
WaveFormData.Factory(afd.fileDescriptor, afd.startOffset, afd.length)
.build(object : WaveFormData.Factory.Callback {
//When Complete, you can receive data and set to the view
override fun onComplete(waveFormData: WaveFormData) {
waveFormView.data = waveFormData
//Initialize MediaPlayer
val player = MediaPlayer()
player.setDataSource(afd.fileDescriptor, afd.startOffset, afd.length)
player.prepare()
player.start()
//Synchronize with MediaPlayer using WaveFormView.Callback
waveFormView.callback = object : WaveFormView.Callback {
override fun onPlayPause() {
if (player.isPlaying)
player.pause()
else
player.start()
}
override fun onSeek(pos: Long) {
player.seekTo(pos.toInt())
}
}
//You have to notify current position to the view
Handler().postDelayed(object : Runnable {
override fun run() {
waveFormView.position = player.currentPosition.toLong()
Handler().postDelayed(this, 20)
}
}, 20)
}
override fun onProgress(progress: Float) {
progressBar.progress = (progress*10).toInt()
}
})
You can change block style via xml and program.
The following xml shows all attributes.
<space.siy.waveformview.WaveFormView
android:id="@+id/waveFormView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:blockColor="@color/white"
app:blockColorPlayed="@color/red"
app:showTimeText="true"
app:textColor="@color/white"
app:textBgColor="@color/black"
app:blockWidth="10"
app:topBlockScale="1"
app:bottomBlockScale="0.5"
app:peakMode="peakmode_average"
app:secPerBlock="0.1" />
See here.
Supports Android 5.0+
WaveFormView uses MediaCodec supporting 5.0+ to generate waveform at runtime.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.