Basic applications

HAL – Hardware Abstraction Layer

Theremino HAL

The HAL connects the hardware of InOut with high-level software via USB and Slots

If you use the USB hardware modules, then the HAL is indispensable and must remain powered on, You can minimize it, but must remain in operation.

If you do not use USB hardware, then the HAL is not necessary, System applications can communicate with each other, through the slots, even without HAL.

The HAL program standardizes the sensor data in a range of easily usable and provides testing and debugging graphic (Oscilloscope).

HAL cap keys with velocity - Theremino System

Tips for getting started: The program “Theremino_HAL.exe”, does not require installation and can be run in any folder on your system – Double clicking on a line opens the window graphic that shows the progress of the signal on that line – With a single click on a line and clicking on another line you can see them at the same time – All spin boxes are editable using the keyboard, with the mouse up/down, with the mouse wheel and with the arrows up and down – Finally, during the tests, It is very convenient to change the values in the column “Value” with the mouse (Press the left button on a column number “Value”, hold it down and move the mouse up and down)
Transient errors caused by surges on Input pins: Sometimes, touching the pins with your fingers, the HAL program stops communicating with hardware, writes a red line with the message "disconnected" and you have to press "Recognize". This will occur if the body is charged with static electricity and emits a small electric shock. All components are carefully chosen and never break, But even if you don't see the spark, It's always tension of many thousands of Volts, who send haywire temporarily serial communication and USB port. During the tests we take special care to handle forms only from off, or touch before the mass (for example the USB connector). The final project should always provide an insulated container that prevents users from touching metal parts under voltage.

– – – – – –

Release notes for Http://

Version 2.0: Enables six pins of InOut masters. Download it and rescheduled the Master with the new firmware (V 2.0) that you download from the page: technical/schematics
Version 2.2: Contains the correction of certain defects and small improvements that make it easier to test the acceleration sensors.

Version 2.6: Contains minor improvements and hardware disconnection recovered immediately from mistakes without loading the cpu.
Version 3.3: Help complete in Italian, English and Japanese. Menu and toolbar with the main controls and access to help. Capacitive keys with velocity (much appreciated by musicians) Improved stability. Now you can replace easily configurations. The HAL realizes if a Master is already connected, and does not attempt to open it.
Version 3.3: small fixes to help files
Version 3.4: small fixes
Version 3.5: In earlier versions the bandwidth was limited to less than 100 Hz even with maximum Response Speed. Now, however, by setting values 98, 99 and 100, the parameter “Response speed” excludes progressively its action of filtering and bandwidth up to 250Hz (half the sample rate)
Version 3.6: Added option “Remove errors” in the properties of the type “Usound sensor”. In previous versions on error control was always enabled and delayed data by almost half a second. Now you can delete the control and make more responsive the distance value. Type applications “Ultrasonic radar” they are very beneficial to this news.
Version 3.8 (experimental): On some computers, especially notebooks, with Windows7 and Windows8, Some users could not exceed 300 FPS. We are therefore trying various solutions to increase the maximum rate of Exchange. This version is expected to reach at least 450 – 500 FPS on slower computers and beyond 800 – 900 FPS on the best. This version, by manually setting the “Run as administrator” to the file “ThereminoHAL.exe” (only Windows7 and 8) , also buys the priority “Real Time”. With priority “Real Time” have not seen improvements, but on some computers might serve. Let us know your experiences!
Version 3.9: This version also supports the new CapSensorHS algorithm “Dynamic Resolution” that allows for incredibly low latency of 0.8 mS and at the same time a great sampling resolution for applications that need it.
Version 4.0: Previous versions contain a bug that (very rarely) causes a crash of the application. The conditions for the occurrence of this error was to keep it open for a long time the oscilloscope window. In version this error is corrected and now the HAL is very strong. We recommend everyone to replace older versions with this.
Version 4.1: The Pin type Cap8 and Cap16 can read sensors variable capacity, for example humidity sensors without any adapter circuit. The details of the selected pins are restored after a “Recognize”. The stairs of the scope are more functional and button “Zero reset” It also acts on normal data (not RAW). Automatic and manual calibrations now also act on pins Cap8 and Cap16. The user interface is improved and the controls are more visible.
Version 4.2: Delete the flashes of the main list. Reordered the menus. The explanation of the commands are improved and translated into languages. The CPU work to draw the list is reduced to a third. The method “Lock masters” is fully implemented. Added button “Disconnect master”. Improved security in recognition of Master “in use”. Giving a new name to a Master will not lose its configuration.
Version 4.3: Even the chart display is optimized for minimum consumption of CPU. And bar menu commands are executed at first click, even though the window was not selected. Small defects of aligning controls on Windows7 and Windows8, have been fixed. The menu and toolbar have a new variegated colors making them more readable.
Version 4.4:
In version 4.3, on Windows XP, the chart was not shaken to the left. The version 4.4 It also works well on Windows XP.
Version 4.5: Changes to work with Mono on Linux. And soon also on the Raspberry Pi !!!
Version 4.6: Significant reduction in CPU usage, to facilitate the operation on Raspberry Pi.
Version 5.0: The pins are increased by 6 to 10., and you can also set as Stepper, Stepper_Dir and Pwm_Fast. For these new Pin the Master must be programmed with Firmware 3.2
Version 5.1: Automatic reconnection!!! This new option is useful for applications, that need to operate for long periods, without supervision. If the USB loses communication (probably for a electrical noise), the HAL makes a fast reconnect. If there is not enough fast reconnect (for example, because you lack the power and the modules forI know the configuration) then it is done automatically reconfiguring modules and finally the system is restarted.
Version 5.3: The pins are increased by 10 to 12 (who has a Master's degree with the second quartz tube, must remove it and put in its place two males). You can set the pins like Encoder, for encoders with two wires, called “quadrature” or phase A and phase B. For these new Pin the Master must be programmed with Firmware 4.0
Version 5.4: This version eliminates the annoying flashes when launching application. This improvement is especially valuable for applications like Theremino_CNC and Theremino_Geiger that trigger the HAL downplayed.
Version 5.5: By popular demand we have also implemented the comments. For instructions read HERE.
Version 6.0: Stepper Motors used with straps can exceed the 18000 millimeters per minute we had established as a maximum. Then we increased MaxSpeed until 99999 and MaxAcc up to 9999. – To avoid exceeding the maximum inadvertently Step per second (which are always 65000), StepPerMillimeter MaxSpeed boxes and turn red in case of error. – The “CustomControlsLib.DLL” has become part of the sources, so there is a problem at least for Linux and MacOsx.
Version 6.1: In previous versions, if you gave the Master a name with trailing spaces, the database configurations no longer worked well. Now this is fixed. – The ComboBox Pin type is constrained to maximum screen height. This avoids problems with screens not very high, such as those of Tablet.
Version 6.6: – Fixed the FastPwm granularity.- The masters are listed alphabetically. – Implemented external commands via zero. – Adc24 with module management 16 new high precision analog pins.
Version 6.7 and 6.8
– Decreasing the number of pins of the Adc24 can no longer happen to delete Active Pin by mistake.
– MinValue and MaxValue have 3 decimals
– MaxSpeed and MaxAcc have 1 decimal.
– StepsPerMM has 3 decimals
– Decimals of StepsPerMM are restored by exiting and restarting the application.
– Improved handling of the names of the Master
– Eliminated errors that occurred by entering master names are too long.
– If you set two pins that write in the same Slot you are warned. See page 3 of the instructions.
– Pin Viewer (Oscilloscope) is much improved. See page 30 of the instructions.

Version 6.9
– Fixed a bug in the viewer of the pins (Oscilloscope) . Now the vertical scale will also work with the value “100”.
– In later versions the “Sleep” It was also sent to the Stepper Motors by mistake then, After the end of HAL, Stepper slots contained strange and very large numbers. Now this doesn't happen anymore.
Version 7.0
– Delete the crash that happened occasionally changing Pin type, especially on Pin 7 that enables and disables the Adc24.
Version 7.1
– Improved signal Viewer (Oscilloscope). Improved the operation of the TextBox when you use mouse (more precise movement at low speed and high speed faster).
Version 7.2
– Added a mechanism that allows applications to automate guarantee that all masters are in operation. In case of malfunction or disconnection of one of Master the HAL issues a non-message number on “NAN_MasterError” zero slot.
– Delete a terrible mistake, which thankfully was only in CSharp and to modify the following line to the one that you were editing. All this with a side of CRASH if it was editing last line.
Version 7.3
– Added the ability to make backups of configurations with two new commands in menu Files.
– Deletes a “Glitch” in PwmFast that happened with duty cycle around 999…1000.
– By setting “Speed = 100” The Smoothing function is completely excluded. This causes the delay is reduced to less than 3 Ms medium (less than 6 Ms considering the delay Output to Input).
Version 7.4
– The version 7.3 was compiled for Debugging and contained an error in the Configuration Backup.
– In version 7.3 CSharp configuration backup didn't work at all.

HAL's documentation has improved. PDF files are in the folder “Docs” and can be reached also from the menu of the application.

Downloads by Theremino HAL – Version 7.4
Theremino_HAL_V 7.4
7.4 Theremino_HAL_V _WithSources (for programmers)

7.4 Theremino_HAL_CSharp_V _WithSources (C # programming)
For all systems from Windows XP to Windows 10, both 32 which in 64 bit (Linux and OSX with Wine)

The C # version facilitates the “Porting”, towards Android and Mac, who prefer the C-Like syntax. This version, It works just like the original. For normal use, However, we recommend that you not use it, Since it is less tested and slightly less efficient, because of the harder string handling, C-Like languages.

– – – – – –

Update your applications with the latest version of HAL

Many applications using the HAL, for example Theremino CNC and Theremino Dolfrang, may contain older versions of HAL. These applications can continue to use the older version with no problems. But if you want to update them with the latest version of HAL you can do it easily. You just have to be careful not to cover even their own configuration file.

How to update applications that contain an earlier version of HAL:
– Download the zip version of HAL.
– Open the folder of your application to update.
– Find the location of the file "Theremino_HAL.exe" with its "Docs" folder.
– Replace the file "Theremino_HAL.exe" and "Docs" with all the files in the ZIP.

The file "Theremino_HAL_ConfigDatabase.txt" and "SlotNames.txt" should not be replaced because they contain their own configurations.

Those who want to use Visual Studio to inspect, modify and rebuild the application, should also replace all files in the folder “Sources”.

– – – – – –

Downloading books in ODT format
Those who know these languages, could open the file in Open Office, fix them and send them to us. For other languages, you can take the file and have it translated to English: onlinedoctranslator that is great, a breeze and respects the formatting.

The file SlotNames.txt

Theremino HAL With Notes Theremino SlotViewer With Notes

The application HAL (from version 5.5 onwards) and the SlotViewer (from version 2.6 onwards), can also display the name of the Slot (or annotations or comments).

The names are written in a file, that should be called “SlotNames.txt” and that must be in the same folder as “Theremino_HAL.exe” and “Theremino_SlotViewer.exe”. If the file “SlotNames.txt” There is no comment field will remain empty.

The file “SlotNames.txt” you edit with NotePad or WordPad. The posting rules are simple and are shown in the sample, located in the latest versions of HAL and SlotViewer.

Important to note that the names are not related to physical Pin, but the slots.

Each line of the file begins with the number of Slots, followed by a space and the text to be displayed. The line can also continue with a comment, that does not appear, preceded by a single quote.

If you want to use the same file of comments, both HAL and the SlotViewer, you have to keep the files “SlotNames.txt”, “SlotViewer.exe” and “HAL.exe”, all in the same folder.

Application modularity

The modular design of the software of the system Theremino you get, in an unconventional way, with running many applications. Each application handles only tasks for which it was designed and runs as smoothly as possible. In this way applications can be simple, efficient and with fewer defects. System Theremino many simple applications communicate with each other and work together to perform complex tasks.

Depending on your needs you can use two different methods:
– Isolated applications
– Groups of isolated applications

This does not mean that isolated applications cannot communicate with other. Modular communication is always possible and is done through the slots, that are shared for all applications.

To avoid using the same slot for different tasks we defined a main diagram.

Experimental 100 slots     000 - 099
- - -
Theremino_Theremin         100 - 199
Theremino_SlotsToMidi      200 - 349
Theremino_MidiToSlots      350 - 499
Theremino_MusicKeys        500 - 549
- - -
250 free slots             550 - 799
- - -
Theremino_OilMeter         800 - 809
Theremino_EEG              810 - 819
Theremino_Meteo            820 - 839
Theremino_Arm              840 - 849
10 free slots              850 - 859
10 free slots              860 - 869
10 free slots              870 - 879
Theremino_EmotionMeter     880 - 889
Theremino_geiger           900 - 909
Theremino_Bridge           900 - 909
Theremino_GEO              910 - 919
Theremino_GeoPreampTester  920 - 929
Theremino_Radar            930 - 939
10 free slots              940 - 949
10 free slots              950 - 959
10 free slots              960 - 969
10 free slots              970 - 979
10 free slots              980 - 989
10 free slots              990 - 999
This scheme is only indicative. You can use the slots as desired, just the same PC do not use the same slot, for two different tasks. If you get it wrong it doesn't break anything, but data overlap with undefined results.

Isolated applications with private HAL

Some applications of the system Theremino launch a private copy of HAL, located in the same folder of the application. These private and HAL have settings and configurations, generally, are locked with key “Master Locks” so it must be connected only to their hardware modules. For more information read the instructions of HAL.

The applications for this configuration are applications with a precise task, such as: Theremino_geiger, Theremino_OilMeter, Theremino_Meteo, Theremino_Theremin, Theremino_Arm, Theremino_Geo and Theremino_EmotionMeter.

Application groups with Theremino Starter

The Theremino Starter start all applications with name “Theremino_xxx.exe” subfolders that are located at the side of the file “Start_ALL_Theremino_Apps.vbs”.

To build a “application group” It begins with a root folder (with the name of the project that you are creating) Inside the main folder, each application should have its own specific folder containing the executable, supporting files and subfolders. If you use multiple copies of the same application is good to add a final number folder names. As shown in the following example:

Folder: "Multiplayer"

      Folder: "ThereminoSoundPlayer_1"
            Folder: "Media"
            Application: "Theremino_SoundPlayer.exe"

      Folder: "ThereminoSoundPlayer_2"
            Folder: "Media"
            Application: "Theremino_SoundPlayer.exe"

      Folder: "ThereminoVideoPlayer_1"
            Folder: "Media"
            Folder: "Media2"
            Application: "Theremino_VideoPlayer.exe"

      Folder: "Http://"
            Application: "Theremino_Hal.exe"
            File: "Theremino_HAL_ConfigDatabase.txt"
            File: "Theremino_HAL_INI.txt"

      Folder: "Theremino_Helper"
            File: "CustomControlsLib.dll"
            Application: "Theremino_Helper.exe"

      File: "Start_ALL_Theremino_Apps.vbs"

Groups of applications like this can also contain dozens of applications. When placed in separate folders, each application maintains its own settings, and even the window positions independently. You can even create multiple groups of applications and run them all at once, maintaining an adequate separation between applications and ensuring that each application communicates only with its sensors and its actuators. But at the same time you can also make them communicate all, or in groups, between them. To communicate using the slots, Learn how to make good use of the slots is critical.

The little script “Start_ALL_Theremino_Apps” deals to launch all the applications of a group with just one click. We recommend that you create a shortcut to this on your desktop “Starter”.

The current version (updated on 18-07-2017) contains a small improvement. If the file name contains “obj” or “vshost” the file does not start. This allows you to use full versions of projects, avoiding intermediate files accidentally start, that Visual Studio uses when compiling.

Theremino Starter
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino SlotViewer

Theremino SlotViewer a simple and handy slot explorer and editor.

The slots are the heart's modular system Theremino. It is often convenient to keep an eye on their value or edit it manually. This small “Explorer of slots” is very flexible, can see the slots in various ways and dimensions, vertically or horizontally and with the color scheme of your choice.

Theremino SlotViewer a simple and handy slot explorer and editor. Theremino SlotViewer a simple and handy slot explorer and editor.

Theremino SlotViewer a simple and handy slot explorer and editor. Theremino SlotViewer a simple and handy slot explorer and editor. Theremino SlotViewer a simple and handy slot explorer and editor.

You can view groups of any number of slots, even by selecting from different areas. You can edit the values with the mouse, arrow keys, PageUp, PageDown method. The CTRL and SHIFT keys allow you to change the values faster and you can also use the mouse wheel.

Notes for versions
Version 1.6:
In earlier versions the slot adjustment with keyboard arrows did not work well, now is in place.
Version 1.7: Changing “NUM slots” Sometimes it appeared a small white box, now no longer happens.
Version 1.8: Fixed small defects were born during the transition from XP to Windows7.
Version 1.9: Changes to work with Mono on Linux.
Version 2.0: Significant reduction in the consumption of CPU in order to facilitate the operation on Raspberry Pi.
Version 2.1: Changes for a better operation with multiple instances.
Version 2.3: Improved overall functioning and visibility of written. Now you can set the minimum and maximum (which were previously fixed at zero and a thousand). You can also use intervals with negative numbers (for example, from -1000 to +1000), or very small intervals (from zero to one), or very large (from – 100 000 to +100 000).
Version 2.4: Correct the size even on systems with font size changed both 125% which in 150%.
Version 2.5: Correct inaccuracies in the setting with the mouse and eliminated the flashes on startup. This version contains the new class “Slots”. New option to fine tune and quickly, with the up and down arrows, in combination with the ALT, SHIFT and CTRL.
Version 2.6: By popular demand we have also implemented the comments. For instructions read HERE.
Version 2.7: The “CustomControlsLib.DLL” has become part of the sources, so there is a problem at least for Linux and MacOsx.
Version 2.8: Improved alignment of comments.
Version 2.9: Added the display of non-message number “NAN_MasterError”. This is a mechanism that allows applications to automate guarantee that all masters are in operation. In case of malfunction or disconnection of one of Master the HAL issues a “NAN_MasterError” zero slot.

Downloads from Theremino SlotViewer – Version 2.9
Theremino_SlotViewer_V 2.9

Theremino_SlotViewer_V 2.9 _WithSources
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino SignalScope

Theremino SignalScope

When the simple viewer of Http:// is not enough you can use this Signal Scope.

Attention: This is not an oscilloscope but Slot signals Viewer, they have a maximum resolution of a millisecond and then a maximum bandwidth (theoretical) by 500 Hz. In practice, however, the phenomenon of aliasing limit the range of frequencies to 100 Hz or so. If you want a true oscilloscope with 22 KHz of bandwidth and 192 KHz sampling download “Theremino DAA” from this page.


  • Storage of signals of two slots for the last 30 minutes maximum resolution.
  • Ability to scroll backward signals (Delta time) to locate and zoom in on particular events.
  • Two adjustable sliders with the mouse to measure widths, times and frequencies.
  • Both the sliders that the delta time can be adjusted with the mouse and also with the TouchScreen.
  • Continuous display of instantaneous values and peak-to-peak in the status bar.
  • Ability to save and restore the event buffer.
  • Ability to save images for documentation.
  • Storing all functions and restore on reboot.
  • Possibility to program the stop sampling after a number of events have occurred, by setting a threshold value and a counter.


  • Enable “Trigger” only for fast repetitive signals, otherwise the display is very slow.
  • Keep “Delta Time” zero if not in use, otherwise the signals do not appear immediately but only after the milliseconds set.
  • Keep “Stop If” disabled if not in use, otherwise, sampling could stop unintentionally.
  • Edit the file “Slot names” to give a meaningful name to its Slot.
  • Copy the executable executable ’ ’ this application next to dell ’ HAL and Viewer share the same Slot “Slot Names”.

Notes for versions
Version 1.2:
This is the first published version.
Version 1.3: When the slot names Panel is visible only if space allows.
Version 1.4: The parameter “Delta” is reset each time you press “RUN” so you don't forget.
Version 1.5: Deleted the error in closing if the folder was missing “Buffers”.
Version 1.6: Deleted the error in closing if the RUN time was greater than the length of the buffer that stores the data. Extended storage buffer 24 hours. Beware that with very long buffer time to save loading can be quite long.
Version 1.7
If cursors are enabled then is saved only the area between the two sliders.

The Trigger is greatly improved.
Deletes a waveform instability happening randomly.
The buffer is again limited to 1 now (for log Logger applications are used).
Save and load buffer takes at most 2 seconds.
The DeltaTime be changed quickly using CTRL and SHIFT + Mouse.
Version 1.8
Deleted error with very large input values.

Downloads Theremino SignalScope – Version 1.8
Theremino_SignalScope_V 1.8

Theremino_SignalScope_V 1.8 _WithSources
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Easy access to slots with: “WriteSlot” and “ReadSlot”

To communicate with the Slots you call functions: “WriteSlot” and “ReadSlot” and their initialization functions.

Download: A very simple application to make the first experiments, you download from here:

This file contains modules for VbNet, CSharp, Python, Pascal and VB6, for C++ refer to the examples of MemoryMappedFiles of the next section. If you need practical examples, almost all applications in the system Theremino using the functions WriteSlot and ReadSlot.

This is the new class to access the slots. This class is better than previous forms “Memorymappedfiles”, and will gradually be included, in all new versions of our applications. Includes only those versions VbNet and CSharp, then those who use other languages, must get by a little, and make a mix with previous versions. This class does not require initialization, you initialize alone when it instantiates an object Slots. Functions for accessing slots have become Slots Write() and Slots Read(). This class also includes the functions to create and compare numbers signaling NAN (operation that everyone said was impossible, We have searched the web for years and eventually the solution we had to invent from scratch)

Interprocess Communications and

Communication via SLOT is based on the MemoryMappedFiles (Windows) and the SharedMemory (Linux). These examples explain how they work with data of all kinds.

For simple communication with the slots on the system Theremino, don't use these examples, but the more practical WriteSlot and ReadSlot, the previous chapter.

These examples also show how to use strings, integers, float in 64 bit arrays that are not needed to communicate with the system Theremino, but it might be useful to communicate efficiently (a few microseconds for each transfer) several programs created by users, even in languages different from each other.

The source code in C++, CSharp, VBNET and VB6, may be useful to non-Windows systems experts to do translations and experiments in various versions of Linux and Mac.

We recommend that you start the tests by launching multiple versions of these programs in different languages, or even all in the same language, and communication experiments by writing strings and numbers, sending them with and receiving them with GET

Communications in system Theremino, use numbers only “Single” (floating point in 32 bit), in positions 0 to 1000 (offset from 0 to 4000), the MemoryMappedFile with name Theremino1. Communication between applications, could also use files with different names from Theremino1 and not engage the slots on the system Theremino.

Theremino_MemoryMappedFiles_V 1.2
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Software to communicate with Max/MSP

These are examples of bi-directional communication between the slots on the system Theremino and Max/MSP

Interactive help for Max/MSP version 4. x

Interactive help for Max/MSP version 5. x

Using a MXE (External module for MAX) you get extremely fast communication (direct calls to a DLL – a few microseconds for each transfer)
Note that through the slots on the system Theremino multiple patches in Max/MSP can communicate with each other very efficiently this possibility might be useful to the makers of complex systems that, currently, for communication between Patches only have much slower methods. (We're not big experts from Max so if anyone knows other efficient methods we communicate and we will correct these notes)

Max Install
In this file all you need to communicate between Max/MSP with the slots and the MemoryMappedFiles system Theremino.

Theremino_Max_Installer_V 1.0
Theremino_Max_Sources_V 1.0 (version for programmers)

Using these sources you can recompile the patch Theremino.mxe. With the necessary changes, It should be possible also interface with PureData and similar programs (VVVV, Processing, Eyesweb, etc…)

For Linux and MAC this project should be changed both in the MemoryMappedFiles and in how to install the files in the folders of Max/MSP.

Software to communicate via UDP with OSC messages

This is an example of bi-directional communication between the slots on the system Theremino and the environment Max/MSP with the Open Sound Control Protocol

Help UDP communication interactive – OSC for Max/MSP version 5. x

This example shows a Max/MSP Patch that sends on UDP port 7401 the request slot values 0 and 56, receives UDP port 7400 and shows them with two VU-Meters.

The Theremino_OSC application receives requests UDP port 7401 and sends the values of slots on UDP port 7400

Application that implements access to slots system Theremino via UDP with OSC messages

On the right side of the sample Patch view, with a similar proceeding, How to write numeric values into the slots of the system Theremino.

Communication options via UDP
OSC Protocol over UDP is slower compared to the previous method (with the DLL “External” by MAX, call MXE) but allows for a much more flexible communication, both on the local network or through the Internet

Through our Slots, ThereminoOSC, Max/MSP, Processing and PureData you can connect seemingly incompatible hardware and operating systems in an easy and immediate. Without writing a single line of code.

With a little experience in programming, you can also change our examples (all freeware and with complete sources) Our software is all written in an extremely simple and modular so you can be a base for the development of applications with special requirements.

Theremino OSC V 1.5 and sample Patch for Max/MSP
Theremino_OSC_V 1.5
Theremino_OSC_V 1.5 _WithSources
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino Script

Theremino Script allows you to write small programs in VbNet or CSharp without installing VisualStudio.

The communication features and MemoryMappedFiles (Interprocess Communication) are implemented at the system level, so just write WriteSlot and ReadSlot to communicate efficiently (a few micro seconds) with the slots on the system Theremino.

The language is compiled and relies on DotNet for which execution is very fast (from our trials VbNet is faster than CSharp and C++), VbNet also has a set of mathematical functions and graphics absolutely complete.

Compiled programs are usable even without Theremino_Script and can be deployed as a regular file “EXE”.

The Theremino_Script is a little’ the younger son of Microsoft Visual Studio Express but it doesn't go quite as well, is slower, contain certainly more bugs and glitches and doesn't have the Visual editor of forms, for which the program you write everything in text. The only advantages are that you should not install Visual Studio Express and write a few lines looks, at the beginning, easier.

We recommend to use the real Visual Studio that you download from here: downloads/notes-on-software # instruments. Visual Studio allows you to easily continue even when programs become large. But many users have asked for an easy way to access to slots, System Theremino, to write things like “I turn on an led – I look forward to 10 seconds – I turn off the led”. So we tried to simplify and hide every complication. It is said that this route is valid, try it and let us know how you are.

If you are not comfortable with Theremino Script and you don't want to use Visual Studio, then another good solution, Max/Msp environments could be, PureData and Processing.

A language even simpler?
Theremino Automation: downloads/automation

Translate the examples to VbNet in C #
– From one of the examples in C # running
– Give it a new name and save it
– Take (with copy and paste) VbNet functions which you are interested
(even more features, but be careful controls and events, they are mistranslated)
– Translate with this utility:
– Or with this:
– And finally paste the translated code in C # application

Notes for versions
Version 2.1:
First version of Theremino_Script with access to integrated SLOT.

Version 2.2: Improved suggestions (IntelliSense) they now have more choices.– The tips are selected by clicking on the list with a double mouse click.– Editing is easier and faster.– No longer happens accidentally choose work from list of suggestions.– Added a sample that simulates the clicks of a Geiger with variable frequency, useful to try the program Theremino_Geiger.
Version 2.3: The mouse wheel now scrolls so decent, fast and progressive.– Added an example that flashes an LED connected to “Slot 1”, useful for those who make their first steps with the slots, the Master and the Hal program.
Version 2.4:
– Complete access to slots is in VB which in c #
The functions you call to access the slots are:
— WriteSlot(Slot, Value)
— ReadSlot(Slot)
— ReadSlot_WithNans(Slot)
– In VB calling MemoryMappedFile_Init is no longer needed (If you call does not give error).
– In c # all
the MemoryMappedFile initialization is no longer needed. You must delete all the rows in the initialization block, otherwise give errors.
– In c # the main class should no longer be called “class Script” but “partial class Script”
– CSharp lovers and for those who were accustomed to Arduino, We added the examples: Example1, Example2, Example3 Example4 and. These examples explain how to add buttons and text boxes and how to use their property and their events.
Version 2.5: Added the example “Temp Meter” in the folder “Theremino SLOT Examples”. Here he is seen as a function:
Version 2.6: Fixed many small defects were born during the transition from XP to Windows-7/8.
Version 2.7:
Added the menu “Files” “Open application folder”
The FileOpen dialog box in addition to opening the Vb and C # can also launch executable files.
The FileOpen dialog box are also permitted multiple selections, comfortable for moving and copying files.
The FileOpen dialog box does not create more problems in the case of multiple ThereminoScript in different folders.
Open the File menu now also contains the MOST RECENTLY USED list, with the recently used files.
Added the current language in Google searches, Bing and MSDN
SaveAs Panel full path made it hard to change the name, Now you see the name of the file without path.
The basic keywords are automatically converted, with uppercase and lowercase letters.
Version 2.8: Fixed small bugs and added many sample scripts.

Theremino Script downloads – Version 2.9
Theremino_Script_V 2.9

Theremino_Script_V 2.9 _WithSources (version for programmers)
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino Office

Theremino Slots To Office

Many know Excel and know how to use VBA (Visual Basic for Applications). You can write and read the Slot from VBA paves the way towards the economic management of sensors and actuators. Just a Master module that you can also build in DIY and you will get the same results that in the past required expensive National systems, MATHLAB or similar.

But most of all those who know VBA will appreciate the simplicity of this implementation, There are only two features, easy to remember, “WriteSlot” and “ReadSlot”. With these two functions accessing sensors, move servo motors, driving relays and Excel charts move externally controlled in real time.

The communication speed is great, to write or read a Slot with Libre Office and Open Office only takes 70 uS, While with Microsoft Office on your own or. 3 uS. This speed can actually be helpful because not only charts with VBA. You can do real applications even with heavy algorithms that need maximum efficiency.

Tips for programmers

Theremino Slots To OfficeAll the magic is in the form “ThereminoSlots” that should never be edited. This module exposes the two functions “WriteSlot” and “ReadSlot” that can be used in all modules, and macros in the document.

To get that all macros of all documents can use functions “WriteSlot” and “ReadSlot”, just copy the form “ThereminoSlots” in “My macros” or in “Office macros”

If you write in a cell while the macro activates Microsoft Excel tries to stop the macro (unpleasant behavior, Libreoffice and OpenOffice do not). If the macro contains a DoEvents and calls him very often when Microsoft Excel tries to stop the macro goes in error. The solution is to call DoEvents at regular times so as to advance the UI but not too often, Let's say every 30 milliseconds.

– – – – – – –


Examples for Microsoft Office, Libre Office and Open Office:

All the examples are in this zip file contains the module “ThereminoSlots” It is written so that we can work on Microsoft Office, Libre Office and Open Office without change even a comma.

The same is not possible for samples for which we have prepared an example for LibreOffice and OpenOffice (with extension “ODS” and some examples for Microsoft Office (with extension “xlsm”).

In the ZIP file you will also find a text file with some explanations and a file “TestFunctions” with the features we've used to try the communication speed.

Theremino Buttons

This application is the fastest method provided by the system theremino to create control panels to use with your Mouse or with Touch Screen.

You don't need to know a programming language, just type the text you want to appear on the buttons and adjust some options. Everyone can quickly learn to create new buttons and text boxes. And change colors, the size and also arrange controls on one or more columns and rows.

Here are some examples of panels that can be created.

Thremino Buttons Examples

To edit the controls you hold down the CTRL key on your keyboard while you click with the left mouse button on a button or a button-free zone.

The following screen appears and its commands modify the controls, you change the text displayed, changing the colors and properties of writing and reading of the signals of the slots. You arrange your controls across multiple rows and columns, If they create new and delete.

Theremino Buttons 2.0

The version 2.0 has greatly improved. You can also manually rearrange buttons, by dragging them with the mouse or use the arrow keys to resize with SHIFT. There are new types of movement and editor also allows you to do the Undo to go back when you are wrong. To discover all the news read the instructions.

Full instructions are in the documentation files.

Documentation in Italian and English


A sample app (rotational speed for internal combustion engines)

A sample app (BrickRobot)
This example shows how to compose a complete environment composed of multiple applications of the system, start them together with “Start_ALL.vbs” and close all of them, together with the middle mouse button (Thanks to the Helper application).

In this video you can see the moving BrickRobot. Note that anyone can add buttons and servo motors. You can also easily change the movements just change the destinations in the buttons. All without programming a single line of software.

Downloads of Theremino Buttons – Version 2.0 (version for programmers)

For all Windows systems to 32 and 64 bit (for Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino SimpleLogger (with Theremino Script)

This is a sample script Theremino Script. Use it only as an example and as a test of Viewer KST. To build a data logger you should use the Theremino Logger that is found in the next chapter.

Even the less programming expertise can adapt this script to their needs. The LOG.csv file is created in the same folder that contains programs “exe”. By changing the first four lines of the file “ThereminoLogger. vb” You can vary the range of acquisition and channels to be scanned. Once edited at will, You can launch directly the compiled version “ThereminoLogger.exe”, no more having to “ThereminoScript”.

– Notes for the new version –
There are some examples of interactive viewing with KST. To use KST first of all you have to install it from the WEB and then proceed as described in the file “Readme – KST Install Notes.rtf”

We have also added the compiled versions (exe), so you should not even open Theremino Script to compile them. The three precompiled versions logging every second, ten times per second and one hundred times per second.
KST files allow you to view logs in various ways, While you are logging. They're just examples. With patience and enquiring on the WEB you can make KST every kind of view and filter. Probably you can also use the WEB to send MySql file KST. Use KST is not easy at all, is a great software and the great results you must pay with a lot of patience.
– Fix –
We moved the files to the same folder as the LOG.csv KST. It seems that KST had a defect that prevents him from reading the LOG if it is in a different folder. If you have not downloaded this latest version manually move them out close to the LOG.csv.

– – – – – –

Downloads of Theremino SimpleLogger – Version 2.0
Theremino_SimpleLogger_With_KST_Examples_V 2.0
For all Windows systems to 32 and 64 bit. For Raspberry Pi, Linux, Android and OSX, read the installation notes.

– – – – – –

Theremino SimpleLogger – Version 3.0
The script Theremino Logger is changed in version 3.0, to collect data from some weather sensors. The version 3 Converts values from 0 to 1000, in temperatures, UV index, Millivolt and Volt and you download from here:

Theremino Logger

Theremino Logger V 3.3

This Datalogger and simple to use but with great performance. The base, concise and intuitive, has been studied by Marco Russiani. Then we supplemented with calculations to measure resistances and temperatures, with the PT100, Pt500 and PT1000 three or four wires.

The temperature calculation from the resistance of Platinum resistors (PTxxx) is done by means of a polynomial formula, with an average absolute error of 0.015% throughout the temperature range, from -200° to +850° C.

Are also implemented the calculations for probes:

  • Lm35 – From 0° C to 150° C with an accuracy of +/-0.5° C)
  • TSIC501 – From -10° C to 60° C with an accuracy of +/-0.2° C
  • UVM-30A – UV index from 0 to 11
  • ML8511 – UV from 0 to 15 MW

For probes LM35, TSIC501, UVM-30A and ML8511 might be enough a Theremino Master. But for high precision measurements and especially for RTD (PT100 and 1000) It is good Add a Theremino Adc24.

Learn more about sensors in These paginand and in Adc24 documentation.

LSI Radio DataloggerA Datalogger controllable via radio
With the Theremino Logger on a Tablet TCU you get a system similar to these without spending thousands of dollars. The result is a complete datalogger controllable via radio, You can store data for years, consuming only 2 Watts (less than 500 but to 5 Volts). The complete system can be enclosed in a watertight container, without ever needing to open it. The radio is controlled via TeamViewer and your data is accessible on your local network, through Windows folders.

Mini Instructions

  • The Log file is written next to the executable and can be viewed with KST (as explained in the previous “Theremino Simple Logger”). Currently the only one who knows well enough KST is Marco Russiani, If you have trouble configuring it let him know.
  • The sampling interval can be very frequent (currently the maximum is 60 samples per second) but under the second you do not have a great precision and get tired enough the CPU. To reduce the work to the CPU is good to keep the application minimized.
  • Each line of LOG (also presented in the second row of the application), consists of the date, followed by the Julian date (in days and fractions) and followed by the values of the sensors are enabled. The field separator is a semicolon.
  • The line “Value” view individual sensor readings. See them in real time is useful in trials.
  • In row “Slot” you set the slots for individual sensors. These numbers must correspond to the numbers of slots that you set in the HAL.
  • In row “Type” you set the sensor type.
  • In row “Multiply” you set the multiplication factor, for fine adjustment of the gain (the slope of the calibration curve). Normally this value is “1”. See the schematic Adc24 documentation.
  • In row “Trim value” you set the factor of addition, for fine adjustment of final value (you move the calibration curve up or down).
  • The new buttons “Zero set” We are from version 3.3 onwards to the “Tara” easily. Mostly it is used for linear transducers and load cells. Using them is easy, moves the sensor in the zero position and the button is pressed.

Special notes for channels with the types “RES-3” or “Res-4” or “PTxxx”

  • With these types using two Slots.
  • The first Slot is written in the line box “Slot” (for example, 10).
  • The second Slot is the Slot following (for example, 11).
  • The first slot is the voltage value measured.
  • The second Slot is the value of the measured current divided by the current measuring resistor (normally 10 k).
  • In row “Multiply” do not set “1”, as with other sensors, but you set the value of the current measurement resistor (usually 10000).

Display data with KST

Datalogger visualization with KST Datalogger visualization with KST

KST is a great OpenSource Viewer for LOG files. View log files in real time, While they are written, as shown in This video.

KST also supports huge files and displays them and filters in every possible way. It is also very easy zoom and browse the files in the past. The perfect solution for all needs scientific logging. With patience, enquiring on the Web and possibly asking for help in Marco Russiani, You can make all kinds of visualization KST. Probably you can also use it to send files MySql on WEB. Use KST is not easy at all, is a great software and the great results you must pay with patience.

Download documentation on KST prepared by Marco Russiani

Theremino Logger downloads – Version 3.3

For all Windows systems to 32 and 64 bit (for Raspberry Pi, Linux, Android and OSX, read the installation notes.

Theremino SeriHAL V 2.2

SeriHal V 2.2

Theremino_SeriHal lets you send to slots data from a serial port and send the data to the serial port of the Slot.

Communication SLOTS <-> Serial (Real or virtual) is bi-directional and, If desired also the transmission, This can be either synchronous or asynchronous.

You can then connect to PC any Hardware or Software interface that sends and receives data through a serial port. And you can send data to and receive numerical data to one or more slots. The data can then be processed by other applications in the world Thereminico and, for example,, displayed with the SlotViewer and the SignalScope or registered with the Theremino_Logger.

By now the world thereminico can communicate not only with Arduino and Processing, But even with Octave (the poor cousin and free of MatLab), with Python and other SW still: just need load their serial plugins. Think about what you can do by managing the OpenCV computer vision functions via Python/Numpy and dialoguing with the slots Theremino-HAL and Master/Slave modules: facial recognition, mechanical/optical tracking, real-time image processing and other graphics of the highest level within the reach of (almost) all.

The instructions and the communication protocol are in the file “SeriHal_v 2.2 _eng” you will find in the folder “Docs”.

Aalso this is a brilliant application of Marco Russiani. In the DOCS folder there are two small files in Italian and English. Had nothing but Marco has recently discovered the supernova SN2017gfh. It's not every day you have a friend who has discovered a star, We had to write it!

Claudio S. deserves a special thank you, Having reviewed the documentation by adding some examples for integrated use, via serial, of various components of the world Thereminico, with each other and/or with the “the rest of the world”. In the DOCS folder there are some examples for using Arduino and also an example to check our application Theremino SDR from the outside with Arduino and Processing.
Downloads from Theremino SeriHAL – Version 2.2
For all Windows systems to 32 and 64 bit (for Raspberry Pi, Linux, Android and OSX, read the installation notes)

Get the system modules

The theremino team only deals with research and does not sell hardware. The system is completely "Freeware", "Open Source", "Not for Profit" and "DIY", but there are manufacturers who can provide modules assembled and tested at a great price. One could hardly self-build them spending less. A list of manufacturers on this page:


The source code of our software does not contain copyright notices, author names and links to our site, so you can make every use, without limitation of any kind. We do not require you to specify the original source or our site but if you are happy with our software remember us and make known this site to your friends. Any donations, even small, are very welcome and can help us to maintain the software “free” and to produce always new applications.

Legal notice


Comments are closed.