background preloader

MultimediaDev

Facebook Twitter

Bing ( a first program for Impromptu) This is about the simplest program you can write in Impromptu. It loads an instrument and plays a single note. ; make sure that everything is disconnected (au:clear-graph) ; setup simple au graph ; piano -> output (define piano (au:make-node "aumu" "dls " "appl")) (au:connect-node piano 0 *au:output-node* 0) (au:update-graph) ; play note on piano (play-note (now) piano (random 60 80) 80 (* 1.0 *second*)) The language is called Scheme, which is a member of the Lisp family of languages. Not being one to break from tradition I feel it my duty to also provide a Hello World example. . ; disconnected any running graphs ; hello world as a list of note pitches ; transposed down one octave (define melody (map (lambda (c) (- (char->integer c) 12)) (string->list "Hello World! "))) ; Define a recursive function to cycle through the pitches in melod y (define loop (lambda (time pitch-list) (cond ((null?

(else (play-note time piano (car pitch-list) 80 10000) (loop (+ time (* *second* 0.5)) (cdr pitch-list)))))) ; start. Screen Capture Utilities for Macintosh. ProQuest Information and Learning - 1932929002 - The Recording E. Using Director:Why Use Lists? (List 101) You're probably familiar with the concept of variables. A variable is a storage area that you define to hold a piece of data. For example, to define a variable called "soundFx" and to set its value to "snap", you would use the command: set soundFx = "snap" If you wanted to store the name of more than one sound effect, you could define a variable for each one: set soundFx1 = "snap" set soundFx2 = "crackle" set soundFx3 = "pop" However, soon the number of variables would become unmanageable. Set soundFx = ["snap", "crackle", "pop"] Using lists is a smart thing to do and makes your code concise and readable.

What Can You Do With Lists? Once you've defined a list, what can you do with it? Say you want to play a different sound effect each time the user clicks a button. PuppetSound 1, getAt(soundFx, 1) which gets translated into: puppetSound 1, "snap" Linear Lists There are two types of lists in Lingo. If the timer < getAt(gCueList, 1) then go the frame Property Lists A Plethora of List Commands. CyberFilmSchool. Director Dot Syntax. About a year and a half ago a few friends and I were sitting around discussing our favorite Lingo "dream additions" over a beer and I mentioned that I would love to see Lingo add dot syntax like Visual Basic (or the recent REALBasic for the Mac). It was agreed that this was a good thing but we also agreed that it would never happen.

Which only goes to show how beer can cloud your prognosticatory abilities. Director 7 came out and, at least for me, the biggest feature was the addition of dot syntax to Director. You may be forgiven if you don't really know what dot syntax is or how to use it in Director. Dot what? Dot syntax is a notational system that allows you to reference properties (and sub properties) of an object with those properties (and sub properties) being separated by a period, or "dot". <object>. Or to translate, it is a way of writing your code in a more logical manner than the more "conversational" Lingo syntax allows. Set thisVar to the locH of sprite 2 put sprite(2).ink.