MattyD 34 Posted May 11, 2022 Share Posted May 11, 2022 (edited) Hi all, Attached below are two segments of this project. The first "Midi API" is a wrap of the windows functions below.https://docs.microsoft.com/en-us/windows/win32/multimedia/midi-functions The second "Midi UDF" library is built on the first, and aims to provide a user friendly code base for people working with midi. In broad strokes, this UDF so far covers: Channel Voice and Mode Messages Registered Parameters (Channel Tuning, Mod Wheel/Pitch Bend ranges) Some more prolific Non-Registered Parameters (Yamaha XG & Roland GS common controls) Drum editing Envelope control Vibrato control Filter control General SysEx messaging Global parameter control (GM2 like Reverb & Chorus control) Device Control (Master Volume/Balance/Tuning) Octive/Scale Tuning Controller Destination settings (aftertouch/cc modulation editing) Any other notation/streaming type functionality is not yet covered by the UDF, nor is Midi Machine/Show Control or reading/writing midi files. Midi streams are addressed fairly well with the midiAPI library however for those wanting to explore at that level. Lastly a big shoutout to Water and Mr_Creator for the Simple Library Docs Generator. The help files are a straight generation from his script. A couple of notes on synths. I've based the UDF on a couple of different RPs published many years apart, so implementation can be quite instrument specific. Don't expect too much of the builtin MS Wavetable Synth! I've had some more joy with the coolsoft midisynth if anyone is looking for a free alternative to test with. The two software synths mentioned above are also very slow responding to midi messages. If you forward messages to a physical instrument you should be able to play in real time. midi.zip Edited December 18, 2022 by MattyD Dan_555 and ptrex 2 Link to post Share on other sites
JAPP 3 Posted May 18, 2022 Share Posted May 18, 2022 MattyD I just found your posting and I am most grateful, I've been hoping for something like this for a very long time. I enjoy working with AutoIt but have never able to use it much with midi. Since I'm not a programmer I often use something else for the midi parts and AutoIt for most everything else. (Not the greatest way of doing things - it gets surprisingly messy.) I've been running your examples all morning and and have not had even the smallest of issues. Your work on this is top shelf and your commitment to it's thorough development is blatantly obvious. As to your mention of a second layer, I very much look forward to seeing it. I'm sure that whatever you come up with will make a great addition to the AutoIt language. Please keep up your great work. Link to post Share on other sites
MattyD 34 Posted May 25, 2022 Author Share Posted May 25, 2022 Thank you JAPP, that is very kind of you. Link to post Share on other sites
JAPP 3 Posted June 16, 2022 Share Posted June 16, 2022 (edited) I was playing with the excellent new "midiAPI" today and I found I had to add a line for the sake of one of the functions. I could not get _midiAPI_InGetNumDevs to tell me how many devices I had until I added: Global Const $__g_hWinMMDll = DllOpen("winmm.dll") I found "$__g_hWinMMDll" listed as a global variable at the top of midiAPI.au3 but not in midiAPIConstants. Just thought you'd like know. I was taking my project forward this morning when I found the _MidiInStart() & _MidiInStop() functions. My apologies for my mistake and solemnly swear to not do it again. I should have gone a little farther yesterday, I've never used MidiInStart/Stop in this or any other way. They say "You can learn something new every day" but what they don't tell you is you have to have your head outside of your own butt to thoroughly benefit from the experience. Edited June 17, 2022 by JAPP Correction Link to post Share on other sites
MattyD 34 Posted June 25, 2022 Author Share Posted June 25, 2022 Don't sweat it mate, I'm just glad there's some intrest Link to post Share on other sites
MattyD 34 Posted July 3, 2022 Author Share Posted July 3, 2022 Hi folks. First release of the general midi UDF. The underlying API library is pretty much unchanged and bedded down, but the UDF I would treat as a "beta" at this stage. The functions themselves shouldn't be too buggy, but I haven't really proofed the doco as of yet so hopefully it makes sense! Any comments, thoughts, suggestions for change are most welcome. Hopefully no fundemental changes are needed, but I'd like to stamp out anything that is particularly bad or nonsensical while the project is young. Enjoy! Link to post Share on other sites
MattyD 34 Posted July 5, 2022 Author Share Posted July 5, 2022 Hi all - quick heads up, There are a couple of silly things that have been corrected since yesterday around doco, calltips and one of the examples. I'm sure there'll be a few more, so for now I won't make an announcement every time I release for these minor fixes. I will keep try to keep the changelog up to date though. Any changes or additions to the actual code (beyond a tidyup) will still get a special mention. Link to post Share on other sites
MattyD 34 Posted July 7, 2022 Author Share Posted July 7, 2022 Just a couple of small changes today. UDF v1.2 - Added "address" and "size" un/packing functions to complement the existing SysEx data transfer functions. (Roland DT1/RQ1, XG Data Dump etc.) - Added functions for retrieving names from midi device handles - Fixed scite integration script stripping out _midiAPI_* keywords/calltips instead of old _midi_* ones. - Fixed _midi_SetDrumLevel example refrencing a non-exsiting function Link to post Share on other sites
MattyD 34 Posted December 18, 2022 Author Share Posted December 18, 2022 Version UDF 1.4 release: This release is mainly around better GM2 support. There are a couple of script breaking things this time around (sorry), though I've tried to keep this at a minimum. - Removed the notification window parameter when opening devices (moved to _midi_Startup). - Common patchs are better supported with the new functions, GM2 patch names are now inbult and can be filtered by category. - Modified some GM1 $PGM_* (program) names to bring into line with the new GM2 $PAT_* (patch) definitions. - Fixed/added a few other constants to better suit modern implementations - extended $NTE_* (note) constants for better GM2 compatability, added $NTE_* constants for the SFX rhythm percussion set. Link to post Share on other sites
PeterVerbeek 31 Posted January 4 Share Posted January 4 @MattyD Thanks for this wonderful library! It was very easy to use it for creating the midi interface of the Peace equalizer. I only had to make one small adjustment in the library to make it work with the Peace source code architecture. Thanks 🙂 Creator of the Peace equalizer, an interface for Equalizer APO. Besides Peace, my library of functions is also available on SourceForge. Link to post Share on other sites
water 2,702 Posted January 4 Share Posted January 4 Added your MIDI UDF to the wiki SOLVE-SMART 1 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to post Share on other sites
ptrex 183 Posted January 5 Share Posted January 5 @MattyD Great job indeed... I have tested this against a Midi controller and works perfectly ! Thanks for sharing!! Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to post Share on other sites
MattyD 34 Posted January 9 Author Share Posted January 9 Thanks guys for the support - very much appreciate it! Congrats Peter on Peace too, it looks amazing PeterVerbeek 1 Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now