Welcome to %s forums

BrainModular Users Forum

Login Register

MIDI (Learn, clock) Help Needed

General Discussion about whatever fits..
Post Reply
a440
Member
Posts: 16
Location: New Jersey, USA
Contact:

Unread post by a440 » 02 Jan 2007, 18:50

Happy New Year, all. Senso, thanks for all your work on the new version, and congrats on the direction you've taken Usine (free vs pro). All the best in the new year with that.

I'm currently running 2.55b, and I'm having some problems with MIDI learn...probably just something I'm doing wrong.

First off, I am unable to map a button on a controller to a switch or button in Usine (knobs and sliders controlling Usine faders is not a problem). When I start the learn, I see the MIDI controller message come in, and I get the little square "learn" icon on the control. When I press the keyboard button, the controller message comes in and triggers the button (sometimes - usually when the button is on), but any more button presses doesn't affect the Usine control, and the learn icon goes away. I've tried setting the control message to send out a single value, and I've tried a toggle value (0 and 1), but no luck. Any ideas?

Second, I'm back to having problems with the conductor previous and next buttons controlled from a keyboard. Previously, the learn function was broken, so I used the global remote to map the controllers, which worked perfectly. With the new version, neither MIDI learn nor the global remote work. I'm posting this here, and not as a bug, because something could have changed and I might not be assigning the controller properly.

Lastly, I'm a little confused about Usine's tempo and using MIDI Time Code (yes, I've got it on in the setup panel). I've got a gate vst plug-in and it's manual says that it slaves itself to the host clock. In my live setup, I'm getting MTC from another computer on stage, which is working well for an arpeggiator that's on one of my keyboards, but I can't seem to make it work with Usine. Should the tempo change with the MTC signal? Should plug-ins just be able to "see" the MTC? I've tried patching a "MIDI in" module to the plug-in's IN, but no luck so far.

OK, I'm done. Thanks in advance to anyone who can help me...hopefully I've described everything well enough.
Steve [ http://www.a440.org/steve/ ]

Novation X-Station 25 (ASIO/MIDI i/f)/CME UF7/M-Audio Axiom 25/Korg Karma

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 02 Jan 2007, 22:42

thanks for your feedbacks.
allways helpful for me.
When I press the keyboard button, the controller message comes in and triggers the button (sometimes - usually when the button is on), but any more button presses doesn't affect the Usine control, and the learn icon goes away.
It should works and the icon should not disappear!
You have noticed a very strange bug.
Can you try wih the remote patch panel (letter R in the up right corner)?
What kind of message does you control send?

Second, I'm back to having problems with the conductor previous and next buttons controlled from a keyboard. Previously, the learn function was broken, so I used the global remote to map the controllers, which worked perfectly. With the new version, neither MIDI learn nor the global remote work.
I'm confused because it's a bug. Fixed now. Actually only works only with key learn..
The next version will arrive soon.
Lastly, I'm a little confused about Usine's tempo and using MIDI Time Code (yes, I've got it on in the setup panel). I've got a gate vst plug-in and it's manual says that it slaves itself to the host clock. In my live setup, I'm getting MTC from another computer on stage, which is working well for an arpeggiator that's on one of my keyboards, but I can't seem to make it work with Usine. Should the tempo change with the MTC signal? Should plug-ins just be able to "see" the MTC? I've tried patching a "MIDI in" module to the plug-in's IN, but no luck so far.
The MTC doesn't affect the tempo, because it's only an 'position' information that changes the smpte indicator (see the dash board).
Maybe you confound with the MIDI clock? Sometime I lost too with MTC, MMC, MIDI CLOCK, SMPTE, VSTtime, etc...

a440
Member
Posts: 16
Location: New Jersey, USA
Contact:

Unread post by a440 » 13 Jan 2007, 16:49

Hi there - thanks for your response. Things have been busy for me, so I'm just getting to this.
senso wrote:
a440 wrote:When I press the keyboard button, the controller message comes in and triggers the button (sometimes - usually when the button is on), but any more button presses doesn't affect the Usine control, and the learn icon goes away.
It should works and the icon should not disappear!
You have noticed a very strange bug.
Can you try wih the remote patch panel (letter R in the up right corner)?
What kind of message does you control send?
Hey, that did it, because from there, I could select "toggle" as the type, which I couldn't do (didn't know about) before. Thanks!
senso wrote:
a440 wrote:Second, I'm back to having problems with the conductor previous and next buttons controlled from a keyboard. Previously, the learn function was broken, so I used the global remote to map the controllers, which worked perfectly. With the new version, neither MIDI learn nor the global remote work.
I'm confused because it's a bug. Fixed now. Actually only works only with key learn..
The next version will arrive soon.
Yes, the new version fixed it - thanks again!
senso wrote:
a440 wrote:Lastly, I'm a little confused about Usine's tempo and using MIDI Time Code (yes, I've got it on in the setup panel). I've got a gate vst plug-in and it's manual says that it slaves itself to the host clock. In my live setup, I'm getting MTC from another computer on stage, which is working well for an arpeggiator that's on one of my keyboards, but I can't seem to make it work with Usine. Should the tempo change with the MTC signal? Should plug-ins just be able to "see" the MTC? I've tried patching a "MIDI in" module to the plug-in's IN, but no luck so far.
The MTC doesn't affect the tempo, because it's only an 'position' information that changes the smpte indicator (see the dash board).
Maybe you confound with the MIDI clock? Sometime I lost too with MTC, MMC, MIDI CLOCK, SMPTE, VSTtime, etc...
Well, I just tried a new gating VST plugin, and it has a sync button for "local" or "host", and host makes it sync to Usine's tempo. I guess what I'd like is a way (module?) to direct the MTC to something like a plugin.

Thanks again - we're starting a new set of gigs in 2 weeks, so I'll be using the new Usine live quite a bit; looking forward to it!

Steve
Steve [ http://www.a440.org/steve/ ]

Novation X-Station 25 (ASIO/MIDI i/f)/CME UF7/M-Audio Axiom 25/Korg Karma

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 13 Jan 2007, 22:43

Well, I just tried a new gating VST plugin, and it has a sync button for "local" or "host", and host makes it sync to Usine's tempo. I guess what I'd like is a way (module?) to direct the MTC to something like a plugin.
Conceptulally, the MTC is very different than Host Synchro used in VST's. The MTC doens't contain any information about the tempo, but only elapsed time (in seconds,frames,etc...)
I'm not an expert, but I dont think it makes sens to convert MTC into tempo(???)

a440
Member
Posts: 16
Location: New Jersey, USA
Contact:

Unread post by a440 » 14 Jan 2007, 02:20

You're right - Usine tempo and MTC should be different. So with that, how can I get MTC to VSTs? I would think that connecting a MIDI IN module to the VST's MIDI in should be enough to get it the clock signal. In which case if it doesn't work, the problem is with the VST plugin, right?

On the other hand (and this might be more of a feature request), how hard would it be to have an option to slave Usine's tempo to MTC? If it's easy, it would help me, but if it's hard, I can get around it.

If you'd like to see what I'm talking about, here's a link to the plugin I'm currently trying:

http://www.kvraudio.com/get/1185.html

Thanks,
Steve
Steve [ http://www.a440.org/steve/ ]

Novation X-Station 25 (ASIO/MIDI i/f)/CME UF7/M-Audio Axiom 25/Korg Karma

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

Unread post by bsork » 15 Jan 2007, 08:52

Hi a440, just a thought...

You're saying that you have a keyboard's arpeggiator slaved to MTC - are you sure it's MTC and not MIDI Clock messages? That would be more typical for a keyboard/workstation kind of thing to be slaving to.

As far as I know, there's no direct way of syncing Usine to incoming MIDI clocks. A special patch might do it; something like counting the milliseconds between clock messages (24 per quaternote) and calculating Usine's tempo from that. But I suspect that you would get some rounding errors and an unstable sync.
Bjørn S

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 15 Jan 2007, 09:01

yes bsork,
It's imposible to convert SMPTE to tempo because, the SMPTE doesn't contain any information about the tempo, bar length, etc, itself.
Personally, I don't know any VST which accepts MTC informations.

With the midi clock, you can create a patch that calculates the average time between midi ticks, and assign it to the master tempo.

a440
Member
Posts: 16
Location: New Jersey, USA
Contact:

Unread post by a440 » 15 Jan 2007, 21:50

Ah, interesting! Thanks to you both for your help. I'll have to do some experimenting...I'll let you know.
Steve [ http://www.a440.org/steve/ ]

Novation X-Station 25 (ASIO/MIDI i/f)/CME UF7/M-Audio Axiom 25/Korg Karma

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

Unread post by bsork » 16 Jan 2007, 10:04

Out of curiosity, I checked the output of the Elapsed Time subpatch and the Time(ms) module using the synchro LEDs as a trigger, and from what I can deduct calculating the time between incoming clocks and maintain a relatively steady clock using standard modules would lead to problems unless some rounding errors etc is being handled.

Elapsed Time generally gave a time between triggers that was too low, and examining Time(ms) showed that every once in a while the value had increased very little. When running at 120 BPM and using 16ths as a trigger, every 5th (or so) new value was around 3ms. I put the values from Time(ms) for 2 bars into a spreadsheet, and the the average interval was 97ms including the "off" low numbers, but excluding these resulted in a not bad result of 124,427ms.

Using 8ths as a trigger, the low numbers came every 3rd interval or so.

Right now I realize that maybe the ASIO driver might have something to do with these results; I've only been testing using ASIO4ALL and the internal sound card on my music laptop and on my work machine. I'll check with a "proper" setup tonight.
Bjørn S

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

Unread post by bsork » 16 Jan 2007, 13:39

I couldn't resist to do another test at work....

I created a small script utilizing the BlocDuration constant, outputting a calculated length for each bar and 16th note:

Code: Select all

var t4 : Tparameter; //trigger from bar led
var t16: Tparameter; //trigger from 16 led
var o4 : Tparameter; //output calculated bar length
var o16: TParameter; //output calculated 16th length

procedure init;
begin  
 t4 := CreateParam('t4',ptButton);
 SetIsOutput(t4,false);
 t16    := CreateParam('t16',ptButton);
 SetIsOutput(t16,false);
 o4 := CreateParam('o4',ptDataField);
 SetIsInput(o4,false);
 o16    := CreateParam('o16',ptDataField);
 SetIsInput(o16,false);
end;

var s4, s16 : integer;
var c4, c16 : single;

begin
 s4 := trunc(getValue(t4));
 s16 := trunc(getValue(t16));

 if s4 = 1
 then begin
   setvalue(o4, c4);
   c4 := blocDuration;
   SetValue(t4,0);
 end
 else begin
   c4 := c4 + blocduration;
 end;

 if s16 = 1
 then begin
   setvalue(o16, c16);
   c16 := blocDuration;
   SetValue(t16,0);
 end
 else begin
   c16 := c16 + blocduration;
 end;
end.
The results were similar to using the modules, but the bar lengths (4/4 at 120 BPM) were mostly too high (502-505ms) going down to 499 every 2nd or 3rd time, and the 16th lengths mostly too low. For each 3rd or 4th 16th-note calculated, the returned value was the same as BlockDuration; in this case 2.90249...ms.

A sample of bar lengths (rounded to nearest integer):
502, 505, 499, 502, 499, 502, 505, 499, 502, 499...
As you can see, the pattern repeats for every 5th value (not surprisingly I suppose).
A calculated average (including decimals) for this pattern: 501.579...

Using 180 BPM, the pattern repeated every 4th value: 334, 337, 334, 331,...

I'm not sure what I can deduct from these examples; maybe that the tempo should be calculated from both small and large intervals?

Now back to work, I'm afraid...
Bjørn S

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 16 Jan 2007, 20:56

whaoooo!
As you can see, the timing precision of Usine is limited by the BLOCDURATION value, depending on the ASIO buffer length.
Normally, Usine try to have a duration of 128 samples, but in some situation it can be less or more:
if the buffer length is 64 the blocduration is 64,
if the buffer length is 343 the bduration is 343 because it can't be divide by 2, 8,16, .. 128.

For best precision the tempo should be calculated as an average of incomming messages on a large period of time.

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

Unread post by bsork » 18 Jan 2007, 09:14

For what it's worth..: Since I said I would test it with a "proper" ASIO driver and interface at home: the results were similiar.

I'm thinking of trying to create a MIDI Clock In patch, but need to get hold of my old rhythm box first to have some real input, and also finish off another patch that's giving me headaches.

If anyone else has had a try at MIDI sync for Usine, I would like to know.

If I have success in creating such a patch, I'll post it in the Add-ons. The "headache patch" as well, although the latter is of a much less generic nature than sync abilities.
Bjørn S

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 18 Jan 2007, 15:55

Normally, it should be almost simple.
The clock precision of Usine is arround 1.5 ms with a good ASIO driver.
A least 10 times more precise than the MIDI Protocol Transfert (15ms jitter with the best drivers).
So don't worry, I think that a patch will work fine.

a440
Member
Posts: 16
Location: New Jersey, USA
Contact:

Unread post by a440 » 20 Jan 2007, 14:15

Wow - you guys are amazing! Thanks for the insight, and if you get that patch going, I will definitely be using it, although I might try my hand at programming it myself (you know, with all the spare time I have :-) ).

I'm using the ASIO driver provided by Novation (my X-Station is my audio/MIDI interface) - anyone know if it qualifies as a "good ASIO driver"?
Steve [ http://www.a440.org/steve/ ]

Novation X-Station 25 (ASIO/MIDI i/f)/CME UF7/M-Audio Axiom 25/Korg Karma

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 20 Jan 2007, 16:27

I don't Know...
For RME are the best I've tested.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 24 guests