Cloud IDE Test #2 - codeanywhere

https://codeanywhere.com

A few things are immediately apparent:

  • codeanywhere has much later versions of node and npm as a default
  • codeanywhere expects you to manually save (CTL+S) your most recent changes to a file whereas codeenvy is autosave almost as you are typing the changes
  • codeanywhere’s SSH terminal runs as a additional tab in the IDE (instead of a window down the bottom) thus showing way more terminal history at a glance
  • codeanywhere’s IDE feels a little more modern
  • codeanywhere’s container doesn’t automatically shut itself down after a period of inactivity like codeenvy does. Though in fairness, restarting the codeenvy doesnt take too long and it does have “keep active” option.

AND … EEEK!!! …. as the codeanywhere docs state, commiting / pushing is all done via the CLI. For a simple post thats not a biggie, but it you want to selectively stage changes, thats a pain. On the flip side there were Auth issues when doing a push for the first time. It just sailed through.

1
2
3
4
cabox@site:~/workspace$ node --version
v10.15.0
cabox@site:~/workspace$ npm --version
6.4.1

Cloud IDE test #1 - Codeenvy

This my test using Codenvy

I had a false start as the default template was java and mysql and I mistakenly thought that it would auto detect when it imported the repo.

The second time round however I made sure it used the node.js template. This time I was able to install the npm packages and Hexo globally so I could easily use

1
hexo new "artible name"

The IDE is a little laggy but thats to be expected. The only downside is the versions on node and npm:

1
2
3
4
user@5f2cc5da0659:/projects$ node --version
v8.11.3
user@5f2cc5da0659:/projects$ npm --version
5.6.0

Also, given that I authorised the app to access my github account I would have expected it to automatically add my github details to any commits I made using the service. I didn’t find out I had add it manually until I tried to commit.

AND that also means you don’t realise you have SSH keys set until you try to push but messages and prompts were helpful.

Exploring Music Notation Using a CLI Idiom

I had this idea where I could easily write a few short riffs without having to fiddle with a mouse and be able to print it off or save it

Concept

:: - Starts a new stave in the key of C maj or whatever the previous key signature is.
:#3: - Starts new stave in the key of A maj (has 3 sharps)
:#3m: - Starts new stave in the key of f# min (has 3 sharps)
:%3: - Starts new stave in the key of Eb maj (has 3 flats)
:%3m: - Starts new stave in the key of c min (has 3 flats)

OR

:A: - Starts new stave in the key of A maj (has 3 sharps)
:f#: - Starts new stave in the key of f# min (has 3 sharps)
:E%: - Starts new stave in the key of Eb maj (has 3 flats)
:cm: - Starts new stave in the key of c min (has 3 flats)

As well as

::(4/4) - Starts a new stave with a 4/4 time signature

Then it occured to me that theres nothing new under the sun and possibly there was already something out that did exactly what I wanted.

The sections below is what I found a after brief search. In essence

Notes

Alda

https://www.theverge.com/2015/9/8/9275011/alda-musical-command-line-notation

All the Adla links seem to be dead in the article but rhe Hackernoon links were of interest and I did find the project is a live and kicking:
https://github.com/alda-lang/alda
https://alda.io/tutorial/
http://chuck.cs.princeton.edu/
https://github.com/heuermh/lick
https://www.ted.com/talks/ge_wang_the_diy_orchestra_of_the_future
The key thing though is this is a compostion and MIDI player tool note a score rendering tool. Also, it’s basically dependent on the JVM as the back end the REPL are written in clojure. I has changed the way I think about aplying a sharp(+ instead of #) or a flat (- instead of %)

A visual score / tool does seem to be a missing piece in the alda story.

ABC notation

ABC notation looks like the venrable precursor to alda. It’s not stricly a programming language but it can be used (with tools) to render a score and play MIDI.
https://abcnotation.com/blog/2010/01/31/how-to-understand-abc-the-basics/
http://www.lesession.co.uk/abc/abc_notation.htm

The main Linux app, EasyABC, is poorly maintained and doesn’t include the python deps. There is also http://abcplus.sourceforge.net/ .

However this site is close to what I’m thinking but theres not interactive / REPL but good to know thees music css and a JS to render to SVG.

http://dev.music.free.fr/web-demo/$ABC_UI.html
http://dev.music.free.fr/web-demo/mini.html
http://tonal.composition.free.fr/web-gradus-ad-pa rnassum/1/02.html
http://tonal.composition.free.fr/web-gradus-ad-parnassum/index.html
http://dev.music.free.fr/web-demo/scores/MIDI.html
http://dev.music.free.fr/web-music-tools/tests/$MUSIC_UI/analysis.html

AND THEN Lordy! I find this: https://abcjs.net/ && https://github.com/paulrosen/abcjs (which I noted earlier but now understand where it fits in) https://abcjs.net/abcjs-editor.html - nearly there

Otherwise, support for ABC is patchy given it’s longevity. MusicXML seems to be the unversal standard for interchange.

http://lilypond.org/
https://wim.vree.org/js/
https://www.gnu.org/software/abcsh/documentation/Command-line-abcsh.html
http://abcnotation.com/software

Verovio https://www.verovio.org/javascript.xhtml (C++)

A music engraving library that uses SMuFL https://new.steinberg.net/dorico/. The MEI Viewer is impressive. Ultimately a fanastic and deeply technical library but no REPL …

It’s pretty fukny as it used https://emscripten.org/ to compile to WASM.

https://www.verovio.org/app.html

lilypond http://lilypond.org/ && https://github.com/LilyBin/LilyBin

Lilpond has it’s own markup which can be a bit heavy:
http://lilypond.org/doc/v2.18/Documentation/notation/writing-pitches

LilyBin is a web-based LilyPond editor. Which demonstrates its docucement / compilation idom. So while what they’ve done here a long the lines of what I had in mind, it’s not that interactive.

http://ciconia.github.io/lydown/

VexFlow http://www.vexflow.com/vextab/tutorial.html

This is problably closest in execuation to what I’ve in mind. However the notation doesn’t suit and I have no intention of creating a imbedable library with it’s own methods etc https://jsfiddle.net/3d0nbL0n/128/ . I also have no intention of creating a complete score writer.

https://github.com/0xfe/vexflow
https://badassjs.com/post/40263157904/vexflow-a-music-notation-language-and-renderer

MuseScore https://en.wikipedia.org/wiki/MuseScore (C++, Qt)

OSS, competes with Sebelius etc. This is the full deal but no REPL.

alphaTab https://github.com/CoderLine/alphaTab (C# - cross compiled)

*Guitar / Tab focused, C# *
alphaTab is a music notation and guitar tablature rendering engine written in C# and cross compiled to other languages like JavaScript. First of all you need to understand that alphaTab is not a music editing software like Audacity or Finale. It is a library for developers or webmasters who want to need a music notation rendering engine for their software or website. Here a live demo where we display a music sheet right within the browser.
https://www.alphatab.net/learn/

Muscript https://pjb.com.au/muscript/ (PERL, Lua)

I liked the idea of this but Perl and Lua makes this not leveragebl for me.

Muscript is a language for typesetting music, and either a Perl script, or a Lua script, which translates this language either into PostScript, or into Encapsulated PostScript, or into MIDI, or into MusicXML, and there is a script muscriptps2svg to translate muscript into SVG. Muscript was written by Peter Billam to typeset his own compositions and arrangements; it started life as an awk script, and was announced to the world in 1996. The ability to define variables was introduced in version 3.1b

New ! The current version of muscript is 3.3j, a bilingual version, available in both Perl and Lua.

Also rans

http://www.songtrellis.com/tonematrixAnimate#top
https://wim.vree.org/js/
https://www.npmjs.com/package/abc2svg

Other

https://en.wikipedia.org/wiki/Numbered_musical_notation

https://meta.wikimedia.org/wiki/Music_markup

https://github.com/topics/music-notation

MEI

https://en.wikipedia.org/wiki/Comparison_of_scorewriters

https://patchstorage.com/

https://github.com/annaneo/pianoKeyboard
https://www.iaml.info/plaine-easie-code

Hot Keys

This article reminded me that Hot Keys will be a feature of my REPL.

Looks like I’ll start with hotkeys-js.

Contenders

https://github.com/jaywcjlove/hotkeys
https://wangchujiang.com/hotkeys/
Last commit: 24 August 2019. Seems like a simpler API to KeybardJS.

https://github.com/RobertWHurst/KeyboardJS
Last commit: March 2019.

https://github.com/piranha/keymage
Last commit: 2016

https://gist.githubusercontent.com/abuduba/c41d40a1b45990c086de6d3b24bdd85a/raw/d5b3ce4dfcbbc31a9e463effb562ce804d48ee07/hotkeys.js
The author doesn’t want to commit to maintaining this.

Other

https://github.com/search?o=desc&q=hotkeys+javascript&s=stars&type=Repositories

https://github.com/jaywcjlove/hotkeys
https://wangchujiang.com/hotkeys/
https://github.com/RobertWHurst/KeyboardJS

https://github.com/piranha/keymage

Objective Ramblings

So this is a quick one to myself about what I’d like to do here.

Mainly this is learning journal / note to self stuff, with the premise that having a Hexo based site will keep things simple for me as posts / articles etc are all authored in markdown.

With that said, there a couple of side projects I have in mind for myself:

1) Sveltr - an SSG using Svelte-3 and Rollup (ie Replace buiding this site with Sveltr - eventually)

2) Muzika-Iro - an online REPL for Alda as a simple/modest score authoring tool - I’d be rapt if I could throw up a few bars of a tune I want learn on the accordion

Objectives

Write something 3 times a week. Can be on anything and can be really short, the real purpose is to keep it rolling on a consistent basis.

As a guide, I’d like spend 1 evening on on Sveltr a week and 1 evening on Muzika-Iro and hopefully the 3rd night is reflection on some praxis.

Ciao Mundo

Hello this is a quick hello to see if my Hexo based site is working.

This is a minor edit that might trigger a redeploy.

Alas poor yorick, I triggered a deploy by editing the raw markdown via GH web interface.