# Trimming Audio File Using P5.js

**URL:** <https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731>\
**Category:** Libraries\
**Created:** [January 22, 2019, 8:43am UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731 "2019-01-22T08:43:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedali](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@ahmedali](https://discourse.processing.org/u/ahmedali)\
**Post date:** [January 22, 2019, 8:43am UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731/1 "2019-01-22T08:43:08Z")

</div>

Hi I have a question that can I trim the audio file that I recorded using p5.js?. I had to trim the first 3 seconds of my recorded file.May you help me.I will be very thankful to all of you after this act of kindness, Thanks

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 22, 2019, 1:21pm UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731/2 "2019-01-22T13:21:57Z")

</div>

looks like you ask for some help for p5 sound lib?  
but if you have the file already  
( downloaded to your browser download folder )  
can use a good external audio tool:  
[https://www.audacityteam.org/](https://www.audacityteam.org/)

---

<div class="post-metadata">

**Author:** ![dan850](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dan850](https://discourse.processing.org/u/dan850)\
**Post date:** [January 23, 2019, 9:37am UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731/3 "2019-01-23T09:37:54Z")

</div>

hi @ahmedali I might be wrong but I don’t think there is a single function for trimming audio yet.

Have you watched this tutorial on sound? - [https://www.youtube.com/playlist?list=PLRqwX-V7Uu6aFcVjlDAkkGIixw70s7jpW](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6aFcVjlDAkkGIixw70s7jpW) . 17.3 of the tutorial talks about going from one point of a song to another and setting up cues at a certain point in a song and other topics that deal with sound.

Other than that as of right now, i 2nd what @kll suggests. But, feel free to give us more detail of your project if you wish. Maybe there is another solution.

---

<div class="post-metadata">

**Author:** ![ahmedali](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@ahmedali](https://discourse.processing.org/u/ahmedali)\
**Post date:** [January 24, 2019, 5:50am UTC](https://discourse.processing.org/t/trimming-audio-file-using-p5-js/7731/4 "2019-01-24T05:50:46Z")

</div>

Thanks, a lot kll when I got you to reply my problem had solved. Thanks a lot, I solved it by AUDIOCONTEXT() in javascript.
