Transient Detector that will record only once and switch off once recorded
I’m Matt and extremely noobish at Max but desperately want to get better. I have a problem..
I found a transient detector that triggers a bang when the sound is above a certain level,
however i’ve hooked this up to my record object and it needs another bang to turn off which is a problem, and I also want it to record only once.
My aim is to record in 4 different samples for 4 different buffers. I’m making a drum sequencer with live samples basically.
Another way to do this live sampling would maybe be to beatbox a beat and then make it slice up the audio into 4 different buffers but I have no idea how to go about doing that. The first option seems simpler?
----------begin_max5_patcher---------- 753.3oc4W11aaBCDG+0jOEHdcVFmefG1Klz9bLUMQBNodhXp.mt1U07Ye1mg zznDBTnUUZuAxYH1+ue24yGOMyKXY4Ch5.+u4+SeOuml44gCYGvqw1KXa1Cq JxpwWKPWtYSgHXt6QpcakpBgFeFzL3cY5U2JUa9UkXk1M2zzzEgy8o.ydiD1 d0+ll+iLGm8xk+9KT5Qyd4N8oSuaH8i2IbycfTYVkarO74YyrWl2SeQI9iYA aWMs3ATsAY4q12N35RktV9Wbo.hQ1CzuAt0USHn2G2kayNdIUYawkL3GUxrh yyCxk3Qsbix9mN7q2DbVtSqKUCNPCNWkfAZHt85473nAFmWlo1LoAZQ9FwzE oQGmjfI5LVWg5jIKTiHY96.Z99de9hgfFx0QCyUCHoKzDOTz.WYWvTBkutep HRH2AgH2lkE7KSDB8yLRxtWTkY1EYboP+ps0SztIBCvJGbLYAB6Lmgv9LSnb QQ1i6MUDfPi+DNQYPs.hxc.pySTI7+CSgnb2QPzv9jBk9YlPK2sdsnZuec4N U9RoV.1HdnOYhPEKDqLSfH2lttaOKZxN8ZcQYldbGeUHuWrXqPavyPaUgm3R Pbci5ZTC37y60P5.SCJj0SaWoFgWVkebRP6qrprnrxsrXQAi+jFBoQG+K3H2 5UYKvBdJGRhOG7ncjxvb840TFB5Lkg89V+AWRCvUm9kLntsi+ZZaHX0p1Iro 0ae3fvyE0ZoJSKMc+9x6XS.7ew6tUlmKvm2tYaqL+tRymhznAJCOU2RFyMdJ skS7KjTLDwFN0h0zt96hXsMubU0FOPwBnXItOmhRfCViTrw8PqICSqiEeo8P Rmv3qyuHJFriis2ZnIZMV0x5qZg9qVBGyIgTLLSItFBsViTsI8PrQenQ6dgu 25NaNhulPu05iPr72nXc8p0D4sViMyj2G0x9Pi1z9TZjMPBxLs4ZiytZiLNb vZjpMpGhkNzBQtR2TW+lzH1YrbegbqaYsN4n+YOO6evZO5KA -----------end_max5_patcher-----------
please help! AHH
I feel your frustration!
I’ve not done this kind of thing with Max, but I’ve been trawling the forum long enough to know that you should search maxobjects.com/this forum/google for bonk~ and analyzer~, two externals that allow you to extract info from audio (realtime or not, I don’t know); a simple solution might also be:
>~ 0.1 (or whatever value) –> [edge~]; this will give you ‘true or false’ bangs.
Get this solved first, and then repost under a different topic for details on slicing into different buffers.
Slicing up a sample based on transients is easy with rm.slice although it just sticks the times in a [coll]. I’ve used it before to slice up a single bar drumbeat and re-sequence my own patterns using the slices. It’s available here: http://www.maxobjects.com/?v=objects&id_objet=4748
It’s also relatively easy to trim off any silence at the beginning of recordings if you need to do that. It’s probably one of the most useful tools I’ve used!
ah thanks a lot guys, i’ll give it a go!
Okay guys, i had a go at making my own transient detector recorder. There may be a couple of unnecessary connections, but it has all the ingredients I believe! I just can’t get it to record!
I think it must be a small problem but i can’t figure it out.
Here’s my transient detector recorder 2.0 lol
----------begin_max5_patcher---------- 876.3oc0XtzbaBCDG+r8mBFNmlgUR7p2xGfdIW6jICOjsoCHx.xMtISxm8JV gozZCFrI3zKVVhGR+18+tZEutbgYX9NdoowWM9twhEutbwBbnpAVT2egYVvt nzfR71Lixyx3Bo4M5qI46j332yixKh2OrXaV9VYJWhOjU8nqxExxjW3UiAja 2O7SAxnMIh0OVvij50BXwTW1fPspZ.argn903g5GJIFm17ve7EpiYqIPDjgS f4cEIAosVPIh8qGnZr2Vtr5matPtu69uYHyMJlV7sIH2TugfOaFvWveVMWGP +K7h7cuebrI8is9Nk+5ItlYyxj0hpUby+Zf8HVHOTeP88qZXt8Ye.qYv9jx+ IOMiK4EcXMftvNQIp5iTBC89TaaTKPPIgC63rRrmLhB2Jk4hQBSXfXcuzXit JpaiGqa+lyzId2lE1oi4nxT5PjoqRyCZ46xxi4segcSOEck1NH8PK5UuaLgQ yr2xbL1nbxYXnTDodGSS3r15by.zDT.0zDcZtSjrCFavby7VDfwmOxEAgo3i Y8eiIhX6ObSj0U1DIyWuV8zSaZPvECW.G5oybPHyBmcrmX31UqTYaLJy2JhC SjbX1Cnr.baQerAfdMVf+0q7g3fn2mrZlzBjZno8WRf6LjL8iILnV4a6c5v. v4ZFFnqH9zgAv4Ul3.xUvX5pnAVuVIxH0BzoyFEDGcMJdt19PzGxp+PkqX1A 4lBd4l2UkCY.2N2hGpEtQiqWeFGuKP5fuOyzDw+d9abMUM9eawTwQEQ64X+4 ZLflkULuTlHBjIph1acSJ0sweV6aRhi4h1IXyRheJWk0obe9E3VaUni5jmpF vytoWy634p0G9LOpMEtGdgUoAq0Due0kTVkiIt6jLiBaqIFae5no1aVo1aHP aMReslSpClFPaBn+0IKO.Z6YEZ+AHv8FGyDKDShtLxZK.1qangYGZqKD5CPf LugnNe.gn.wGEnLnULJ1qaOmymtXzpOPy4DipyLQX9M85lZ1rRMa.T6LV8JP 9z44XmmiifNNGmlNc62nyJyTqAlnAFQ1UGsL0EkoD.+NWXuto1edoFFH0jgS Mk31lZFqoWO6oXMqXSHC.a+yRgC9s2JE60C1y6dovPvt5iAbFbyp+fTs50C2 rOobCmK20ERcJtujbZFOr7sk+FfqoAah -----------end_max5_patcher-----------
Also unless I’m being stupid it seems bonk~ fiddle~ and rm.slice no longer exist. I tried with and without the tilde and the max window didn’t recognise it
here’s something using max ‘native’ objects– it does transient detection OK but I can’t seem to get it to record into a buffer (something silly you can fix yourself…(just read your post again and you can’t get it to record either – sorry I didn’t answer that question…))
hope it makes sense– it needs cleaning up and other tweaking but at least illustrates the principles of high pass filtering to isolate transients, using averaging of the signal over a time window (256 samps), use of average amplitude threshold and hysteresis, debouncing the recording trigger (or gate) using the del object
OK I better do some real work and stop procrastinating
----------begin_max5_patcher---------- 3864.3oc6c08jihaD+4Y9qfxIOjrY1oPef.Rd5RkpRdI4g75co1Bavd3VL3B i2Otqt4u8.pE1fMHKvBM3a2qtx6LXfo0O0cqV8W5We7gEKy9Rz9EV+Uqez5g G90Ge3A9kptvChe+gEaC9xpjf87aawprsaiRKV7D7cEQeofe8Wh27h0tx6xZ cbRQTtUQlU79rjfhHqh7fz8wkO0dq5mKINMZU1gT9CiEWbWdz9x6JnHNK8Cs tCp3NVmkVjFrMh+m7GxiCRpegoG1FmlDUvoRTWuv7nUEvHkRIOa+jkKp5SGe 9m3mss9emdWYGJpeY10urfhUuDmto4Kh3V8vLV0md7eF623EUQt6i+EN4hre 1tCxpI4FGxGWYK+426RVTcse6wGq93IEmbRi9b4CewbSRVP31nxoFj8hwAjK 2rJKIKGF01OyHNXe5Sk+jO1g523GP8BiHIvnsCG573fIt5SjaOvn+QTDd2Ee cWD7VVr33CzDHw0CrVi.GOahOthv8PHWlC+mvUCKwXXDneehFAGBi4S0ZkI1 uhexhf3vks3igyBiHbYArMpA32KOL5H52.hYzEZDs1kD70kAq9ndQKDhKlSs I2Hb4fAobx3gKcJZuyJ3PQ1+rTK6.wKbmibb+ibhKG0vftSlipi7KESexZQb kZ8NjVYGkV4TPTt.QDPR4ej3jnOEkuuslyGVDraWiK+PiGoBG+YPv24oiWJN EtD53kxi9Tb8y6CWrb14w5urFFrOx+vn7+g50fQpRSYR1pOFE1fO5gEgQqU+ MjsKJsq69blV3NiSOe0jl+UCNjT7gtmXZ+8qCVE06C2I6zCK1jGGlkVQDsdx pKW+mqRfgyn3zjt42QZvtNd3hrrjkA4USEKShZMEWJeDjFusjUuHFnGr8wmK d6t7XvVgiWKJMn7c7x9U4YIIsdUv27oN9lvRtfUQeNNr3E965DZ0xRol7WMk baccYRvskhKrrad89w79T60+5s8INyHv7BHTSNWZVhDc2R0MknOWpl5tn95b sdBYK8ii6iRFMRh6EIwxQRv.RDfgD5MijKCR2Toire3jY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Oa8u9ESCtdnF8sXwh9SN5hMD5ZddUQmOiXaRdUamuU3VYzKMQcxwWGz cPd7CkYkrtsyH3qX2y04A3RiggHRvB264xZ.b0Al5qXYMXOnJ7YRxTLNhqbr 6Q2cQSliwyo.oX6bWlWJpS2yqb7.O.zdFwcqrToybivYCgvsuCI7tjDdKobG zfHbz2CM6rJzrU96v5myR2j70oNtjDr8oCrMw180VPZc044fM5IqjrrcSenZ wvIbAXwFbFZoOHQmgsd+Z9Qe8Te9oicA1BHHET1s5UWoGc5KZn5P7X+g+S0i bbvx8COpxS919LHJtbOy+2Vn0CYre3+9usJxrfi4yo9L8Eignk.mvm9Jexd1 jwZTA+rxU4IaiJhxeUOgxBK5pF9Mh9CaTGruXm25CoXbqCoX3POf3OpwBVih 8KOrdc47ktOw6knAfIpCUQ3cDc3iwb7dA0zqTM.57vqqYZZbSpGkcdbiYf2N .tD2QH6hZsPI+Aaued.BN2JPAPbYNr2ZCN8kLgsrX8Ri951fuKlVTklZ2QR6 yZTZyD3cxoIhqpzDwb3DUEZx0rycJSSHiQSsK3KYycFDmTkjF.Lg8X7TETnW Aae72tQhkpJwRMF9QUglL7TpJpRolklHpnJkfMJMwvyOZBqBMwLKMwO7RaH+ KgnPlcx6ZzDdf.EE6vCAqmeciw+heC4A4GU49Cp+sabj3nxJ5Nl0xmy9y0Wa pkYzob03CaWgOFhntpVD24mgqXyxRgUxRCypYiRTbw6YGStYMbEor1f41ly3 DEdds78Y1BMSzPQL6x2Lkm8Lms7L0W0ybatl4ohEglU1yUkMxxL75KJoOvrR dpL0clSAlEpxMrBJkoIz7hl7MqUcDkTOYVV74mPm6DSQk+xu83+G.TEQ8 -----------end_max5_patcher-----------
i need the patch in my last post to record when a transient comes in and then allow me to turn it off without turning off the dac ^
or if this can’t be done, can someone show me how to slice silence from the beginning of a recording?
oo some interesting objects Terry, thanks!
And yes people I have looked at max objects and I just can’t seem to find any use out of it. Seeing as some of the objects don’t exist
rm.slice seems to still be available at the link I had above. To trim silence: generally the second time it puts into [coll] will be where you need to trim. On a patch I worked on recently, I programmed it to get that time and give it to my playback objects as soon as recording was finished, it’s pretty efficient and may eliminate your transient detection need.
I’d really like to use that, but max isn’t recognising rm.slice
it can only find zl.slice for lists.
Would you be able to copy the object in here?
would be much appreciated
And yes people I have looked at max objects and I just can’t seem to find any use out of it. Seeing as some of the objects don’t exist
While maxobjects.com does list objects that are included with Max, it also lists 3rd party objects that you need to download if you want to use them (each object listing on maxobjects.com should have a download link—sometiems they are old, but many of them are good).
You should be able to find
rm.slice from the maxobject.com link dickmedd provided, or you can follow this link to my download page: http://www.rothmichaels.us/roth-moves
See this thread for some info about some warnings
rm.slice will print to the Max window that can be safely ignored (you can also download the a zip containing
rm.slice from that thread, but the download link I provided or maxobjects.com is the way to go because I will be updaing that object sometime next week).
A few brief thoughts on this issue: while it is good to detect an attack and sync the triggered recording with a zero crossing, your use of
zerox~ is not accomplishing this. You have the output of
zerox~ going into
record~ which will just record a series of numbers (representing the number of zero-crossings) into the
buffer~. Check out this thread for some thoughts on syncing recording to zero-crossings: http://cycling74.com/forums/topic.php?id=36777
You are on the right track using
thresh~ vs the use of
>~ in the original example you linked because to detect a transient, you need to see when a signal goes above and below a threshold. You may want to think about using
edge~ to covert the output from
thresh~ into something you can use to trigger your recording. The problem with using
edge~ is you are not working at signal rate and so the actual recording could be triggered sometime after the threshold was crossed (again, see this thread for some discussion about managin that: http://cycling74.com/forums/topic.php?id=36777).
Also, as in your Terry’s example and the original, some sort of averaging/envelope following of the signal you are analyzing for transients could be useful but may not be necessary depending what you are trying to accomplish. If you do no envelope following, you sould at least run your signal through
abs~ to get the absolute value of the signal you are processing (because if you have a threshold of 0.5, you want -0.6 to still trigger recording).
Something else to keep in mind is that after you have detected a transient, that transient you wanted to record will have already passed, so you will need some sort of delay on the signal being recorded to compensate (it won’t be possible to get this delay exact, but this could work well combined with techniques for starting recordings at zero crossings I linked above).
What you are trying to accomplish involves a few steps and I would take them one at a time.
1. You need a some sort of gate system to prevent recording for being triggered more than once. Get this working first just with some toggles and using your mouse.
2. You need some way of deciding when to stop recording, either manually, with a fixed time delay, when your signal goes below a threshold, or some combination of crossing below a threshold and a timed delay.
3. You need the actual transient detector
4. If you want to trigger recording at signal rate, you will need to manage that (again, see the link posted above
5. Delaying the signal being recorded so you can capture the transient your are using to trigger the recording
or if this can’t be done, can someone show me how to slice silence from the beginning of a recording?
As I’ve outlined this certainly can be done, but if your goal is avoiding silence at the beginning of a recording, it is probably simpler and more effective to do it post-recording with something like
It’s probably one of the most useful tools I’ve used!
Thanks :) stay tuned for updates on
rm.slice coming soon! (I mean it this time, after Christmas have some time to work on my own projects)
Wow, I guess not so brief—I’m sometimes more verbose than normal when I’m tired.
Wow lol thanks for your time. It’s a shame rm.slice is a download because I would have to provide my lecturers with it when I hand in my work. The gate system is what I’m working on at the moment. Quite a pain to figure out.
I’ll take a look at the links you provided.
Thanks a lot.
Hope I’m not trying to accomplish too much lol. All I want to do is live sampling! Never thought it would be this hard
Are they really not letting you include externals in your patch? So many of the projects I work on in Max require at least one external at some point, I find it hard to believe your lecturers wouldn’t understand that fact!
We can give them externals, it’s just a bit of a pain to tell them where to install them etc. If that turns out to be the best option though, i’ll definitely do that!
That’s good news. I’m sure they can handle it ;)
yea I think they can haha :P
i don’t want to put these files in the wrong folders, so just to check the java file goes into:
Max 6 > Cycling 74 > Java > Lib
and the help file into: Java > help
I’m not at a computer right now, so I cannot say for sure, but Max6/Cycling ’74/Java/lib should work (I don’t know I sure just because normally I have other folders I put my external java stuff in and set the path Max6/Cycling ’74/Java/max.java.config.txt).
You can also put any external patches or objects in the same folder as your patch which may be more convenient to hand in a folder with a patch and any external objects you require (although putting things in a more general location like you suggest may be more convenient since any patch you work on would be able to access those objects). Putting a java external in the same folder with should be no problem for simple objects like
rm.slice but for more complicated Java libraries with many objects that depend on each other you may need the library to be in a general library location like you suggest (loading Java objects from the same folder as your patch uses a special work around with the Java class loader that can behave a little differently than the normal class loaders use for tha lib folder or other folders you list in max.java.config.txt but off the top of my head I don’t remember what the differences are and when they matter but I know the same folder trick works for
rm.slice because that is how the included help patch works).
Unless your teacher had asked you not to, I wouldn’t worry about uses 3rd party objects in your class work because that is a fairly normal workflow for using Max. I often teach
pitch~ to my students and encourage them to browse the forums and maxobjects.com and sometimes they have found some interesting externals I had not heard of.
I’m really loving rm.slice… its super useful. I’m wondering if there would be any way of reversing the calculation process somewhat, ie specify the number of slices that you would like to be calculated from a particular audio file. Would this be possible?
rm.slice works really well, thanks for that!
It looks like the key to writing a really intelligent object will be to automatically detect the relative silence threshold. For example, sometimes a signal has noise from an instrument amp or reverb or delay or release tails from previous notes which may always be above a static threshold value. This might produce a waveform like the attached screenshot from Ableton Live.
Notice in the screenshot how Ableton has somehow calculated the transients even though there is a significant amount of signal noise between the transients. Does anyone know how they did this? Is it possibly just the minimum amplitude in the buffer plus a little extra to account for variation? Feeding a dynamic threshold value to rm.slice would make for a really intelligent recording algorithm.
Thoughts? Abjections? I’m feeling this out as I go.
It’s all about volume differential and not an absolute threshold. So the change between whatever is happening and what’s coming next. That way you can have a loud noise floor and still detect onsets.
This is what I use for nearly everything (tweaked from a Peter McCulloch patch):
----------begin_max5_patcher---------- 3088.3oc6c0zbihiF9bxuBJW6gYp0iKz2vdXqcutUsW2K8LUJrQNgowfKPNI 8L0je6q9.HfsAjSaKS5jCcRZIr8idz6WRuRu9Ou8lYKyelWNy6e38Euat4Ou 8lazMoZ3lp++My1D87pznR8iMaU9lM7Lwr4l9D7mE51+e7z7UIhuU2Qo3aob cO0srNOSrNZktQPq1JS9Cca3fE9UMmsaSRVJWT19YkMluST2Z8itMRr5gjr6 uqfuRXFHTBcA.Rl6A.x2QOPHT8Kp+Beueq5UkDqgV9xe+WvgsAXVzFCp+2EI QoyTc7W2dq5Gy+NIn+ytRgWjPDs5qS.NhEpoFMAAofAIn.2PPOZkDTMS.fma oElOSQCDCmzGYPOujA+OhiV8R+C4NiM3oN1BfA5ACfrPN.wD0+Q8yiMx.f2B 9W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75imtmU6KJdn VI+DNsvCX5AG2HMSrUX1MvAaCdPtyvN1lYKr6jdv1XLD6NkcLvV73H4Geaje bWjSHahrDiOs.Cnjpuj6HMQFvjKnf0osKPjA1MXbmmOjMgIibWX6HaBSF4Na 6HqLl5tH4PXaUNAtCO.avCzM3AYC+3tkEirwYydf9piGX3IZLMjpsbhYrEHL E6qNp83f8Z6RXMEZgzGLzcZC13JG3tPKP1trO2.GXnsJCtY5BZiyXj6bFCY1 hG2vO5b+YwlD4tEhBrJ1cxzBOHvaJ1TPHaQPHknJYKT+vtMcALlZ0XA.lVbK vcgBtubdOS1tie.1X9Zec3KKhXVuox.GhHfUHB5HDQshiXNbVytTAPmbH5DW yup.VpCIkhZBSEDR1qsKgkU.wJoPrC0KvVOm6JDgrBQNz2tkNfdqK11jB389 FURAl89lTZuuEkN7aPo9+1SZ+u4jjex+0s+e.rL.KA. -----------end_max5_patcher-----------
A follow up. I use rm.slice for when I want to retroactively determine when attacks happen in a recorded file, and the onset detection above to detect when onsets are happening in REALTIME to trigger stuff.
Thanks Rodrigo! Yeah "volume differential" is what I was grasping at with the phrase "relative threshold," but I don’t really know what I’m talking about …yet.
There are a few objects.concepts that I’m not familiar with in there, like slide~. Some questions:
- Would you mind giving an english summary of the "just attack" side? Does it just compare an initial amplitude as the low value and look for an increase above the threshold?
- What kind of latency can we expect when using the final bang to trigger a record~?
- If record-start latency is an issue, could you give some tips to use this in a post-processing situation? For example I’m not sure how to step through the buffer’s waveform performing these calculations? Maybe it’s more practical to just trigger record-start with a little latency?
Thank you so much! Great thread!
Well, it turns out that the real-time attack detection is fast enough to pass for my sampler. I didn’t even adjust the attack and release thresholds. It obviously works well when there are reverb/delay/release trails from previous notes as well, which can lead to some interesting creative stuff.
Very cool! Thanks!
Forums > MaxMSP