Angelos58 Posted July 9, 2018 Share Posted July 9, 2018 I'd like create a script that with a trigger (note or ...) go to marker and start playback. Advices? Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 Can’t do it. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 I made it without script with transformer object in Environment. Stop Playback && Go To Marker #. So I thought to repeating it in a scripting for exercise. Instead doesn't it possible? PS In Environment I created the note trigger must be on a track, but if i play, during playback, the same note the transformer works (I see it in Monitor) but doesn't work. How ever? Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Dewdman42 in Scripter what's the Event Type for computer Keyboard Key o for Command Keyboard? Thanks Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 Scripter can not send any meta events like is possible in the environment Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Thank you for answer, but ... no meta event in scripter is a big limit. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 But but but in scripter do you can invoke an environment object? Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 There is only one possibility to use scripter forbwhat you want to do. You can send midi from scripter to IAC and loop it back around into LPX. So you could use some CC values, send them over IAC and then when it comes back into LPX, use the environment to convert those CC events into transport control messages as are available in the environment Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 And also, all midi generated inside a channel is sandboxed there, from any plugin, not just scripter. The only way to get to the environment from a plugin such as scripter is over IAC. Yes I agree it’s limiting, but that’s the current situation. Complain to Apple Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Thank you very much. From Scripter to IAC and from IAC to LPX Environment. And .. why the note from keyboard doesn't trigger my expected answer? (in Environment like i write before. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 So I can't in scripter write an easy if...else routine that when I bit the key 1 triggers a meta event, when 2 another and so on. And I can't write a loop cycle with while for repeat two or three or ... time the same bars. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 Scripter can’t control the transport, it can only generate standard midi events. And midi generated inside the channel can not get to other parts of LPX without going over IAC. Another possibility for you to consider is using a third party external tool. For example the free MidiPipe app can listen to midi an perhaps call AppleScript, which could conceivably send key commands to LPX. Or maybe you will need to dabble with OSC or some other external technology. Scripter can send midi over IAC to these other programs and they can respond to the midi in whatever way they are capable. Bomes midi translator might be useful for you. Scripter on its own cannot send key commands or control other parts of LPX in any way at all it can only generate midi and the midi can only feed the software instrument on the track and/or send to IAC. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Thank you, you are truly a precious mine Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Does Bome MIDI Translator Pro work with High Sierra? Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 I don’t use it and don’t know, but I know it can be used to turn midi into key commands. Check out OSC also Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Do you know it (OSC) better? Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 Never used that either. But it’s very powerful. You have some options now go figure something out and please let us know what works Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 it will take time, but I hope to be able to reciprocate your precious generosity Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 9, 2018 Author Share Posted July 9, 2018 Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 That video says its not on mac, but it is now, FYI also don't forget to investigate OSC: https://osculator.net Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted July 9, 2018 Share Posted July 9, 2018 And those are not free I guess? but anyway, There are other OSC solutions out there, OSC is a protocol. and like I said, MidiPipe, which is free, can execute AppleScript...so check that out too. There are probably other solutions. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 10, 2018 Author Share Posted July 10, 2018 Could be interesting? "Scripter – Global attributes and functions NeedsTimingInfo:boolean Defining NeedsTimingInfo as true at the global scope enables the GetTimingInfo() function ResetParameterDefaults:boolean Sets UI controls to default values HandleMIDI(Event) This function is called each time a MIDI event is received by the plug-in, and is required to process incoming MIDI events. If you do not implement this function, events pass through the plug-in unaffected. ProcessMIDI() This function is called once per “process block,” which is determined by the host’s audio settings (sample rate and buffer size). This function is often used in combination with the TimingInfo object to make use of timing information from the host application. To enable the GetTimingInfo feature, add NeedsTimingInfo = true at the global script level. ParameterChanged(integer, real) This function is called each time one of the plug-in’s parameters is set to a new value. It is also called once for each parameter when you load a plug-in setting. Reset() This function is called when the plugin is reset Trace(value) Prints a message to the console that represents the supplied value of any type GetTimingInfo():TimingInfo Retrieves a TimingInfo object, which contains timing information that describes the state of the host transport and the current musical tempo and meter. GetParameter(string):real Returns a given parameter’s current value. GetParameter() is typically called inside the HandleMIDI() or ProcessMIDI() functions. Event – Base class for all events send() Send the event sendAfterMilliseconds(ms:real) Send the event after the specified value has elapsed sendAtBeat(beat:real) Send the event at a specific beat in the host’s timeline sendAfterBeats(beats:real) Similar to sendAtBeat(), but uses the beat value as a delay in beats from the current position. trace() Prints the event to the plug-in console toString() Returns a string representation of the event channel(integer) Sets MIDI channel 1 to 16. Note: Event.channel is an event property, rather than a method, so it may be used in expressions such as (evt.channel == 1) where evt is an instance of Event) Note – Base class for note events Note() Constructor toString() Returns a String representation of the Note event. NoteOn – Represents a note on event NoteOn(Event) Constructor pitch(integer) Pitch from 1–127 velocity(integer) Velocity from 0–127. A velocity value of 0 is interpreted as a note off event, not a note on. NoteOff – Represents a note off event NoteOff(Event) Constructor pitch(integer) Pitch from 1–127 velocity(integer) Velocity from 0–127 PolyPressure – Represents a Polyphonic aftertouch event PolyPressure(Event) Constructor pitch(integer) Pitch from 1–127 value(integer) Pressure value from 0–127 toString() Returns a String representation of the PolyPressure event. ControlChange – Represents a ControlChange event ControlChange(Event) Constructor number(integer) Controller number from 0–127. value(integer) Controller value from 0–127. toString() Returns a String representation of the ControlChange event. ProgramChange – Represents a ProgramChange event ProgramChange(Event) Constructor number(integer) Program change number from 0–127 toString() Returns a String representation of the ProgramChange event. ChannelPressure – Represents a ChannelPressure event ChannelPressure(Event) Constructor value(integer) Aftertouch value from 0–127 toString() Returns a String representation of the ChannelPressure event. PitchBend – Represents a PitchBend event PitchBend(Event) Constructor value(integer) 14-bit pitch bend value from -8192–8191. A value of 0 is center. toString() Returns a String representation of the PitchBend event. Fader – Represents a Fader event Fader(Event) Constructor value(integer) Fader value from 0–127 toString() Returns a String representation of the Fader event. TimingInfo – Contains timing information that describes the state of the host transport and the current musical tempo and meter playing:boolean Value is true when the host transport is running blockStartBeat:real Indicates the beat position at the start of the process block blockEndBeat:real Indicates the beat position at the end of the process block blockLength:real Indicates the length of the process block in beats. tempo:real Indicates the host tempo. meterNumerator:integer Indicates the host meter numerator meterDemoninator:integer Indicates the host meter denominator. cycling:boolean Value is true when the host transport is cycling leftCycleBeat:real Indicates the beat position at the start of the cycle range rightCycleBeat:real Indicates the beat position at the end of the cycle range MIDI – Contains class-level variables and functions (you don’t instantiate MIDI). _noteNames:string[] Contains names such as C and G# for all 128 MIDI notes _ccNames:string[] Contains names such as Expression and Sustain for all 128 MIDI controller numbers noteNumber(string) Returns the MIDI note number for a given note name. For example: C3 or B#2. Flats not permitted. noteName(real) Returns the name for a given MIDI note number. ccName(real) Returns the controller name for a given controller number allNotesOff() Sends the all notes off message on all MIDI channels normalizeStatus(real) Normalizes a value to the safe range of MIDI status bytes (128–239) normalizeChannel(real) Normalizes a value to the safe range of MIDI channels (1–16) normalizeData(real) Normalizes a value to the safe range of MIDI data bytes (0–127) _sendEventOnAllChannels(Event) Sends a given event to all MIDI channels" James Weaver Twitter: @JavaFXpert Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 15, 2018 Share Posted July 15, 2018 I'd like create a script that with a trigger (note or ...) go to marker and start playback. Advices? Read this here https://support.apple.com/kb/PH13118?locale=en_US&viewlocale=en_US I've attached a Logic Pro X project that implements what was described in the above link which is adding a Meta Event to go to a marker and it continues playing. Not really sure why you'd want to do this but the project does what you're looking for. markerTest.zip Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 15, 2018 Author Share Posted July 15, 2018 Thank ValliSoftware very much. I really appreciate your attention. But ... I didn't understand. My goal is this: I made it with Environment Transform object. And I asked to myself if would be possible to make it with a Script in Scripter. In your project I can's see Scripter or Environment. Where is the trick? Thanks again Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted July 15, 2018 Share Posted July 15, 2018 Thank ValliSoftware very much. I really appreciate your attention. But ... I didn't understand. My goal is this: GifAnimataACapo.gif I made it with Environment Transform object. And I asked to myself if would be possible to make it with a Script in Scripter. In your project I can's see Scripter or Environment. Where is the trick? Thanks again Oh, may I suggest looping a MIDI region, that would get what you're trying to accomplish That project if you notice in the Event List has a gotomarker meta event and I added two markers in the project as well. I'll try to create another sample logic project with looping the MIDI region. Quote Link to comment Share on other sites More sharing options...
Angelos58 Posted July 15, 2018 Author Share Posted July 15, 2018 My goal is an A Capo bar line. So, without any manual action, the track play until the first "a capo" then goes to beginning and the second time goes on without repetition. So with Scripter I created a counter that repeat two times a region, but I can't comunicate between Scripter and arranger or Score. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.