Page 1 of 1

how to quickly change MIDI target of a template

Posted: 16 Oct 2013 21:33
by Phil999
1. open the jzml in a text editor
2. call the text editor's replace function, and replace midi_target="x" with midi_target="y"

for example, when the template has all objects set to MIDI0, and you want them to be on MIDI3, replace midi_target="0" with midi_target="3".

3. save to a new file name


This should work for parented targets as well. Custom MIDI and scripted MIDI output, and scripts listening to MIDI input, must be set in the Lemur editor.

Using a text editor, you can also batch-process colours of objects, or other properties.

Re: how to quickly change MIDI target of a template

Posted: 20 Oct 2013 11:15
by Macciza
Hi just a little followup on this
Yep it is certainly a way to do global 'find replace ' I guess I would just like to add that its utility also depends on the initial setup/programming of the project.
Some projects are hard-coded to particular MIDI Targets but remember there is also the option of 'Project' and 'Parent' particularly when making your own projects.
For a user variable single target system, the best approach is probably to set the MIDI Target of the Project by selecting it in the hierarchy and then simply setting the object target
The when you create Objects in your project you select 'Project (MIDI n)' - that way other users can easily change the target of the whole project by simply changing the top level project target - all the others follow.
This should be applicable to just about any panel selectable object, custom midi , On_MIDI scripts etc.

Just thought I would add that as perhaps a preferred way of working but certainly recognise that the text find replace approach can be used though it is perhaps not best for the novice user . . .

Cheers
MM

Re: how to quickly change MIDI target of a template

Posted: 27 Oct 2013 20:32
by ErikG
I wanted to do this on this little midi keyboard, to include it in my own template.
http://forum.liine.net/viewtopic.php?f= ... ard#p14048

But it didnt work so I guess this is a case of the "hardcoded" example?
Any suggestions on a way to do it with this template?

I have a rather complex Mackie Control template thats based on this template (basically just the Mackie control mixer emulation):
http://liine.net/en/community/user-library/view/309/

Both the above templates defaults to using Midi 0, and using the search and replace method something breaks.
Suggestions on how to make one of them assigned to a different port appreciated.

Running these to templates together actually crasches Nuendo after a short time as they partially use the same controllers, thus somehow creating a feedback loop and eventually Nuendo crasches.

Attached is my work in progress template.
Untitled22c.jzml.zip
Work In progress, not at all finished.
(37.64KiB)Downloaded 115 times

Re: how to quickly change MIDI target of a template

Posted: 17 Dec 2013 17:01
by XedMada
I've been looking for a solution to this as well. I have a single project file that I run simultaneously on up to four iPads at a time. It really stinks to have to do a different search and replace in the XML every time I make a modification and then keep track of which one gets loaded to which ipad.

Is there no solution via scripting where the taget can be changed from within the project while its running?

Multiline Script - On Midi Parent(Midi 0) not working

Posted: 11 Feb 2014 00:38
by RagsInRags
Hey,

I am trying to create a simple template using the Parent Target. However, for multiline script, I dont get the script triggered if it is set to Parent(Midi 0). So here is what I am doing:

1. Create a blank project
2. Add a container object and set its "Object Target" (and Target) to Midi 0.
3. Create a text object (Text) inside the container
4. Create a script inside Text (myScript)
5. Set the script parameters to "On Midi", "System Exclusive", "Parent(Midi 0)", values 0-127, channel 1 to 1 (I think the value parameter does not matter)

This script is never executed (even if SysEx is being sent by the DAW). But if I change "Parent(Midi 0)" to "Midi 0", I immediately have the script executing. Is this a bug or am I understandnig the concept of Parent wrong?

I am trying to ensure that all objects are within a "Main" container. So if I change the target of this container, all other objects will follow. I have also tried setting the target at the project level. Even that does not seem to work.