Musical Phrase Example

Musical Phrase Example preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 394 times • Downloaded 48 times • Run 1 time
Download the 'Musical Phrase Example' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

extensions [ sound ]

globals [clock]

to beethoven
  set clock 0
  let i "ACOUSTIC GRAND PIANO"
  let v 50
  ;; da da da DUMMMM
  note i v 56 eighth
  note i v 56 eighth
  note i v 56 eighth
  note i v 53 half
  rest eighth
  ;; da da da DUMMMMMMMMMMM
  note i v 55 eighth
  note i v 55 eighth
  note i v 55 eighth
  note i v 52 whole
end 

;;; helpers

to note [instrument velocity pitch duration]
  sound:play-note-later clock instrument pitch velocity duration
  set clock clock + duration
end 

to rest [duration]
  set clock clock + duration
end 

to-report whole   report 240 / bpm end

to-report half    report 120 / bpm end

to-report quarter report  60 / bpm end

to-report eighth  report  30 / bpm end


; Public Domain:
; To the extent possible under law, Uri Wilensky has waived all
; copyright and related or neighboring rights to this model.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky almost 12 years ago Updated version tag Download this version
Uri Wilensky over 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago Musical Phrase Example Download this version
Uri Wilensky over 14 years ago Musical Phrase Example Download this version

Attached files

File Type Description Last updated
Musical Phrase Example.png preview Preview for 'Musical Phrase Example' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.