Quartz Composeræ¥è¨#5
ä»ã¾ã§MIDIãã¼ãã«å¿ããåå¹ã表示ããã¨ãã¯ä¸ã¤ä¸ã¤ifæã®ä¸ã«æ¸ãã¦ãããããããJavaScriptã使ã£ã¦èªååããã¨ãããã¨ãä»æ¥ã¯ãã£ã¦ããã
åç»ã¨ãã¦ã¯å¾æ¥ã¨ç¹ã«å¤ããªãã®ã ãâ
http://vimeo.com/17601144
ãããå
¨ä½åã¨ãã¦ãããªæãã«ãªã£ã¦ããã
ã追è¨éå§ããã®JavaScriptã®é¨åã¯String Componentsã¨Structure Index Memberã®çµã¿åããã使ã£ãæ¹ããããã¨ã«å¾ã§æ°ãã¤ããã
ãã®å ´åSeparatorã«ã¯åè§ã¹ãã¼ã¹ã¯ä½¿ããªãã®ã§TextEditã§ç½®æãããã¨ã«ãªãã
ã追è¨çµäºã
MIDI Note Numberã¨é¡ããããã¯ãã®ä¸èº«ã¯ä»¥ä¸ã®ãããªé
·ãææ§ã§ãããé
·ãããé ãããããã¦Libraryã«è¿½å ãã¦ã¿ãã
ãã®ç¸¦ã«é·ãJavaScriptã®ä¸èº«ã¯ä»¥ä¸ã®ããã«ãªã£ã¦ãããæ¨æ¥#4.5ã§æ¸ãããMIDI Notes Receiverã®ãã©ãã©ãªåºåãä¸ã¤ã«æãããã®ãå°ãæ¹è¯ããå
¥åããªãæã«-1ãè¿ãããã«ãã¦ããã
function (__number noteNumber) main (__number velocity[48]) { var result = new Object(); for ( i=0; i < 48; i++){ if ( velocity[i] != 0 ){ result.noteNumber = i; return result; } } result.noteNumber = -1; return result; }
ãã®ãã¯ããããä¸å¤®ã®Cã®ä¸ã®ä¸ã®Cã0ã¨ãã¦åé³ä¸ãããã¨ã«1å¢ããæ°å¤ãåºåãããããããæ´ã«JavaScriptã«çªã£è¾¼ãã§ãããããã¯çµæçã«ã¯ä»¥ä¸ã®ãããªã·ã³ãã«ãªãã®ã ããJavaScriptã®Stringã®æ±ãæ¹ãå¦ã³ãªããä½ã£ãã®ã§ä½ãéç¨ã¨ãã¦ã¯ææ義ãªåå¼·ã«ãªã£ãã
function (__string currentSentence) main (__string lyrics, __number noteNumber) { var result = new Object(); sentences = lyrics.split(" "); result.currentSentence = sentences[noteNumber]; return result; }
Root Macro Patchã®å·¦ä¸ã®"String Splitter"ã¨ããååã®Input Splitterã«æè©ãã²ã¨ã¤ãªããã®ããã¹ãã§å
¨é¨å
¥ã£ã¦ããããã¢ããã«ç½®ãã¦ãã俺ã®æ²ã®æè©ãããæ´å½¢ãã¦ã³ãããããã®ã ãæ´å½¢ã¨è¨ã£ã¦ããä¸è¨ã®JavaScriptã«ããã¦Stringãåå²ããã®ã«åè§ã¹ãã¼ã¹ã使ã£ã¦ããã®ã§ãã¾ããããå¿
è¦ããªããåè§ã¹ãã¼ã¹ã«ãã£ã¦åå²ãããåæååãé
åSentencesã«æ ¼ç´ãããä»æ¼ãã¦ããéµç¤ã«ç¸å½ããé¨åããã®é½åº¦åºåãããã
å³ã®éããã¯ãã«ã¯Image With Stringã¨Interpolationã¨Billboardãå
¥ã£ã¦ããããã®ãã¯ãã®Timebaseããã¼ã«ã«ã«ãã¦ãã£ã¦ãMIDIãã¼ããªã³ã§ãã¯ããEnableããããã«ãã¦ããã®ã§ãæè©ãåºã度ã«ã¢ãã¡ã¼ã·ã§ã³ãæ¯åæåããéå§ããããã«ãªã£ã¦ããã
æ¬å½ã¯åå²ãããæååãã¨ã«è¡¨ç¤ºããå ´æããã©ã³ããè²ãåããå¤ããã¨ããã¾ã§ããããã£ãã®ã ããå¤ãæ´ããã®ã§ã¾ãä»åº¦ãã¨ã¯ãã次åã¯å³å½¢ãæããããã調ã¹ã¦ã¿ãããªãã