Project

General

Profile

Example of integration with Samplitude

In an attachment of the given section all necessary libraries, a demo application and plug-in library for Digispot.

DigispotIP.dll

Realizes a direct connection with MDB by means of library DigispotLink.dll.

DigispotLink.dll

Library Win32, exporting some methods:

Method Initialize

Initialization of parameters

typedef void (+stdcall *CallbackEventMethod)(BSTR result);
typedef void (+stdcall *Initialize)(char* server_host_name, char* client_host_name, char* host, int port, CallbackEventMethod callback_event_method);


Parameters of the method:

server_host_name - identifier of a host of the server (MDB)

client_host_name - identifier of a host of the client (Samplitude)

host - address of a host of the server for connection

port - port of a host of the server for connection

callback_event_method - delegate on a method processing all messages coming from the server.

Method OpenFromDigispot

The method is intended for realization of a choice of one of existing elements MDB and opening of elements of sound files for editing in Samplitude.
As result the string of type BSTR returns XML structure on the chosen elements.

typedef BSTR (+stdcall *OpenFromDigispot)();

Method SaveInDigispot

The method is intended for addition or updating of elements of sound files in MDB. By means of parameter bstr_value the structure with the description of elements of sound files is transferred XML.

typedef void (+stdcall *SaveInDigispot)(BSTR bstr_value);

Example XML of structure of the data on elements

<ELEMENTS>
    <MediaElem>
        <ID dt="i4">0</ID>
        <FONO_INFO>
            <Type dt="i4">3</Type>
            <FileName>\AUDIODB\Track01.mp3</FileName>
            <dbID dt="i4">0</dbID>
            <FONO_STRING_INFO>
                <Name>01. Track</Name>
                <Artist></Artist>
                <Author></Author>
                <Album></Album>
                <Category></Category>
                <Comment></Comment>
            </FONO_STRING_INFO>
        </FONO_INFO>
    </MediaElem>
        <MediaElem>
        <ID dt="i4">0</ID>
        <FONO_INFO>
            <Type dt="i4">3</Type>
            <FileName>\AUDIODB\Track02.mp3</FileName>
            <dbID dt="i4">100</dbID>
            <FONO_STRING_INFO>
                <Name>02. Track</Name>
                <Artist></Artist>
                <Author></Author>
                <Album></Album>
                <Category></Category>
                <Comment></Comment>
            </FONO_STRING_INFO>
        </FONO_INFO>
    </MediaElem>

        ...

</ELEMENTS>

The description Example.exe application

This application shown work with library DigispotLink.dll. The application has MDI the interface with three basic functions:

Creating a new elements collection (New button)

Getting a elements collection from MDB (Open button)

Saving a elements collection to MDB (Save button)

Installing and configuring the plugin

The LinkServer.dll library file must be in root folder a Digispot. For plug-in connection it is necessary to configure .vid a file as follows:

Add to end of file the following lines:

Connect the plug-in library:

CREATE_NET_WND_PLUGIN   LinkServerPlug LinkServer.dll LinkServer.Plugin


Set the location of the visual plug-in (left panel, the tab name "Link Server"):

SET_VIEW_TAB_OBJ VIEW_T1 LinkServerPlug "Link Server"


Set the file with the parameters to connect to server:

INIT_EVENT_SERVER linkserver.xml

It is necessary to create and put near to vid a file a file linkserver.xml. File contents:

<EVENT_SERVER HOST="LINKSERVER_HOST">
  <CLIENTS>
    <TCP ADDR="SRV" TYPE="SERVER" IP="0.0.0.0" PORT="7601" PROTOCOL="XML" />
  </CLIENTS>                                             
</EVENT_SERVER>


To use Example.exe must specify port 7601

Installing and configuring the demo version DJin

The order of actions:

1. Install it DJin djindemosetup.exe demo by following the instructions of the wizard.
2. In the root application folder DJin (C:\Program Files\Digispot II DEMO\DJin) to copy the plug-in library LinkServer.dll
3. Add to folder SYSTEM (C:\Program Files\Digispot II DEMO\DJin\SYSTEM) files LinkServerDemo.vid and linkserver.xml
4. Run this application DJin
5. After running the application you want to change the current configuration file. With the menu item "File->Select configuration …" must specify the configuration LinkServer Demo, and the application will be restarted.
6. If everything is correct, then the left side of the screen should appear tab the plugin "Link Server". Now you can run and use the demo application Example.exe.

Add picture from clipboard (Maximum size: 742 MB)