QuickBasic 4.5 Gravis Ultrasound Library - midi

I am currently working on a small project in QuickBasic that requires the use of MIDI files.
As the DOS environment I'm using DOSBox 0.74, which provides emulation of the Gravis Ultrasound card.
So far, I've been able to access GUS only by using the PLAYMIDI.EXE file in the C:\ULTRASND directory. However, it is impossible to launch it from inside QuickBasic: the SHELL statement creates a child COMMAND.COM process, so when PLAYMIDI.EXE starts playing in the background the child process finishes and terminates, and the music stops. All of this means that the only way to launch PLAYMIDI.EXE is through a batch file before the actual program, but it also means that there is no way to control the music from the QuickBasic program. Edit (Jul 24, 2011): It is actually possible to launch it using SHELL (my mistake), but the TSR version of PLAYMIDI.EXE takes a lot of memory, so there isn't enough left for my program. The question still stands.
Therefore, my question is whether there is a Gravis Ultrasound library for QuickBasic available.
Edit (Jul 19, 2011): Might be in another language as well, as QuickBasic can link those too.
P.S. Sound Blaster library available here, but I don't like the sound it produces.
Resources
libTiMidity: http://libtimidity.sourceforge.net/
Assembly Gravis Ultrasound library: guslib11.arj
Assembly tutorials (including QBasic): http://www.petesqbsite.com/sections/tutorials/assembly.shtml
Direct Sound 4 QB++ : ds4qbpp12.zip
Bells, Whistles and Soundboards: bwsb.zip
QMIDI 4.1: http://www.phatcode.net/downloads.php?id=191

As an huge fan of QB, I'm happy to see someone still using it. So I made it a point to find an answer for you. Here's what I've found. There is an ASM Gravis library on this page. Using the ASM tutorials, you should be able to combine the two. FYI, here's another great resource. Good luck.

You could look at DS4QB++, which allows you to play music and sound effects using the Windows API. I haven't tried it with later versions of Windows though. There's also BWSB which is DOS based and can play MOD/S3M files. Both available on my old QB site:
http://piptol.qbasicnews.com/files.htm

QB64 uses TiMidity, i guess via _SNDOPEN.

Related

How can I easily develop an app such that it will run on every major OS?

Everything that I have coded upto this point has been launched from Command Prompt or the IDE itself. I would like the ability to deploy an application such that launching it doesn't require a tutorial for novices. .exe, .apk, .app, ELF. Double-click and go.
I recall creating .exe files from Python as being restrictivly difficult. I was thinking C# and found .net/maui. It doesn't support linux, which I could maybe look past, but it also doesn't appear to support creating .exe files.
Java is more low level than I would like to deal with. Learning a new language that runs virtually could be the solution. I havn't done much investigating as this wouldn't be the ideal. (Edit: JVM requires an additional install, so that's not going to work.)
I don't have any experience with web developement, but it seems like a promising route none the less. It is not clear to me if I can create a local icon-launchable webpage that will run an application in your browser sans-server. Additionally, I am not sure how far my known languages will take me before I have to then learn CSS or whatever.
Thoughts?
Electron seems to be popular choice for cross-platform development in case you don't mind developing with JavaScript.
QT is another cross-platform framework that was around for a long time.
Specifically for .NET, there's MAUI (mobile-focused, no Linux), Avalonia UI, Eto Forms, AlterNET UI. The last one is desktop-only and still in beta.

Why can't I debug into UnityEngine.UI code?

I add the UnityEngine.UI.dll and UnityEditor.UI.dll to my assets folder with their mdb files . also i add the both project to my current project. i am sure all the unity engine ugui code build success, because i debug log in the event system, and it print message. when i want to step into the event system class, i always failed . I find unity will load the code from a build path ,rather than i original code. Why does it do this ? if i want to debug unity engine ugui code, what should i do ?
To debug code, you need two things:
Symbols, the list of all functions, classes, variables used throughout the module. When using C++ symbols are stored in special .pdb files on Windows (and you obviously are using Windows since you are talking about dlls). Symbols in C# (.NET in general) are stored in the .dll itself. Having symbols will let you see the name of functions on the call stack and possibly some variables but nothing more.
Source code of the module.
U3D's source code is proprietary - you need to spend a good amount of money to receive it. And if I am guess to - UnityEngine.UI.dll is a C++ module with stripped (removed) symbols removed.
Thus you have neither, so you can't debug U3D's code at all.
Why would you need to that anyway? If you want to see how the internals of a big game engine work, there are plenty of other options (for example UE4 and Lumberyard). If you are struggling with a problem and you'd like to be able to solve it through debugging...well though luck. Your best bet would be to ask in unity community.

How does Unity3D's web-deployment work?

It's very slick and cross browser/platform at the click of a button, which is leading non-technical types to conclude the entire engine is intrinsically better than what we use now. Is it simply that they've taken the time to implement all the per-browser/OS plugin versions of Unity WebPlayer and polish it, or is there anything deeper in the way the engine architecture is set up?
Unity takes scripts written in C#, UnityScript (based on JavaScript), or Boo (based on Python), and compiles them into mono assemblies. Those assemblies + the 3d models, sounds, and textures required by your game are compressed into a .unity3d file that is loaded by their browser plugin. Since almost all of the game's logic is in managed mono assemblies it runs cross platform with very few platform specific quirks.
They've recently rewritten their plugin detection and installation code so that it is very easy to drop a block of javascript into a web page that shows Unity content if the user has the plugin, or other content (image, flash, video) if they don't. I believe their plugin supports all A-class browsers on Mac and Windows, and the plugin can be installed without restarting the browser.
One advantage of the Unity engine is that you can take a lot of off-the-shelf managed assemblies and include them in your project and call them from Unity code. But you have to be aware that these assemblies can really bloat the size of the .unity3d file.
Another advantage is that you can easily write components that expose tunable parameters that can be modified by non-technical people.
And yet another advantage is that a well written project can be ported to/from iPhone, Standalone, Android, Web, etc. in under a day. I've personally done iPhone to Web by just modifying my input handler and changing texture compression.
One big disadvantage is that since the application is running managed code it is not too difficult for a curious or malicious person to decompile the assemblies into completely readable code. So you need to think about what someone could do with that info (cheat in multiplayer, write bots, falsify high scores, etc.). It is possible to obfuscate your assemblies, but it isn't trivial to add this step to your build process.

Is there a way to find out if an application uses Core Animation or OpenGL ES?

I'm very interested in the technology behind ConvertBot. I tried to do a lot of stuff with Core Animation, but what I am seeing there looks just too fast for Core Animation.
I tried to open it with Instruments, but it doesn't work with 3rd-party apps. Is there any legal way to figure out what's under the hood?
I'd also recommend just asking the tapbots people. But if you're just curious (and impatient), you can always look into the executable.
You can find your iPhone's synchronized apps in "~/Music/iTunes/Mobile Applications/". The '*.ipa' files are really only zip files which you can rename and decompress. You'll find the app wrapper in the 'Payload' directory.
To see what frameworks an executable links to use the command line:
> otool -L MyApp/Payload/MyApp.app/MyApp
If there's a line in the output like
/System/Library/Frameworks/OpenGLES.framework/OpenGLES (compatibility version 1.0.0, current version 1.0.0)
they are probably using OpenGL.
You can also look into the linked symbols, to see what functions they are using:
> nm -u MyApp/Payload/MyApp.app/MyApp
...
_glColorPointer
_glDrawArrays
_glEnable
_glVertexPointer
_glViewport
...
I would hazard a guess that ConvertBot is using CA. What is it doing in that makes you think otherwise?
This is a complete guess BTW.
Why not write them and ask? They've been very open about their design process in a blog post and an interview on the Mobile Orchard podcast. From looking at the application, there's nothing that they are doing that couldn't be done with Core Animation and achieve the level of performance they're seeing. I don't know what you're doing with Core Animation, but I've been impressed with its capabilities in my application.
It is odd that you can't attach Instruments to a running application on the iPhone in the same way that you can for arbitrary applications on the Mac. Instruments is based on DTrace, so it should hook into any running process, but maybe the DRM prevents that on the iPhone.

What is the best/a very good meta-data reader library?

Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?), but the more it can do (eg EXIF from images?) the better without compromising the ID3 tag reading abilities.
I'm interested in making a script that goes through my media (right now, my music files) and makes sure the file name and directory path correspond to the file's metadata and then create a log of mismatched files so I can check to see which is accurate and make the proper changes. I'm thinking Ruby or Python (see a related question specifically for Python) would be best for this, but I'm open to using any language really (and would actually probably prefer an application language like C, C++, Java, C# in case this project goes off).
There is a great post on using PowerShell and TagLibSharp on Joel "Jaykul" Bennet's site. You could use TagLibSharp to read the metatdata with any .NET based language, but PowerShell is quite appropriate for what you are trying to do.
use exiftool (it supports ID3 too). written in perl, but can also be used from the command line. it has a compiled windows and mac version.
it is light-years ahead of any other metadata tool, supporting almost all known audio, video and image files, supports writing (not just reading), and knows about all the custom/extended tags used by software (such as photoshop) and hardware (many camera manufacturers).
#Thomas Owens PowerShell is now part of the Common Engineering Criteria (as of Microsoft's 2009 Product Line) and starting with Serve 2008 is included as a feature. It stands as much of a chance to be installed as Python or Ruby. You also mentioned that you were willing to go to C#, which could use TagLibSharp. Or you could use IronPython...
#Thomas Owens TagLibSharp is a nice library to use. I always lean to PowerShell first, one to promote the language, and two because it is spreading fast in the Microsoft domain. I have nothing against using other languages, I just lean towards what I know and like. :) Good luck with your project.
Further to Anon's answer - exiftool is very powerful and supports a huge range of file types, not just images, but video, audio and numerous document formats.
A Ruby interface for exiftool is available in the form of the mini_exiftool gem
see http://miniexiftool.rubyforge.org/