Jump to content

Go To Marker && Playback


Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Thank ValliSoftware very much.

 

I really appreciate your attention. But ... I didn't understand.

 

My goal is this: GifAnimataACapo.gif.159189f1488aecffb0b820308e6ba522.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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...