ArchitectureVersionThree

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 14. about 3 years by uniquesnowflake8
  2. 13. about 3 years by uniquesnowflake8
  3. 12. about 3 years by uniquesnowflake8
  4. 11. about 3 years by uniquesnowflake8
  5. 10. about 3 years by uniquesnowflake8
  6. 9. about 3 years by uniquesnowflake8
  7. 8. about 3 years by uniquesnowflake8
  8. 7. about 3 years by uniquesnowflake8
  9. 6. about 3 years by uniquesnowflake8
  10. 5. about 3 years by uniquesnowflake8
  11. 4. about 3 years by uniquesnowflake8
  12. 3. about 3 years by uniquesnowflake8
  13. 2. about 3 years by uniquesnowflake8
  14. 1. about 3 years by uniquesnowflake8
 

Major Components

GUI

  • Built with Qt, contains all of the interface widgets, which are listed in a separate table.
  • The GUI sends events to the controller as Qt signals, which are received by slot methods.
  • A slot method could trigger an interface update, or modify the application, or both.

Interface

  • None, the operating system supplies Events which are handled by GUI widgets.

References

  • Controller

Controller

  • The Controller is responsible for updating the application based on User actions.
  • Provides Qt callback functions for each Widget known as slots, which are triggered by signals.
  • If the signal denotes a change in the model, the controller will call the interface method of the appropriate class.

Interface

  • AddMusician() -- passes a musician to the Conductor, who adds it to the Ensemble.
  • RemoveMusician() -- passes a musician to the Conductor, who removes it from the Ensemble.
  • FilterMusicians(tags) -- references MusicianDirectory, and gets a list of Musicians with descriptions matching the given tags.
  • Play() -- Starts the CoreDriver, which causes audio to play.
  • Pause() -- Stops CoreDriver, which stops triggering audio playback.
  • UpdateSongInfo() -- Changes a value of SongInfo, such as the Key.

References

  • MusicianDirectory
  • Conductor
  • CoreDriver
  • SongInfo

CoreDriver

  • The CoreDriver is responsible for synchronizing the Conductor and the Parser.
  • It contains a timer which ticks on intervals which evenly divide a song measure into rhythmic units.
  • The Conductor and Parser listen for these ticks to increment the current position in the Score.
  • The CoreDriver implements the Play/Pause functionality: if it stops emitting ticks, the Conductor and Parser do not do anything.

Interface

  • Run() -- causes the internal Timer to start emitting ticks based on the song tempo and time signature.
  • Halt() -- stops the internal Timer.
  • Pulse() -- listenable method, called when the Timer ticks.

References

  • SongInfo
  • Score

Parser

  • Moves through the Score, and processes notes from the Score as FluidSynth signals.
  • Its position is updated on each CoreDriver Pulse.
  • If there is a note to play on a given pulse, send a signal to FluidSynth.
  • Controlled by CoreDriver Pulse().

Interface

  • OnPulse() -- Listens for a Pulse event, and plays any notes which fall within that pulse.

References

  • Score
  • CoreDriver

Conductor

  • Cues Musicians from the Ensemble to add their parts to the score.
  • Controlled by CoreDriver PulseEvent.
  • Adds and removes musicians from the ensemble.

Interface

  • OnPulse() -- Listens for a Pulse event, and cues musicians to compose for a specified duration.
  • AddMusician() -- adds a new Musician to the Ensemble.
  • RemoveMusician() -- removes a Musician from the Ensemble.

References

  • Score

SongInfo

  • Contains tempo, key signature, time signature which are currently valid.
  • The interface writes modifications to the song here, which are applied when a new measure is loaded by CoreDriver.

Interface

  • UpdateTempo() -- changes the beats per minute.
  • UpdateKeySignature() -- changes the key signature, and whether the key is major/minor.
  • UpdateTimeSignature() -- changes the time signature.

References

  • None

MusicianDirectory

  • Contains Musician class references and descriptions.
  • Used to filter Musicians based on tags (genre, instrument, category) to support GUI.

Interface

  • Filter(tags) -- given a set of tags, returns a list of musicians which contain all of those tags.

InstrumentDirectory

  • Contains family hierarchy and filterable list of instruments.

Interface

  • GetParent(instrument) -- given an instrument, returns the parent of that instrument in a familial sense.

    For example, a djembe's parent is a hand drum, a hand drum's parent is a drum, a drum's parent is percussion instrument, ...and so on.

Ensemble

  • A list of musicians. Contains no other data at this time.

Interface

  • Get()
  • Add()
  • Remove()

References

  • Musician

Musician

  • Has a list of properties such as 'Energy' or 'Bowed.'
  • Has an instrument which is a key in the InstrumentDirectory. This key is written into the score. Used also so the Parser can look up which SoundFont to use.

Interface

  • SetProperty(key, value) -- changes a Musician parameter such as Energy or Complexity.
  • Compose(duration) -- instructs the Musician to add its performance to the score. Duration specifies at least how far into the future the Musician should compose (ie one full beat)

References

  • Instrument
  • InstrumentDirectory

Instrument

  • Simply a key for lookup in InstrumentDirectory()

Interface

  • None

References

  • None

Score

  • Contains Staffs, which contain StaffMeasures. Staffs is rarely accessed by anything, just used to add or remove a Musician.
  • Contains StaffMeasures.

Interface

  • GetStaff(Musician) -- returns the staff belonging to a specific Musician.
  • GetScoreSlices() -- gets the head of the ScoreSlice linked list.

References

  • Staff
  • ScoreSlice

Staff

  • Contains Measures.
  • Not intended to be used by any components except for Score.

Interface

  • GetMeasures() -- returns the head of a linked list of Measure.

References

  • Measure

ScoreSlice

  • Represents a vertical slice of a piece of sheet music.
  • Stores a key signature and a time signature.
  • Contains Measures indexable by Musician.

Interface

  • GetMeasures() -- a list of measures which are played simultaneously.
  • Next() -- the next StaffMeasure, moving forward in time.
  • Previous() -- the previous StaffMeasure, moving backward in time.

References

  • Measure
  • Musician

Measure

  • Has next() and previous() methods to move forward or backward in Score.
  • Contains Notes, implemented as a doubly linked list.

Interface

  • Next() -- return the measure after this one in the Score.
  • Previous() -- return the measure before this one in the Score.
  • GetNotes() -- get the Notes which are in this measure.
  • AppendNote(Note) -- adds a Note to the end of this Measure's Notes.

References

  • Note

Note

  • A note represents a tone and its rhythmic description in the Score.

Interface

  • SetVelocity() -- how hard the note is struck.
  • SetDuration() -- the musical description of the Note's rhythmic value.
  • SetTone(tone, octave) -- describes the Note frequency.
  • SetSlur(slur, type) -- whether or not this note blends into the next note, and how to shift the pitch.
  • Previous() -- get the previous note(s)
  • Next() -- get the next note(s)

References

  • None