Using madmom to synchronise software with instrumentalists

70 views
Skip to first unread message

Alex McLean

unread,
Oct 16, 2017, 8:47:19 AM10/16/17
to madmom-users
Hi all,

Thanks for sharing madmom!

Second attempt at posting, I think the first didn't come through but apologies if i'm (unintentionally) spamming.

I'd like to synchronise my software Tidal (http://tidalcycles.org) with live percussionists.

Just by running `DBNBeatTracker online` I can see that the madmom algorithms should be good for this.

To sync with my system I'll need more than onsets, to also have current beat (or other measure such as metric cycle) per second as well as number of beats/cycles that have taken place and the time of the last one.

I can try to delve into the source with my moderate Python knowledge, but has something like this been done before with madmom? Any pointers / tips much appreciated!

Best wishes

alex

Sebastian Böck

unread,
Oct 16, 2017, 9:23:20 AM10/16/17
to madmom-users
Sorry, seems like I missed your first post.

Currently only beat tracking (i.e. the timing of the beats) is supported in online mode. Unfortunately, downbeat tracking (i.e. also track the position inside a measure/bar) is not supported yet. Preliminary tests on training a neural network to accomplish this task were not successful.

However, we did something in this direction for ROBOD (an automatic drummer). We use GMMs to track the metre/pattern. Code is available online (https://github.com/CPJKU/madmom/tree/ROBOD) but not really up-to-date any more. Furthermore we did not upload any models yet, since we only used it for tracking acoustic guitars playing only predefined patterns.

I guess that the most promising approach at the moment will be something which uses a counter to keep track of the position inside the bar.

At least `DBNBeatTracker online` outputs the beat timings, so you can use this information to infer the current tempo -- this is also used for the visualisation in verbose mode '-v'. I just merged online tempo estimation functionality, which might also be useful for you, since it applies some smoothing over the tempo information. And last but not least there's a student working on online real time beat tracking, see PRs 314 and 333.

HTH

Alex McLean

unread,
Oct 16, 2017, 10:12:34 AM10/16/17
to Sebastian Böck, madmom-users
Thanks for the quick+helpful response Sebastian,

This all sounds promising. The underlying aim is to be able to do away
with driving the percussionist's timing with a click track in music
improvisation. Knowing position inside a measure is not super
important, as in improvisation there is no real ground truth, and such
matters can be negotiated on the human level. :)

ROBOD sounds fun, I enjoyed the video I found. Somewhat relatedly, I'm
organising the "festival of algorithmic and mechanical movement" at
the moment:
http://algomech.com/

Thanks for merging the tempo estimation, I agree that smoothing of
tempo would be useful for me. However when I run `./TempoDetector
online` I get the following error:
"TypeError: add_arguments() got an unexpected keyword argument 'hist_buffer'"

Best wishes

alex

On 16 October 2017 at 14:23, Sebastian Böck
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "madmom-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/madmom-users/oCRrQhsjOAE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> madmom-users...@googlegroups.com.
> To post to this group, send email to madmom...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/madmom-users/84fdcb1b-fba3-47fb-9383-fd61ed0a91df%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
blog: http://slab.org/

Sebastian Böck

unread,
Oct 16, 2017, 10:53:27 AM10/16/17
to madmom-users
Hi,

On Monday, 16 October 2017 16:12:34 UTC+2, Alex McLean wrote:
Thanks for merging the tempo estimation, I agree that smoothing of
tempo would be useful for me. However when I run `./TempoDetector
online` I get the following error:
  "TypeError: add_arguments() got an unexpected keyword argument 'hist_buffer'" 

this sounds a bit like you try to run TempoDetector from a directory containing the current version of madmom (e.g. master git branch), but there's another madmom installation around (possibly via pip) which is accessed instead (since TempoDetector simply uses 'from madmom import' statements). A possible solution is to or install madmom in 'develop' mode (python setup.py develop --user).
Reply all
Reply to author
Forward
0 new messages