How to access samples in a buffer (Transient detector)

Learn about building and using Max for Live devices.
Post Reply
charlybeck
Posts: 114
Joined: Sat Sep 18, 2010 1:42 pm

How to access samples in a buffer (Transient detector)

Post by charlybeck » Sat Apr 25, 2020 2:44 am

Hi,

i want to implement a transient detector. So how can i access samples in a buffer~ object?

Maybe there is a more compfortable way to do this?

Cheers,
cb

doubleUG
Posts: 283
Joined: Sun Apr 24, 2011 7:19 am

Re: How to access samples in a buffer (Transient detector)

Post by doubleUG » Sat Apr 25, 2020 5:51 am

peek~ poke~ index~
copy the text, open Live > drag in empty M4L device > open Max editor > paste > save M4L device
https://docs.cycling74.com/max8/vignett ... ng_patches

https://doubleUG.bandcamp.com/releases

chapelier fou
Posts: 6263
Joined: Mon May 15, 2006 12:15 pm

Re: How to access samples in a buffer (Transient detector)

Post by chapelier fou » Sat Apr 25, 2020 4:45 pm

Bonk~
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

charlybeck
Posts: 114
Joined: Sat Sep 18, 2010 1:42 pm

Re: How to access samples in a buffer (Transient detector)

Post by charlybeck » Sun Apr 26, 2020 3:32 am

doubleUG wrote:
Sat Apr 25, 2020 5:51 am
peek~ poke~ index~
thanks i used peek~.

However, it is not so important since my samples all start after a few milliseconds but it is quite slow doing this in max.

Isn't there a faster way? For example an object that calculates the rms level of a defined part of a buffer or something like this?

charlybeck
Posts: 114
Joined: Sat Sep 18, 2010 1:42 pm

Re: How to access samples in a buffer (Transient detector)

Post by charlybeck » Mon May 25, 2020 4:00 am

i did not try it but in the meantime i read about the gen~ object which may be a faster solution than scanning samples with patcher objects because the code is directly translated to machine code...

[jur]
Site Admin
Posts: 6152
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: How to access samples in a buffer (Transient detector)

Post by [jur] » Mon May 25, 2020 1:56 pm

Yep, gen~ is the way to go as it works at sample rate (while msp is buffer length based).
You can check the Surreal Machines "Transient Machines" devices.
Ableton Forum Moderator

Post Reply