IFD:IOSDev/Projects/Pavlos: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 39: Line 39:
A user can choose between three different modulations (''sine'', ''triangle'', ''square'' waveforms) by clicking on one of the three differently colored buttons. This way, a '''red''' line stands for a ''sine'' waveform, a '''green''' line for a ''triangle'' and a '''blue''' line stands for a ''square'' wave. An '''undo''' button allows to step back and delete the last line(s). With the '''pinch-out''' gesture, all interface elements (buttons & slider) vanish, so that the whole canvas is available for drawing (pinch-in brings everything back) The user can '''play/stop''' the composition, control '''playback speed''' by moving the slider and also play in '''loop'''.
A user can choose between three different modulations (''sine'', ''triangle'', ''square'' waveforms) by clicking on one of the three differently colored buttons. This way, a '''red''' line stands for a ''sine'' waveform, a '''green''' line for a ''triangle'' and a '''blue''' line stands for a ''square'' wave. An '''undo''' button allows to step back and delete the last line(s). With the '''pinch-out''' gesture, all interface elements (buttons & slider) vanish, so that the whole canvas is available for drawing (pinch-in brings everything back) The user can '''play/stop''' the composition, control '''playback speed''' by moving the slider and also play in '''loop'''.
When playing, a needle indicates the position on the drawing/partiture.
When playing, a needle indicates the position on the drawing/partiture.
===Mechanics===
The app consists of 3 Classes:
The '''UpicAppDelegate''' is where evertything starts from (not much interesting happens here)
The '''UpicViewController''' controls the only View of the UPIC app. When a user draws a line, the ''UpicViewController'' creates an instance of '''SoundVector''' which is charged with storing the point2d-path the line consists of, and also transforming this point2d-path into sound. Two-dimensional points are stored in an [http://cocoawithlove.com/2008/12/ordereddictionary-subclassing-cocoa.html '''OrderedDictionary'''] as SoundVector instants themselves. Of course, all user interaction (painting, undoing, playing, controlling speed and loop) is handled by the '''UpicViewController'''.
==References==
==References==
<references/>
<references/>