Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tone Matrix Class Project. Primary Functions of Tone Matrix Play a tune comprised of multiple instruments which can be selected to play (or not) each.

Similar presentations


Presentation on theme: "Tone Matrix Class Project. Primary Functions of Tone Matrix Play a tune comprised of multiple instruments which can be selected to play (or not) each."— Presentation transcript:

1 Tone Matrix Class Project

2 Primary Functions of Tone Matrix Play a tune comprised of multiple instruments which can be selected to play (or not) each of 16 beats of a single measure (1/16 time) Maintain a user interface to allow the user to select/deselect each instruments pattern to play

3 Tone Matrix Layer Manager Layer Sequencer Sound Player UI

4 Relationships Layer Manager Layer Sequencer Sound Player UI The UI updates the LayerManager of any changes in the MatrixCells or active layer The UI controls the stop/start of the Sequencer The Sequencer controls the playing of the SoundPlayer and getting the information needed to run the SoundPlayer from the LayerManager The Sequencer provides the UI with information on which column to highlight as it plays. The LayerManager manages changes to the layer information. The LayerManager provides the UI with MatrixCell information upon activelayer change The LayerManager provides the Sequencer with Sounds on initialization and with which sounds to play on each beat. The Layer stores the sounds relative to the instrument(s) it represents, as well as the beat information.

5 User Interface(UI) User Interface 3 buttons (radio?) that represent the instrument layer selected for display onClick changes LayerSelectCell and updates LayerManager/MatrixCells to display selected layer 16x16 image array (MatrixCells) that represents the selected layer onClick changes MatrixCell and updates LayerManager Play/Stop Button that controls the sequencer Tempo Adjustment ? Indicator of which column is being played by the Sequencer

6 Layer Manager Layer Maintains an ArrayList of Layers, including an int var m_selectedLayer (UI selected) Provides UI with 16x16 array of MatrixCell state (bool true/false) for m_selectedLayer Provides Sequencer with 3x16 array (bool true/false) of notes to be played for a given column (1/16 th beat!) for ALL LAYERS Receves updates from UI for MatrixCell changes and for m_selectedLayer changes. Provides Sequencer with 3x16 array (int) of sound id’s Maintains a 16x16 bool array to represent [column = time 1/16 th ] and [row – play/don’t play] (sound array) Receves updates from LayerMgr for MatrixCell changes Provide Layer Manager a 16x16 array for UI to update MatixCells when m_selectedLayer changes. Provide Layer Manager a 1x16 array(int) of sound id’s for sequencer..must match the sound for each row of 16x16 sound array.

7 Tone Matrix Sequencer Responsible for playing the selected instruments in proper sequence Turns on and off via the UI Updates the UI to display which column is being played at a given time Collects the appropriate sounds to be played from the layer manager Initializes the Sound Player from sound files obtained from the Layer Manager

8 Sound Player Utilizes Soundpool object Soundpool – an android/java sound player that allows multiple sound files to be played at one time. Uses mp3 or ogg soundfiles for best playback All files loaded in the initialization, use play/stop function to control Sound Player Controlled by the Sequencer Initialized with sound files provided by the Sequencer->LayerManager Maintains a matrix of loaded sound files 3x16 [layer][row] used to turn on /off different sounds


Download ppt "Tone Matrix Class Project. Primary Functions of Tone Matrix Play a tune comprised of multiple instruments which can be selected to play (or not) each."

Similar presentations


Ads by Google