How to access samples in a buffer (Transient detector)

Questions and discussion about building and using Max for Live devices
Post Reply
charlybeck
Posts: 112
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: 157
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~

chapelier fou
Posts: 5224
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.
iMac 27" Retina i5 3,2 GHz OS 10.11.3 L10.0.1 M4L.

charlybeck
Posts: 112
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: 112
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: 2221
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