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: Problem with Q: field  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Problem with Q: field
« on: April 05, 2019, 03:11:17 PM »

I am using EasyABC on a HP machine running Windoze 10.

I have a problem with correct representation of numeric values in the Q: field.

Briefly, any value above 127 produces an incorrect value both in the display, and in the generated PDF file.
Here's an example:

Code: [Select]
X:1
T:Newcastle
M:4/4
L:1/8
Q:1/4=150
K:G
|: A2 | "G" B2 d2 "D7" G2 A2 | "G" G3 A G2 D2 | "G" B2 d2 G2 d2 | "C" e2 g4 fe |
 "G" d2 B2 A2 G2 | "C" E2 e4 dc | "G" d2 B2 "D7" A3 G |1 "G" G4 G2 :|2 "G" G6 |]
|: ef | "G" gfed g3 B | "Am" A2 g4 A2 | "Em" G3 A "Bm" B2 F2 | "Em" E2 e4 f2 |
 "G" gfed g3 B | "Am" A2 A2 c3 d | "C" e2 B2 "D7" A3 G | "G" G6 :|

I've attached the PDF generated by this ABC code - the metronome marking which should be 150 is
shown as -106.

A value of 127 works fine; a value of 128, yields -128; a value of 129 yields -127; and so on... (*)

I'm baffled by this - particularly as on my other W10 machine, it all works fine.

Any ideas?

Thank you. (I thought I had already asked this question, but I can't find any trace...)

Roger

(*) It hasn't escaped my attention that 127=(2**7)-1, and that the value produced is a discontinuous function of the input Q: value:
        f(x)1:127=x;
        f(x)128:256=x-256
       which just shows that I'm a right smarty-knickers, but which doesn't get me much forrader...
  ::)
« Last Edit: April 05, 2019, 03:47:43 PM by Roger Hare »
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Stiamh

  • Old grey C#/D pest
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 3611
    • Packie Manus Byrne
Re: Problem with Q: field
« Reply #1 on: April 05, 2019, 03:23:54 PM »

EasyABC on what platform, Roger? I just copied and pasted your ABC code into EasyABC for Windows - tempo displayed correctly - and exported to PDF - likewise displayed correctly.

Edit to add: just converted the file via the Windows command line to ps using abcm2ps and then to pdf with ghostscript and the resulting pdf is fine too.
« Last Edit: April 05, 2019, 03:35:08 PM by Stiamh »
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: Problem with Q: field
« Reply #2 on: April 05, 2019, 03:39:36 PM »

(*) It hasn't escaped my attention that 127=(2**7)-1, and that the value produced is a discontinuous function of the input Q: value:
        f(x)1:127=x;
        f(x)128:256=x-256
       which just shows that I'm a right smarty-knickers, but which doesn't get me much forrader...
  ::)

Looks like some silly programmer decided a single byte data type was enough to hold the Q value.
Actually, an unsigned byte would give a range of 0 - 255, which you'd mostly get away with.

Maybe they used char with a C compiler that treats char as signed instead of unsigned.

Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Problem with Q: field
« Reply #3 on: April 05, 2019, 03:41:44 PM »

Roger, what are you using to generate the PDF? I just copied and pasted your ABC code into EasyABC - tempo displayed correctly - and exported to PDF - likewise displayed correctly.

Edit to add: just converted the file via the Windows command line to ps using abcm2ps and then to pdf with ghostscript and the resulting pdf is fine too.

I'm using a HP machine running Windoze 10. I just corrected my post to reflect the fact that I am using EasyABC!!!

Thank you for that. I haven't tried running abcm2ps/gs in the command prompt window as you describe,
perhaps I should. I think I'll try the ABC script in another ABC editor, to try and track down if it's a problem
with my implementation of EasyABC, or a problem with my OS.

If push comes to shove, I'll just xfer the file (~200 tunes) to the machine where it does work, before
producing my final PDF, but I'd like to get to the bottom of it if I can...

Thank you for the speedy reply.
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Problem with Q: field
« Reply #4 on: April 05, 2019, 03:45:19 PM »

...Looks like some silly programmer decided a single byte data type was enough to hold the Q value...
That's the immediate 'conclusion' innit? Strewth, I hope not - I thought we stopped doing that sort of
stuff about 40 years ago when memory started to come down in price...
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.

Tone Dumb Greg

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 4955
    • Dartmoor Border Morris
Re: Problem with Q: field
« Reply #5 on: April 05, 2019, 05:41:12 PM »

...Looks like some silly programmer decided a single byte data type was enough to hold the Q value...
That's the immediate 'conclusion' innit? Strewth, I hope not - I thought we stopped doing that sort of
stuff about 40 years ago when memory started to come down in price...

As an ignoramus  ;D I would expect EasyABC to be a well tested piece of software that normally functions ok.
Have you tried upgrading to the latest version. |I| canm't see you saying you have?
Logged
Greg Smith
DG/GC Pokerwork, DG 2.4 Saltarelle, pre-war CF Hohner, Hohner 1040 Vienna style, old  BbEb Hohner that needs a lot of work.

ACCORDION, n. An instrument in harmony with the sentiments of an assassin. Ambrose Bierce

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: Problem with Q: field
« Reply #6 on: April 05, 2019, 07:15:56 PM »

I would expect EasyABC to be a well tested piece of software that normally functions ok.

You'd think that about Boeing's plane control software too, wouldn't you?  >:E]
Many a slip, etc....
(speaking as one who has released software with embarrassing bugs  :|bl )
Logged
Слава Україні !
Music recording and web hosting: www.treewind.co.uk
Mary Humphreys and Anahata: www.maryanahata.co.uk
Ceilidh band: www.barleycoteband.co.uk

Lester

  • MADman
  • Mods and volunteers
  • Hero Member
  • ***
  • Offline Offline
  • Posts: 9327
  • Hohners'R'me
    • Lester's Melodeon Emporium and Tune-a-Rama
Re: Problem with Q: field
« Reply #7 on: April 05, 2019, 07:18:21 PM »

(speaking as one who has released software with embarrassing bugs  :|bl )
Any one who says they have not has never written any proper software
Signed Ex Chief Engineer of a major Air Traffic Management company 

Mike Hirst

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1433
  • Black Dot B/C, Bastardo C#/D, Corona II GCF
Re: Problem with Q: field
« Reply #8 on: April 05, 2019, 08:13:03 PM »

I can see no error using Ubuntu Studio. abcm2ps, yaps and abc2abc all display the Q: field as expected. After conversion using abc2midi tempo is displayed with the correct value.
Logged
Semper idem, sed non eodem modo

Gena Crisman

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 1108
  • 🇬🇧
Re: Problem with Q: field
« Reply #9 on: April 05, 2019, 08:18:34 PM »

https://sourceforge.net/p/easyabc/tickets/12/

Conclusion: your EasyABC installation needs updating, or you can directly replace the abcm2ps binary it uses.
Logged

Roger Hare

  • Hero Member
  • *****
  • Offline Offline
  • Posts: 949
  • Urmston, Lancashire, U.K. éééé
Re: Problem with Q: field
« Reply #10 on: April 05, 2019, 08:43:10 PM »

...Have you tried upgrading to the latest version...

Aye, I've got 1.3.7.7 (and 1.3.7.6, for that matter). Maybe I should try re-installing....

But, wait a minute!

https://sourceforge.net/p/easyabc/tickets/12/
Conclusion: your EasyABC installation needs updating, or you can directly replace the abcm2ps binary it uses.

Although I have got 1.3.7.7 installed, I have cleverly (:() managed to leave the 1.3.6.6 binaries selected in the
file settings. Changing to the 1.3.7.7 binaries fixed it. What a klutz!!! I really am usually more careful than that!!!

Thank you very much indeed Gena!!!
« Last Edit: April 05, 2019, 09:00:06 PM by Roger Hare »
Logged
My ABC tune collections can be found here (GoogleDrive) & here (Dropbox).

For more about Manchester Morris, The Beech Band Folk Club or anything else,  please use the private messaging facility.
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