Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7732105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:38:53+00:00 2026-06-01T06:38:53+00:00

( Preface: This is my first audio-related question on Stack Overflow, so I’ll try

  • 0

(Preface: This is my first audio-related question on Stack Overflow, so I’ll try to word this as best as I possibly can. Edits welcome.)

I’m creating an application that’ll allow users to loop music. At the moment our prototypes allow these “loop markers” (implemented as UISliders) to snap at every second, specifying the beginning and end of a loop. Obviously, when looping music, seconds are a very crude manner to handle this, so I would like to use beats instead.

I don’t want to do anything other than mark beats for the UISliders to snap to:

  • Feed our loadMusic method an audio file.
  • Run it through a library to detect beats or the intervals between them (maybe).
  • Feed that value into the slider’s setNumberOfTickMarks: method.
  • Profit!

Unfortunately, most of the results I’ve run into via Google and SO have yielded much more advanced beat detection libraries like those that remixers would use. Overkill in my case.

Is this something that CoreMedia, AVFoundation or AudioToolbox can handle? If not, are there other libraries that can handle this? My research into Apple’s documentation has only yielded relevant results… for MIDI files. But Apple’s own software have features like this, such as iMovie’s snap-to-beats functionality.

Any guidance, code or abstracts would be immensely helpful at this point.

EDIT: After doing a bit more digging around, it seems the correct terminology for what I’m looking for is onset detection.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:38:55+00:00Added an answer on June 1, 2026 at 6:38 am

    Onset Detection algorithms come in many flavors from looking at the raw music signal to using frequency domain techniques.

    if you want a quick and easy way to determin where beats are:

    1. Chop up the music signal into small segments (20-50ms chunks)

    2. Compute the squared sum average of the signal: Sum(Xn ^2) / N (where N is the number of sample per 20-50ms)

    If you want more sophisticated techniques look into:

    https://adamhess.github.io/Onset_Detection_Nov302011.pdf

    or for hardcore treatment of it:

    https://scholar.google.com/citations?view_op=view_citation&hl=en&user=PMHXcoAAAAAJ&citation_for_view=PMHXcoAAAAAJ:uJ-U7cs_P_0C

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me preface this question with first stating that I'm new to GUI interfaces:
First off, let me preface this question by stating that I'm really a pretty
First let me preface this question by saying that I'm fairly new to Javascript.
First off, let me preface this question by saying that my professor is firmly
To preface this question, this is my first app and I have a very
I'll preface this by saying that I've been a longtime fan of Stack Overflow,
First, let me preface this by saying that I'm brand-new to Ember.js and relatively
Preface I've rarely ever been a JS developer and this is my first attempt
Let me preface this question by saying I've exhausted Google, or at least what
I should preface this question by saying that I am new to JavaServer Pages.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.