Old 10-11-2015, 04:16 AM   #1
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,354
Default JSFX Instance Tracking library

I've made an import library to help with tracking plugin instances. You might find it useful if you're trying to make any kind of global plugin.

https://stash.reaper.fm/v/25417/IX.Tracker.jsfx-inc.zip

It's easy to use and there's a demo in the zip. The only limitation is that you have to specify the maximum number of instances allowed and the system uses double that number of global memory slots.

Code:
options:gmem=myplugin

import IX.Tracker.jsfx-inc

@init
base_address = 0;
max_instances = 16;
next_gmem = _global.MyPlugin.Tracker.Init(base_address, max_instances);

@serialize
_global.MyPlugin.Tracker.Serialize(self);

@block
_global.MyPlugin.Tracker.Update(self);
my_id = _global.MyPlugin.Tracker.GetID(self);
instance_count = _global.MyPlugin.Tracker.GetCount();
Issues:

1. There is currently no way to differentiate between an instance being bypassed or deleted, which means it is unsafe to recycle missing id numbers. If you have created the maximum number of instances then delete one, the next instance created will not recieve a valid id.

2. If you duplicate a bypassed effect, the duplicate will have the same id as the original.

Changes:

1.1
  • Properly restore ids on un-bypass and un-delete behaviour (increased memory usage to max-instances * 3)
  • Explicit call to Tracker.Register() is no longer necessary.
  • Other small stuff I can't remember.
1.0
  • Initial release

Hope it helps someone.

Last edited by IXix; 02-25-2016 at 02:41 PM.
IXix is offline   Reply With Quote
Old 10-11-2015, 07:07 AM   #2
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,414
Default

Quote:
Originally Posted by IXix View Post

Hope it helps someone.
Oh this will save me a lot of tinkering about for something I've been planning on putting together. Sweet!

Thanks!
James HE is offline   Reply With Quote
Old 10-11-2015, 02:14 PM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,644
Default

Great !

I'll have a look.

I am nearly ready with a suite JSFXes (one Midi filter and several more just for configuring the actions) that allow live-players to control transposing and changing patches (aka programs, sounds) via Laptop keyboard shortcuts (and via Midi controllers).

It is supposed to work with VSIs, external Midi enabled devices, but at best with SWS "LiveConfigs".

Momentarily it's in Beta testing.

I'll post the code and a manual in some days.

This project also make use of a kind of JSFX instance tracking.

-Michael

Last edited by mschnell; 10-11-2015 at 02:22 PM.
mschnell is online now   Reply With Quote
Old 02-25-2016, 02:36 PM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,354
Default

Updated to version 1.1

Code:
1.1 - Properly restore ids on un-bypass and un-delete behaviour (increased memory usage to max-instances * 3)
      Explicit call to Tracker.Register() is no longer necessary.
      Other small stuff I can't remember.
IXix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.