Packages

  • package root
    Definition Classes
    root
  • package o1

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University.

    O1Library is a toolkit designed for the course Programming 1 (a.k.a. O1) at Aalto University. It contains an assortment of tools; most prominently, it provides a framework for simple graphical programming and utilities for playing sound.

    This is the front page of O1Library’s documentation. However, this is probably not the best place to start learning about O1Library as a student. That’s because the relevant content of this library is introduced bit by bit in the chapters of O1’s custom ebook alongside the associated programming concepts and assignments.

    You may still find this documentation useful as a reference. You can also find some optional content here that you may wish to try.

    This front page lists the content available in the top-level package called simply o1. These tools are available with the simple command import o1._ in your Scala programs. Some of them you’ll use a lot; some of them you won’t necessarily need at all.

    The tools listed here are actually implemented in a number of subpackages (o1.gui, o1.sound, etc.); what you see here are just “shortcut aliases” to those actual implementations. The aliases are here to make that convenient import command work and to provide you with this list of links to some of the more commonly used tools in O1Library. The subpackages also contain additional content not listed here.

    O1Library has been developed by Aleksi Lukkarinen and Juha Sorva. Several of the key components in o1.gui and o1.world are built upon Aleksi’s Scala Media Computation Library. Some parts of O1Library draw inspiration from the “teachpacks” of the Racket programming language.

    We are grateful to Riku Autio, Joonatan Honkamaa, Juhani Numminen, Leo Varis, Veera Kahva, and anonymous students for bug reports and fixes. We thank Otto Seppälä for helpful discussions.

    Definition Classes
    root
  • package sound

    Please see one of the two subpackages:

    Please see one of the two subpackages:

    • o1.sound.midi for MIDI sound described in terms of notes, instruments, and other directives
    • o1.sound.sampled for working with recorded sound samples.
    Definition Classes
    o1
  • package midi

    This is one of O1’s sound packages (the other being o1.sound.sampled).

    This is one of O1’s sound packages (the other being o1.sound.sampled). This package provides a simple interface to a part of the more generic MIDI API. In particular, it lets students play MIDI music by writing notes a String and passing them to a function. That function, play, has an alias in the top-level package o1, so it’s accessible to students simply via import o1._.

    Here is a summary of the notation used in the musical Strings that you pass to play and some other functions in this package:

    • "cdefgah" plays seven notes at the default tempo of 120. (N.B. the seventh note is h, not b.)
    • "CDEFGAH" plays them louder.
    • "CDEFGAH/240" plays them at a double tempo of 240.
    • "CD E" has a pause between the second and third note.
    • "CD-E---" has a longer second note and a longer still third note.
    • "C.D.E" produces a staccato-like effect on the first two notes (playing them shorter followed by a pause).
    • ">CDE<<<CDE" plays three notes in a higher octave then shifts three octaves down before playing them again.
    • "C7D3E" plays the c in Octave #7, the d in Octave #3, and the e in the default Octave #5.
    • "CbDBE#7F" has a c-flat, a d-flat, an e-sharp in Octave #7, and a natural f. b and B are equivalent.
    • "C♭D♭E♯7F♮" is a fancy-pants way of writing the same thing.
    • "CDE[13]CDE" plays three notes using the default Instrument #1, then again using Instrument #13.
    • "(CEG)(DF#A)(EG#H)---" plays three chords, the last of which is longer.
    • "CDE&<<[28]efg&[110] F" simultaneously plays the three parts separated by &s.
    • "P:CDE" uses the MIDI percussion channel: each "note" represents a different percussion instrument.
    • "C|D||||E" means the same as ̀"cde": the |s don't do anything, but you can use them to mark bars or whatever.

    For a numbered list of the instruments, see the General MIDI Sound Set; the Instrument object contains the same list as Scala constants.

    Definition Classes
    sound
  • object Instrument extends Serializable

    This object provides a selection of constants that correspond to the 128 main instruments of the standard MIDI list.

    This object provides a selection of constants that correspond to the 128 main instruments of the standard MIDI list. They are grouped in nested objects (Piano, Strings, etc.). The object PercussionChannel contains constants that correspond to the special sounds available on the MIDI percussion channel.

    Definition Classes
    midi
  • Bass
  • Brass
  • ChromaticPercussion
  • Ensemble
  • Ethnic
  • Guitar
  • Organ
  • Percussion
  • PercussionChannel
  • Piano
  • Pipe
  • Reed
  • SoundEffects
  • Strings
  • SynthEffects
  • SynthLead
  • SynthPad
o

o1.sound.midi.Instrument

PercussionChannel

object PercussionChannel

Constants that evaluate to the notes (Strings) that correspond to different special sounds on the MIDI standard’s percussion channel. For example, BassDrum is the note "C3" and HandClap the note "D#3". See the package overview for an explanation of the note syntax.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PercussionChannel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val AcousticBassDrum: String
  5. val AcousticSnare: String
  6. val BassDrum: String
  7. val Cabasa: String
  8. val ChineseCymbal: String
  9. val Claves: String
  10. val ClosedHiHat: String
  11. val Cowbell: String
  12. val CrashCymbal1: String
  13. val CrashCymbal2: String
  14. val ElectricSnare: String
  15. val HandClap: String
  16. val HiBongo: String
  17. val HiMidTom: String
  18. val HiWoodBlock: String
  19. val HighAgogo: String
  20. val HighFloorTom: String
  21. val HighTimbale: String
  22. val HighTom: String
  23. val LongGuiro: String
  24. val LongWhistle: String
  25. val LowAgogo: String
  26. val LowBongo: String
  27. val LowConga: String
  28. val LowFloorTom: String
  29. val LowMidTom: String
  30. val LowTimbale: String
  31. val LowTom: String
  32. val LowWoodBlock: String
  33. val Maracas: String
  34. val MuteCuica: String
  35. val MuteHiConga: String
  36. val MuteTriangle: String
  37. val OpenCuica: String
  38. val OpenHiConga: String
  39. val OpenHiHat: String
  40. val OpenTriangle: String
  41. val PedalHiHat: String
  42. val RideBell: String
  43. val RideCymbal1: String
  44. val RideCymbal2: String
  45. val ShortGuiro: String
  46. val ShortWhistle: String
  47. val SideStick: String
  48. val SplashCymbal: String
  49. val Tambourine: String
  50. val Vibraslap: String
  51. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  52. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  53. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  55. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  56. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  57. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  58. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  59. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  60. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  61. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  62. def toString: String
    Definition Classes
    AnyRef → Any
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped