HyperTalk ABC Music Notation via MIDI

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
PaulDaMacMan
Posts: 190
Joined: Wed Apr 24, 2013 4:53 pm

HyperTalk ABC Music Notation via MIDI

Post by PaulDaMacMan » Fri Oct 06, 2017 12:09 am

I've been playing around with MIDI via JavaScript in a Browser instances that utilize either WebMIDI API (in Chrome/CEF 43 and up) or a browser plug-in called Jazz-Plugin available for all platforms at http://Jazz-Soft.net for more than a year. While I was recently looking for a certain usage example I came across a .js library call jsPlayCommand that uses the same thing for musical output. It was designed to emulate HyperCard's ABC music notation for use with the authors own X-Talk language, OpenXION http://www.kreativekorp.com/docs/openxion/1.4/manual/. Since it's written in JS it works just as well to extend LiveCode's abilities. So I just connected the dots (or rather the .js) for an LC stack that plays HyperTalk music using whatever the default synth is that lives in your OS (probably Apple's DLS Synh or MS Wave Table Synth), YEAH!

Here, try it for yourself, but if you are using the LC9 builds on macOS you may need to run it in 32bit mode.
http://livecodeshare.runrev.com/stack/847/HyperTalkMIDI

I also took the time to figure out how to upload to LiveCodeShare.runrev.com so I'll probably be posting more examples of mixing JZZ.js with LiveCode, writing AND READING MIDI files in pure LCS, and other stuff soon!
Last edited by PaulDaMacMan on Wed May 09, 2018 1:17 am, edited 5 times in total.

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 583
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

Re: HyperTalk ABC Music Notation via MIDI

Post by Thierry » Thu Jan 11, 2018 5:09 pm

Hi all,

For a private project, I had to evaluate and validate if it was
possible to build an external in 64 bits, using Flex and Bison !

As I was using these tools in 2009 for my Maestro Junior( ABC player) MacOSX external,
I spent a couple of hours to update everything and here is a new version
which shows that it is possible:

sunnY- 2018-01-11 à 16.35.31.jpg

Just to be clear: MacOS only, external and it needs to run LC in 64 bits.
Oh and it uses the Apple CoreMidi framework.

If anyone is interested to have a look at it,
just let me know and I'll send it to you.

Now back to my project...

Thierry
Thierry Douez - https://sunny-tdz.com
Pourquoi tant de notes lorsqu'il suffit de jouer les plus belles... [Barbara]

PaulDaMacMan
Posts: 190
Joined: Wed Apr 24, 2013 4:53 pm

Re: HyperTalk ABC Music Notation via MIDI

Post by PaulDaMacMan » Tue May 08, 2018 8:29 pm

Since I started this thread 7 months ago LiveCode 9 has come out with FFI (Foreign Function Interface) pretty much ready for prime time, and I've created a mostly complete LiveCode Builder LCB wrapper for AVMIDIPlayer that is available in macOS 10.9 (actually I think it was included earlier, 10.7?) and iOS 8+ (though I have not tested at all on iOS). It's still a work in progress but it works pretty well now and it's available free and is open-source, here: https://github.com/PaulMcClernan/LCB_macAVMidiPlayer

Next up wrapping Core MIDI for some live real-time fun!

Sorry other platforms (though I do know I can get MIDI to play with built-in sounds on Android without any sort of LiveCode add-ons)

PaulDaMacMan
Posts: 190
Joined: Wed Apr 24, 2013 4:53 pm

Re: HyperTalk ABC Music Notation via MIDI

Post by PaulDaMacMan » Tue May 08, 2018 8:37 pm

I need to dig out the UDI's PlayPMD ABC/MIDI Library (which I updated a little bit), and a few other music demos I created or collected over the decades (ancient HyperCard stacks).

PaulDaMacMan
Posts: 190
Joined: Wed Apr 24, 2013 4:53 pm

Re: HyperTalk ABC Music Notation via MIDI

Post by PaulDaMacMan » Wed May 09, 2018 1:11 am

Next up wrapping Core MIDI for some live real-time fun!
Actually, I might stick with wrapping the Objective C AVFoundation / AVKit stuff like AVAudioUnitMIDIInstrument and AVAudioUnitSampler because I don't think there are any examples of wrapping CoreFoundation's C API's (which is what CoreMIDI is) and so I don't know how to make binding strings for that stuff, and I also have a feeling it might involve aggregate types (which is still marked experimental in the LCB guide).
Sorry other platforms (though I do know I can get MIDI to play with built-in sounds on Android without any sort of LiveCode add-ons)
Oh that reminds me, I remember someone had a little bit of success early on in LCB development with wrapping FluidSynth on Windows so someone might be interested in looking that up in the LiveCode Builder section of the forum.

Post Reply

Return to “Rich Media”