Melodeon.net Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new melodeon.net forum

Pages: [1]   Go Down

Author Topic: ABC Tool Wanted (to clean up accidentals and key sigs)  (Read 3382 times)

0 Members and 1 Guest are viewing this topic.

Gandy

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 407
ABC Tool Wanted (to clean up accidentals and key sigs)
« on: July 07, 2010, 01:30:22 PM »

Hi,

I'm looking for an ABC tool that can clean up code that's been written with the wrong key signature.   In this case its from a MIDI - ABC conversion.

To illustrate what I mean, suppose the tune is in F, but the conversion comes out with no key signature.  All the B flats will be written with unnecessary flat symbols, and the odd B natural accidental will be written without the natural symbol.

What I am hoping to find is something that would re-write the ABC code for a new key signature, without transposing, but correcting the sharp, flat and natural symbols to match the new key signature.

Any suggestions would be appreciated,

Tony S
Logged
Tony S

Simon

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 449
  • Serenellini Selli C/F and Gold98 G/C
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #1 on: July 07, 2010, 02:34:45 PM »

Perhaps abc2abc can do this. A simple search/replace in a text editor also works. Or transpose the midi to C first.
Logged

Gandy

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 407
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #2 on: July 07, 2010, 03:15:32 PM »

Or transpose the midi to C first.
That's worth a try ... transpose down to C within MIDI, convert to ABC then transpose the ABC back to the proper key.   I think there'll still be a few surplus symbols, because MIDI seems not to really recognise bar lines when it comes to notating accidentals.

abc2abc looks promising, but those command line programs seem a bit neglected nowadays.  There seem to be up to date "readme" files for new versions, but the actual programs available for download are much older with fewer options.
Logged
Tony S

Simon

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 449
  • Serenellini Selli C/F and Gold98 G/C
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #3 on: July 07, 2010, 06:13:36 PM »

I think there'll still be a few surplus symbols, because MIDI seems not to really recognise bar lines when it comes to notating accidentals.
Actually midi doesn't do notes, only pitches. So a midi file can't distinguish a G# from an Ab for example.
abc2abc looks promising, but those command line programs seem a bit neglected nowadays.  There seem to be up to date "readme" files for new versions, but the actual programs available for download are much older with fewer options.
I'm using v1.56 (on linux); the latest is v1.59. There's a windows binary from May 2010 which should be pretty up to date.
Logged

Anahata

  • This mind intentionally left blank
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 6767
  • Oakwood D/G, C/F Club, 1-rows in C,D,G
    • Treewind Music
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #4 on: July 07, 2010, 06:29:28 PM »

I think what you want (using abc2abc) is this:

-usekey  sf
              This will force abc2abc to output the notes in the key signature
              keys[sf]  where  sf specifies the number of flats (-negative) or
              sharps (+positive) in the key signature. It is a number  between
              -5 and +5 inclusive.


That's different from transposing, and I assume it means it will take out the accidentals where they are already covered by the key signature you specify.
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

cboody

  • Member
  • *
  • Offline Offline
  • Posts: 26
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #5 on: July 08, 2010, 07:41:39 AM »

Binaries for abcMIDI contain the code for abc2abc and can easily be compiled for whatever platform.  I'm in process to update the abcMIDI files for Mac on the abcPlus site, but that will need to wait until probably tomorrow evening for me to get to it, and then Guido will need to post the files. 
Logged

Gandy

  • Respected Sage
  • ****
  • Offline Offline
  • Posts: 407
Re: ABC Tool Wanted (to clean up accidentals and key sigs)
« Reply #6 on: July 08, 2010, 10:41:59 AM »

Thanks all.   abc2abc works for me, thanks for pointing me to an up to date version.
Logged
Tony S
Pages: [1]   Go Up
 


Melodeon.net - (c) Theo Gibb; Clive Williams 2010. The access and use of this website and forum featuring these terms and conditions constitutes your acceptance of these terms and conditions.
SimplePortal 2.3.5 © 2008-2012, SimplePortal