Exe setup window

Until our dedicated user library is in place you can post examples and modules here

Moderators: electrogear, exonerate

Exe setup window

Postby trogluddite on Sat Feb 05, 2011 8:06 pm

Now that we have some nice shiny new primitives for our exe's, I thought I'd try and make a nice control panel for dealing with driver selection and choosing audio channels (for those lucky enough to have lots of I/O!)

Here's version 1...
EXE IO Modules.osm
(16.44 KiB) Downloaded 277 times

The idea is that you usually only want to mess about setting things up once, so it saves a text file with your most recent settings to your 'Application Data' folder (it creates a sub-folder automatically - choose the name in the properties).
The main window is designed to pop-up on top of your .exe's GUI - just pump a trigger in to open it.
If it can't find a settings file, the window will automatically pop up on loading the exe. You can then choose your MIDI and Audio drivers (sorry, ASIO only), and also route your plugin inputs and outputs to whatever ASIO channels you choose.
When you close the window, the settings are saved - and from then on, everything is set up automatically at load time.
Of course, you can put a button on your .exe's GUI to call it up any time you like, to alter settings later on.
Drivers are recognised by name, so it should always work even if the drivers are not enumerated by Windows n the same order every time.

I only have one driver here to test it on, so I'd like to know if it works OK for anyone else if possible - should be possible to test this with the schematic as it is.

By default a settings file is saved to ....Application Data/Driver Setup/ASIO Settings.ini. So you may want to hunt down and delete that once you've had a play.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Sat Feb 05, 2011 9:15 pm

awesome and very professional work trogg!

1st Test with my 14/14 I/O's:
- i'm really shure i selected my asio-driver but none stands in the ini...
- after 2nd try it wrotes the driver name on 1st row :)
- but settings window shows up anyway
- ASIO name in selector isn't shown after reload because the well known missing redraw in this module...
+ top use of System path, Bus system and find modules ;)

keep on doing!

cheers,
Walter
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby trogluddite on Sun Feb 06, 2011 4:28 pm

Glad you like it :) - hopefully I'll have a slightly optimised one to upload soon - I'm working on some parsing so that it's easy to add more variables to the .ini file, so that controller assignments, skin settings etc.etc. can be easily added.

I realised that some of the update problems you've seen might be because of the way I saved the .osm - I've saved it with the window already opened! Oops :blush: The 'only open the first time' works OK when I re-save the .osm with the window closed - the the on-load trigger opening the window then forces the GUI to update properly. Just ported it into Soopa Loopa and saved as .exe, and it's working nicely on all the machines I tried so far.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby trogluddite on Fri Feb 11, 2011 1:19 am

Version 4 (2 and 3 were rubbish!)
EXE IO Modules v4.osm
(32.04 KiB) Downloaded 191 times

NB: When you first open this schematic, it will create a folder 'SM TEST DELETE ME' in your App.Data folder. Click the properties button for the main module to see the full path to the file, so you can clear the garbage when you're done playing.

Improvements...
-Got the triggers flowing properly so that the GUI, file and driver selectors all agree (Hmm, well fairly certain ;) )
-The ini file now saves with variable names as well as values for easier deciphering and editing.
-Which means you can now add other variables to the .ini file using the new INI variable module.
-More useful properties panels, including a window where you can see the .ini file contents and full path to the file.
-A load of extra comment boxes and popups to make it easier to understand and adapt.

Behaviour is basically as before.
On first load, the popup window opens, all settings go to their defaults, and the folder and file are created. Changing any of the settings then updates the .ini file directly to disk (trigger delays are used to stop your HDD going bonkers).
Next time you load, all the settings are magically restored from the .ini file. The window doesn't pop up again unless you open it manually using the trigger input.
To get the defaults back, just delete the .ini file.

An alternative version for using within plugins, with the .ini file variable stuff, but not the audio drivers etc., will hopefully be along soon.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby trogluddite on Fri Feb 11, 2011 7:19 pm

Updated the download in the previous post - fixed a bug where the text formatting goes mad if your driver names are very long (e.g. "Microsoft GS Wavetable SW Synth")
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Fri Feb 11, 2011 10:04 pm

Hi Trogg,

nice work - if i find some spare time i will test it more extensive...

But i had an idea long ago to check which inputs are active:

If u check the ins with a 'detect signal present' modul (found one from oddson in my Toolbox) with 1 uV (microvolt) sensitivity only existing Ins can be detected :)

I will make an OSM if i have time 4 it later...

Next idea was to read out the asio/dx output code to determine the Outs but i think this is a no-go...?!
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby trogluddite on Sat Feb 12, 2011 3:13 pm

Interesting idea - I already suggested to have number of inputs/outputs etc. on the device selector, I hadn't thought if we could find the info already.

I've managed to make a little module to read the ASIO Out code output - extracts the number of outputs and the buffer size - seems reliable with the drivers tested so far.
Read ASIO Code.osm
(643 Bytes) Downloaded 172 times

Inputs is more tricky for me - many of my ins are from digital devices that truly send zero for silence, so testing the audio stream will not find them without sending a test signal.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Sat Feb 12, 2011 5:27 pm

Awesome - never say no-go to Trog... ;)
Works with ASIO4All(onboard) and my Motu 828 :)

Here my little construction 4U:
I left the PID as a warning that we always have to disable active audio I/O and that an ASIO Kernel driver kills this osm when selected :(
many of my ins are from digital devices that truly send zero for silence, so testing the audio stream will not find them without sending a test signal.

Yeah - that's a prob... maybe we can detect a spike or any input status bit changes with ASM?
Attachments
EXE IO Modules v4_sun_detect Input v2(recovered)pid=2056.osm
(40.14 KiB) Downloaded 154 times
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby trogluddite on Sat Feb 12, 2011 8:29 pm

Cool those are some nice new features!

sunsynth wrote:ASIO Kernel driver kills this osm

I assume that you mean the weird hybrid drivers "ASIO Multimedia" and "ASIO DirectX"? I noticed that they crashed my machine, but I always thought it was because my soundcard drivers were flaky. So, if I understand you, those drivers will not work with SM on any setup? In which case, I may see if I can somehow remove those options from the drop down list.

Your input detector works flawlessly on my machine - but confirms our fears about silent digital inputs, there just doesn't seem to be a way of picking them up :(
After poking around inside, I thought that the detector could be stripped back to its most basic form - just checking for any non-zero value, and with a latching action within the code. Here's a little example of just that part...
ASIO Input Test.osm
(2.41 KiB) Downloaded 151 times
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Sat Feb 12, 2011 10:18 pm

Hi Trog again,

good shrinking of the code - works perfect 4 me - with active signals on the In's of course ;)
ASIO Kernel driver
it's not the fault of ur schematic i think - it's simply a bad driver on my machine 3:)

Now we can only hope that malc comes on our wishlist to this point and gives us ASIO I/O components with their I/O names( and which are active)...

But will check above modules in my schematic - maybe they are useful 4 me - will report later!
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby trogluddite on Sat Mar 26, 2011 7:03 pm

Here's a new version of the .exe setup and .ini file schematic - thanks to sunsynth for his testing; this helped to identify a couple of niggling bugs.
EXE IO Modules v7.osm
(28.71 KiB) Downloaded 289 times

Usage is the same as previous versions (see posts above), changes are...

-Fix for MIDI I/O not always updating correctly at load time.
-Fix for corrupted .ini file when many variables were updated simultaneously.
-No longer uses windows timers, faster initialisation of the schematic at load time.
-NEW. Automatic loading of the last used VST preset bank into the preset manager (use the regular preset manager if you don't want this feature)

NB. As before, this schematic will save a .ini file to a new sub-folder within your App'Data folder - you can find the location of the file/folder by looking at the properties of the 'Audio/MIDI settings window' module - deleting the file will restore default settings to the schematic (and keep your hard drive tidy!)
When saving an .exe that uses these modules, make sure to export it with the 'Audio and MIDI setup" window hidden (click the red/white 'X' button) - it will then remain hidden when the .exe is loaded apart from the first time the .exe is used, when you will be prompted to make your initial settings.
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Sat Mar 26, 2011 8:25 pm

Thanks Luddite,

will check it soon - as always ;-)

Just saw u changed 'something' more than expected :o

...later
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby trogluddite on Sun Mar 27, 2011 6:45 pm

sunsynth wrote:Just saw u changed 'something' more than expected :o

:S Hope it was 'something' good!
Feel free to use any schematics and algorithms I post on the forum in your own designs - a credit is appreciated (but not a requirement).
Don't stagnate, mutate to create. Without randomness and serendipity the earth would be just another barren rock.
User avatar
trogluddite
smychopath
 
Posts: 3025
Joined: Mon Oct 20, 2008 3:52 pm
Location: Yorkshire, UK

Re: Exe setup window

Postby sunsynth on Sun Mar 27, 2011 9:13 pm

HI Luddite,
tomorrow i will place ur changes directly into my actual project!
Cross your fingers! ;-)

Cheers

btw:I just finished (hope so) my slide replacement with a counter...
The slide behaviour was always suspect in my 'special' schematics
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Re: Exe setup window

Postby sunsynth on Mon Mar 28, 2011 3:55 pm

So - implemented and stress tested... ;-)

Sorry - only RGY means INI with Midi only...

Even use it for knobs with an after drag trigger 4 a sample and hold :)

Perfect work Luddite - thanks again!

Cheers,
Walter
User avatar
sunsynth
smaniac
 
Posts: 1494
Joined: Mon Sep 11, 2006 3:27 pm
Location: HH - Made in Germany

Next

Return to Examples

Who is online

Users browsing this forum: Google [Bot] and 2 guests