Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Define Music:
- # Vocal or instrumental sounds (or both) combined in such a way as to produce beauty of form, harmony, and expression of emotion.
- class Music
- has_many :sounds
- has_many :notes , through: :sounds
- sequences_of_emotions = []
- def good user
- sequences_of_emotions.select { |e| e == user.definition_of(Music, :good) }
- end
- end
- class Sound
- has_many :notes
- end
- class Note
- has_many :sequences
- end
- class Vocal < Sound
- end
- class User
- DEFINITIONS = {
- music: {
- good: []
- }
- }
- def definition_of klass, type
- DEFINITIONS[klass.downcase][type]
- end
- end
- # a user can say:
- #
- # Play some good music
- #
- # 1. play = action the computer has to execute
- # 2. some = the range
- # 3. good = a selection based on the user for the object(music)
- # 4. music = the subject
- # the only hard to explain here is the "good" because the good based on the expectation we want.
- # what is good music? and what is good in general?
- # good: to be desired or approved of.
- # So we should define what is good for us based on the previus examples
- # How can u define good? what music is do so will do "good" to me?
- # IF: i accept these type of sequences and i will hear them it is good for me
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement