Isomet Modular Synthesiser (iMS) API  v1.4.2
iMS API
Cross Language Support and Scripting Wrappers

We recognise that not all users prefer to develop their applications in C++ and for convenience we also supply a number of wrappers and support libraries for writing software in alternative languages including scripting languages.

.NET Wrapper

The .NET library iMSNET.dll wraps around the C++ library, exposing many of the same functions or providing a thin layer to translate C++ concepts such as std::list into .NET compatible frameworks such as IEnumerable. Most classes and functions are recognisable from the C++ API documentation - one noticeable exception is the Image class which is renamed iMSImage to avoid confusion with the .NET entity System.Image. Just as with the C++ library, all classes and functions are contained within the same namespace iMS.

Initialisation

One very important point of note when using the .NET library is that is must be explicitly initialised before first using the library within your application. So within the application's startup routine, you must call the function:

iMSNET.Init();

Concepts

Most concepts familiar to .NET programmers can be applied to code written against the iMSNET library. For example, to iterate through all the ImagePoint's in an Image, in C++ one might write the code

for (iMS::Image.iterator it = img.first(); it != img.end(); ++it) {
// ...
}

In C#, the iMSImage class implements IEnumerable, so one could instead write:

iMS.iMSImage img = new iMS.iMSImage(500, new iMS.ImagePoint());
foreach (var pt in img) {
// ...
}

WPF and INotifyPropertyChanged

Classes ImagePoint, CompensationPoint and TBEntry all implement the INotifyPropertyChanged interface which is a key concept in WPF (Windows Presentation Foundation) and UWP (Universal Windows Platform) applications. As a result, they may all be used directly within ViewModels where the MVVM design pattern is being used.

More Information

For further information, we recommend creating a new .NET project in Visual Studio, adding the iMSNET.dll library as an assembly reference and using the Object Browser to examine all of the available classes and functions, comparing them with the C++ documentation.

Python Wrapper

We are planning to develop and release a wrapper for the C++ library in the Python scripting language to allow users to create their own iMS compatible .py scripts. At present, this is not yet complete but we welcome feedback from users on the usefulness of this feature or whether other scripting languages (e.g. Perl, TCL) would be handy.