Jump to content


Photo

Incorrect Midi Chords - Abc Conversion


  • Please log in to reply
10 replies to this topic

#1 John in Brisbane

John in Brisbane

    New Member

  • Members
  • Pip
  • 1 posts

Posted 01 February 2005 - 07:51 AM

I've been referring people to the ABC Converter and I often double check my syntax here beforehand. It's a great feature!

Today for the first time I posted an ABC tune with "guitar chords", w: lyrics and W; lyrics and was pleased to see that all was well.

I was thrilled to hear when I hit the MIDI button that I could hear the 3/4 chord accompainiment, but Oh Dear, what's happened to my Seventh chords? They'd been played as Major Sevenths!

Here's the notation, sorry if it's not Beethoven:

X:1
T:The Bull's Despair
M:3/4
L:1/32
Q:1/4=135
K:C
G8|"C"e8d8c8|"F"d8c8A8|"C"G8E16-|E8z8G8|e8d8c8|
w:They say I'm a champ-i-on bull, sir, My genes are the
"D7"c8B8c8|"G"d24-|"G7"d8z8 G8|"C"e8d8c8|"F"d8c8A8|
w:best ones to sow, My broth-ers all got the un
"C"G4G4E16-|"A7"E8z8 G4G4|"D7"A8d8c8|"G7"B8A8B8|"C"c24-|c16|
w:kind-est cut, But with pride I still swing to and fro.
W:
W: The Bull's Despair
W:
W: They say I'm a champion bull, sir,
W: My genes are the best ones to sow,
W: My brothers all got
W: The unkindest cut
W: But with pride I still swing to and fro.
W:
W: My grandfather told me of his exploits,
W: Of springtimes the natural way,
W: He and his mates
W: Would rush through the gates
W: And see how many cows they could lay.
W:
W: Now, I've fathered some thousands of calves, sir,
W: Yet I've not seen a flesh and blood heifer,
W: For me, it's a vet
W: With a latex pipette
W: In a fibreglass cow, that they proffer.
W:
W: Darwin showd us behaviour's passed down, sir,
W: We seek romance to help us beget,
W: If this practice adheres
W: For some thousands of years
W: Bulls will lust for the most dextrous vet!

Is there a minor problem here?

Best wishes for a great facility at a great site,
John

#2 bellowbelle

bellowbelle

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1253 posts
  • Gender:Female
  • Location:Lancaster, Massachusetts USA

Posted 09 February 2005 - 06:56 PM

Yes, I don't know if there's any way around the 7th chord problem, there. Usually, now, if I submit a song to my tunebook, I just leave off the 7th -- i.e., G7 will be shown as just G.

But...that's hard to settle for, sometimes, when you really want to add the 7th!

I am no whiz with the ABC stuff, I only speak from experience. I do like using it, it's a great system, anyway.

#3 David Barnert

David Barnert

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 2318 posts
  • Gender:Male
  • Location:Albany, NY, USA

Posted 10 February 2005 - 08:15 AM

Yes, the problem doesn't go away when you make the abc code simpler (in a tune with no note values shorter than a quarter note, why did you go for L:1/32?). In any case, the problem is still there in this simple exercise (I used a different key and time signature to see if that made a difference--it didn't):

X:1
T:Test
M:C
L:1/2
K:G
"G"G "A7"G|"D7"F "G"G|

I don't know if it's a new problem or always been there. I've been using the converter for years, but I generally put the tunes in without chords, so I wouldn't have heard it.

#4 Howard Mitchell

Howard Mitchell

    Chatty concertinist

  • Members
  • PipPipPipPip
  • 157 posts
  • Gender:Male
  • Location:Thorpe Satchville, Melton Mowbray, UK

Posted 10 February 2005 - 11:03 AM

The Tune-o-Tron page says that it uses abc2midi to do the conversion so I tried abc2midi on my local machine and it converts 7th and maj7th chord correctly.

So I looked at the C code for abc2midi and the relevant part was last changed in 1999 but I can't tell if the specific code for chord production was altered.

If anyone's interested the code for major, minor and 7th is:

static int list_Maj[3] = {0, 4, 7};
static int list_m[3] = {0, 3, 7};
static int list_7[4] = {0, 4, 7, 10};
static int list_m7[4] = {0, 3, 7, 10};
static int list_maj7[4] = {0, 4, 7, 11};
static int list_M7[4] = {0, 4, 7, 11};

which seems correct, the numbers being the note numbers in the chord from 0 -root, to 11 maj7th.

I wonder if Tuno-o-Tron is using an earlier version of this routine.

Howard Mitchell

#5 bellowbelle

bellowbelle

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1253 posts
  • Gender:Female
  • Location:Lancaster, Massachusetts USA

Posted 10 February 2005 - 06:05 PM

If anyone's interested the code for major, minor and 7th is:

  static int list_Maj[3] = {0, 4, 7};
  static int list_m[3] = {0, 3, 7};
  static int list_7[4] = {0, 4, 7, 10};
  static int list_m7[4] = {0, 3, 7, 10};
  static int list_maj7[4] = {0, 4, 7, 11};
  static int list_M7[4] = {0, 4, 7, 11};

Howard Mitchell

<{POST_SNAPBACK}>



Hmm, I tried to apply this to one of my songs in my tunebook, and for now anyway I can't quite figure out how to apply it.

But, in the process, I did remember how I 'solved' the problem of the strange-sounding 7th chords!

As shown in my tune 'Leaving The Leaves,' I used the typical roman-numeral notation (V7, iii, I, ii, etc.). I think, however, that in this case, NO chords get played on the midi. At least I can have a printable copy of the chords I want, though, as text.

I think that I didn't care, in this song, if the chord notation actually played in the midi, because the counterpoint present in the dots plays the 7ths, etc..

Anyway, I don't seem to have much for the Tune-O-Tron these days, anyway! Have gotten tired lately of writing out melodies.

#6 David Barnert

David Barnert

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 2318 posts
  • Gender:Male
  • Location:Albany, NY, USA

Posted 11 February 2005 - 09:47 AM

If anyone's interested the code for major, minor and 7th is:

  static int list_Maj[3] = {0, 4, 7};
  static int list_m[3] = {0, 3, 7};
  static int list_7[4] = {0, 4, 7, 10};
  static int list_m7[4] = {0, 3, 7, 10};
  static int list_maj7[4] = {0, 4, 7, 11};
  static int list_M7[4] = {0, 4, 7, 11};

Howard Mitchell

<{POST_SNAPBACK}>

Hmm, I tried to apply this to one of my songs in my tunebook, and for now anyway I can't quite figure out how to apply it.

Perhaps you're misunderstanding what this is all about. It doesn't apply to tunes so much as to chords. It's just the definition of chords. It tells the software how to build chords. If you think of the root note (say, C) as 0 and count half steps, the major 3rd (E) is 4 half steps higher. The 5th (G) is at half step number 7. Bb is at 10 and B natural is 11. So a major chord (CEG), in language a computer will understand, is {0, 4, 7} and the others follow as above. The numbers in square brackets are just the amount of notes spelled out, [3] without a seventh, and [4] with.

But, in the process, I did remember how I 'solved' the problem of the strange-sounding 7th chords!

As shown in my tune 'Leaving The Leaves,' I used the typical roman-numeral notation (V7, iii, I, ii, etc.).  I think, however, that in this case, NO chords get played on the midi.  At least I can have a printable copy of the chords I want, though, as text.

The same would be true using the chord names like "G7." They don't play right in the tune converter, but they print just the way they're supposed to (and they play right in other abc software).

#7 bellowbelle

bellowbelle

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1253 posts
  • Gender:Female
  • Location:Lancaster, Massachusetts USA

Posted 11 February 2005 - 08:56 PM

Perhaps you're misunderstanding what this is all about. It doesn't apply to tunes so much as to chords. It's just the definition of chords. It tells the software how to build chords.......

<{POST_SNAPBACK}>


I'll have to try again to see what I can do. I didn't know where to put what exact code....i.e., to make a former "G7" chord symbol at the start of a measure, I don't know where to put the {0,4,7,10} -- make something like "G{0,4,7,10}" to replace "G7" -- ? (Yes, I learn by trial and error...)



The same would be true using the chord names like "G7." They don't play right in the tune converter, but they print just the way they're supposed to (and they play right in other abc software).

<{POST_SNAPBACK}>


Well, I couldn't bear to listen to too many off chords, just to get them printed! Yet I want to show what type of chord sound I want. So, at least the roman-numeral symbols remain silent, in the midi.


I don't know about other abc software. I kind of gave up on it, after my own ABC2Win software, of which I'd bought a registered copy, quit working. Then, we got this new computer, and I don't know if I can transfer my license and get it all to work, but, I'm happy enough to just use the Converter at C-net!


Edited to fix a typo.

Edited by bellowbelle, 11 February 2005 - 08:57 PM.


#8 David Barnert

David Barnert

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 2318 posts
  • Gender:Male
  • Location:Albany, NY, USA

Posted 11 February 2005 - 10:40 PM

I'll have to try again to see what I can do.  I didn't know where to put what exact code....i.e., to make a former "G7" chord symbol at the start of a measure, I don't know where to put the {0,4,7,10} -- make something like "G{0,4,7,10}" to replace "G7"  -- ?

I don't think you can. The {0,4,7,10} stuff isn't abc. It's in the code for the software that interprets the abc. That is, it's part of the program, not part of the data you input to the program.

Well, I couldn't bear to listen to too many off chords, just to get them printed!

Of course, you're right. If the converter is your only way to hear a computer play your abc, you don't want it to be playing incorrect chords, so you can't include standard guitar chords (unless you don't use 7ths).

Edited for typo

Edited by David Barnert, 11 February 2005 - 10:43 PM.


#9 bellowbelle

bellowbelle

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1253 posts
  • Gender:Female
  • Location:Lancaster, Massachusetts USA

Posted 12 February 2005 - 10:30 AM

...I don't think you can. The {0,4,7,10} stuff isn't abc. It's in the code for the software that interprets the abc. That is, it's part of the program, not part of the data you input to the program.

<{POST_SNAPBACK}>


Thanks for the info and for saving me more vain attempts!!

I knew I didn't understand things correctly, but now I understand what it is I didn't understand. :)

#10 Mark Evans

Mark Evans

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1674 posts
  • Gender:Male
  • Location:Milford, MA.

Posted 12 February 2005 - 11:08 AM

Wendy,
Congradulations you Heavyweight Boxer you!

#11 bellowbelle

bellowbelle

    Heavyweight Boxer

  • Members
  • PipPipPipPipPip
  • 1253 posts
  • Gender:Female
  • Location:Lancaster, Massachusetts USA

Posted 12 February 2005 - 09:10 PM

:) Thanks!!

I'm just so thrilled, I didn't even eat Lean Cuisine, today.

Ate fudge, and other stuff. Then, birthday cake and all that, tomorrow, for my daughter (though it's not quite her BD yet).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users