Forums > MaxMSP

drum sampler for Roland TD-20 MIDI drums

October 27, 2006 | 5:24 pm

Hi there

I am currently working on a Max/MSP patch for a sampler that can be controlled by MIDI. Specifically, this sampler will be driven by MIDI data coming from a Roland TD-20 v-drum kit.

I’ve tested it, but we experienced some latency in the drum samples being played back. Enough to throw the drummer off and make it hard for him to keep time while playing with other live musicians.

This patch will be for live performance. Not for studio recording. So there is no room for latency. No sequencers or MIDI clocks are being used. Only live musicians playing in real time.

I’m running the patch on a Powerbook G4 aluminum 1.25GHz with 1.25 GB or RAM… the midi is coming in over a MIDI sport USB 2×2 box. The processor hit is only about 8%, so I don’t think it’s a processor issue.

Obviously there are lots of variables at play here… I want to narrow it down a bit to troubleshoot the problem areas.

Does anyone out there have any experience with Roland v-drums and its MIDI output? Is there any known delay of MIDI signal coming out of the drum kit brain? Hopefully this isn’t the case!

I can share the patch code if you wish to see what I’m doing. Perhaps someone might see some problems with my Max/MSP patch.

I’m using the groove~ object. This seemed to be the simplest object to play back sounds of varying lengths. Does file format (AIFF vs WAV) make a difference?

Thanks for any input. Hopefully we can fix these issues and start gigging this kit out live with a massively expanded set of sounds beyond the built-in Roland sounds!

cheers,


October 27, 2006 | 10:13 pm

ed guild skrev:
> Hi there
>
> I am currently working on a Max/MSP patch for a sampler that can be controlled by MIDI. Specifically, this sampler will be driven by MIDI data coming from a Roland TD-20 v-drum kit.
>
> I’ve tested it, but we experienced some latency in the drum samples being played back.

> No sequencers or MIDI clocks are being used. Only live musicians playing in real time.
>
> I’m running the patch on a Powerbook G4 aluminum 1.25GHz with 1.25 GB or RAM… the midi is coming in over a MIDI sport USB 2×2 box.
I think the most likely thing is that the latency is introduced either by a:
the settings within max – The vector settings primarily. I’m not all that familiar with these parameters, so I’ll leave that to others.
Or b: Your audio interface. What kind of buffer size is it set to?

Andreas


October 27, 2006 | 10:17 pm

ed guild wrote:
> I’m using the groove~ object. This seemed to be the simplest object
> to play back sounds of varying lengths. Does file format (AIFF vs
> WAV) make a difference?

usually the bottleneck isn’t Midi, but the latency of your sound card.
You have to set the I/O vector size and the signal vector size as small
as possible. Depends on the soundcard as well. The vector size
translates directly to latency, its that amount of samples…
A small vector size will eat extra CPU, but if your on 8% you probably
have enough headroom…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


October 28, 2006 | 12:16 am

Quote: Wetterberg wrote on Fri, 27 October 2006 18:13
—————————————————-
> ed guild skrev:
> > Hi there
> >
> > I am currently working on a Max/MSP patch for a sampler that can be controlled by MIDI. Specifically, this sampler will be driven by MIDI data coming from a Roland TD-20 v-drum kit.

> I think the most likely thing is that the latency is introduced either by a:
> the settings within max – The vector settings primarily. I’m not all that familiar with these parameters, so I’ll leave that to others.
> Or b: Your audio interface. What kind of buffer size is it set to?
>
> Andreas

ah, currently I’m going out of the headphone jack in my laptop. I plan on getting a firewire interface when it’s ready for performance.

unsure what the buffer is set at. so the default settings I’d imagine.


October 28, 2006 | 12:20 am

Quote: Stefan Tiedje wrote on Fri, 27 October 2006 18:17
—————————————————-
> ed guild wrote:
> > I’m using the groove~ object. This seemed to be the simplest object
> > to play back sounds of varying lengths. Does file format (AIFF vs
> > WAV) make a difference?
>
> usually the bottleneck isn’t Midi, but the latency of your sound card.
> You have to set the I/O vector size and the signal vector size as small
> as possible. Depends on the soundcard as well. The vector size
> translates directly to latency, its that amount of samples…
> A small vector size will eat extra CPU, but if your on 8% you probably
> have enough headroom…
>
> Stefan
>

sweet! thank you very much Stefan for the insight. this sounds very plausible.

hopefully next week I can get another session in with the drummer and test the vector sizes.

cheers,


October 28, 2006 | 1:27 am


October 30, 2006 | 3:47 pm

Quote: Wetterberg wrote on Fri, 27 October 2006 18:13
—————————————————-
> I think the most likely thing is that the latency is introduced either by a:
> the settings within max – The vector settings primarily. I’m not all that familiar with these parameters, so I’ll leave that to others.
> Or b: Your audio interface. What kind of buffer size is it set to?
>
> Andreas
—————————————————-

Andreas

thank you for this info… it really helped me narrow down my search for the latency.

The sampler gets far more responsive when the signal vector is set below 16.

Unfortunately, I also lose my velocity data. I guess the input signal vector is how much data Max will allow to be input?

so the delay may be slightly caused by the input signal vector, but I think the real problem lies with how I am using the velocity data with my sampler.

I took the velocity processing code directly from one of the Max tutorial patches that was for a basic velocity sensitive sampler.

I think the manner in which the sampler is playing back the sample buffer is causing the sample to have a really slow attack and therefore making it sound like a delay.

I guess I will have to think harder on how to use the velocity data.

for now, thanks to all for their input it was all very helpful.


October 31, 2006 | 10:29 am

ed guild wrote:
> I took the velocity processing code directly from one of the Max
> tutorial patches that was for a basic velocity sensitive sampler.

That should be fine…

> I think the manner in which the sampler is playing back the sample
> buffer is causing the sample to have a really slow attack and
> therefore making it sound like a delay.

To check the timing, you need to be sure that there is no silence or low
amplitude part in the beginning of the sample as well. Cut it as short
as possible…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


Viewing 8 posts - 1 through 8 (of 8 total)