Changes

m
Line 2: Line 2:  
==Sectors==
 
==Sectors==
 
==Sectors==
 
==Sectors==
==Broadcasting==
+
<source>
{| {{Table|sort|class=left}}
+
Option Explicit
! Symbol !! Security Name !! Exchange !! ETF !! Chart
+
Option Base 0
|-
+
Private Const MAXPNAMELEN              As Integer = 32
! AMCX
+
Private Const MMSYSERR_BASE            As Integer = 0
| AMC Networks Inc. - Class A Common Stock
+
Private Const MMSYSERR_BADDEVICEID      As Integer = (MMSYSERR_BASE + 2)
| Q
+
Private Const MMSYSERR_INVALPARAM      As Integer = (MMSYSERR_BASE + 11)
| N
+
Private Const MMSYSERR_NODRIVER        As Integer = (MMSYSERR_BASE + 6)
| {{GraphChart|width=200|height=50|xAxisTitle=Days|yAxisTitle=Market Price|y1Title=High|y2Title=Low|legend=Legend|type=stackedrect
+
Private Const MMSYSERR_NOMEM            As Integer = (MMSYSERR_BASE + 7)
|x= 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,|y1= 32.5516, 29.63, 31.73, 32.34, 31.34, 30.54, 28.57, 28.105, 26.77, 28.645, 28.29, 27.54, 28, 28.06, 29.6, 25.87, 30.18, 29.2016, 25.3, 26.28, 27.28, 26.68, 25.65, 26.79, 27.11, 25.26,|y2= 28.37, 27.54, 27.84, 29.9, 29.09, 28.37, 27.09, 26.17, 25, 26.37, 26.325, 24.11, 24.72, 23.75, 25.7, 22.83, 24.31, 24.02, 21.026, 23.4, 24.44, 24.4, 23.74, 23, 24.13, 22.07,
+
Private Const MMSYSERR_INVALHANDLE      As Integer = (MMSYSERR_BASE + 5)
|colors=#000000,#ffffff}}
+
Private Const MIDIERR_BASE              As Integer = 64
|-
+
Private Const MIDIERR_STILLPLAYING      As Integer = (MIDIERR_BASE + 1)
! ATUS
+
Private Const MIDIERR_NOTREADY          As Integer = (MIDIERR_BASE + 3)
| Altice USA, Inc. Class A Common Stock
+
Private Const MIDIERR_BADOPENMODE      As Integer = (MIDIERR_BASE + 6)
| N
+
 
| N
+
Private Type MIDIOUTCAPS
|-
+
  wMid            As Integer
! BBGI
+
  wPid            As Integer
| Beasley Broadcast Group, Inc. - Class A Common Stock
+
  wTechnology      As Integer
| Q
+
  wVoices          As Integer
| N
+
  wNotes          As Integer
| {{GraphChart|width=200|height=50|xAxisTitle=Days|yAxisTitle=Market Price|y1Title=High|y2Title=Low|legend=Legend|type=stackedrect
+
  wChannelMask    As Integer
|x= 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,|y1= 3.4833, 3.27, 3.2, 3.2488, 3.31, 3.34, 3.64, 3.63, 3.2, 3.19, 3.1, 3, 2.59, 2.57, 2.69, 2.6, 2.33, 2.46, 1.61, 1.67, 1.93, 2.09, 1.99, 2.05, 1.9399, 1.87,|y2= 3.22, 3.1092, 3, 3.13, 3.1748, 3.17, 3.19, 3.21, 3.1, 3.0497, 3, 2.45, 2.5, 2.24, 2.5296, 2.05, 2.0381, 1.28, 1.3501, 1.4, 1.6, 1.8191, 1.6899, 1.85, 1.85, 1.6,
+
  vDriverVersion  As Long
|colors=#000000,#ffffff}}
+
  dwSupport        As Long
|-
+
  szPname          As String * MAXPNAMELEN
! BILI
+
End Type
| Bilibili Inc. - American Depositary Shares
+
| Q
+
Private Declare PtrSafe Function midiOutGetNumDevs Lib "winmm" () As Integer
| N
+
Private Declare PtrSafe Function midiOutGetDevCaps Lib "winmm.dll" Alias "midiOutGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As MIDIOUTCAPS, ByVal uSize As Long) As Long
| {{GraphChart|width=200|height=50|xAxisTitle=Days|yAxisTitle=Market Price|y1Title=High|y2Title=Low|legend=Legend|type=stackedrect
+
Private Declare PtrSafe Function midiOutClose Lib "winmm.dll" (ByVal hMidiOut As Long) As Long
|x= 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,|y1= 29.28, 27.29, 26.15, 27.25, 27.57, 27.57, 28.27, 27.87, 25.98, 26.6, 26.71, 24.25, 25.4, 23.16, 24.76, 23.9, 21.95, 21.9297, 20.56, 22.815, 23.98, 23.84, 22.8, 23.25, 24.75, 24.85,|y2= 27.07, 25.75, 24.56, 25.86, 25.85, 26.72, 27.07, 25.93, 23.7, 25.115, 25.16, 22.84, 22.23, 20, 21.295, 19.25, 20, 20, 19.45, 21.1301, 22.5, 22.66, 22.05, 22.15, 22.51, 23.11,
+
Private Declare PtrSafe Function midiOutOpen Lib "winmm.dll" (lphMidiOut As Long, ByVal uDeviceID As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
|colors=#000000,#ffffff}}
+
Private Declare PtrSafe Function midiOutShortMsg Lib "winmm.dll" (ByVal hMidiOut As Long, ByVal dwMsg As Long) As Long
|-
+
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
! CABO
+
| Cable One, Inc. Common Stock
+
Private mlngNumDevices    As Long
| N
+
Private mlngCurDevice      As Long
| N
+
Private mlngHmidi          As Long
|-
+
Private mlngRc            As Long
! CETV
+
Private mlngMidiMsg        As Long
| Central European Media Enterprises Ltd. - Class A Common Stock
+
Private mlngMiPrivatesg    As Long
| Q
+
Private mintChannel        As Integer
| N
+
Private mintVolume        As Integer
| {{GraphChart|width=200|height=50|xAxisTitle=Days|yAxisTitle=Market Price|y1Title=High|y2Title=Low|legend=Legend|type=stackedrect
+
Private mintNoteLength    As Integer
|x= 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,|y1= 4.5, 4.44, 4.431, 4.43, 4.43, 4.4, 4.34, 4.34, 4.24, 4.04, 3.98, 3.94, 4.02, 3.88, 2.42, 2.29, 2.38, 2.58, 2.8, 3.1, 3.22, 3.41, 3.32, 3.39, 3.24, 3.05,|y2= 4.34, 4.34, 4.39, 4.38, 4.35, 4.33, 4.3, 4.17, 3.89, 3.64, 3.82, 3.71, 3.75, 1.8, 1.805, 1.93, 2.05, 2.26, 2.49, 2.85, 2.91, 3.1, 3.14, 3.1, 2.98, 2.84,
+
Private mintMidiNote      As Integer
|colors=#000000,#ffffff}}
+
Private mintInstrument    As Integer
|-
+
Private mstrDeviceName    As String
|}
+
Private mblnIsDeviceOpen  As Boolean
 +
'
 +
Private Const INT_DEFAULT_CHANNEL      As Integer = 0
 +
Private Const INT_DEFAULT_VOLUME        As Integer = 127
 +
Private Const INT_DEFAULT_NOTE_LENGTH  As Integer = 1000
 +
Private Const INT_DEFAULT_CUR_DEVICE    As Integer = 0
 +
'
 +
 +
Private Sub Class_Initialize()
 +
    mintChannel = INT_DEFAULT_CHANNEL
 +
    mlngCurDevice = INT_DEFAULT_CUR_DEVICE
 +
    mintVolume = INT_DEFAULT_VOLUME
 +
    mintNoteLength = INT_DEFAULT_NOTE_LENGTH
 +
    mblnIsDeviceOpen = False
 +
    Call OpenDevice
 +
End Sub
 +
 +
Private Sub Class_Terminate()
 +
    Call CloseDevice
 +
End Sub
 +
 +
Private Sub OpenDevice()
 +
On Error GoTo ERR_HANDLER:
 +
    If Not mblnIsDeviceOpen Then
 +
        mlngRc = midiOutClose(mlngHmidi)
 +
        mlngRc = midiOutOpen(mlngHmidi, mlngCurDevice, 0, 0, 0)
 +
        If (mlngRc <> 0) Then
 +
            MsgBox "Couldn't open midi out, lngc = " & mlngRc
 +
            mblnIsDeviceOpen = False
 +
        End If
 +
        mblnIsDeviceOpen = True
 +
    End If
 +
    Exit Sub
 +
ERR_HANDLER:
 +
    Debug.Print "Open DLL Error:=" & Err.LastDllError
 +
    mblnIsDeviceOpen = False
 +
End Sub
 +
 +
Private Sub CloseDevice()
 +
    If mblnIsDeviceOpen Then
 +
        mlngRc = midiOutClose(mlngHmidi)
 +
        mblnIsDeviceOpen = False
 +
    End If
 +
End Sub
 +
 +
Private Sub StartNote()
 +
    mlngMidiMsg = &H90 + (mintMidiNote * &H100) + (mintVolume * &H10000) + mintChannel
 +
    midiOutShortMsg mlngHmidi, mlngMidiMsg
 +
End Sub
 +
 +
Private Sub StopNote()
 +
    mlngMidiMsg = &H80 + (mintMidiNote * &H100) + mintChannel
 +
    midiOutShortMsg mlngHmidi, mlngMidiMsg
 +
End Sub
 +
 +
Private Sub PauseNote()
 +
    Sleep mintNoteLength
 +
End Sub
 +
 +
'Private Function Playnote(ByVal note As csNote)
 +
'    mintNoteLength = note.NoteLength
 +
'    mintVolume = note.volume
 +
'    mintInstrument = note.Instrument
 +
'    mintMidiNote = note.NoteNumber
 +
'    Call StartNote
 +
'    Call PauseNote
 +
'End Function
 +
 
 +
Public Function note(n)
 +
        mintMidiNote = n: Call StartNote
 +
        mintMidiNote = n + Me.note_1: Call StartNote
 +
        mintMidiNote = n + Me.note_2: Call StartNote
 +
        mintMidiNote = n + Me.Note_3: Call StartNote
 +
   
 +
   
 +
    Call PauseNote
 +
End Function
 +
 +
Private Sub UpdateInstrument()
 +
    If mblnIsDeviceOpen = True Then
 +
        mlngMidiMsg = (mintInstrument * 256) + &HC0 + mintChannel + (0 * 256) * 256
 +
        midiOutShortMsg mlngHmidi, mlngMidiMsg
 +
    End If
 +
End Sub
 +
 +
Private Sub getNumberOfDevices()
 +
    mlngNumDevices = (midiOutGetNumDevs() - 1)
 +
End Sub
 +
 +
Private Sub CurrentDeviceName()
 +
    Dim caps    As MIDIOUTCAPS
 +
    midiOutGetDevCaps mlngCurDevice, caps, Len(caps)
 +
    mstrDeviceName = caps.szPname
 +
End Sub
 +
 +
Private Function GetMIDIDevices() As String()
 +
    Dim strRet() As String
 +
    Dim lngLoop As Long
 +
    Dim udtCap As MIDIOUTCAPS
 +
   
 +
    mlngNumDevices = (midiOutGetNumDevs() - 1)
 +
    ReDim strRet(0) As String
 +
    strRet(0) = " MIDI Mapper"
 +
   
 +
    For lngLoop = 0 To mlngNumDevices
 +
        mlngRc = midiOutGetDevCaps(lngLoop, udtCap, Len(udtCap))
 +
        ReDim Preserve strRet(lngLoop + 1) As String
 +
        strRet(lngLoop + 1) = udtCap.szPname
 +
    Next
 +
    GetMIDIDevices = strRet()
 +
End Function
 +
 
 +
Private Sub Form_Close()
 +
    CloseDevice
 +
End Sub
 +
 
 +
Private Sub Form_Load()
 +
    Class_Initialize
 +
End Sub
 +
</source>
    
=Test 1=
 
=Test 1=
4,000

edits