Difference between revisions of "PlaySound Command"

From GeoGebra Manual
Jump to: navigation, search
m (wiki formatting)
Line 4: Line 4:
 
;PlaySound[ <Note>, <Duration>, <Instrument> ]
 
;PlaySound[ <Note>, <Duration>, <Instrument> ]
 
:Plays a MIDI note.  
 
:Plays a MIDI note.  
:Note is an integer from 0 to 127 that represents a musical note given by the table below. When note = 60 a Middle C is played.  
+
:''Note'' is an integer from 0 to 127 that represents a musical note given by the table below. When note = 60 a Middle C is played.  
:Duration is the time to play the note in seconds.  
+
:''Duration'' is the time to play the note in seconds.  
:Instrument is an integer that represents the synthesized instrument used to play the note. See here for possible instruments http://www.midi.org/techspecs/gm1sound.php.   
+
:''Instrument'' is an integer that represents the synthesized instrument used to play the note. See [http://www.midi.org/techspecs/gm1sound.php techical specifications at midi.org] for possible instruments.   
 
:Most instruments are supported, but there are differences between computer platforms.
 
:Most instruments are supported, but there are differences between computer platforms.
:::{| style="color:black; border-color:silver;align=center" cellpadding="4" cellspacing="0" border="1"
+
::{| class="pretty"
|+ MIDI Notes
+
|+ '''MIDI Notes'''
|Octave
+
!Octave
|C
+
!C
|C#
+
!C#
|D
+
!D
|D#
+
!D#
|E
+
!E
|F
+
!F
|F#
+
!F#
|G
+
!G
|G#
+
!G#
|A
+
!A
|A#
+
!A#
|B
+
!B
 
|+
 
|+
|0
+
|'''0'''
 
|0
 
|0
 
|1
 
|1
Line 38: Line 38:
 
|11
 
|11
 
|+
 
|+
|1
+
|'''1'''
 
|12
 
|12
 
|13
 
|13
Line 52: Line 52:
 
|23
 
|23
 
|+
 
|+
|2
+
|'''2'''
 
|24
 
|24
 
|25
 
|25
Line 66: Line 66:
 
|35
 
|35
 
|+
 
|+
|3
+
|'''3'''
 
|36
 
|36
 
|37
 
|37
Line 80: Line 80:
 
|47
 
|47
 
|+
 
|+
|4
+
|'''4'''
 
|48
 
|48
 
|49
 
|49
Line 94: Line 94:
 
|59
 
|59
 
|+
 
|+
|5
+
|'''5'''
 
|60
 
|60
 
|61
 
|61
Line 108: Line 108:
 
|71
 
|71
 
|+
 
|+
|6
+
|'''6'''
 
|72
 
|72
 
|73
 
|73
Line 122: Line 122:
 
|83
 
|83
 
|+
 
|+
|7
+
|'''7'''
 
|84
 
|84
 
|85
 
|85
Line 136: Line 136:
 
|95
 
|95
 
|+
 
|+
|8
+
|'''8'''
 
|96
 
|96
 
|97
 
|97
Line 150: Line 150:
 
|107
 
|107
 
|+
 
|+
|9
+
|'''9'''
 
|108
 
|108
 
|109
 
|109
Line 164: Line 164:
 
|119
 
|119
 
|+
 
|+
|10
+
|'''10'''
 
|120
 
|120
 
|121
 
|121

Revision as of 10:57, 21 May 2011



PlaySound[ <Note>, <Duration>, <Instrument> ]
Plays a MIDI note.
Note is an integer from 0 to 127 that represents a musical note given by the table below. When note = 60 a Middle C is played.
Duration is the time to play the note in seconds.
Instrument is an integer that represents the synthesized instrument used to play the note. See techical specifications at midi.org for possible instruments.
Most instruments are supported, but there are differences between computer platforms.
MIDI Notes
Octave C C# D D# E F F# G G# A A# B
0 0 1 2 3 4 5 6 7 8 9 10 11
1 12 13 14 15 16 17 18 19 20 21 22 23
2 24 25 26 27 28 29 30 31 32 33 34 35
3 36 37 38 39 40 41 42 43 44 45 46 47
4 48 49 50 51 51 53 54 55 56 57 58 59
5 60 61 62 63 64 65 66 67 68 69 70 71
6 72 73 74 75 76 77 78 79 80 81 82 83
7 84 85 86 87 88 89 90 91 92 93 94 95
8 96 97 98 99 100 101 102 103 104 105 106 107
9 108 109 110 111 112 113 114 115 116 117 118 119
10 120 121 122 123 124 125 126 127


PlaySound[ <Note Sequence>, <Instrument> ]


PlaySound[ <File> ]


© 2024 International GeoGebra Institute