UDI add ins for RunRev/LC (and OXT), HyperCard, SuperCard

Post Reply
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

UDI add ins for RunRev/LC (and OXT), HyperCard, SuperCard

Post by OpenXTalkPaul »

I'd like to welcome udi ( @udiOXT ) to our forums!

Udi is the community member from Japan that, about 20 years ago, wrote the makeSMF/playPMD library which is at the center of the OXT General Music library, thanks to it being released into public domain. The original leveraged QuickTime musical instruments as a playback engine on macOS Classic & OS X and Windows. Prior to that the 'PMD' musical grammar, which is a super-set of the HyperTalk 'playSentence' grammar, was used with an XCMD called UxMIDI (which I gather would communicate MIDI data with external devices? Since it supported up to 32 channels back then).

'OXT General Music' merged a slightly modified version of makeSMF/PlayPMD with my own MIDI/SoundFont related scripts library, and packaged it as an Extension Library (which get loaded when the rest of IDE libraries do). Instead of using Apple's now-defunct Quicktime' for MIDI playback, OXT GM tries to automatically route the resulting MIDI Data to any MIDI player engine that it is aware of, starting with searching for certain Builder extensions (OXT FluidSynth. AppleAVMIDI Player), failing that it falls back to looking for other playback methods such as command line tools, or MCISendString (on Win32+), or 'play as videoClip' (which works on Android).
https://github.com/OpenXTalk-org/org.op ... neralmusic

Some of the stacks on udi website have been updated recently.
Besides the MIDI/music stacks, there's some other nice stacks and things on the web site:
http://udimac.web.fc2.com/livecode/withLivecode.html

Also the original HyperCard / XCMD stuff:
http://udimac.web.fc2.com/stack/tool.html
User avatar
udiOXT
Posts: 1
Joined: Mon Sep 16, 2024 10:20 am
Location: Japan
Contact:

Re: UDI add ins for RunRev/LC (and OXT), HyperCard, SuperCard

Post by udiOXT »

Thanks for the welcome, Paul.

XCMD UxPlayMidi, the original makeSMF/playPmd, created QuickTimeMusic(QTMA) data directly from playSentence and had QuickTime play it. It was smarter than makeSmf/playPmd because it did not go through SMF.

QuickTime no longer supports MIDI (why? Why, Apple!), I thought makeSMF/playPmd was dead. But you brought it back to life. I am very happy. I am very grateful.

I can't spend as much time programming as I used to, but I still write code now and then. xTalk is fun.

UDI
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: UDI add ins for RunRev/LC (and OXT), HyperCard, SuperCard

Post by OpenXTalkPaul »

udiOXT wrote: Wed Oct 02, 2024 2:23 am Thanks for the welcome, Paul.

XCMD UxPlayMidi, the original makeSMF/playPmd, created QuickTimeMusic(QTMA) data directly from playSentence and had QuickTime play it. It was smarter than makeSmf/playPmd because it did not go through SMF.

QuickTime no longer supports MIDI (why? Why, Apple!), I thought makeSMF/playPmd was dead. But you brought it back to life. I am very happy. I am very grateful.

I can't spend as much time programming as I used to, but I still write code now and then. xTalk is fun.

UDI
The 'QuickTime Musical Instruments' are actually still part of the macOS, the 4mb Roland GS (.DLS) Soundset is now buried deep inside the CoreAudio.framework Not sure why they removed support from QuickTime X, but AVMIDIPlayer API can perform the same task. OXT FluidSynth wrapper extension, is also available to play MIDI w/ SoundFonts on Linux and Windows (and also woks on macOS).

Elsewhere you asked about the MIDI RunList format that I use. It's basically like a time-stamped MIDI message list in a text-based format with timestamps limited to milliseconds (not microseconds or nanoseconds). I've used it to record MIDI input events, and to convert 'playSentence' into a list that can animate notes on my Piano Widget.
It looks something like:

Code: Select all

0 NoteOn Ch:10 36 127
250 NoteOff Ch:10 36 0
250 NoteOn Ch:10 38 127
500 NoteOff Ch:10 38 0
So I can also read in SMF .mid and convert channels data to this format. To convert from this list format into a 'playSentence' one would have to subtract the note-on time from the note-off times and then figure out I if the number of milliseconds is close enough to a specific note duration at a given beats-per-minute. I have a function in the 'General Music' library that can generate a list of common note durations (w. h.. s3 q3 etc.) and their approximate length in milliseconds at a specific tempo. It's much easier to go from 'playSentence' to MIDI than it is to do the reverse. I wrote a script that converts 'playSentence' to an x/y grid, the intention being able to generate 'piano roll' style scrolling animation of the MIDI data.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests