transpose_new_261101.lastw

来自「LastWave」· LASTW 代码 · 共 20 行

LASTW
20
字号
setproc transpose {{&book bookIn} {&book bookOut} {&float factor} {&int octavemin}} {{"<bookIn> <bookOut> <factor> <octavemin>" "changes the pitch by multiplying it with <factor> only for atoms at a scale >= 2^<octavemin>"}} {    book write bookIn  tmp.book    book read  bookOut tmp.book    nmolecules=bookOut.size    for {set ncurr 0} {$ncurr < $nmolecules} {incr ncurr} {        mol=bookOut.mol[ncurr]        katoms=mol.dim        for {kcurr=0} {kcurr<katoms} {incr kcurr} {            atom=mol[kcurr]            if {atom.windowSize>=2^$octavemin} {               atom.phase=frac($factor*atom.phase)               atom.freq =$factor*atom.freq               atom.chirp=$factor*atom.chirp            }         }     }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?