Page 385 -
P. 385

mixing multiple tracks


          The DJ wants to play more than one track


           The World Music Mixing Expo is only a few weeks away. Your DJ friend is
           thrilled with the work you’ve done, but now he has a few extra requirements.
           Just playing one track isn’t enough. To be useful, the program needs to be able   I can fade a track
           to mix several tracks together at the same time. Each track needs its own   in and out, but that‛s
           graphical interface elements (or widgets).                             not enough. I need to
                                                                                  be able to mix several
                                                                                  tracks together.






           How will you create the widgets for each track?

           To play and control a single track, you created two widgets on the GUI: a
           check button to start and stop the track and a scale to change the volume. Then
           you added event-handling code to hook those widgets up to the sound
           system.









              Track.
                                                                               Control the
         Turn on/off.                                                          volume.













           To play multiple tracks together, you just need more of  the same. Each track will
           need its own set of  widgets and its own event handlers to connect the widgets and
           the track together. Then, each set of widgets needs to be added to the same
           window in the GUI.

           Let’s generate the widgets and event handlers.


           350    Chapter 10
   380   381   382   383   384   385   386   387   388   389   390