Welcome to %s forums

BrainModular Users Forum

Login Register

One note triggering

I need help on a Patch
Post Reply
ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 22 May 2008, 19:57

I'm just trying to do my first patch after playing with the add ons...

I would like to be able to trigger different sample ( using the sampler module ) or midi loops each one after each one...

For example:

1st time you press your key=Sample 1 playing
2nd time = Sample 1 stoping and midi loop 1 playing
3rd time= midi loop 1stoping and sample 2 playing
4th time=sample 2 stopping and sample 3 playing
5th time= sample 3 stoping and midi loop 2 playin
Etc.....

While testing, I've been able to do it with two samplers:

1) linking the "is playing" output from the first one to the "stop" input through a toggle module

2) Linking a PLAY BUTTON ( linked of course to the play input ) to the "stop" input through a toggle module on the first sampler only

3) Linking the toggle module wich goes into the "stop input" from the first sampler, to the "play" input of the second sampler through a "0 to 1" module

I've tried to use the "stopplay" output but the sample is triggered only at the sample end, not if i press the main PLAY BUTTON one more time


The main idea, as i'm a drummer, is to trig different samples or midi loops with only one drum pad, in the order i want and the next one stops the previous one ( when i hit my drum pad )...

I need help from Usine Guru's... :-)

Am i searching in the right direction, or should i use a switch concept?
Seb.Dub

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 23 May 2008, 00:04

Hi ethnix73, I've come up with a couple of ideas for you for your switching thing.

First, if you don't need more than 16 different samples/midi files in your list, you could use a Data/Selector and enter one value for the Sampler and another for the Piano Roll in the val 1-16 inputs. Then put a Data/Counters/Counter Simple.pat patch between your play/trigger button and the Selector.select. If you need more than 16, you'll have to use one of the array modules (or maybe a Step (sequenced)?) together with the Get Array Element Value to get hold of which module to play. Either way, use two A=B modules to check if the current selection is a Sampler or Piano Roll.

From your post I'm not quite sure whether you want to use both sample and MIDI to loop, if they're one-shots, or a mixture. Forgetting the "mixed" part for now, here are a couple of recipies for switching assuming you've done as described above:

For both, you should have a Wait One Cycle connected to your trigger button.

One-shots:
Set sync mode on both to play button, and have two Pass Event Flow modules with the pass input connected to the A=B modules. The Wait One Cycle should be connected to both Pass Event Flow.in inputs, while the Pass Event Flow is connected to the play inputs of the Sampler and the Piano Roll. Also connect the trigger button to the stop input of both Sampler and Piano Roll. This will first stop whatever module is playing before starting the other.

Loops:
This is actually a little bit easier; just take the output of the A=B modules and connect them to the sync input of their respective Sampler or Piano Roll, and connect the Wait One Cycle to stop on both modules as well. This will switch the sync mode between play button and loop, and stop the playing module immediately after starting looping the other.

Hope this helps you a bit further - happy patching!
Bjørn S

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 23 May 2008, 14:10

I've been thinking a bit more, and if you're going to switch freely between samples and midi, you should have to instances of each, or else you'll end up with quite a bit of extra coding to stop the playing, load the new file and start it without hickups. You'll also probably end up with a little bit of extra latency, since you would need to use more Wait One Cycle modules to do things in the right order.

I also got another idea for you if that might come in handy when you're entering the order of files to be triggered. If you have eg two Samplers and two Piano Rolls, let them have numbers 100, 200, 300, and 400 respectively. Then add the number of the file to that number. I guess the Array Editor would be the best module to use this way. On the output, add an AdivB where B=100 and connect the output of that to A=B modules as outlined in my previous post. Also connect an AmodB where B=100 to the Selector or Array output, and then you'll get the file number to load.

Come to think of it, you would probably need to delay the triggering anyway (with a Wait One Cycle) so that the new file gets loaded first. Hm...
Bjørn S

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 23 May 2008, 20:01

Thanks for your reply Bsork,

i'm just trying your solution
Seb.Dub

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 26 May 2008, 00:35

Hi again ethnix73,
I'd just like to say that I found your idea for a list of files to trigger quite useful. Sort of like an extension of the play next/previous file in the samplers.

I've been working on a patch which goes a bit further, including some stuff that will be a bit impractical for a drummer with a trigger pad to use - like setting pitch etc for the next file to play. Anyway, it's getting a bit too late to finish it, but I think I've sorted out most of the problems, and I reckon I have something for the add-ons tomorrow night.
Bjørn S

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 26 May 2008, 13:09

hi bsork,

Happy to know you find my idea quite useful...

i'm still working on my patch...It's not yet finished. i'm able to trigger samples and midi loops, but i've got still some problems.

I will upload it in the add-ons when it will be the case.
Seb.Dub

nofish
Member
Posts: 114
Contact:

Unread post by nofish » 26 May 2008, 14:49

ethnix73 wrote:hi bsork,

Happy to know you find my idea quite useful...

i'm still working on my patch...It's not yet finished. i'm able to trigger samples and midi loops, but i've got still some problems.

I will upload it in the add-ons when it will be the case.
Yes, please.
I'm looking forward to it because this might be what I'm looking for.

http://www.sensomusic.com/forums/viewtopic.php?id=842

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 27 May 2008, 00:46

Bsork

It's ok with your first solution, i've tested it.

but I don't understand how to use the array in the second...I don't understand anything yet with array modules :-(

I might be a solution really interesting...Could i really choose the order of files to be played with the array? Or does have also to sort the list of files, in samplers and piano roll, according to the order i want to be played? Is my question clear?

I've managed also to make a patch with the dispatcher...will work a little more on it.
Seb.Dub

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 27 May 2008, 09:06

Hi ethnix73
Could i really choose the order of files to be played with the array?
Yes - that's what I'm working on with the patch that you inspired me to create. The order of the audio/MIDI files doesn't matter, it's handled through the array.

I know it can be hard getting into array handling; it took some time for me also to get into it when I started with Usine. I am a programmer, but programming with modules instead of IFs and LOOPs etc was a bit "alien" at first, especially the order of things (Wait one Cycle...) and arrays.

I said earlier that I would upload an add-on yesterday, but I didn't get it finished. I haven't created the MIDI part and the interface yet. I also think that I should write some more patch info and comments here and there. And I just got an idea for making editing the array a bit easier...

But keep working on your own patches! The one I'm making is a bit complicated, and would probably be overkill in a lot of situations. That said, when I make a patch that I think would be a nice add-on, I often put in some extra "might-be-nice-to-have-but-far-from-essential" stuff, but try to do this in a way that I HOPE will make it easy to remove.
Bjørn S

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 27 May 2008, 19:25

Still working on my patch of course...I will try to learn how to use the array with yours, as it's a complete mystery for the moment for me...
Seb.Dub

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 28 May 2008, 19:37

Here is my patch not yet finished...I've used a step sequencer to switch between audio and midi each time you hit play in the interface...

And two step sequencer also to select wich sample or midi loop to play.

i still need to work on it to synchronise step position between the main step sequencer for audio/midi switch and others step sequencer...and some improvements also with the interface...

http://ethnix73.free.fr/Usine/Temp%20sw ... r+midi.pat
Seb.Dub

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 29 May 2008, 00:41

Hi,

I took a quick look at your patch, and I'm impressed. We certainly have done things differently, both in how we've done the basic patching and how the UI is designed. I really like to see the same basic ideas approached in different ways!

I've met some troubles with my patch. Originally I created a sub-patch with the normal samplers, and copied that to create patches for grain samplers and MIDI. But I've discovered that the start (and stop?) on the grain samplers act differently from the others - the grain samplers start when receiving a 1 and then a 0 while the others just needs a 1. The handling of start, stop and loop mode in the patch had become quite messy anyway, so I guess some rethinking is called for...
Bjørn S

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 29 May 2008, 01:04

Could you share it? It would be nice to see how you've done your patch, and perhaps will help in understanding the arrays....
Seb.Dub

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 29 May 2008, 08:47

I will put it up on the add-ons once the problems are sorted out. I also hope that the result will be easier to understand than the existing patch.

One tip concerning arrays in general that might help in understanding: When you're using the 16 in- and outputs of eg. the Step module, you're accessing the first elements of an array - similar to using the Set/Get Array Element Value modules, which can handle every element. BTW, if you take a look in the manual (at least in the 3.64a version), the "index" line for both contains the same error. The right values should be min=0 and max=511. I'll notify Olivier.
Bjørn S

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 29 May 2008, 21:51

Sorry, but I've rethought the concept of the patch, so even though it's nearly functioning I won't spend time fixing the last problems. What I have in mind will hopefully be more user-friendly and easier to customize.

Ethnix73, if you want I can mail the patch to you.
Bjørn S

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 07 Jun 2008, 14:43

Still working on this patch, and i'm wondering, if there anyway to incorporate a view of the piano roll in the interface...What i mean is seeing always the piano roll in the interface, not seeing with a "show" button, 'cause i've already done it.

I'm working on this patch to work in the usine vst version...I've still got problems with triggering...
If i use direct midi learn on my play button, it does'nt work. Step sequencer goes step after step, but samples are not triggered.
If i use the vst parameter, samples are triggered, but step sequencer seems to go two step further each time...

My host is energy XT1.4

Here is my patch...If someone could help me, it would be great.


http://ethnix73.free.fr/Usine/SubPatch% ... +midi2.pat
Seb.Dub

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 12 Jun 2008, 13:20

Had time to test it, and it's working....Doesn't know what happened last time.
Seb.Dub

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests