Display text Message by incoming Midi CC - Script question

Discuss Lemur and share techniques.
Post Reply
iceleben
Newbie
Posts: 17
Joined: 17 Sep 2012 09:10

Display text Message by incoming Midi CC - Script question

Post by iceleben »

Hello,
I've bought Lemur a week ago and so far I'm very impressed by the software, but I have a script question which is driving me nuts for the last days...
I'd like to display a text message when I receive a Midi CC when it reaches value 64. below that it should display nothing or another text.
I found a script where I can Monitor the incoming data and the setup so far is fine - the Midi value is displayed in the Monitor.
If you have any existing template with this function or if you could help me which commands are needed for the script, I'd be very thankful.

Cheers,
Markus
iceleben
Newbie
Posts: 17
Joined: 17 Sep 2012 09:10

Re: Display text Message by incoming Midi CC - Script questi

Post by iceleben »

I have finally made a partial working script/template (problem was the MIDI_ARGS[1]). It displays the words by incoming Midi Data but aside from the warning symbol next to the script I have the problem that if I pull it from my Library in another template it displays the Text in a completely different Text Field?????

If you know where the Bug is please feel free to help :D

Here is the script and attached the Template
decl val1 = MIDI_ARGS[1];
if(val1<=50)setattribute(Text,'content','Below');
if(val1>=51)setattribute(Text,'content','Above');
Attachments
midinamer.jzml
(1.3 KiB) Downloaded 95 times
iceleben
Newbie
Posts: 17
Joined: 17 Sep 2012 09:10

Re: Display text Message by incoming Midi CC - Script questi

Post by iceleben »

Oh so stupid - of course it does - maybe its just to late - I should have renamed the textstring in the template to the just created textfieldnumber. So the only question that's left why the warning Symbol?
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: Display text Message by incoming Midi CC - Script questi

Post by nick_liine »

You could use the getobject() function to reference the current object. This is helpful to create "portable" scripts. For example in your code:

Code: Select all

decl val1 = MIDI_ARGS[1];
if(val1<=50)setattribute(getobject(),'content','Below');
if(val1>=51)setattribute(getobject(),'content','Above');
Cheers,
Nick
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Display text Message by incoming Midi CC - Script questi

Post by Macciza »

Hmm
Ok that is a bit odd - will try to have a closer look
If you copy the script text then delete and recreate the script and past it back in it should work.
Sorry about that -
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
iceleben
Newbie
Posts: 17
Joined: 17 Sep 2012 09:10

Re: Display text Message by incoming Midi CC - Script questi

Post by iceleben »

Thank you both for your input,will try this later as I'm working on a new template right now- the Idea with the getobject is great! What a Beast this App is - so great - and I've just scratched the surface. Hope to get finished until next Monday...
Post Reply