Melodeon.net Forums

Discussions => Teaching and Learning => Topic started by: Michael Eskin on July 08, 2023, 12:28:12 AM

Title: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 08, 2023, 12:28:12 AM
I'd consider adding D/G tablature generation as well, but I'm a B/C player and have no idea on how D/G players choose between the plethora of duplicated notes on that system.

With B/C and C#/D there are only two notes duplicated between the rows, and it's simple

If someone can explain it in a way that can be made somewhat deterministic, at least for a starting point, then I might be able to add it.

I get the sense that the rules would change considerably depending on the tune key and mode, making it a substantially more complex solution than half-step boxes.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Mike Hirst on July 08, 2023, 09:32:09 AM
Hi Michael.

First off I will say that I fin d your project truly impressive both in ambition and execution.

I have on several occasions looked at the problem of automatic tab generation. Certainly it is possible, but in my experience rather clunky and inadequate.

At a very basic level each note in the melody has a unique set of relationships with the note(s) it follows, the note(s) it precedes and any other note(s) which are to be played against it. The ergonomics of the instrument mean that the same note will be articulated using different bellows direction/fingering many times in any given melody. This is equally true of D/G, B/C and more complex three row instruments.

Whilst it might make sense to play smooth runs without changing bellows direction the subtle demands of bellows control can sometimes benefit from direction change.

As a test I put some of the more exotic scales that I use into your online app. The generated tab was faithful and accurate, but lacked the subtle nuances that only experience can bring.

I think the solution would demand an Object Oriented Approach combined with machine learning. Perhaps if several experienced players were to hook up midi melodeons and play through a sizeable chunk of their repertoires data anlysis might reveal some common patterns.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Chris Ryall on July 08, 2023, 10:52:04 AM


 I’ve looked at this challenge in a (presently aborted) recode of Melodeon Explorer earlier in the year. it’s “about“ fingers and buttons, and in a sense easier to approach on a ½-tone set-up. The two rows are then very different, and there are fewer possibilities? Having said that, it doesn’t apply to George’s favourite BCC#! 😉   Also hemitonr kit seems to be best approached using “gut feeling”. That’s certainly how I play in eg Bb on mine.

  I found the most useful (it seemed) approach was functional programming, and that isn’t really “deterministic”? I was experimenting with a lookup table that told whether a note was there in one direction, or two.  When you are working with both directions it  is … fairly easy to work out a fingering. Experimentation revealed that with 1-direction … the various racemic options were much more fruitful if 2 notes in a tune lay on the same button.

  But I was only looking at phrases. A whole tune is a much more complex issue. And my strategy wrt restricted notes …  had basically just rediscovered the B/C’s “magic button”?

   I do think that there are realistic possibilities on ½-tone kit. Arguably too many possibilities on a D/Gaccs or larger 4th-apart. You will surely be able to find a tablature. But it might not be the best one.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Stiamh on July 08, 2023, 12:13:47 PM
The tool is a very impressive piece of work. But box tablature seems to me a huge can of worms. To appreciate the scale of the challenge facing you on D/G, consider some of the issues that your semitone implementation does not deal with, at least not yet. The following examples refer to C#/D tab, since that’s the system I am most familiar with.

1. “Magic” notes (reversals). As far as I can see, the tab generated never proposes either of the reversals available on the outer row, and I think you say that somewhere.

On C#/D, I might play the sequence dc#d in one direction. Or I might not. This would depend to some extent on the player's experience.

Take the sequence EF#G or GF#E in either octave. In a majority of cases I would play these in one direction. But not always. And a different player might make different choices. If the F# is in an unaccented position, chord choices will not come into the picture.

But in a hypothetical sequence like g f#edA I might choose to play the f# on the outer row for smoothness, but if I were playing basses and the chord required was D, the f# would have to be played on the row.

2. This brings us to chords. On semitone boxes there are few occasions where chord choices will dictate whether to use a reversal or not. On C#/D, for example, a Bm chord will force you to use the outer-row F#, and a D chord as mentioned above, the inner-row note. You would choose to use the outer-row C# in an accented position to go with a chord of A or one of F#m. And that’s about it.

If I paste the ABC for a Bm tune such as the Glass of Beer, the C#/D tab will indicate that all the f#s in the first two bars (fB B/B/B fBaB|fB B/B/B e2de|) are played on the inner row. If you wanted to play chords, this wouldn’t work. Even if you didn’t want to play chords, the outer-row f# would be a better choice for ease of playing.

Then take this tune, where the chords are actually indicated in the ABC code:

Code: [Select]
X:150
T:THE HALLOWEEN JIG
R:jig
C:Jean Duval
M:6/8
L:1/8
K:D
F\
|:"Bm"B2B Bcd|"A"c2A ABc|"G"B2G GAB|"F#m"A2F FEF|
  "Bm"B2B Bcd|"A"c2A ABc|"G"def "A"edc|1 "Bm"B3 BAG :|2 "Bm"B3 cde|]
|: "D"f2f fed|"A"cde Adc|"G"Bcd dcB|"F#m"cAF Fde|"D"f2f fed|
"A"cde Adc|"G"Bcd "A"cBA|1 "Bm"B3 cde :|2 "Bm"B3 B3|]

The c# at the beginning of bar 2 would have to be played on the outer row to allow you to sound the A push chord for the whole bar. The c# at the start of bar 2 in the B part would be played on the inner row, however, while the c# at the start of bar 4 of the B part would be push to go with the F#m chord.

It doesn’t make much sense to generate tablature where the buttons pressed do not go with the chords that are specifically indicated.

So, I think you are facing a considerable challenge, even on a semitone box with its limited choices. On a D/G or other "quint" system, this problem would be much greater. And personal playing styles would be a big issue. No doubt AI could do a decent job, given sufficient data produced by humans to learn from... Do you want to go there?

PS What made you choose a down-arrow to indicate a bellows push? A small point, but to me this seems counter-intuitive in that a push requires more effort and a pull less. So I would imagine pushing up, against gravity.

PPS How would D/G tablature deal with notes that are not present on the instrument? Would it give up and tell you to get a B/C? Or transpose a tune in E-flat to D? What about accidentals that may be present on some instruments, but not necessarily on the same button, or in the same direction?

PPPS You could produce tablature for a one-row box confidently. (Although some D one-rows don't have a low B, but have a low A in both directions...)
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Chris Ryall on July 08, 2023, 12:36:31 PM

   Chords, (or even appropriate modal substitute chords) are a much easier problem, Stiamh.   Analytically the system in use … doesn’t matter much either. Tab is an order of magnitude harder.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Gena Crisman on July 08, 2023, 01:00:30 PM
So, in my opinion at least, 2 row fourth apart boxes are ostensibly chord driven instruments - for it's 2 named 'keys', there is a way to voice each of the diatonic chord triads on the melody side of the instrument, and if they're present to begin with, you'll have the corresponding basses in the matching direction. For example, you can play A major's component notes of A C# and E all on the draw, and A major is available as a draw chord. B minor is B D F# (and A for the m7) and can be found on the press, and is found as a B + D major cross chord. If you can voice the whole diatonic triad, you can play the chord in that direction, but you do additionally you have a push C chord and pull D chord, with only some of the notes to match (A & F# for pull D, G for push C). So, chord driven, in my mind.

Therefore, when approaching a new tune, a very important early step in deciding how to play it is going to be informed by the chord I shall be playing with those melody notes. While there are 2 options for playing G4, only one of them is available if I want to play a G major chord at the same time, and the other if I want to play an E minor, and so, the choice is determined by this.

So, the key of the tune influences the chords that will be picked, which in turn influences the way I will play the tune. For the notes that don't fall on the beat, typically that is influenced by the tradition or style of tune, with a gradient from 'on the row' playing being preferred in some versus the other end being holding a direction for full bars, like a piano accordion, where possible.

There are, then, 2 sticking points:
1) There's no guarantee that a tune comes with chords, and there's no requirement for those that do to use strict diatonic harmony, or to match said chords to said notes on said beats.
2) We have reversals for 2 of the chords, D major and C major, with only some of their component notes available in their reversed directions.

In the case of 1, the key of the tune informs how I'll initially approach a tune - D + Em tunes on D row, G + Am tunes on G row, etc. But, when I decide chords, I will alter my fingering to match.
In the case of 2, this is most strong in the key of D major. If your chord sequence is batting between D and A, you have a push/pull balance. If it's batting between D and G, and you say 'oh well it's a tune in D major, surely we prefer to play these on the D row and only cross for the G chord', then, actually you may not have a balance and will run out of air. Some people will instead bat between D and Em but stay on the D row (push and pull balanced again), and some will play sections of the melody in a push/pull style but on the G row instead, and bat between G push and D pull, using the pull versions of the A and F# melody notes to accomplish this.

I suspect you'll find that an approach with no controls exposed to the user to be frustrating for both yourself and end users. And, in my mind, end users who'd want tablature come in two forms - those who want it for themselves (who may not know enough to know if it's right for them), and those who want to add tabs to teach others (who know exactly what they want).

However, you are in the position of being able to confidently add a tablature into the displayed score/pdf etc. So... if you can give me even a suggestion that I can then modify/edit myself, to be what I would want to give to a friend or a student, then uh, I'd kinda love that? Because, how on earth am I going to make that otherwise? With a pen? Learn, idk, Musescore or something? An automated approach not being able to be 100% correct is fine, I'll take 90%... heck, 50% correct, as that saves me time and I can cover the rest. I wouldn't mind if my 'fix' is volatile/ephemeral as I'm probably saving it out as a PDF.

So in summary:
a) Basically, it's chords.
b) If a tune doesn't have chords, you could assume on the row playing for the key that it's in. Or, you could add chords that would suit the tune, then work from those.
c) Sometimes it's because of air, too.
d) Give me some way to modify the generated tabs so I can eg fix a couple bars that are 'wrong'/not what I would recommend to someone.

Like, tabs are a way for people to get their foot in the door, or for others to share their mastery with those who need the information in this kind of format, so, idk go for it imo.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Chris Ryall on July 08, 2023, 04:25:02 PM

    This is the sort of thing we’re working towards http://erwan-diato.com/pages/tablatures/tablatures/tousStyles.php

    Tab for accordéon has bern going in France for about 30 years. The site has 2 Maraîchines. ie … there are choices to make?
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 08, 2023, 04:39:58 PM
Yes, there are choices if you aren't already a D/G player trying to understand the instrument and don't want to make bad assumptions.

There are duplicated notes on both rows that are the common notes between the D and G diatonic scales:

D E G A B

Now, I could naively assume that one just plays along the G row for tunes in G Major and its related modes A Dorian, D Mixolydian,etc. , and similarly for D Major, assume the D row for D Major, E Dorian and A Mixolydian, but I'd rather hear from someone who actually plays the instrument how they approach it.

On half-step boxes like B/C and C#/D, the duplicated are limited to two notes and it's not unreasonable to default to the one on the primary row (C for B/C, D for C#/D) as a starting solution.

I agree, once you bring in the chords on a half-step box, it will dictate the requirements for some magic note directions, but this is meant primarily as a starting point for someone who is learning the instrument and doesn't read notation, not as a "does all things and knows your preference for every possible note combination" solution. 

There's no way for the tool to have a way to modify the tab "on the fly" as at tablature render time, the underlying abcjs engine just gives me offset numbers from the bottom note of the instrument, and I use that to select a replacement glyph or glyphs for the note. 

One coule use a PDF tool like Acrobat and modify the PDF directly, but just be aware, the PDFjs engine used for creation of the PDF in the tool creates a high-resolution bitmap representation of the notation, not vector. You'd have to essentially overlay any note you want to replace in the bitmap on the page with another glyph combination using the text tool in Acrobat. Not difficult, but but something to be aware of.

Unfortunately, there isn't a open-source Javascript library out there so far that can generate vector PDF directly from SVG for notation, so we have to generate SVG notation and rasterize it to bitmaps and insert them into the PDF.

Your best bet if you want to mess with the notation after-the-fact is to use the browser's own "Print to PDF" feature, which, because it's native code running on the computer and not using a Javascript library,is able to generate a vector PDF representation (but you lose all the PDF tunebook features I provide like Table-of-Contents, index, hyperlinks, etc.) and then change the tablature glyphs directly in Acrobat.

Or, print it, white out the bits you want to replace, and fix it using a quill pen. :-)

As I like to remind people, the project is free and open source, complete source code available at:

https://github.com/seisiuneer/abctools

So if anyone wants to implement a better box tablature solution, please go for it and then send me a pull request!

Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Gena Crisman on July 08, 2023, 08:25:24 PM
So looking at app.js, RenderTheNotes, you're iterating over Tspans, reading the existing innerHTML value (a relative note), and replacing it with some glyph. I have currently have no idea how this is then later rendered, however, like eg the whistle tabs obviously are rendered in a particular way but I'm yet to fathom that out.

Anyway this is an integer indexed list where we basically stuff the characters that we want to be printed as tabs so... if the tune doesn't change, then if that string is output to the person using your program, they could modify it and request the tune be rerendered (just as if the tune was changed) and we can just ignore the information provided and substitute in whatever we want. Case in point, see attached file where I just have it pull a character out of a string.

Code: [Select]
var test_string = "Iwonderhowthiswillwork.Maybeitwillbeterriblebutwhocansay.thisisjustatestofadumbidea...."
for (x = 0; x < Tspans.length; x++) {
if (true)
{
Tspans[x].innerHTML = test_string[x];
} else if (Tspans[x].innerHTML == "0") { // D#3

So, like hopefully the white out could conceivably stay on the shelf?

The thing is though that, for a D/G, a bare number like this is not enough information to base your decision of which button to push. The way you would decide the most correct way to play any given note is going to be based on the most recent chord that has been played, or at the very least be based on the key of the tune in some way. Do we actually have access to that kind of information at this juncture? Because I get the impression that you currently do not?
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 08, 2023, 08:46:04 PM
No, I don't, and that's the problem...
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Gena Crisman on July 08, 2023, 09:30:21 PM
OK well - your software here can transpose a tune, right? So, it knows how to a) read a note b) understand it in some musical fashion and then c) write that back down as ABC.

I would suggest then that possibly the way forward is to be able to read a note in, work out musical information about them, and put that information into a data structure that we can then take a second look at once we've read the whole tune through, rather than a sort of 'data in -> data out -> forget it and move on' methodology, which is... kind of what I assume is happening?

Anyway, the assumption that I would pin all my hopes and dreams on is that, if we had some 'tune' data structure, the fact that we're now holding onto that musical information in some way let's us solve most of our issues. If we get chord information from the ABC file, great, but if we don't, we could now know that a bar has, idk, E G and C notes in it on the beats, and remember that our tune is supposed to be in the key of G, and we can try and make a guess at what kind of chord we might want to play there.

If we can in some way have an association from our stream of notes from the ABC, even if it's just by the order that they appear in the file, that connects to some form of overarching musical information data structure, I think that gives us the information you would want to make these kinds of decision when we're doing things here like trying to render tabs.

Like the most basic no-music-brain approach I could think to take is to just like, crawl through the tune in order, and every time we read a chord, stuff it in to some variable, and for each note we read, we just add another instance of that chord to some list. Then when it comes time to do D/G tabs, we look up that_list_of_chords_we_made[ x ] and voila we know what the last chord before any given note was, provided the note indexes do indeed line up (which from everything I'm seeing, they should). It doesn't help us if we don't know what beat of the bar the note we're dealing with is, really, but, it starts to get us that kind of information. But, before long it turns into an overarching musical information data structure...

I imagine there are other options one could take but I mean, that's what I would do, probably. JS and webdev is not really in my primary skillset, unfortunately, but perhaps one of these years.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Mike Hirst on July 08, 2023, 09:35:51 PM
The way you would decide the most correct way to play any given note is going to be based on the most recent chord that has been played, or at the very least be based on the key of the tune in some way.

This is my thinking exactly.

To decide note direction we need context. To determine context we need to set status.

Imagine a set up where melody notes are given sequential status. That is to say each note is sequentially set as the current note, with Object Oriented status set defining current note number, previous note number, harmony, etc. John Maeda is very good on this. Despite his Microsoft affiliations I find his methods very useful in harnessing abstract creative concepts.

Though it is not my favourite platform, I suspect that Processing (https://processing.org/) could be used for this, though Python may be more effective.

I've some other ideas. I'll hunt out the links and share, maybe tomorrow.

AtB

Mike
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 09, 2023, 04:00:36 AM
OK well - your software here can transpose a tune, right? So, it knows how to a) read a note b) understand it in some musical fashion and then c) write that back down as ABC.

No, not my software, abcjs can do that. I just tell it how many semitones to transpose and abcjs takes care of the transpose for me and generates new ABC that I inject in place of the old. 

It's pretty complex internally, one of the harder issues that Paul Rosen had to solve I'm not willing to take that on just for D/G tablature. 

Of course, if anyone else is sufficiently motivated, go for it!

It sounds like once you get beyond half-step boxes, things get much more complex as far as tab generation. 

That's why I asked here, and the focus more on chords driving the fingering than on half-step boxes really pretty much tells me it's not something I want to take on, as I'm a B/C player, not a D/G player.

Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 09, 2023, 04:37:46 AM
I'd consider adding D/G tablature generation as well, but I'm a B/C player and have no idea on how D/G players choose between the plethora of duplicated notes on that system.

With B/C and C#/D there are only two notes duplicated between the rows, and it's simple

If someone can explain it in a way that can be made somewhat deterministic, at least for a starting point, then I might be able to add it.

I get the sense that the rules would change considerably depending on the tune key and mode, making it a substantially more complex solution than half-step boxes.
Oh, I only just saw this. I think this may have arisen because of a PM I sent to Michael? In it I mentioned a thread in which user 'david' described a Python script for adding Ed Rennie style D/G melodeon tabs to a simple ABC script. This is the thread concerned:

http://forum.melodeon.net/index.php/topic,20960.0.html [1]

and it gives some sort of background for the ensuing discussion (which, so far, I've only 'speed-read').

Edit: Yeah, I've now read the thread in a little more detail. Other contributors have mentioned most of the 'problems' I've tried to overcome in my 'project' (see footnote below), plus a couple of others I hadn't thought of... 8)
___________________________
[1] This was what inspired me (in part) to get stuck into a 'project' to automatically add concertina tabs to simple ABC scripts. I can do it for G/D, C/G and Bb/F concertinas, for a variety of mappings/keys/modes, and yes it's tricky - several of the problems mentioned by other posters needed 'sorting out'. It works, it works fast, and I use it on a daily basis, but it's pretty simple-minded (and pretty 'deterministic'...8)).

I've also added 'note name' mappings and very basic mappings for the Ed Rennie melodeon tabs. It's still 'under development' - and always will be, I guess.

As it stands, it's very primitive - the 'crock of gold at the end of the rainbow' is to develop some sort of 'optimisation' so that 'sensible' choices of button are made when there is more than one option. The mathematics/programming techniques needed to do this sort of stuff are a little above my pay-grade, these days, so I don't expect anything to happen very soon.. :(
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Howard Jones on July 10, 2023, 12:13:16 AM
The difficulty is that for many phrases there are several possible ways to play them. As well as up-and-down the rows, they can often be played across the rows in both directions.  Which to choose is to a large extent determined by the choice of chord, which dictates the bellows direction, but there are other factors.  For example, the D chord is available in both directions, so whether I choose to play on the push or pull may be influenced by air management.  Then there's 'feel', and whether I want the tune to be 'lumpy' or legato. How you lead into the phrase and continue after it also play a part. 

Exploring these options is a considerable part of arranging a tune, and may involve a lot of trial and error to arrive at a playable solution. However what suits one player may not suit another. Tab has its uses, but I think some players might find that they sometimes prefer to deviate from the recommended tab, and would want to be able to tweak it to reflect their own playing.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 10, 2023, 06:48:11 AM
Further reason for not trying to go down this path.

Thank you everyone for the great information!
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 10, 2023, 09:00:27 AM
Further reason for not trying to go down this path...
That'll be a 'No', then?  8) I don't blame you - it's starting to look like a mugs game. Unfortunately, I happen to be a mug, so I'll be carrying on trying to get this to work, if only at a very simplistic level. I can already 'optimise' the choice of buttons for simple (melody-only) concertina tablature, but as it's a random choice of available buttons, and I already choose the 'best' button in my hard-wired mappings, it's guaranteed to produce a 'worse' solution - I said it was a mug's game didn't I 8)? I'll keep plugging away though - getting it 'wrong' first time round can give an insight into getting it 'right', second time round...
_____________
I think this must be one of those problems which doesn't have an analytical solution, but which can be approximated by using empirical techniques - like the 'nearest unvisited location' solution to the Travelling Salesman Problem, for those who are into that sort of stuff.


Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Howard Jones on July 10, 2023, 09:26:57 AM
For all that I've said, I suspect that my choices, which I foolishly believe to be the result of my inherent musicality, are in fact simply grabbed from my mental toolbox and could probably be replicated by some well-honed computer algorithms.  I don't doubt that it could generate something playable - whether that is the best or even a good solution is another matter, but the recent publicity around ChatGBT shows what computers are now capable of. It's probably only a matter of time.

Personally, I find tab to be most useful and most interesting where it gives some insight into the technique of the person who has written it, especially where they are a well-respected player, so I don't think I'd have much use for computer-generated tab. However for those who use it as an alternative to conventional notation in order to learn a tune it could at least be a starting point.  However I suspect that it could sometimes make a tune more difficult than it need be.

Good luck with your project.

Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 10, 2023, 11:11:25 AM
...I don't doubt that it could generate something playable - whether that is the best or even a good solution is another matter...
Good luck with your project.
Strictly speaking, it's always 'playable', but sometimes it generates some bizarre results. A while back I transposed something in some 'orrible key like Eb into Gmaj before generating the tabs. Weirdly, the tab generated for Eb was easier to play on the G/D concertina than the tab generated after transposing to Gmaj - very peculiar... :-[

Thank you for your encouragement - clearly, I need all the luck I can get... 8)
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Anahata on July 10, 2023, 07:44:24 PM
The difficulty is that for many phrases there are several possible ways to play them. As well as up-and-down the rows, they can often be played across the rows in both directions.  Which to choose is to a large extent determined by the choice of chord, which dictates the bellows direction, but there are other factors.  For example, the D chord is available in both directions, so whether I choose to play on the push or pull may be influenced by air management.  Then there's 'feel', and whether I want the tune to be 'lumpy' or legato. How you lead into the phrase and continue after it also play a part. 

Exploring these options is a considerable part of arranging a tune, and may involve a lot of trial and error to arrive at a playable solution. However what suits one player may not suit another. Tab has its uses, but I think some players might find that they sometimes prefer to deviate from the recommended tab, and would want to be able to tweak it to reflect their own playing.

This perfectly expresses what I nearly posted earlier, but couldn't find the right words. It's so much more about musical taste and personal preference than how to play the notes.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Mike Hirst on July 11, 2023, 12:18:44 PM
One possible solution would be to adopt a Darwinian approach.

The software would make a simple 'on the row'  tab. From this starting point successive mutations could be generated. The new versions should be tested against a set of pre defined rules - harmony, ergonomics, fingering, note combinations, chordal progressions etc. each test should be given a numeric value as it's outcome. The higher the running total the more likely the mutation would be to succeed. Each generation builds on the successful aspects  of it's ancestors.

This organic approach matches the way that one would develop an song or tune arrangement in the real world.

i have seen this approach used to develop python 'Wordle' puzzle solvers and also in this counterpoint software:

https://github.com/ntoll/foox
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Chris Ryall on July 11, 2023, 02:42:31 PM

   Nice idea, Mike 👍

   🤔 does the machine judge the outcome? Or does it seek feedback from a user who might be more naive than you

   The difference from wordle is that wordle has 1 right answer. Music phrases don’t? 
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Mike Hirst on July 11, 2023, 04:13:50 PM
The foox cli tool is very effective. Download from github and run using python.

This presentation reveals some of the background to the project:

https://ntoll.org/static/presentations/foox/index.html

Running the software using the same input (Cantus Firmus) multiple times will produce many different results. Each one true to the harmonic rules of counterpoint, but often with very different tonal shifts.

Implementing 'Genetic Algorithms' is simple. I have played around with the basic structure using Python, but I guess other languages would work too.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: PeterBRC on July 11, 2023, 06:27:55 PM
I can’t understand a word of this !!  but I wish I could !
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Peadar on July 11, 2023, 09:16:15 PM

   Nice idea, Mike 👍

   🤔 does the machine judge the outcome? Or does it seek feedback from a user who might be more naive than you

   The difference from wordle is that wordle has 1 right answer. Music phrases don’t?


I am not sure if there is any point in producing DG tabs for (I presume) Irish Traditional Dance Music. I queried some time ago why someone who wants to play Irish (Dance) Music in "C" sessions didn't just play a C/C# box on the outer row. I learned that it is the fashion in Irish Diaspora Music to copy the style of a favourite big name player to the extent that playerrs want half step boxes that match their heroes set up.  In that context tabs make sense.

But for a hundred plus years the purpose of most melodeon tab systems has been to guide the begginer's fingers as an aid to finding their way round the instrument at the same time learning to read staff notation. This is as true of Ed Rennie's system as it was of Peter Wyper's . The only tab systems I know of that don't seem to have been designed for this purpose are those of Forbes and Hohner, both of which seem to have had the primary object of selling more Hohner's.

Or do I just misunderstand completely?
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 11, 2023, 09:38:12 PM
Well, based on the appreciative responses I've received from beginner B/C and C#/D box players, clearly there is a point to making these available.

By having both the tablature and the notes for the tunes, hopefully this might help bootstrap them into reading notation and start to associate common patterns in the tab with the patterns in the notation.

My half-step box solution isn't meant to be all things to all players, it's primarily an aid to help bootstrap newer players who might find tab useful.

For the rest who are complaining that my half-step solution isn't infinitely flexible, print out the tab to a vector PDF using the browser's print function (so you get true vector glyphs, not a bitmap PDF as would be generated by my jsPDF-based exporter) and edit the resulting PDF in Adobe Acrobat to make whatever changes you like.

It's absolutely possible, even easy to do.  I'll put up a demo video in the next few days showing how.

Or print it on dead trees and use correction fluid and a quill pen. :-)

Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Mike Hirst on July 11, 2023, 10:37:48 PM
I can’t understand a word of this !!  but I wish I could !

I'm not sure that I fully understood what I was trying to articulate 'til I wrote my earlier post.

Google 'genetic algorithms (https://www.google.com/search?client=firefox-b-e&q=genetic+algorithms)' and you will find many useful results.

This Wikipedia entry is a useful starting point:

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

The more I read the more I am convinced that this approach is something I have been struggling towards for some time with my heuristic code musical experiments.

Michael: this is certainly not a criticism of your project, which I have already made clear that I greatly admire. Rather it is an acknowledgement that where music and code colide there will always be room for improvement through addressing commonalities across parallel projects.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Stiamh on July 12, 2023, 12:18:15 AM
For the rest who are complaining that my half-step solution isn't infinitely flexible...

I take it you mean me. First point: like Mike Hirst, I am very impressed by what you have achieved with your endeavour. Second, I don't care for tablature and would not use it in teaching.

But you asked about the possibilities of producing useful D/G tablature. The reason I brought up what I see as a serious shortcoming in your half-step solution (hardly a plea for "infinite flexibility") was to suggest that, if it was not easily fixable, then trying to work out a system for D/G would be an order of magnitude more difficult. Which other people's posts seem to have since convinced you is the case. That's all.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Michael Eskin on July 12, 2023, 01:20:02 AM
Stiamh, not just you, others have expressed similar concerns about the limitations to me on Facebook as well. And, to be clear, I agree with you, if there was any way to make it simple to express specific fingerings that could work with abcjs, I’d absolutely implement it, but no solution has come to mind yet. I’m still mulling over the possibilities.

I don't believe in teaching from tab myself either, but clearly, some newer players appreciate it as a way to reduce the initial friction taking on the instrument, particularly if they don't read notation.

I just posted a thread showing how to edit the transcriptions after-the-fact to easily adjust any fingerings. I hope that procedure may be useful to someone. I also don’t believe that one tool has to do everything possible. This is one of those cases where my tool in combination with Adobe Acrobat can be a very powerful thing. My tool does most of the work and then you handle some details in Acrobat.
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 12, 2023, 05:31:07 AM
One possible solution would be to adopt a Darwinian approach...
Which immediately set me thinking 'Genetic Algorithms'. Stupidly, I hadn't thought of that, even though I wrote a simple GA program myself about 20 years ago. I suspect though, that any approach which iterates round successive solutions evolved using GAs would be slooooow?
...I don't care for tablature and would not use it in teaching...
I completely understand this, but I know my own limitations. As a 'latecomer' to music who's never going to be a competent sight-reader, I do find it useful. Unfortunately, some folks do use it for teaching, but make a complete dog's breakfast of it. I could point up a 'system' (for concertina, based on ABC) used by at least one set of on-line lessons, and some associated software in which the authors have clearly mis-understood ABC; and even within the context of their 'understanding' have made a complete (and misleading) mess of the whole thing. Caveat emptor!
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Howard Jones on July 13, 2023, 08:25:18 PM
I could point up a 'system' (for concertina, based on ABC) used by at least one set of on-line lessons, and some associated software in which the authors have clearly mis-understood ABC

It's possible they were using the Irish system of ABC, which also uses letters of the alphabet but differs in a number of ways from Chris Walshaw's ABC, although at first glance it looks similar.

https://www.leslieanneharrison.com/irish-flute-tips-blog-original/2021/8/3/18-how-to-read-abc-notation-in-irish-traditional-music#:~:text=ABC%20notation%20uses%20the%20letters,used%20on%20thesession.org).
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 14, 2023, 05:14:43 AM
Warning: Strictly speaking, this is off-topic...
Quote from: Howard Jones link=topic=2947Irish sys7.msg349763#msg349763 date=1689276318
It's possible they were using the Irish system of ABC, which also uses letters of the alphabet but differs in a number of ways from Chris Walshaw's ABC, although at first glance it looks similar.
The url you cite isn't either of the ones I had in mind, but after reading it, I guess that it may have served as the 'inspiration' for one or other of the two I mentioned. It seems to me to have a rather odd approach to notating higher octave notes. I've looked at thousands of ABC scripts, in many genres over the last few years, and never seen anything remotely like this before.

Here's an example of the output from a program which claims to add ABC note names to an ABC script, and which appears to use the 'Irish system of ABC'. It's full of errors which seem to arise because of a mixture of using the 'Irish system of ABC' and then getting the code wrong. To me, it's simply 'wrong', and potentially very confusing for anyone who stumbles on this without any context.

Edit: I should have done this at the start - the second example shows the same tune with ABC note names added using a program which seems to do a slightly better job...
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Howard Jones on July 14, 2023, 01:05:35 PM
I know very little about "Irish ABC", except that it exists and I believe is widely used in Irish traditional music. It has been around for a considerable time, and unlike "Walshaw ABC" it wasn't developed with computers in mind, and I suspect that many players had their own variants. There probably isn't the consistency that you find with Walshaw ABC, which has a recognised standard which developers can work to. 

This is perhaps similar to the way there are at least two well-known tablature systems for melodeon (and no doubt many more personal versions) and many more for anglo concertina.  Some of these can appear very similar, and this can lead to confusion. I get the impression from occasional comments on The Session (which uses Walshaw ABC) that Irish musicians are sometimes confused that the scripts don't match the systems they are used to.

All the ABC scripts I have come across online have been in Walshaw ABC. Traditional Irish ABC was paper-based for personal use and face to face taaching, and I doubt much found its way online until teachers began to use the internet as a teaching resource.

What is wrong with the examples you posted? The first one is a mess because the note names are not aligned with the notes on the staff, but that's a programming issue. The names themselves look OK, although not Walshaw-compliant. The second one seems better.  However I may have missed something.

Whilst I can't rule out the possibility that the author of the scripts you are referring to has misunderstood ABC, I suspect it is more likely that they are using a variant of Irish ABC, quite possibly their own or that of their own teacher.

Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: CAB on July 14, 2023, 01:59:13 PM
I know very little about "Irish ABC", except that it exists and I believe is widely used in Irish traditional music. It has been around for a considerable time, and unlike "Walshaw ABC" it wasn't developed with computers in mind, and I suspect that many players had their own variants. There probably isn't the consistency that you find with Walshaw ABC, which has a recognised standard which developers can work to. 

Exactly right.  Steer clear of Irish ABC unless you need to communicate with Irish players who use it.  Irish teachers use it widely but individuals seem to have their own ways of using it.  I first came across it over 20 years ago but still avoid it whenever possible.  I attach an example of a tune in standard notation and Irish ABC.  This comes from The Online Academy of Irish Music, who use a fairly consistent version.  Some of their tutors post tunes in standard notation, Walshaw ABC and this (which they call "easy abc", confusingly enough).
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: tirpous on July 14, 2023, 02:37:44 PM
I first came across 'Irish ABC' while attending Seosamh Mac Gabhann Summer School on-line classes a couple of years ago.  Most teachers provided scores in that format. (videos of the classes, with scores in the comments, are still available at https://www.facebook.com/smgsummerschool (https://www.facebook.com/smgsummerschool))

I've since come to realize it is indeed a standard thing in ITM circles.  In my experience it is a simple and straightforward system that works well for its intended use (see picture of a flute class for an example).  Nothing wrong or odd with it, unless you expect it to be the same as the 'Standard ABC', which has its own oddities. 
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Roger Hare on July 14, 2023, 05:02:11 PM
...Some of their tutors post tunes in standard notation, Walshaw ABC and this (which they call "easy abc", confusingly enough).
So, they call it easy abc, eh?

OK, I surrender - if I had a white flag, I'd be waving it right now...
Title: Re: Would consider adding D/G tablature if it can be done deterministically
Post by: Rick_vdS on January 19, 2024, 01:52:51 PM
I have been working on a online tool myself to create tablature from ABC notation. As a beginner player I have been using it myself for a few months now. It has reached a state where it might be useful to others as well. I play a G/C and C/F box, but it works for D/G as well.

The tool derives the push pull direction from the chords. If a chord can be played in both directions, add > to the end of the chord to force push direction and < to force pull direction. In the same way a . or : can be added after the chord to force melody notes to be played on the outer or inner row respectively.

Give it a try here https://diatotab.com (https://diatotab.com)
SimplePortal 2.3.5 © 2008-2012, SimplePortal