abcjs & greasemonkey Help needed

abcjs & greasemonkey Help needed

Slightly off-topic, but there might be some younger nerds here who can help me.
I’ve installed Greasemonkey 1.1 on my Firefox (latest, 15.0.1) and the abcjs javascript as recommended elsewhere here. If I understand corrrectely I should be able to transfrom automatically every snip of abc code into score (hat I am more used to read).
No idea what I have to configure to make it work like that. What filename is perfect to add in the abcjs option?

Thanks for an help!

Re: abcjs & greasemonkey Help needed

Well, if you installed Greasemonkey and added the abcj-script to it, it should just work… I’m not sure if I understand the problem, so this is just a step-by-step instruction from the scratch:

- install Greasmonkey addon, then go
- Tools -> Addons -> User Scripts -> Get user scripts
- Type abcjs in the search field, and click the abcjs result
- In the upper right corner there should be a green "Install" button…
- A dialog box should appear, where you click "Install" again

That’s it. Check if Greasemonkey is enabled in the menu at the monkeyface icon, and if abcjs now appears in Tools -> Addons -> User Scripts (if not, maybe try to install it again…?!).

By the way, thank you for the tip! I didn’t know abcjs before, it’s very cool!

Re: abcjs & greasemonkey Help needed

I tried and couldn’t do it.

There is no documentation telling you where the scripts should go. I installed Greasemonkey but couldn’t get it to find the abcjs script.

Re: abcjs & greasemonkey Help needed

Disillusioned with the functionality, here and the poor rendering in to score, I usually go to tunepal.org and search for the tune there. Or copy the abc and render using ABCJ (http://abcj.ganderband.com)

Re: abcjs & greasemonkey Help needed

I don’t know what operating system you are using. I do know that abcjs, which worked correctly before hand, stopped working when I upgraded to Mac Mountain Lion. I’ve been unable to figure out what might be wrong. At least yet…

Re: abcjs & greasemonkey Help needed

OK. I went looking and re-installed. Now things work correctly on the Mac OS. Let me suggest a slightly different approach to finding things.

1) Install Greasemonkey.
2) Click on the little down arrow that is next to the monkey symbol in your tool bar. You should see the word "Enabled" if not you need to enable GreaseMonkey…a different issue.
3) Select New User Script from that drop down menu you got in step 2. This should take you to a page that lists userscripts available. There is a search field in the upper right corner.
4) Type "abcjs" into that search field and press return.
5) One Script should come up named abcjs. The name itself is "hot."
6) Click on that name and you will be taken to a page with some information about abcjs (currently showing 302 installs). In the upper right corned of that page you will see a green "install" button.
7) click on the install button and you’ll get a pop up window telling you about the script with a button at the bottom that says "install." Click on that install.
8) You’re done. Go to one of the tunes at thesession and choose the abc. youll see the abc, the tune in notation, and a way to click to play the midi.

This works on Firefox for sure. It should work in a similar way on Chrome, but I have not tried that (later πŸ™‚ ). It DOES NOT work on other browsers as far as I know.

Hope this helps someone.

Re: abcjs & greasemonkey Help needed

Now we have the same installation guide twice πŸ™‚ …

The bare script you get on the abcjs homepage is just for embedding in other sites, like on abcnotation.com. Installation via greasemonkey works and is plattform independent.

Both JS and XML are standards, which are supported by virtually every browser and have nothing to do with the operating system.

Re: abcjs & greasemonkey Help needed

I very much doubt if any standard is going to dictate where in the file system scripts should be put for an interpreter to find them. That was the issue I couldn’t solve.

Re: abcjs & greasemonkey Help needed

This Grease Monkey add-on was one of a few alternatives I was thinking about last week when people began coming out of the woodwork imploring Jeremy to continue his midi conversions. Basically if a web page has abcs with at least the reference # (X:1) the script will render a score & provide the midi. The main reason for having it enabled is if you want either of those beyond the original tune submission (i.e. not just first come first serve but also subsequent posts in the tunes comments &/or general discussions).
I was a little surprised to see only 302 people have grabbed this add-on since Paul Rosen wrote it six months ago. I would have thought the demand for this sort of thing to be high enough that more people (on the entire web) would have found it & installed the plug-in. Fair play, it’s still a brand new feature & I sincerely hope more people who might want what it does will give it a try.

Posted by .

Re: abcjs & greasemonkey Help needed

"I very much doubt if any standard is going to dictate where in the file system scripts should be put for an interpreter to find them. That was the issue I couldn’t solve."

That’s what I meant - you don’t have to worry about the location of abcjs when you install it via Greasemonkey itself, so it will put the .js file where ever it is needed, depending on the system - for example, in Linux it is placed somewhere in ~/.mozilla/firefox/…blablabla…/abcjs/, in Windows it will be somewhere else, in the settings-directory I guess.

The standard is not *where* the scripts shall be, but *how* they are to be interpreted, and therefore it is platform independent.
8-|

Grease Monkey add-on & abcjs.user.js

After installing Grease Monkey one needs to then install this version of abcjs ~
http://userscripts.org/scripts/show/127434
I know that’s obvious, but sometimes the obvious is what you breeze past.

Posted by .

Re: abcjs & greasemonkey Help needed

As co-author with Paul Rosen of abcjs, I’m kinda embarrassed that the whole grease monkey thing isn’t easier (though to be honest, we never figured a greasemonky version would be useful to so many people - maybe I should write a short documentation thingy - mostly it’s greasemonky’s fault). At the same time, I’m very happy to stumble across threads like this and find that the problem came and was solved befor I even got there.

I’m curious about people finding the rendering to score "poor". I don’t think I’ve ever had any trouble with "simple" stuff like Irish dots.

Also, sound support is spottier and spottier. At this point we’re looking into various other solutions - I think it only works in Firefox at the moment?

Best regards

Greg

Posted by .

Re: abcjs & greasemonkey Help needed

Greg, Well done on abcjs, it’s a useful library. A while ago I started putting a REST layer behind your library, things got busy in work and it got put aside. Jeremy should consider using it on the site here.

Re: abcjs & greasemonkey Help needed

Greg, I was referring to a ‘score feature’ which used to be on this site, but no longer seems to be here now, the score was displayed as an image file if I remember correctly. I wasn’t referring to your library.

Re: abcjs & greasemonkey Help needed

@megapop

"Now we have the same installation guide twice πŸ™‚ … "

No, we don’t yhou used the Tools menu. I used the drop down on the greasemonkey icon. There was a reason: Often different implementations of the same software on different platforms do things differently in the menu bar. I wanted to avoid that as an issue.

That’s why I said a "slightly different" approach.

I’ve said plenty of things worthy of a "dig" but posting those instructions wasn’t one of them.

Re: abcjs & greasemonkey Help needed

@Greg

Some months back I sent a note to Paul about some issues I had noted about the user script on pages with multiple abcs. If you guys are going to revisit that and improve it I’ll try to resurrect my concerns and send them on.

Re: abcjs & greasemonkey Help needed

abcjs works fine in Google Chrome. Install is essentially the same. It does not work in Apple’s Safari.

Re: abcjs & greasemonkey Help needed

@cboody: oh yes, indeed.

Re: abcjs & greasemonkey Help needed

Can’t get abcjs working with Greasemonkey, tried several times! I am using Firefox 15.0.1, Greasemonkey 1.1 (enabled). I could not install abcjs from the green Install button on the script page, clicking it opens a tab with the text of the script displayed. So I did a Select All and Copy of this script text, then went to Tools - Greasemonkey - New User Script, put in some name and pasted the abcjs greasemonkey script into the new script in the text editor. Saved. Reloaded Firefox. On thesession.org the script appears as loaded, but no joy seeing any scores.

the top of the script reads:
// ==UserScript==
// @name abcjs
// @namespace D:\greasemonkey\abcjs.txt
// @description show abc tunes
// @include https://thesession.org/*
// @version 1
// ==/UserScript==

then follows abcjs code.
Any ideas what could be wrong?

Re: abcjs & greasemonkey Help needed

well call it a hunch but if you’re cutting and pasting anything, you’re probably doing it wrong. Javascript code must be surrounded by <script></script> tags though. All those lines are comments, so they have absolutely no effect on the code, showing them here is pretty useless.

Re: abcjs & greasemonkey Help needed

The lines I posted are the header of the greasemonkey user script. And greasemonkey scripts do not use HTML <script> tags. Their content is implicitely javascript code.

Re: abcjs & greasemonkey Help needed

Hans, shall I just mail you my .js file (which was installed by Greasemonkey), so that you can try to create a user script with that one? I don’t want to post it here, it’s long.
By the way, apparently the namespace has to be http://code.google.com/p/abcjs

Though, keep in mind that copy/pasting and running just any code is not secure and kills kittens! πŸ™‚

Re: abcjs & greasemonkey Help needed

Thanks for the offer! I got it working now. Apparently GM was not enabled. Therefor did not run any script, nor intercept the script call from the green Install button. Entirely my stupidity to blame, since I missed to place a tick mark beside the word "enabled" in the FF Tools submenu. Or I could blame FF for assuming that users know where tick marks need to be, or what their absent means ("enabled" without tick means "disabled", which was not very obvious to me).

Question: how can I make the score displayed look a bit smaller?

Re: abcjs & greasemonkey Help needed

Thanks for the help and thanks for the lads who have written the code!!
I have uninstalled abcjs and reinstalled it from Greaemonkey as recommended above. and it does work!
It works on tunes on the comment section only if there is correct header (X:3874), sniplets are ignored.
Does this exist as an app for iTunes, too?

Re: abcjs & greasemonkey Help needed

The output seems to be displayed to the html body with a fixed width. perhaps if you forced the display within a containing element and somehow set it’s overall size to about 95% of that container?

Re: abcjs & greasemonkey Help needed

@megapop

Yes indeed what (ah well maybe I don’t want to know πŸ™‚

Re: abcjs & greasemonkey Help needed

Not that this is quite the same thing, but I wrote a "bookmarklet" a couple of years ago that lets you put script into a bookmark, and then you can either highlight ABC text and click on the bookmark, or click on the bookmark and paste ABC into it, and then it opens it up in Concertina.net’s sheet music transcription (and then you can click on the PDF link for a high res version)

You can see the post that has instructions here: https://thesession.org/discussions/26527#comment561367

It still works well, and you can just add a bookmark into Firefox’s bookmark bar, which makes it easy. Then all you do is go to a tune (say, in the tune archive here), select the ABC with your mouse, and then click your bookmark, and it will show you sheet music…

Kinda old school, low tech, but it works.

Re: abcjs & greasemonkey Help needed

Reverend is too modest. His bookmarklet is great and works in every browser I’ve tried it with.