Jump to content

What does the Fader() do?


Recommended Posts

Is this even implemented? It exists in https://gist.github.com/djtech42/94e3b0980c684680ac79 which is a copy of that EventTypes.js hidden inside Logic Pro X.app.

 

Fader.prototype = new Event();
Fader.prototype.constructor = Fader;
//-----------------------------------------------------------------------------
function Fader(e) {
this.status = 0x50;
if(e) {
	// clone existing event
	this.channel = (e.channel) ? e.channel : 1;
	this.number = (e.number) ? e.number : 1;
	this.value = (e.value) ? e.value : 0;
	this.inStartFrame = (e.inStartFrame) ? e.inStartFrame : 0;
   this.isRealtime = (e.isRealtime) ? e.isRealtime : false;
} else {
	// default values
	this.channel = 1;
	this.number = 1;
	this.value = 0;
	this.inStartFrame = 0;
   this.isRealtime = true;
}
};

//-----------------------------------------------------------------------------
Fader.prototype.toString = function() {
return '[' + this.constructor.name + 
' slot:' + this.channel +
' parameter ID:' + this.number +
' value:' + this.value + ']';
};

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

This is now called TargetEvent in the EventTypes.js

//-----------------------------------------------------------------------------
// TargetEvent : { target:, value: }
//-----------------------------------------------------------------------------
TargetEvent.prototype = new Event();
TargetEvent.prototype.constructor = TargetEvent;
//-----------------------------------------------------------------------------
function TargetEvent(e) {
this.status = 0x50;
if(e) {
	// clone existing event
	this.target = (e.target) ? e.target : "";
	this.value = (e.value) ? e.value : 0;
   this.isRealtime = (e.isRealtime) ? e.isRealtime : false;
   this.beatPos = 0;
} else {
	// default values
	this.target = "";
	this.value = 0;
	this.beatPos = 0;
   this.isRealtime = true;
}
};

//-----------------------------------------------------------------------------
TargetEvent.prototype.toString = function() {
return '[' + this.constructor.name + 
' target:' + this.target +
' value:' + this.value + ']';
};

Link to comment
Share on other sites

Are you sure that TargetEvent is a replacement for Fader? TargetEvent lets you send midi events to specific user assignable controls on a midi instrument. Fader was deprecated after Logic 10.2.2 and is no longer available in EventTypes.js. I have no idea what the Fader class did. Perhaps it related to an Environment fader, but I really have no clue.
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...