Does the memorywriter reset everytime it's triggered? Meaning, does it start over and record from the beginning or does it sort of "loop around"?
MemoryWriter does reset when it is Triggered. If you check the Cyclic box, it will wrap around to the beginning again after CaptureDuration.
I need to record while gate is high, and then a sampleplayer play it and only loop the timeselection as long as i recorded. In simpler terms "button down - record - button up - playback and loop exactly what recorded while button down"
There's an example in the Sound library that might be close to the behavior you want. If you search in the SoundBrowser for a Sound named:
Live Looper Aligned with the Bar, Blinking metronome, Position within bar, Resync when Silence button goes up
you could try it out and then open it up to take a look inside at how it works. The basic idea is to create a capture buffer that is longer than you really need and then have the Sample loop for the fraction of that time that you actually recorded. If you look inside the SoundToGlobalController named 'timer' the value is:
!Master trackAndHold: (!Master ramp: 180 s)
The ramp: keeps track of where you are in the 180 s buffer as long as the !Master toggle is on. As soon as it goes up, the current value of the ramp is used as !LoopEnd, and the sample starts looping.
Hope that example is helpful. Please let us know how it goes. Thanks!