summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2011-03-20 15:59:29 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2011-03-20 15:59:29 -0500
commit1fe275ee28e8a37fdbbd6d6cf75f1b15b9674b4b (patch)
tree34ad4db517d3e9eb6f73eae850f620303ab9e05c
parent45b6f6d5cba8274c2e75d3cc7cd7a14f54a7b659 (diff)
downloademacs-1fe275ee28e8a37fdbbd6d6cf75f1b15b9674b4b.tar.gz
* calc/calc-menu.el (calc-units-menu): Add entries for logarithmic
units and musical notes.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-menu.el105
2 files changed, 110 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fe45788d888..b12445b466f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-20 Jay Belanger <jay.p.belanger@gmail.com>
+
+ * calc/calc-menu.el (calc-units-menu): Add entries for logarithmic
+ units and musical notes.
+
2011-03-20 Leo <sdl.web@gmail.com>
* ido.el (ido-read-internal): Use completing-read-default.
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index aaddf3e486e..d8099b0aadc 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -960,6 +960,111 @@
(require 'calc-units)
(call-interactively 'calc-view-units-table))
:keys "u V"]
+ (list "Logarithmic Units"
+ ["Convert (1:) to dB (power)"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-db))
+ :keys "l d"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to dB (power) with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t))
+ (call-interactively 'calc-db)))
+ :keys "O l d"
+ :active (>= (calc-stack-size) 2)]
+ ["Convert (1:) to Np (power)"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-np))
+ :keys "l n"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to Np (power) with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t))
+ (call-interactively 'calc-np)))
+ :keys "O l n"
+ :active (>= (calc-stack-size) 2)]
+ ["Convert (1:) to power quantity"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-lu-quant))
+ :keys "l q"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to power quantity with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t))
+ (call-interactively 'calc-lu-quant)))
+ :keys "O l q"
+ :active (>= (calc-stack-size) 2)]
+ "----"
+ ["Convert (1:) to dB (field)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-hyperbolic-flag t))
+ (call-interactively 'calc-db)))
+ :keys "H l d"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to dB (field) with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t)
+ (calc-hyperbolic-flag t))
+ (call-interactively 'calc-db)))
+ :keys "O H l d"
+ :active (>= (calc-stack-size) 2)]
+ ["Convert (1:) to Np (field)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-hyperbolic-flag t))
+ (call-interactively 'calc-np)))
+ :keys "H l n"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to Np (field) with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t)
+ (calc-hyperbolic-flag t))
+ (call-interactively 'calc-np)))
+ :keys "O H l d"
+ :active (>= (calc-stack-size) 2)]
+ ["Convert (1:) to field quantity"
+ (progn
+ (require 'calc-units)
+ (let ((calc-hyperbolic-flag t))
+ (call-interactively 'calc-lu-quant)))
+ :keys "H l q"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (2:) to field quantity with reference level (1:)"
+ (progn
+ (require 'calc-units)
+ (let ((calc-option-flag t)
+ (calc-hyperbolic-flag))
+ (call-interactively 'calc-lu-quant)))
+ :keys "O H l q"
+ :active (>= (calc-stack-size) 2)])
+ (list "Musical Notes"
+ ["Convert (1:) to scientific pitch notation"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-spn))
+ :keys "l s"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (1:) to midi number"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-midi))
+ :keys "l m"
+ :active (>= (calc-stack-size) 1)]
+ ["Convert (1:) to frequency"
+ (progn
+ (require 'calc-units)
+ (call-interactively 'calc-freq))
+ :keys "l f"
+ :active (>= (calc-stack-size) 1)])
"----"
["Help on Units"
(calc-info-goto-node "Units")])