Thursday, May 28, 2015

MS-Word 에서 Emacs Key 지정

1. 기존에 있는  명령어에서 지정

Word Option > 왼쪽창 [사용자 지정]
            > 오른쪽 창 아래 [사용자 지정]
            > 창 [키보드 사용자 지정]
            > 좌측 범주 [모든 명령] 선택

  --> 오른쪽 창 --> (아래 선택) -> 새 바로가기 키 지정 -> 지정
C-b – CharLeft   현재키: 추가  Ctrl+B
C-f – CharRight  ->
C-e – EndOfLine  
C-p – LineUp
C-n – LineDown
C-a – StartOfLine
;; 붙여넣기는 키 중복으로 윈도우즈에서 보류한다. -> C-v – PageDown


2. 글자 하나 지우는 것과 라인 끝까지 지우는 건 매크로 지정으로 처리

Word Option > 좌측창 [기본설정] > 우측창 - Word에서 갖아 많이 사용하는 옵션
          > [리본 메뉴에 개발 도구 탭 표시] 체크 함
          > 화면 상단 우측에 [보기] 메뉴 우측에 [개발 도구] 메뉴가 표시 됨

       화면상단 [매크로 기록] 클릭 ->
          매크로 이름 지정 -> "DeleteCharacter"
          매크로 할당 위치 -> 키보드 클릭 -> (작업수행)  -> 화면상단 -> [매크로 기록 중지] 클릭

Here’s the procedure, in MS Word 2011 for Mac.
    Tools → Macros → Record Macro
    Give it a name with no spaces
    Click the keyboard button to assign a keystroke to it
    Select OK
    Type the set of key strokes
    Tools → Macros → Stop Recording

C-d – [DeleteCharacter] (as a macro)
C-k – [KillLine] (as a macro)

한글 & 중국어 입력 -- dot/init-multi.el

dot/init-multi.el

;;;; ----------------------------
;;;; key define
;; Input method and key binding configuration.
;; http://stackoverflow.com/questions/12032231/is-it-possible-to-alternate-two-input-methods-in-emacs
(setq alternative-input-methods
      '(
        ("korean-hangul"    . [?\C-\\])
        ("chinese-py-punct" . [?\C-|])

;       ("chinese-py-punct" . [?\M- ])
        ("korean-hangul"    . [?\M- ])    ;; m-spc   > hangul
        ("chinese-py-punct" . [?\S-\M- ]) ;; m-s-spc > chinese

;       ("russian-computer" . [?\C-\M-|])
;       ("german-postfix"   . [?\C-\\])
  ))

(setq default-input-method
      (caar alternative-input-methods))

(defun toggle-alternative-input-method (method &optional arg interactive)
  (if arg
      (toggle-input-method arg interactive)
    (let ((previous-input-method current-input-method))
      (when current-input-method
        (deactivate-input-method))
      (unless (and previous-input-method
                   (string= previous-input-method method))
        (activate-input-method method)))))

(defun reload-alternative-input-methods ()
  (dolist (config alternative-input-methods)
    (let ((method (car config)))
      (global-set-key (cdr config)
                      `(lambda (&optional arg interactive)
                         ,(concat "Behaves similar to `toggle-input-method', but uses \""
                                  method "\" instead of `default-input-method'")
                         (interactive "P\np")
                         (toggle-alternative-input-method ,method arg interactive))))))

(reload-alternative-input-methods)
;;;; ----------------------------


;;;; ----------------------------
;;;; set font
;(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
;    (progn
;        (create-fontset-from-fontset-spec    ; chinese fontset
;        "-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
;         chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
;         chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
;         chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
;         (setq default-frame-alist
;            (append
;             '((font . "fontset-chinese"))
;             default-frame-alist))
;    )
;)

(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default"    'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))

;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")

;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)

(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")

;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)

(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)

;;;; end of chinese
;;;; --------------------------------------------------------------------------------

Wednesday, May 20, 2015

Audacity - Tutorial - Recording Computer Playback on Windows

http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_windows.html

Tutorial - Recording Computer Playback on Windows

 

Choosing the recording device in Audacity

Choose "MME" or "Windows DirectSound" in the Audio Host box of Device Toolbar and the sound device's input for recording computer playback in the third (Recording Device) box of Device Toolbar. You can also choose this recording device at Recording Device in Devices Preferences.
DeviceToolbarWin7Basic.png
If the sound device provides an input for recording computer playback, it could be called "Stereo Mix", "Wave Out", "Sum", "What U Hear", "Loopback" or other names. The exact name and whether such an input is available depends entirely on the drivers of your sound device. Also Audacity will not see this input unless it is enabled in the Windows Control Panel.
You must play the audio you want to record using the same sound device that has the "Stereo Mix" or similar input. You cannot play audio through an HDMI output or through a headset, headphones or speakers that connect via USB or wirelessly then record that playback using the stereo mix input of the built-in sound device. Choose the Windows WASAPI host (next section) if you want to record playback of a USB, wireless or external sound device.
Warning icon Transport > Software Playthrough (on/off) should be off when recording computer playback, so if Software Playthrough has a check mark, click that item to turn it off. Otherwise you will hear and record echoes or distorted sound.

Windows WASAPI loopback recording

On Windows Vista, Windows 7 or Windows 8 only you can choose the Windows WASAPI  Audio Host and then the (loopback) input in the Recording Device box. Choose the loopback input for the computer playback device you will be listening to (for example, "Speakers (loopback)" ). The loopback input records computer playback even if your sound device lacks its own stereo mix or similar input:
DeviceToolbarStreamingAudio - WASAPI loopback.png
WASAPI loopback has an advantage over stereo mix or similar inputs provided by the soundcard that the capture is entirely digital (rather than converting to analog for playback, then back to digital when Audacity receives it). System sounds playing through the device selected for WASAPI loopback are still captured, however.

Playback and Recording sliders

The behavior of the Audacity playback and recording sliders may vary according to the sound device you are recording from.

....

http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_mac.html

Tutorial - Recording Computer Playback on Mac

 

Use Soundflower

Soundflower is a free open source system add-on for Mac computers that allows you to route what is playing on the computer digitally back to the input without using a cable. Set Soundflower as your system output device, then in Audacity, set Soundflower as your recording device.
  1. Download the latest version of Soundflower. It is possible that older versions of Soundflower may work better on older versions of OS X. Older versions of Soundflower may be obtained if necessary at https://code.google.com/p/soundflower/downloads/list.
  2. If the downloaded zip file does not extract automatically, double-click it to extract the DMG file it contains, or use your favorite extraction utility. To install the extracted DMG file, double-click it to mount it. In the DMG itself, double-click the PKG file.
    Warning icon If you see a warning on OS X 10.7.5 or later that Soundflower cannot be opened due to your Security Preferences, right-click or control-click over the PKG file and choose "Open", then choose "Open" again.
  3. After opening the PKG file, you may see a warning that the certificate for the installer has expired. Press "Show Certificate" to review the certificate then choose "Continue".
  4. Then run through the standard installer steps. Save your work in other applications, then press the button in the installer to restart your Mac.
  5. Choose Apple Menu > System Preferences and select the Sound preferences panel.
  6. In the Sound preferences panel, choose the Output tab, then select "Soundflower (2ch)" from the "Select a device for sound output:" list and turn the Output volume up.
    MacSoundPrefsSoundflower.png
  7. In the same panel, choose the Input tab, select "Soundflower (2ch)" and and turn the Input volume up.
    • At this point you will no longer be able to hear what is playing on the computer. The sound output of the computer is being sent to Soundflower.
  8. Click on the "Sound Effects" tab, and from the "Play sound effects through" dropdown menu choose "Line Out", "Headphones" or "Internal Speakers" (whichever is appropriate for your system).
    • This will route some system alert sounds (such as Mail alert sounds) to the Line Out or Internal Speakers and not to Soundflower. Thus these sounds will not be recorded by Audacity.Some Macintosh applications are better behaved than others when it comes to alert sounds. Tests on a recent iMac running 10.7.2 show that Mail and TextEdit alert sounds will not be recorded with the above setup, but iCal and Yahoo Messenger alert sounds will be recorded. To be safe you should disable the sound on any iCal alerts that may occur while you are recording, and quit any other program that may make an alert sound.
  9. Close the System Preferences window.
  10. Start Audacity.
  11. In Audacity's Device Toolbar, select Built-in Output  MenuDownArrow.png or similar as Playback Device and Soundflower (2ch)  MenuDownArrow.png as Recording Device.
    DeviceToolbarMac02.png
  12. Click on the Transport menu and make sure that "Software Playthrough" is checked.
  13. Go to the application that will be playing the sound you want to record. For example, start Safari and go to a website that plays sound clips. Start some audio playing.
  14. Click on the recording level meters (beside the microphone symbol) to begin monitoring:
    Recording Toolbar in use.png
    You should now be able to hear the sound playing on your computer.
  15. Now click Record to record anything playing on your computer.

To set things back to "normal" so you can hear audio playing on your computer without running Audacity

1) Click on Apple Menu > System Preferences then the Sound panel, and select the Output tab. Select "Line Out", "Internal Speakers" or "Headphones" in the output device list. See step 3 above for an illustration.
2) In Audacity, if you want to record from a different source (such as the Line Input or an external USB device), click on Audacity > Preferences then the Devices section and select the input you want to record from in the Recording section. See step 7 above for an illustration.

 

Tuesday, May 12, 2015

Emacs - Chinese setting

;;;; dot ----------------------------
;;;; 1. load with default (with hangul)
;;;; 2. load chinese setting -> chinese ==> f10
;;;; 3. change chinese -> korean ==> M-SPC = change font in english mode with chinese
;;;; 4. change korean -> chinese ==> f2 = my-inconsolata-hangul

(defun my-inconsolata-china ()
  (interactive)  "set font"
  (set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
  (load "d:/Pkg/emacs/lib/dot/init-china.el"))

(global-set-key [f10] 'my-inconsolata-china)
;(my-inconsolata-china)

(defun my-inconsolata-hangul ()
  (interactive)  "load set hangul"
; (set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
  (activate-input-method "korean-hangul"))

(global-unset-key (kbd "M-SPC"))
(global-set-key (kbd "M-SPC") 'my-change2-chinese)

(defun my-change2-chinese ()
  (interactive)  "set hangul input"
; (set-keyboard-coding-system 'chinese-iso-8bit)   ; input
; (set-language-environment "Chinese-GB18030")
  (load "d:/Pkg/emacs/lib/dot/init-china.el")
  (toggle-input-method)
)

;(global-unset-key [f2] 'my-inconsolata-hangul)
(global-set-key [f2] 'my-inconsolata-hangul)

;;;; init-china.el --------------------------------
;;;; --------------------------------------------------------------------------------
;;;; -- Chinese

;;;; -- chinese language
(set-keyboard-coding-system 'chinese-iso-8bit)   ; input
;(set-selection-coding-system 'chinese-iso-8bit)  ; copy/paste

;(setq w32-enable-synthesized-fonts t)

(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
    (progn
        (create-fontset-from-fontset-spec    ; chinese fontset
        "-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
         chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
         chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
         chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
         (setq default-frame-alist
            (append
             '((font . "fontset-chinese"))
             default-frame-alist))
    )
)

(set-language-environment "Chinese-GB18030")
;(setq file-name-coding-system 'gb18030)

;;set font
; Microsoft JhengHei / ???? /
;    (set-fontset-font "fontset-default"
;    'gb18030 '("Microsoft YaHei" . "unicode-bmp"))
;;?????????????? :pixelsize=18:foundry=monotype:weight=medium:slant=i:width=normal
;;????????M-x describe-char??????

;; (if (eq system-type 'windows-nt)
;;     (set-default-font "Courier New")
;; (set-default-font "Bitstream Vera Sans Mono"))
;(set-frame-font "YaHei Consolas Hybrid-12")

(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default"    'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))

;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")

;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)

(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")

;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)

(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)

;;;; end of chinese
;;;; --------------------------------------------------------------------------------

Pranten

 Pranten