Help creating a looping midi sampler.
I’m trying to create a patch that allows me to loop a sample when played from midi, giving sustained notes. Using the sampler position out and an a=b I tried to create this:
When the position is equal to the loop end-point set position to the loop start-point. This didn’t work at all. I put a trunc module in between the position and the a=b, this worked intermittently, about 1 in 3 times.
I then tried replacing the a=b with a>b but this was still just as unreliable.
Am I missing something or does anyone have any ideas how to make this work?
Thanks,
Neufena
When the position is equal to the loop end-point set position to the loop start-point. This didn’t work at all. I put a trunc module in between the position and the a=b, this worked intermittently, about 1 in 3 times.
I then tried replacing the a=b with a>b but this was still just as unreliable.
Am I missing something or does anyone have any ideas how to make this work?
Thanks,
Neufena
Hi neufena,
Right now I can't quite figure out everything you have to do to make this work, but I think it would be simpler and give a more predictable result if you use the sampler in sync mode Loop when the note is held, and switch to Button when the note stops.
Actually - if you only want the sample to be played at one pitch, you could simply connect a switch to the Sync mode inlet and use Midi learn on that switch. The two first sync modes are Button and Loop, which corresponds nicely to the 0 and 1 sent from the switch module. If you want the sound to stop at once and not play through to the end position, connect a "From 1 to 0.pat" between the switch and the Stop inlet on the sampler.
If you want to play the sample freely, you will obviously have to do some more. I'm at work now and can't help with details, but unless someone else has a solution and you haven't found one yourself, I could try to make a patch for you later on.
Right now I can't quite figure out everything you have to do to make this work, but I think it would be simpler and give a more predictable result if you use the sampler in sync mode Loop when the note is held, and switch to Button when the note stops.
Actually - if you only want the sample to be played at one pitch, you could simply connect a switch to the Sync mode inlet and use Midi learn on that switch. The two first sync modes are Button and Loop, which corresponds nicely to the 0 and 1 sent from the switch module. If you want the sound to stop at once and not play through to the end position, connect a "From 1 to 0.pat" between the switch and the Stop inlet on the sampler.
If you want to play the sample freely, you will obviously have to do some more. I'm at work now and can't help with details, but unless someone else has a solution and you haven't found one yourself, I could try to make a patch for you later on.
Bjørn S
Thanks bsork,
I did want to be able to play the sample freely and ultimatly I'd like to have a loop region within the sample so the playabck starts from the beginning then loops back to a certain region, continuing to play that region over and over until I release the key.
I'm also at work but once I get home I'll upload the experiments I done so far and post a link so you can see what I've been trying.
Neufena
I did want to be able to play the sample freely and ultimatly I'd like to have a loop region within the sample so the playabck starts from the beginning then loops back to a certain region, continuing to play that region over and over until I release the key.
I'm also at work but once I get home I'll upload the experiments I done so far and post a link so you can see what I've been trying.
Neufena
You have another option that's maybe better/easier, at least if you're not going to much more than set some loop points and play the samples in a "conventional" manner: use a VST sampler.
A lot of the free/share/donationware might not recognize loop points, and they might be restricted in what sample rates and bit depths they can handle, and I suspect that there's not much to be found that acts like the grain sampler, but it's worth a try. The Usine samplers have a lot going for them (they sample!), but as it is stated in the manual, they're not really a substitute for "normal" samplers when it comes to playing.
A lot of the free/share/donationware might not recognize loop points, and they might be restricted in what sample rates and bit depths they can handle, and I suspect that there's not much to be found that acts like the grain sampler, but it's worth a try. The Usine samplers have a lot going for them (they sample!), but as it is stated in the manual, they're not really a substitute for "normal" samplers when it comes to playing.
Bjørn S
I'd looked at that as an alternative option, I'd just wanted to use the in built sampler as it's more 'intergrated'. at the moment I'm using a vst soundfont player but since most of my sounds are made up of only 1 sample (no splits of velocity switching) I thought this might be simpler.
I'll look into single sample vsts and see how it works out.
Thanks,
I'll look into single sample vsts and see how it works out.
Thanks,
You're very close to the solution.
First, the position indicator is very unprecise for sampler in polyphonic mode, even if you play only on note at the same time on your keyboard.
So set the Sampler/polyphony to 1.
Another point: if you compare the Sampler/pos to a MAXPOS.
the test "Sampler/pos>MAXPOS" doesn't work all the time because, when the MAXPOS is reached it's sometime too late...and the sample stops.
so try to compare Sampler/pos >= 0.9* MAXPOS, that gives 10% margin.
(use a math/mult module)
After that, the best way is to use a Event/pass event
connect as follow
[>=/ou] --> [pass Event/pass]
[STARTPOS]-->[pass Event/in]
[pass Event/out]-->[sampler/pos]
normally should work.
If you have time, post an add-on !!!
First, the position indicator is very unprecise for sampler in polyphonic mode, even if you play only on note at the same time on your keyboard.
So set the Sampler/polyphony to 1.
Another point: if you compare the Sampler/pos to a MAXPOS.
the test "Sampler/pos>MAXPOS" doesn't work all the time because, when the MAXPOS is reached it's sometime too late...and the sample stops.
so try to compare Sampler/pos >= 0.9* MAXPOS, that gives 10% margin.
(use a math/mult module)
After that, the best way is to use a Event/pass event
connect as follow
[>=/ou] --> [pass Event/pass]
[STARTPOS]-->[pass Event/in]
[pass Event/out]-->[sampler/pos]
normally should work.
If you have time, post an add-on !!!
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Apart for the logic to tell once the end is reached that's just how I have it (with the Event/Pass). I finish work in a few hours so as soon as I get home I'll get to work and once it's done post an add on (or come back here for more help if I fail!)
Thanks,
Thanks,
Who is online
Users browsing this forum: No registered users and 21 guests
