Technical Note of
"Split/Merge AudioVisual" 2 |
index@kenjikojima.com |
|
|
||
|
on openStack insert the script of btn "makeSmfLib" into front end openStackYou do not need to know details of the library "makeSMF". But it plays a video clip file by QuickTime automatically, then you have to modify the script. Open the script of "makeSMF", and block some lines.
on playPmd notes, playTempo, instNum put specialFolderPath( "Temporary" ) & "/playPmdTemp.mid" into tempFilePath -- block the script. You do not need for the videoclip script. -- a midi file is made into specialFolderPath("Temporary"). /* if ( notes is "stop" ) or ( notes is "clear" ) then try play stop vc tempFilePath end try if notes is "clear" then delete file tempFilePath end if setPlayBtn false else try stop playing vc tempFilePath end try */ -- You need this line. makeSMF notes, playTempo, instNum, tempFilePath /* play vc tempFilePath if the result contains "no" then put the result &return& "Requestment QuickTime3" into aMsg answer aMsg playPmd "clear" exit playPmd end if setPlayBtn true checkPlayEnd end if */ end playPmd
on mouseUp put "140 11 217 190 84 123 238 209 186 136 105 66 246 63 219 208 156 212 213 240 118 165 235 236 249 " & \ "73 125 198 230 46 34 204 229 176 114 85 90 155 39 102 16 179 168 81 31 110 95 155 " into tNumbers put evenOddScore(tNumbers) into tScore -- "playPmd" is a command creating midi file in makeSMF -- the 1st parameter is the score, 2nd is the tempo, 3rd is instrumental number "1" is piano playPmd tScore, 120, 1 set the filename of player "music1" to specialFolderPath( "Temporary" ) & "/playPmdTemp.mid" end mouseUp function evenOddScore pNum repeat for each word tWord in pNum if tWord mod 2 is 1 then -- tWord is odd number, a quater note put tWord div 2 & "e" & space after tScore else -- tWord is even number, an eighth note put tWord div 2 & "s" & space after tScore end if end repeat return tScore end evenOddScore