[ubuntu-studio-users] The best things come in fours: BPM to ms calculation by command line

Ralf Mardorf ralf.mardorf at alice-dsl.net
Fri Feb 3 06:31:41 UTC 2017


Oops,

now the correct _final_ script is attached.

-- 
[root at archlinux rocketmouse]# diff /usr/local/bin/bpm2ms /mnt/moonstudio/usr/local/bin/bpm2ms
14c14
<     ms=$(calc "(60000/$bpm)*4*($bar)")
---
>     ms=$(calc "int((60000/$bpm)*4*($bar))")  
[root at archlinux rocketmouse]# cp -ai /usr/local/bin/bpm2ms /mnt/moonstudio/usr/local/bin/bpm2ms 
cp: overwrite '/mnt/moonstudio/usr/local/bin/bpm2ms'? y
[root at archlinux rocketmouse]# diff /usr/local/bin/bpm2ms /mnt/moonstudio/usr/local/bin/bpm2ms 
[root at archlinux rocketmouse]# ls -l /usr/local/bin/bpm2ms /mnt/moonstudio/usr/local/bin/bpm2ms 
-rwxr-xr-x 1 root root 500 Feb  3 07:24 /mnt/moonstudio/usr/local/bin/bpm2ms
-rwxr-xr-x 1 root root 500 Feb  3 07:24 /usr/local/bin/bpm2ms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bpm2ms
Type: application/octet-stream
Size: 500 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-studio-users/attachments/20170203/5dd60c20/attachment.obj>


More information about the ubuntu-studio-users mailing list