Page 1 of 1
HyperTalk ABC Music Notation via MIDI
Posted: Fri Oct 06, 2017 12:09 am
by PaulDaMacMan
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!
Re: HyperTalk ABC Music Notation via MIDI
Posted: Thu Jan 11, 2018 5:09 pm
by Thierry
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:
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
Re: HyperTalk ABC Music Notation via MIDI
Posted: Tue May 08, 2018 8:29 pm
by PaulDaMacMan
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)
Re: HyperTalk ABC Music Notation via MIDI
Posted: Tue May 08, 2018 8:37 pm
by PaulDaMacMan
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).
Re: HyperTalk ABC Music Notation via MIDI
Posted: Wed May 09, 2018 1:11 am
by PaulDaMacMan
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.
Re: HyperTalk ABC Music Notation via MIDI
Posted: Sun Feb 10, 2019 9:14 pm
by PaulDaMacMan
Since my last reply to this thread I have created working (at least partially) LiveCode Builder libraries for binding to CoreMIDI (MIDI out only, a work in progress), AVMIDIPlayer (pretty much complete), and AVAudioUnitSampler (working, but very much a work in progress).
https://github.com/PaulMcClernan/
Re: HyperTalk ABC Music Notation via MIDI
Posted: Sun Feb 10, 2019 10:47 pm
by bogs
Nice work Paul!