Skip to primary content

Making Music with Computers

Creative Programming in Python

Making Music with Computers

Main menu

  • Overview
  • Download
  • Examples
    • Ch. 1 – Introduction and History
    • Ch. 2 – Elements of Music and Code
    • Ch. 3 – Organization and Data
    • Ch. 4 – Transformation and Process
    • Ch. 5 – Iteration and Lists
    • Ch. 6 – Randomness and Choices
    • Ch. 7 – Sonification and Big Data
    • Ch. 8 – Interactive Musical Instruments
    • Ch. 9 – Making Connections
    • Ch. 10 – Music, Number, and Nature
    • Ch. 11 – Exploring Powerful Ideas
  • FAQ
  • Reference
    • Music Library ▸
      • MIDI Constants ▸
        • Pitch
        • Duration
        • Dynamic
        • Panning
        • Instrument
        • Drums and Percussion
        • Scale and Mode
      • Transcription ▸
        • Note
        • Phrase
        • Part
        • Score
      • Composition ▸
        • Mod
        • View
        • Read/Write
      • Performance ▸
        • Play
        • AudioSample
        • Envelope
        • MidiSequence
        • Metronome
      • Mapping Values
      • Microtonality
    • GUI Library ▸
      • Display
      • Graphics ▸
        • Line
        • Circle
        • Point
        • Oval
        • Rectangle
        • Polygon
        • Arc
        • Icon
        • Label
      • Regular Controls ▸
        • Button
        • Checkbox
        • Slider
        • DropDownList
        • TextArea
        • TextField
        • Menu
      • Music Controls ▸
        • Fader
        • Rotary
        • Push
        • Toggle
        • XYPad
      • Events ▸
        • Keyboard Events
        • Mouse Events
        • Display Events
      • Color
    • Image Library
    • Timer Library
    • MIDI Library ▸
      • MidiIn
      • MidiOut
    • OSC Library ▸
      • OscIn
      • OscOut

MIDI Constants

The music library defines many musical constants. These constants (words and abbreviations) can be used in place of numbers in your code. In many cases, each value is represented by several alternate constants (words). For example, the duration value 1.0 is equivalent to the constants QUARTER_NOTE and QN.

  • Pitch Constants
  • Duration Constants
  • Dynamic Constants
  • Panning Constants
  • MIDI Instrument Constants
  • MIDI Drum and Percussion Constants
  • Scale and Mode Constants

Reference

B. Manaris and A. Brown, Making Music with Computers: Creative Programming in Python, Chapman & Hall/CRC Textbooks in Computing, May 2014.

License

Creative Commons License Content licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where indicated otherwise.

Source Code

DOI
    • Making Music with Computers
    • Customize
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions