Michael Eskin Posted February 26 Posted February 26 I’ve released a simple web-based utility that will scan one or multiple files of ABC tunes, extract all the common ABC tags and write them to a CSV file for import into a spreadsheet or other software. Additionally, it can read back a CSV file created with the tool after optional editing with an external tool and get back the ABC files. You can use this, for example, to extract the ABC tags from all the ABC files in a folder, sort or filter the tunes in an external program like a spreadsheet and then save out a CSV file with the sorted/filtered tunes. It also optionally includes the ABC filename and a Share URL for the tune in my ABC Transcription Tools as the first and last columns. You can also optionally have any font, spacing, or *: style ABC annotations found in the each file’s ABC file header injected into each of the tunes found in that file under the tune’s X: tag and used for the tag analysis. The complete set of ABC tag columns in the saved CSV are: Filename,X:,T:,Subtitles,C:,O:,A:,R:,L:,M:,Q:,K:,D:,S:,Z:,N:,H:,B:,G:,r:,F:,ShareURL If multiple tags, for example more than one Z: tag, are found in the same tune, their text is concatenated in the tag’s CSV column separated by a space or / depending on the tag. Once you have the CSV file, you can open it in a spreadsheet program like Apple Numbers, Google Sheets, or Microsoft Excel for additional sorting, filtering, and analysis of all the tunes across the multiple files. Once you’ve done your processing of the CSV file in the spreadsheet program, you can export the spreadsheet back out in CSV format and import it into the utility or my ABC Transcription Tools. The tool is at: https://michaeleskin.com/tools/abc2csv.html The utility can also be launched from a command on the “Hamburger” menu in the standard and “Quick Editor” versions of the ABC Transcription Tools. If importing the CSV back into the ABC Transcription Tools, the “Quick Editor” may be the better choice to use if working with many thousands of tunes. I’ve tested this in the “Quick Editor” with a CSV collection of over 20,000 tunes and it’s extremely fast. The “Quick Editor” version which only draws one tune at a time is available at: https://michaeleskin.com/abctools/abctools-quick-editor.html After importing the CSV data into a spreadsheet or other tool, when exporting back to CSV, you need to make sure the first line CSV table names header is included in the exported CSV. I hope this is useful to those of you who have been asking about such a utility on the various ABC forums. Please spread the word to those who might be interested. Demo videos: Overview of ABC tags to CSV and CSV to ABC: Deeper dive into ABC tags to CSV: Editing the CSV data with external tools
Michael Eskin Posted February 26 Author Posted February 26 Demonstration of how to use the ABC Tags to CSV Extractor utility and Apple Numbers (could be another spreadsheet like Microsoft Excel or Google Sheets) to generate a graph of the distribution of tunes by key in an entire tunebook. The utility is at: https://michaeleskin.com/tools/abc2csv.html Demo video
Michael Eskin Posted February 27 Author Posted February 27 (edited) Fancy graph of tune key distribution made in Apple Numbers from a CSV of the San Diego Comhaltas Tunebook ABC: Edited February 27 by Michael Eskin
Roger Hare Posted February 27 Posted February 27 9 hours ago, Michael Eskin said: Fancy graph of tune key distribution made in Apple Numbers from a CSV of the San Diego Comhaltas Tunebook ABC: Nice! Daft question: Is the vertical axis number of tunes or percentage of tunes? Does it matter?
Michael Eskin Posted February 27 Author Posted February 27 In that graph, it's the number of tunes. The count is on the axis on the right. I've put a simple 2D bar chart example below with the count on the left. Of course, this has nothing to do with the CSV itself or my program, it's just how you setup the graph and the axis definition in the spreadsheet program when setting up the graph. For example if you wanted to see a percentage distribution, you could do a donut chart like the one below:
David Barnert Posted February 27 Posted February 27 There must be about a hundred tunes in your tune book, because although one can’t see absolute numbers in the graphs, it looks like they could easily add to 100, which, I suppose, is why Roger asked what he asked.
Michael Eskin Posted February 27 Author Posted February 27 (edited) 112 tunes for this tunebook. Again, this has nothing to do with my ABC tool, CSV export, this is all spreadsheet graph setup stuff. Just trying to convey that once you have the data for a tunebook in a spreadsheet, you can do interesting analysis on it, but the actual analysis would depend on the data present. For example, here's a graph of the most common tune origins (from the O tag) in Paul Hardy's tunebook: I'm sure there are many other ways this can be useful for the musicologists out there. Edited February 27 by Michael Eskin
Roger Hare Posted February 27 Posted February 27 (edited) 1 hour ago, David Barnert said: There must be about a hundred tunes in your tune book, because although one can’t see absolute numbers in the graphs, it looks like they could easily add to 100, which, I suppose, is why Roger asked what he asked. Exactly right! I counted the number of tunes in the tune book - 112, and did a rough eyeball count of the numbers in each 'column' in the chart - roughly 100 - so it could have been either. That is a really nice illustrative representation of the data - and green is my favourite colour anyway...🙂 It's really good to see this sort of sophisticated representation of data emerging. Edited February 27 by Roger Hare
Michael Eskin Posted February 27 Author Posted February 27 (edited) Yep, once you can extract all the tags into a CSV format, then pretty much anything is possible, of course limited by the information actually present in the tune tags. Obviously, if there are no O: tags in the tunes, you can't do a graph of tune origin distribution. Pretty much every collection of tunes I've seen uses the informational tags differently. The extraction tool is agnostic, it just extracts the tags and puts them in the CSV. How the CSV data is then used depends on the specific goals of the person working with it and limited by the information actually present in the tags. I'm absolutely no master of spreadsheets, but it was pretty easy to create these relatively simple examples using Apple Numbers. Edited February 27 by Michael Eskin
Roger Hare Posted February 28 Posted February 28 (edited) On 2/26/2025 at 7:20 PM, Michael Eskin said: ...extract all the common ABC tags and write them to a CSV file for import into a spreadsheet or other software... 17 hours ago, Michael Eskin said: ...Again, this has nothing to do with my ABC tool, CSV export, this is all spreadsheet graph setup stuff... One of the things I like about ME's programs is that they make me think! Thinking about this ABC to CSV utility, I realised I had been collecting at least some of this header-related information (M:, K:) for some time, using it once in a simple printed report - and throwing it away. Never occurred to me that it could be used for other things further down the road. I'll now be looking at saving this information for use in an appropriate graphics program. In the past, I've never had occasion to use this sort of graphics, but that's a poor excuse - I am a berk for not thinking of this before! Thank you for giving me a digital kick in the pants... Edited February 28 by Roger Hare
Michael Eskin Posted March 13 Author Posted March 13 Cool, I just hope somebody finds this work useful. 🙂
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now