Post Reply 
(34C) Musical Notes (Original by J.M. Bowsher)
02-10-2019, 04:37 PM (This post was last modified: 02-10-2019 07:57 PM by Dieter.)
Post: #4
RE: (34C) Musical Notes (Original by J.M. Bowsher)
(02-10-2019 03:28 PM)Thomas Klemm Wrote:  Input smaller than 11.9495 is considered a musical notation.
A frequency higher than 16264 is considered invalid.

OK, but the 34C has two label keys A and B so that this kind of trick is not required.

(02-10-2019 03:28 PM)Thomas Klemm Wrote:  \(15.88609958 = \frac{440}{2^\frac{115}{24}}\)

I now have a program for the HP67 that is based on a slightly different constant and returns the output in the same way as the original program. Both conversions fit into not much more than 67 steps.

450     [A] => 9,439
4698,63 [A] => 2,800

7,6 [‌B] => 1568,0

Changing the input/output the way you did allows even more compact code, as you have shown. I think it even makes more sense to have the octave and then the tone plus cents. So instead of 9,439 I think that 4 and 9,39 are more intuitive.

Edit:
Here is an HP-34C version of your program. Since there is no two-line display the octave is displayed with "PAUSE". In either case the octave is returned/entered in Y and the note in X.

Code:
001 LBL A
002 FIX 0
003 4
004 4
005 0
006 /
007 LN
008 2
009 LN
010 /
011 4
012 .
013 7
014 5
015 +
016 INT
017 PAUSE
018 LastX
019 FRAC
020 1
021 2
022 *
023 FIX 2
024 RTN
025 LBL B
026 FIX 1
027 1
028 2
029 /
030 +
031 4
032 .
033 7
034 5
035 -
036 2
037 X<>Y
038 Y^X
039 4
040 4
041 0
042 *
043 RTN

450 [A] => "4"  9,39
6 [ENTER] 7 [‌B] => 1568,0


Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (34C) Musical Notes (Original by J.M. Bowsher) - Dieter - 02-10-2019 04:37 PM



User(s) browsing this thread: 1 Guest(s)