macOS에서 음원 파일 노동요 모드로 재생하기

집중하기 어려울 때 후크송(?)이나 전파계(?) 음원을 빠른 템포로 반복 재생하면 좀 나아서 그런 음원 검색해서 듣곤 했다. 그런데 오늘 macOS의 afplay 명령을 보다가 좋은 옵션을 발견했다. man 페이지엔 별거 없던데 -h 플래그론 쓸모 있는 옵션이 꽤 나오더라.

> afplay -h

    Audio File Play
    Version: 2.0
    Copyright 2003-2013, Apple Inc. All Rights Reserved.
    Specify -h (-help) for command options

Usage:
afplay [option...] audio_file

Options: (may appear before or after arguments)
  {-v | --volume} VOLUME
    set the volume for playback of the file
  {-h | --help}
    print help
  { --leaks}
    run leaks analysis
  {-t | --time} TIME
    play for TIME seconds
  {-r | --rate} RATE
    play at playback rate
  {-q | --rQuality} QUALITY
    set the quality used for rate-scaled playback (default is 0 - low quality, 1 - high quality)
  {-d | --debug}
    debug print output

-r 을 1보다 큰 값을 주면 그만큼 빨리 재생하고, -q 1 을 주면 품질 손실이 심각하진 않더라. (참고 들어줄만?)

그래서 대략 이렇게 재생 중. (fish shell 기준 다른 shell이면 적당히 수정할 것)

while true; afplay -r 1.4 -q 1 ./path-to-some-music.m4a; end