27 February 2013

In Windows we can use WSH to interact with console/batch processing task, or for simple case "net send" or "msg" will suffice. Then I found zenity, a modern version of cdialog which curses based.

This tool use GTK as its gui to bridge console I/O with modern dialog window for many purpose. Its template (glade ui) can be customized too. I found it a good match for bash though I haven't try it with batch cmd (I dont see a reason why it won't work).

notes:
- consequently as this is static build, no locales/translation included (English only), but it's possible to add
- zenity.ui is embedded in the executable, to override it put zenity.ui alongside zenity.exe (see source for zenity.ui file)
- icons are different from original version as I force it to be stocked

Edit:
Hmm I think, I have an example...
"runas" which allow to do "UAC" ala commandline usually assume you know the username of the admin account (as it don't ask you), making it uninteractive. With zenity we could do something like this:

16 February 2013

This is actually just a re-post of PyGI AIO (see main page). Since building PyGI consequently need to build the whole things and that because PyGI have poor documentation (actually it means to be that way, so you're forced to read C documentation instead), so I build the important part of this, devhelp. Which make your life way easier (it's a kind of CHM in concept), then gedit (not my choice of editor though), then for po translation we need gtranslator too and of course glade! Yeah most are not available for Windows yet but now you could try it

There we go, a complete suite guys! BUT this of course really is PyGI oriented. a.k.a all runtime has been linked to msvcr90.dll using my mingw toolchain (special). Basically it will potentially crashed when mixed with generic dll (linked to msvcrt.dll) so you've been warned!, however it you use complete GTK c runtime package from OpenSuSe or Fedora it should work fine.
As usual this build, I think is the most feature complete yet smallest available on the net (OK that's a brave claim ha ha), no really it's (just as all of my build here, is extremely complete one). Ok maybe not smallest as possible cause I use dwarf2 gcc which have redundant debug sections than sjlj.

As you know GTK-3 is still not production ready (I even found 3.6 to be worse than 3.4 in some case). This however should not prevent you to give it a try :)

GI for windows itself is credit to Dieter Verfaillie for his yet uncommitted patch (more than a year ago) which still relevant today, although GIR generation remain unreliable and messy process under Windows. Also thanks to Helge too for pointing many issues.

Overtime you will (i'm sure you will) encounter binding errors and stuff. You could fix it without having recompile everything. Just edit (say use gedit) the gir file (located in share\gir-1.0) save the edited gir alongside g-ir-compiler and invoke: "g-ir-compiler -o [binding-name].typelib [binding-name].gir" then copy the typelib into site-packages\gtk\lib\girepository-1.0 and overwrite. As a hint you could grab linux gir version and compare the error part.

10 February 2013

This weekend topic is MIDI player, of course there are more than just three MIDI players :-p in the crowded Windows world even for OSS. But I will cover three players as representative of three common synths.

The first is GUS patches based synthesizer, for this one I choose wildmidi. GUS patches is a collection of individual instrument sound which each parameter/effect stored in configuration text file. I made a little modification based on 0.2.3.5 version which make it less hardcoded and more portable as usual. So we have completely portable and small player (ok, player is small but patch vary).

Basically once we have a zipped patches follow these steps:

0. extract the patches :)
1. create share\wildmidi directory in the same place as wildmidi.exe
2. put all *.pat files into share\wildmidi above
3. copy its config file (usually *.cfg) in the same place as wildmidi.exe and rename to wildmidi.cfg
4. edit wilmidi.cfg above with notepad: put a line of dir before the first bank directive, if dir directive already exist and has value just remove its value (path).

Next is SF2 (SoundFont 2) based synth which could be said as bundled version of GUS but more detailed (sometime a wave for a note sometime a wave for a range of notes). This may be good or bad, let say for editing individual pat is may simpler than having a dedicated SoundFont editor, but for distribution SF2 is handy and easy to setup. For this I choose fluidsynth which dedicated to be sf2 based player.

Fluidsynth itself is a bit complex, it include interactive console environment for many task, as a player (with focus for ease) this may be overkill. Fluidsynth seems not have option to load default sf2 file or sort of, so we may need create simple batch wrapper say fluidsynth.bat something like:

@%~dpn0.exe -i %~dpn0.sf2 %*

That is assuming you have soundfont named fluidsynth.sf2 at the same place as fluidsynth.exe

downloads: fluidsynth.exe (676 KB) and if you want to compile it yourself with all interfaces enabled, this patch may help

And the last one is player that use native synth, that is DirectX MS GS Wavetable Synth which use DLS bank (similar to SF2 in the way that it's a bundle). Well most audio players capable of playing MIDI usually use this method. To fit with previous choices is playsmf which use its own MIDI parser but with MS Synth as renderer. This tiny player of course doesn't need any setup or other dependencies, we could use file association or just drag and drop.

Obviously there is a worth mentioning player that try to do everything above and more (playing MOD, sort of bundled MIDI+Patches): timidity but I'm running out of time to build the latest version (2.14) which ask for fork doh. BTW my ffplay build (part of ffmpeg) is able to play MOD too.

06 February 2013

According to wikipedia article about Uniscribe http://en.wikipedia.org/wiki/Uniscribe you can get (as this written) the latest usp10.dll from Office 2010 (the last Office to support XP) and slightly updated version 1.626.7600.20796 from its SP1, but you could get it in easier way: