Reverse append mode on record~

ironside's icon

Hi. I have a little head-scratcher here with a buffer-based system I am trying to make.

I have a system which records dialogue through a noise gate, writing it to a buffer with record~ (using append mode), when it passes an amplitude threshold (ie. I am removing gaps between words which are coming over a mic while doing this).

This system works well. I am using record~ @append 1 (controlled by a noise gate/threshold), plus count~/index~ to play back the buffer. However, I would like to vary it, so that I build this loop backwards - eg. the sequence runs A; B-A; C-B-A; D-C-B-A etc (A being the first word spoken/sounded, D the last). I feel that the record~ object is now no longer the correct choice, and some combination of poke~ and index~ is best. The system is intended to be dynamic - eg. there are no fixed timings or durations for the incoming signal, only a threshold amplitude.

I'm struggling to get my head around this, and was wondering if someone could point me in the right direction, or point out a feature of an object that will help?

Tj Shredder's icon

You would have to shift the previously recorded material, or record it as you did and have a list of takes (beginning time/end time) and sequence the playback reversed...
For shifting content within the buffer~ you could use mxj~ as well as index~ and poke~ with an offset. That has to be done after recording a take, as you can't know in advance how long it will be...

ironside's icon

Thanks for your reply. If I was to sequence the list of takes (your first suggestion, which is probably less sophisticated, but could be more appropriate for this specific application), do you think coll is a good place to start? I have always found coll pretty flakey, and never much liked it, and was wondering if there is a decent alternative I do not know about (I'm on Max 6).

Thanks again for your reply.

EDIT: It's probably worth pointing out that I am dealing mostly with phonemes, so I am looking at loads of very short sounds running together to form words.

Tj Shredder's icon

Interesting field...
coll is a viable option, but if this is a bigger project, I would dump it into a SQLite data base. Unfortunately there is only a javascript way to access it in a rudimentary way. Might be worth to learn it...
The other option worth to look into are dicts...
I vote for native SQLite support in Max - (feature request...). It is way more powerful than dict will ever be...
But in your case I guess dict is fine...

ironside's icon

Sorry, I forgot to reply to this. I used coll, and it turned out to be surprisingly easy to do. Thanks for your suggestions.

Wetterberg's icon

care to share your patch? I *think* i could recreate it, but I'd rather not ;)

ironside's icon

@Wetterberg

It's not on this computer currently, but I will dig it out for you in the next few days.