Interfaces, audible tones, and forced updates
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Interfaces, audible tones, and forced updates
Three quick requests, the first one should be very easy, the second would depend on what interface to the midi architecture is available, and the third I don't even know is possible.
First, could you incorporate either a drop down that checks
netsh wlan show interfaces
and pull the "name" field out of the displayed information, or just a text box that if its length is greater than zero, the new netsh string would be
netsh wlan show networks interface="<whatever the user enters>" mode=Bssid
that way we can choose which interface Vistumbler pulls data from.
Second, and this one really only applies if the third can be accomplished, in Netstumbler, theres an audible tone generated by a midi instrument chosen by the user, the pitch corresponding to the signal strength. Now like I said, this one would only be really useful if the third request can be fulfilled.
Third, the netsh wireless data normally updates about once a minute, but if you hit the refresh button on the "Connect to a Network" window, the netsh data is updated. Because this occurs, I'm sure there's some way to force the data to be updated, but to be honest I have no idea what it is. I've used Spy++ on the window to attempt to trap the api message, but so much data is transferred back and forth I couldn't come up with anything worthwhile, and even then you'd have to hook into a window, which can lead to instability.
Sorry if these requests have been made before, I did a quick search and didn't find anything along these lines.
First, could you incorporate either a drop down that checks
netsh wlan show interfaces
and pull the "name" field out of the displayed information, or just a text box that if its length is greater than zero, the new netsh string would be
netsh wlan show networks interface="<whatever the user enters>" mode=Bssid
that way we can choose which interface Vistumbler pulls data from.
Second, and this one really only applies if the third can be accomplished, in Netstumbler, theres an audible tone generated by a midi instrument chosen by the user, the pitch corresponding to the signal strength. Now like I said, this one would only be really useful if the third request can be fulfilled.
Third, the netsh wireless data normally updates about once a minute, but if you hit the refresh button on the "Connect to a Network" window, the netsh data is updated. Because this occurs, I'm sure there's some way to force the data to be updated, but to be honest I have no idea what it is. I've used Spy++ on the window to attempt to trap the api message, but so much data is transferred back and forth I couldn't come up with anything worthwhile, and even then you'd have to hook into a window, which can lead to instability.
Sorry if these requests have been made before, I did a quick search and didn't find anything along these lines.
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
I was actually looking into the midi thing when I made the signal to speech part of vistumbler. The problem I was having was the MIDI sounds would not work on my laptop, but they worked on my desktop (which has a system speaker). I was looking at this Autoit UDF to do the midi (http://www.autoitscript.com/forum/index ... 72&hl=midi)
I did not realize I could specify the interface though the netsh command. I will try to make a wireless adapter selector now that I know that. I could also try to make a interface to try and guess the netsh search words, assuming the words are in the same position in every language.
I have also looked for another way of refreshing networks (http://forum.techidiots.net/forum/viewt ... ?f=10&t=16). So far i have not found another way, but I agree that there must be a way without using the window automation I am doing now. If you find it let me know and we will get it added.
I did not realize I could specify the interface though the netsh command. I will try to make a wireless adapter selector now that I know that. I could also try to make a interface to try and guess the netsh search words, assuming the words are in the same position in every language.
I have also looked for another way of refreshing networks (http://forum.techidiots.net/forum/viewt ... ?f=10&t=16). So far i have not found another way, but I agree that there must be a way without using the window automation I am doing now. If you find it let me know and we will get it added.
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Re: Interfaces, audible tones, and forced updates
I've never used AutoIT before, but I'll see what I can come up with for the midi thing, and I didn't even see the whole huge thread about how you were working on a direct method for refreshing, now I kinda feel like a douche. I'll keep looking into that as well to see if I can figure out a way to do it.
[edit!]
Actually, that UDF ran fine on 4 of my systems (2 laptops, a desktop, and a server that I haven't disabled the sound system yet for some reason...), once I could get the thing to compile. You may check the sound sliders on your laptop to see if there's any "midi synth" option or something along those lines that's either very low or muted. I don't even know if you could drive a system speaker with midi information without some sort of software midi emulation, but I'd wager a guess that every sound card, including onboard ones, would include a midi chip, if I remember off hand their biggest part is a handful of shift registers and flip-flops, so they won't be very big or expensive.
Anyhow, I'll see what I can do about the network refreshing now.
[edit!]
Actually, that UDF ran fine on 4 of my systems (2 laptops, a desktop, and a server that I haven't disabled the sound system yet for some reason...), once I could get the thing to compile. You may check the sound sliders on your laptop to see if there's any "midi synth" option or something along those lines that's either very low or muted. I don't even know if you could drive a system speaker with midi information without some sort of software midi emulation, but I'd wager a guess that every sound card, including onboard ones, would include a midi chip, if I remember off hand their biggest part is a handful of shift registers and flip-flops, so they won't be very big or expensive.
Anyhow, I'll see what I can do about the network refreshing now.
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
Don't worry about it, I always like to here suggestions and input. I want the forums to be as open as possible...unlike some other forums (cough...netstumbler)..lol
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Re: Interfaces, audible tones, and forced updates
http://msdn.microsoft.com/en-us/library ... S.85).aspx
This is some random Windows class, which I don't even know if you can use in AutoIT, but it's using wlanapi.h and wlanapi.dll.
But, if it's possible, you'd need that, and this
http://msdn.microsoft.com/en-us/library ... S.85).aspx
to register an interface to respond to events.
This is some random Windows class, which I don't even know if you can use in AutoIT, but it's using wlanapi.h and wlanapi.dll.
But, if it's possible, you'd need that, and this
http://msdn.microsoft.com/en-us/library ... S.85).aspx
to register an interface to respond to events.
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
I added in the code to select what interface was being used.
If "Default" is selected it uses the old netsh command without specifying the adapter. If an adapter is specified it uses the netsh command and specifies the adapter
I will look into the midi thing again to see if i have better luck.
If "Default" is selected it uses the old netsh command without specifying the adapter. If an adapter is specified it uses the netsh command and specifies the adapter
I will look into the midi thing again to see if i have better luck.
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Re: Interfaces, audible tones, and forced updates
Look at this guy, being awesome and implementing code already.
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
Are you using an english version of vista?
I made this to test guessing searchwords. it works in english, but I have no way to try in another language. The only problem I have with this is it will be hard to guess the "WEP", "NONE", and "OPEN" searchwords, so those would still need to be done manually
the midi udf seems to work for me now. Now to figure out how to implement it.
I made this to test guessing searchwords. it works in english, but I have no way to try in another language. The only problem I have with this is it will be hard to guess the "WEP", "NONE", and "OPEN" searchwords, so those would still need to be done manually
the midi udf seems to work for me now. Now to figure out how to implement it.
I swear...I was working... and using my work time for work related things...Look at this guy, being awesome and implementing code already.
- Attachments
-
- guess_searchwords.zip
- (247.76 KiB) Downloaded 362 times
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Re: Interfaces, audible tones, and forced updates
Yeah I'm using the US version of Vista Business 32. Off hand I don't know anyone who's using a non-English version of Vista...
The code looks good for searching though. I mean I don't have any real experience with AutoIT but all programming shares the same basic design.
The code looks good for searching though. I mean I don't have any real experience with AutoIT but all programming shares the same basic design.
lol well done sir, well done.I swear...I was working... and using my work time for work related things...
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
How would you expect the midi function to work? I've never used the one in netstumbler, but from what i heard is it makes a sound for more than one at once.
Should it make sounds for multiple APs or one the selected?
Should it make sounds for multiple APs or one the selected?
-
- Junior Member
- Posts: 7
- Joined: Tue Oct 14, 2008 1:58 pm
- Location: Alvin, TX
- Contact:
Re: Interfaces, audible tones, and forced updates
Sorry for the late reply.
The way it works in netstumbler, any active AP makes a tone when the list is updated. Which, can get a little discordant at times, but mostly it's pretty helpful.
I guess the way you could do it is, if an AP is selected, only make the tone for that, else, find all active APs, and make a tone for them. I dunno if you can do something like
From what I've read, AutoIT doesn't do OOP, so I don't even know if you can use structured member variables like that, but I'm sure you've got some sort of data structure in there to handle all of it.
The way it works in netstumbler, any active AP makes a tone when the list is updated. Which, can get a little discordant at times, but mostly it's pretty helpful.
I guess the way you could do it is, if an AP is selected, only make the tone for that, else, find all active APs, and make a tone for them. I dunno if you can do something like
Code: Select all
if (List1.SelectedValue)
{
if(!List1.SelectedValue.Dead)
playMidi(userTone, List1.SelectedValue.Power)
}
else
{
foreach(ApEntry accessPoint in List1)
{
if (!accessPoint.Dead)
playMidi(userTone, accessPoint.power)
}
}
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
Does the pitch change based on signal strength?
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
Code: Select all
Func _PlayMidi($Instument = 0, $Signal = 0, $Sleeptime = 500)
$open = _midiOutOpen ()
_MidiOutShortMsg ($open, 256 * $Instument + 192) ;Select Instrument
If $Signal > 0 And $Signal <= 9 Then
$PitchOn = $A0_NOTEON
ElseIf $Signal >= 10 And $Signal <= 14 Then
$PitchOn = $A0SHARP_NOTEON
ElseIf $Signal = 15 Then
$PitchOn = $B0_NOTEON
ElseIf $Signal = 16 Then
$PitchOn = $C1_NOTEON
ElseIf $Signal = 17 Then
$PitchOn = $C1SHARP_NOTEON
ElseIf $Signal = 18 Then
$PitchOn = $D1_NOTEON
ElseIf $Signal = 19 Then
$PitchOn = $D1SHARP_NOTEON
ElseIf $Signal = 20 Then
$PitchOn = $E1_NOTEON
ElseIf $Signal = 21 Then
$PitchOn = $F1_NOTEON
ElseIf $Signal = 22 Then
$PitchOn = $F1SHARP_NOTEON
ElseIf $Signal = 23 Then
$PitchOn = $G1_NOTEON
ElseIf $Signal = 24 Then
$PitchOn = $G1SHARP_NOTEON
ElseIf $Signal = 25 Then
$PitchOn = $A1_NOTEON
ElseIf $Signal = 26 Then
$PitchOn = $A1SHARP_NOTEON
ElseIf $Signal = 27 Then
$PitchOn = $B1_NOTEON
ElseIf $Signal = 28 Then
$PitchOn = $C2_NOTEON
ElseIf $Signal = 29 Then
$PitchOn = $C2SHARP_NOTEON
ElseIf $Signal = 30 Then
$PitchOn = $D2_NOTEON
ElseIf $Signal = 31 Then
$PitchOn = $D2SHARP_NOTEON
ElseIf $Signal = 32 Then
$PitchOn = $E2_NOTEON
ElseIf $Signal = 33 Then
$PitchOn = $F2_NOTEON
ElseIf $Signal = 34 Then
$PitchOn = $F2SHARP_NOTEON
ElseIf $Signal = 35 Then
$PitchOn = $G2_NOTEON
ElseIf $Signal = 36 Then
$PitchOn = $G2SHARP_NOTEON
ElseIf $Signal = 37 Then
$PitchOn = $A2_NOTEON
ElseIf $Signal = 38 Then
$PitchOn = $A2SHARP_NOTEON
ElseIf $Signal = 39 Then
$PitchOn = $B2_NOTEON
ElseIf $Signal = 40 Then
$PitchOn = $C3_NOTEON
ElseIf $Signal = 41 Then
$PitchOn = $C3SHARP_NOTEON
ElseIf $Signal = 42 Then
$PitchOn = $D3_NOTEON
ElseIf $Signal = 43 Then
$PitchOn = $D3SHARP_NOTEON
ElseIf $Signal = 44 Then
$PitchOn = $E3_NOTEON
ElseIf $Signal = 45 Then
$PitchOn = $F3_NOTEON
ElseIf $Signal = 46 Then
$PitchOn = $F3SHARP_NOTEON
ElseIf $Signal = 47 Then
$PitchOn = $G3_NOTEON
ElseIf $Signal = 48 Then
$PitchOn = $G3SHARP_NOTEON
ElseIf $Signal = 49 Then
$PitchOn = $A3_NOTEON
ElseIf $Signal = 50 Then
$PitchOn = $A3SHARP_NOTEON
ElseIf $Signal = 51 Then
$PitchOn = $B3_NOTEON
ElseIf $Signal = 52 Then
$PitchOn = $C4_NOTEON
ElseIf $Signal = 53 Then
$PitchOn = $C4SHARP_NOTEON
ElseIf $Signal = 54 Then
$PitchOn = $D4_NOTEON
ElseIf $Signal = 55 Then
$PitchOn = $D4SHARP_NOTEON
ElseIf $Signal = 56 Then
$PitchOn = $E4_NOTEON
ElseIf $Signal = 57 Then
$PitchOn = $F4_NOTEON
ElseIf $Signal = 58 Then
$PitchOn = $F4SHARP_NOTEON
ElseIf $Signal = 59 Then
$PitchOn = $G4_NOTEON
ElseIf $Signal = 60 Then
$PitchOn = $G4SHARP_NOTEON
ElseIf $Signal = 61 Then
$PitchOn = $A4_NOTEON
ElseIf $Signal = 62 Then
$PitchOn = $A4SHARP_NOTEON
ElseIf $Signal = 63 Then
$PitchOn = $B4_NOTEON
ElseIf $Signal = 64 Then
$PitchOn = $C5_NOTEON
ElseIf $Signal = 65 Then
$PitchOn = $C5SHARP_NOTEON
ElseIf $Signal = 66 Then
$PitchOn = $D5_NOTEON
ElseIf $Signal = 67 Then
$PitchOn = $D5SHARP_NOTEON
ElseIf $Signal = 68 Then
$PitchOn = $E5_NOTEON
ElseIf $Signal = 69 Then
$PitchOn = $F5_NOTEON
ElseIf $Signal = 70 Then
$PitchOn = $F5SHARP_NOTEON
ElseIf $Signal = 71 Then
$PitchOn = $G5_NOTEON
ElseIf $Signal = 72 Then
$PitchOn = $G5SHARP_NOTEON
ElseIf $Signal = 73 Then
$PitchOn = $A5_NOTEON
ElseIf $Signal = 74 Then
$PitchOn = $A5SHARP_NOTEON
ElseIf $Signal = 75 Then
$PitchOn = $B5_NOTEON
ElseIf $Signal = 76 Then
$PitchOn = $C6_NOTEON
ElseIf $Signal = 77 Then
$PitchOn = $C6SHARP_NOTEON
ElseIf $Signal = 78 Then
$PitchOn = $D6_NOTEON
ElseIf $Signal = 79 Then
$PitchOn = $D6SHARP_NOTEON
ElseIf $Signal = 80 Then
$PitchOn = $E6_NOTEON
ElseIf $Signal = 81 Then
$PitchOn = $F6_NOTEON
ElseIf $Signal = 82 Then
$PitchOn = $F6SHARP_NOTEON
ElseIf $Signal = 83 Then
$PitchOn = $G6_NOTEON
ElseIf $Signal = 84 Then
$PitchOn = $G6SHARP_NOTEON
ElseIf $Signal = 85 Then
$PitchOn = $A6_NOTEON
ElseIf $Signal = 86 Then
$PitchOn = $A6SHARP_NOTEON
ElseIf $Signal = 87 Then
$PitchOn = $B6_NOTEON
ElseIf $Signal = 88 Then
$PitchOn = $C7_NOTEON
ElseIf $Signal = 89 Then
$PitchOn = $C7SHARP_NOTEON
ElseIf $Signal = 90 Then
$PitchOn = $D7_NOTEON
ElseIf $Signal = 91 Then
$PitchOn = $D7SHARP_NOTEON
ElseIf $Signal = 92 Then
$PitchOn = $E7_NOTEON
ElseIf $Signal = 93 Then
$PitchOn = $F7_NOTEON
ElseIf $Signal = 94 Then
$PitchOn = $F7SHARP_NOTEON
ElseIf $Signal = 95 Then
$PitchOn = $G7_NOTEON
ElseIf $Signal = 96 Then
$PitchOn = $G7SHARP_NOTEON
ElseIf $Signal = 97 Then
$PitchOn = $A7_NOTEON
ElseIf $Signal = 98 Then
$PitchOn = $A7SHARP_NOTEON
ElseIf $Signal = 99 Then
$PitchOn = $B7_NOTEON
ElseIf $Signal = 100 Then
$PitchOn = $C8_NOTEON
EndIf
_midioutshortmsg ($open, $PitchOn);Start playing Instrument
Sleep($Sleeptime)
If $Signal > 0 And $Signal <= 9 Then
$PitchOff = $A0_NOTEOFF
ElseIf $Signal >= 10 And $Signal <= 14 Then
$PitchOff = $A0SHARP_NOTEOFF
ElseIf $Signal = 15 Then
$PitchOff = $B0_NOTEOFF
ElseIf $Signal = 16 Then
$PitchOff = $C1_NOTEOFF
ElseIf $Signal = 17 Then
$PitchOff = $C1SHARP_NOTEOFF
ElseIf $Signal = 18 Then
$PitchOff = $D1_NOTEOFF
ElseIf $Signal = 19 Then
$PitchOff = $D1SHARP_NOTEOFF
ElseIf $Signal = 20 Then
$PitchOff = $E1_NOTEOFF
ElseIf $Signal = 21 Then
$PitchOff = $F1_NOTEOFF
ElseIf $Signal = 22 Then
$PitchOff = $F1SHARP_NOTEOFF
ElseIf $Signal = 23 Then
$PitchOff = $G1_NOTEOFF
ElseIf $Signal = 24 Then
$PitchOff = $G1SHARP_NOTEOFF
ElseIf $Signal = 25 Then
$PitchOff = $A1_NOTEOFF
ElseIf $Signal = 26 Then
$PitchOff = $A1SHARP_NOTEOFF
ElseIf $Signal = 27 Then
$PitchOff = $B1_NOTEOFF
ElseIf $Signal = 28 Then
$PitchOff = $C2_NOTEOFF
ElseIf $Signal = 29 Then
$PitchOff = $C2SHARP_NOTEOFF
ElseIf $Signal = 30 Then
$PitchOff = $D2_NOTEOFF
ElseIf $Signal = 31 Then
$PitchOff = $D2SHARP_NOTEOFF
ElseIf $Signal = 32 Then
$PitchOff = $E2_NOTEOFF
ElseIf $Signal = 33 Then
$PitchOff = $F2_NOTEOFF
ElseIf $Signal = 34 Then
$PitchOff = $F2SHARP_NOTEOFF
ElseIf $Signal = 35 Then
$PitchOff = $G2_NOTEOFF
ElseIf $Signal = 36 Then
$PitchOff = $G2SHARP_NOTEOFF
ElseIf $Signal = 37 Then
$PitchOff = $A2_NOTEOFF
ElseIf $Signal = 38 Then
$PitchOff = $A2SHARP_NOTEOFF
ElseIf $Signal = 39 Then
$PitchOff = $B2_NOTEOFF
ElseIf $Signal = 40 Then
$PitchOff = $C3_NOTEOFF
ElseIf $Signal = 41 Then
$PitchOff = $C3SHARP_NOTEOFF
ElseIf $Signal = 42 Then
$PitchOff = $D3_NOTEOFF
ElseIf $Signal = 43 Then
$PitchOff = $D3SHARP_NOTEOFF
ElseIf $Signal = 44 Then
$PitchOff = $E3_NOTEOFF
ElseIf $Signal = 45 Then
$PitchOff = $F3_NOTEOFF
ElseIf $Signal = 46 Then
$PitchOff = $F3SHARP_NOTEOFF
ElseIf $Signal = 47 Then
$PitchOff = $G3_NOTEOFF
ElseIf $Signal = 48 Then
$PitchOff = $G3SHARP_NOTEOFF
ElseIf $Signal = 49 Then
$PitchOff = $A3_NOTEOFF
ElseIf $Signal = 50 Then
$PitchOff = $A3SHARP_NOTEOFF
ElseIf $Signal = 51 Then
$PitchOff = $B3_NOTEOFF
ElseIf $Signal = 52 Then
$PitchOff = $C4_NOTEOFF
ElseIf $Signal = 53 Then
$PitchOff = $C4SHARP_NOTEOFF
ElseIf $Signal = 54 Then
$PitchOff = $D4_NOTEOFF
ElseIf $Signal = 55 Then
$PitchOff = $D4SHARP_NOTEOFF
ElseIf $Signal = 56 Then
$PitchOff = $E4_NOTEOFF
ElseIf $Signal = 57 Then
$PitchOff = $F4_NOTEOFF
ElseIf $Signal = 58 Then
$PitchOff = $F4SHARP_NOTEOFF
ElseIf $Signal = 59 Then
$PitchOff = $G4_NOTEOFF
ElseIf $Signal = 60 Then
$PitchOff = $G4SHARP_NOTEOFF
ElseIf $Signal = 61 Then
$PitchOff = $A4_NOTEOFF
ElseIf $Signal = 62 Then
$PitchOff = $A4SHARP_NOTEOFF
ElseIf $Signal = 63 Then
$PitchOff = $B4_NOTEOFF
ElseIf $Signal = 64 Then
$PitchOff = $C5_NOTEOFF
ElseIf $Signal = 65 Then
$PitchOff = $C5SHARP_NOTEOFF
ElseIf $Signal = 66 Then
$PitchOff = $D5_NOTEOFF
ElseIf $Signal = 67 Then
$PitchOff = $D5SHARP_NOTEOFF
ElseIf $Signal = 68 Then
$PitchOff = $E5_NOTEOFF
ElseIf $Signal = 69 Then
$PitchOff = $F5_NOTEOFF
ElseIf $Signal = 70 Then
$PitchOff = $F5SHARP_NOTEOFF
ElseIf $Signal = 71 Then
$PitchOff = $G5_NOTEOFF
ElseIf $Signal = 72 Then
$PitchOff = $G5SHARP_NOTEOFF
ElseIf $Signal = 73 Then
$PitchOff = $A5_NOTEOFF
ElseIf $Signal = 74 Then
$PitchOff = $A5SHARP_NOTEOFF
ElseIf $Signal = 75 Then
$PitchOff = $B5_NOTEOFF
ElseIf $Signal = 76 Then
$PitchOff = $C6_NOTEOFF
ElseIf $Signal = 77 Then
$PitchOff = $C6SHARP_NOTEOFF
ElseIf $Signal = 78 Then
$PitchOff = $D6_NOTEOFF
ElseIf $Signal = 79 Then
$PitchOff = $D6SHARP_NOTEOFF
ElseIf $Signal = 80 Then
$PitchOff = $E6_NOTEOFF
ElseIf $Signal = 81 Then
$PitchOff = $F6_NOTEOFF
ElseIf $Signal = 82 Then
$PitchOff = $F6SHARP_NOTEOFF
ElseIf $Signal = 83 Then
$PitchOff = $G6_NOTEOFF
ElseIf $Signal = 84 Then
$PitchOff = $G6SHARP_NOTEOFF
ElseIf $Signal = 85 Then
$PitchOff = $A6_NOTEOFF
ElseIf $Signal = 86 Then
$PitchOff = $A6SHARP_NOTEOFF
ElseIf $Signal = 87 Then
$PitchOff = $B6_NOTEOFF
ElseIf $Signal = 88 Then
$PitchOff = $C7_NOTEOFF
ElseIf $Signal = 89 Then
$PitchOff = $C7SHARP_NOTEOFF
ElseIf $Signal = 90 Then
$PitchOff = $D7_NOTEOFF
ElseIf $Signal = 91 Then
$PitchOff = $D7SHARP_NOTEOFF
ElseIf $Signal = 92 Then
$PitchOff = $E7_NOTEOFF
ElseIf $Signal = 93 Then
$PitchOff = $F7_NOTEOFF
ElseIf $Signal = 94 Then
$PitchOff = $F7SHARP_NOTEOFF
ElseIf $Signal = 95 Then
$PitchOff = $G7_NOTEOFF
ElseIf $Signal = 96 Then
$PitchOff = $G7SHARP_NOTEOFF
ElseIf $Signal = 97 Then
$PitchOff = $A7_NOTEOFF
ElseIf $Signal = 98 Then
$PitchOff = $A7SHARP_NOTEOFF
ElseIf $Signal = 99 Then
$PitchOff = $B7_NOTEOFF
ElseIf $Signal = 100 Then
$PitchOff = $C8_NOTEOFF
EndIf
_midioutshortmsg ($open, $PitchOff)
_MidiOutClose ($open)
EndFunc
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
I added the MIDI code above as part of the speak signal options (Settings --> Speak Signal). This is basically a test, I still have some things I want to do (add a instrument drop down menu instead of having to put the instrument number)
I also noticed a bug in Speak signal i have to fix in which it keeps saying the last above 0 signal after it goes to 0%. I'll fix that next
anyway, heres what i got so far
http://downloads.sourceforge.net/vistum ... eta2.3.zip
Instruments Avalible
I also noticed a bug in Speak signal i have to fix in which it keeps saying the last above 0 signal after it goes to 0%. I'll fix that next
anyway, heres what i got so far
http://downloads.sourceforge.net/vistum ... eta2.3.zip
Instruments Avalible
Code: Select all
;Instruments
#cs
Piano
0 Acoustic Grand Piano
1 Bright Piano
2 Electric Grand Piano
3 Honky-tonk piano
4 Electric Piano 1
5 Electric Piano 2
6 Harpsichord
7 Clav
Chromatic Percussion
8 Celesta
9 Glockenspiel
10 Music Box
11 Vibraphone
12 Marimba
13 Xylophone
14 Tubular Bells
15 Dulcimer
Organ
16 Drawbar Organ
17 Percussive Organ
18 Rock Organ
19 Church Organ
20 Reed Organ
21 Accordian
22 Harmonica
23 Tango Accordian
Guitar
24 Nylon String Guitar
25 Steel String Guitar
26 Jazz Guitar
27 Clean Electric Guitar
28 Muted Electric Guitar
29 Overdrive Guitar
30 Distortion Guitar
31 Guitar Harmonics
Bass
32 Acoustic Bass
33 Fingered Bass
34 Picked Bass
35 Fretless Bass
36 Slap Bass 1
37 Slap Bass 2
38 Synth Bass 1
39 Synth Bass 2
Strings
40 Violin
41 Viola
42 Cello
43 Contrabass
44 Tremolo Strings
45 Pizzicato Strings
46 Orchestral Harp
47 Timpani
Ensemble
48 String Ensemble 1
49 String Ensemble 2
50 Synth Strings 1
51 Synth Strings 2
52 Choir Ahh
53 Choir Oohh
54 Synth Voice
55 Orchestral Hit
Brass
56 Trumpet
57 Trombone
58 Tuba
59 Muted Trumpet
60 French Horn
61 Brass Section
62 Synth Brass 1
63 Synth Brass 2
Reed
64 Soprano Sax
65 Alto Sax
66 Tenor Sax
67 Baritone Sax
68 Oboe
69 English Horn
70 Bassoon
71 Clarinet
Pipe
72 Piccolo
73 Flute
74 Recorder
75 Pan Flute
76 Blown Bottle
77 Shakuhachi
78 Whistle
79 Ocarina
Synth Lead
80 Square Wav
81 Sawtooth Wav
82 Caliope
83 Chiff
84 Charang
85 Voice
86 Fifth's
87 Bass&Lead
Synth Pad
88 New Age
89 Warm
90 Polysynth
91 Choir
92 Bowed
93 Metallic
94 Halo
95 Sweep
Synth Effects
96 FX Rain
97 FX Soundtrack
98 FX Crystal
99 FX Atmosphere
100 FX Brightness
101 FX Goblins
102 FX Echo Drops
103 FX Star Theme
Ethnic
104 Sitar
105 Banjo
106 Shamisen
107 Koto
108 Kalimba
109 Bagpipe
110 Fiddle
111 Shanai
Percussive
112 Tinkle Bell
113 Agogo
114 Steel Drums
115 Woodblock
116 Taiko Drum
117 Melodic Tom
118 Synth Drum
119 Reverse Cymbal
Sound Effects
120 Guitar Fret Noise
121 Breath Noise
122 Seashore
123 Bird Tweet
124 Telephone Ring
125 Helicopter
126 Applause
127 Gunshot
Drum Notes
27
28
29
30
31
32
33
34
35 Acoustic Bass Drum
36 Bass Drum 1
37 Side Stick
38 Acoustic Snare
39 Hand Clap
40 Electric Snare
41 Low Floor Tom
42 Closed Hi-Hat
43 High Floor Tom
44 Pedal Hi-Hat
45 Low Tom
46 Open Hi-Hat
47 Low-Mid Tom
48 Hi-Mid Tom
49 Crash Cymbal 1
50 High Tom
51 Ride Cymbal 1
52 Chinese Cymbal
53 Ride Bell
54 Tambourine
55 Splash Cymbal
56 Cowbell
57 Crash Symbol 2
58 Vibraslap
59 Ride Cymbal 2
60 Hi Bongo
61 Low Bongo
62 Mute Hi Conga
63 Open Hi Conga
64 Low Conga
65 High Timbale
66 Low Timbale
67 High Agogo
68 Low Agogo
69 Cabasa
70 Maracas
71 Short Whistle
72 Long Whistle
73 Short Guiro
74 Long Guiro
75 Claves
76 Hi Wood Block
77 Low Wood Block
78 Mute Cuica
79 Open Cuica
80 Mute Triangle
81 Open Triangle
82 Shaker
83
84
85
86
87
#ce
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
Updated Function
Code: Select all
Func _PlayMidi($Instrument = 0, $Signal = 0, $Sleeptime = 500)
$PitchOn = ''
$PitchOff = ''
;Pick Start/Stop Varialbles based on signal
If $Signal > 0 And $Signal <= 9 Then
$PitchOn = $A0_NOTEON
$PitchOff = $A0_NOTEOFF
ElseIf $Signal >= 10 And $Signal <= 14 Then
$PitchOn = $A0SHARP_NOTEON
$PitchOff = $A0SHARP_NOTEOFF
ElseIf $Signal = 15 Then
$PitchOn = $B0_NOTEON
$PitchOff = $B0_NOTEOFF
ElseIf $Signal = 16 Then
$PitchOn = $C1_NOTEON
$PitchOff = $C1_NOTEOFF
ElseIf $Signal = 17 Then
$PitchOn = $C1SHARP_NOTEON
$PitchOff = $C1SHARP_NOTEOFF
ElseIf $Signal = 18 Then
$PitchOn = $D1_NOTEON
$PitchOff = $D1_NOTEOFF
ElseIf $Signal = 19 Then
$PitchOn = $D1SHARP_NOTEON
$PitchOff = $D1SHARP_NOTEOFF
ElseIf $Signal = 20 Then
$PitchOn = $E1_NOTEON
$PitchOff = $E1_NOTEOFF
ElseIf $Signal = 21 Then
$PitchOn = $F1_NOTEON
$PitchOff = $F1_NOTEOFF
ElseIf $Signal = 22 Then
$PitchOn = $F1SHARP_NOTEON
$PitchOff = $F1SHARP_NOTEOFF
ElseIf $Signal = 23 Then
$PitchOn = $G1_NOTEON
$PitchOff = $G1_NOTEOFF
ElseIf $Signal = 24 Then
$PitchOn = $G1SHARP_NOTEON
$PitchOff = $G1SHARP_NOTEOFF
ElseIf $Signal = 25 Then
$PitchOn = $A1_NOTEON
$PitchOff = $A1_NOTEOFF
ElseIf $Signal = 26 Then
$PitchOn = $A1SHARP_NOTEON
$PitchOff = $A1SHARP_NOTEOFF
ElseIf $Signal = 27 Then
$PitchOn = $B1_NOTEON
$PitchOff = $B1_NOTEOFF
ElseIf $Signal = 28 Then
$PitchOn = $C2_NOTEON
$PitchOff = $C2_NOTEOFF
ElseIf $Signal = 29 Then
$PitchOn = $C2SHARP_NOTEON
$PitchOff = $C2SHARP_NOTEOFF
ElseIf $Signal = 30 Then
$PitchOn = $D2_NOTEON
$PitchOff = $D2_NOTEOFF
ElseIf $Signal = 31 Then
$PitchOn = $D2SHARP_NOTEON
$PitchOff = $D2SHARP_NOTEOFF
ElseIf $Signal = 32 Then
$PitchOn = $E2_NOTEON
$PitchOff = $E2_NOTEOFF
ElseIf $Signal = 33 Then
$PitchOn = $F2_NOTEON
$PitchOff = $F2_NOTEOFF
ElseIf $Signal = 34 Then
$PitchOn = $F2SHARP_NOTEON
$PitchOff = $F2SHARP_NOTEOFF
ElseIf $Signal = 35 Then
$PitchOn = $G2_NOTEON
$PitchOff = $G2_NOTEOFF
ElseIf $Signal = 36 Then
$PitchOn = $G2SHARP_NOTEON
$PitchOff = $G2SHARP_NOTEOFF
ElseIf $Signal = 37 Then
$PitchOn = $A2_NOTEON
$PitchOff = $A2_NOTEOFF
ElseIf $Signal = 38 Then
$PitchOn = $A2SHARP_NOTEON
$PitchOff = $A2SHARP_NOTEOFF
ElseIf $Signal = 39 Then
$PitchOn = $B2_NOTEON
$PitchOff = $B2_NOTEOFF
ElseIf $Signal = 40 Then
$PitchOn = $C3_NOTEON
$PitchOff = $C3_NOTEOFF
ElseIf $Signal = 41 Then
$PitchOn = $C3SHARP_NOTEON
$PitchOff = $C3SHARP_NOTEOFF
ElseIf $Signal = 42 Then
$PitchOn = $D3_NOTEON
$PitchOff = $D3_NOTEOFF
ElseIf $Signal = 43 Then
$PitchOn = $D3SHARP_NOTEON
$PitchOff = $D3SHARP_NOTEOFF
ElseIf $Signal = 44 Then
$PitchOn = $E3_NOTEON
$PitchOff = $E3_NOTEOFF
ElseIf $Signal = 45 Then
$PitchOn = $F3_NOTEON
$PitchOff = $F3_NOTEOFF
ElseIf $Signal = 46 Then
$PitchOn = $F3SHARP_NOTEON
$PitchOff = $F3SHARP_NOTEOFF
ElseIf $Signal = 47 Then
$PitchOn = $G3_NOTEON
$PitchOff = $G3_NOTEOFF
ElseIf $Signal = 48 Then
$PitchOn = $G3SHARP_NOTEON
$PitchOff = $G3SHARP_NOTEOFF
ElseIf $Signal = 49 Then
$PitchOn = $A3_NOTEON
$PitchOff = $A3_NOTEOFF
ElseIf $Signal = 50 Then
$PitchOn = $A3SHARP_NOTEON
$PitchOff = $A3SHARP_NOTEOFF
ElseIf $Signal = 51 Then
$PitchOn = $B3_NOTEON
$PitchOff = $B3_NOTEOFF
ElseIf $Signal = 52 Then
$PitchOn = $C4_NOTEON
$PitchOff = $C4_NOTEOFF
ElseIf $Signal = 53 Then
$PitchOn = $C4SHARP_NOTEON
$PitchOff = $C4SHARP_NOTEOFF
ElseIf $Signal = 54 Then
$PitchOn = $D4_NOTEON
$PitchOff = $D4_NOTEOFF
ElseIf $Signal = 55 Then
$PitchOn = $D4SHARP_NOTEON
$PitchOff = $D4SHARP_NOTEOFF
ElseIf $Signal = 56 Then
$PitchOn = $E4_NOTEON
$PitchOff = $E4_NOTEOFF
ElseIf $Signal = 57 Then
$PitchOn = $F4_NOTEON
$PitchOff = $F4_NOTEOFF
ElseIf $Signal = 58 Then
$PitchOn = $F4SHARP_NOTEON
$PitchOff = $F4SHARP_NOTEOFF
ElseIf $Signal = 59 Then
$PitchOn = $G4_NOTEON
$PitchOff = $G4_NOTEOFF
ElseIf $Signal = 60 Then
$PitchOn = $G4SHARP_NOTEON
$PitchOff = $G4SHARP_NOTEOFF
ElseIf $Signal = 61 Then
$PitchOn = $A4_NOTEON
$PitchOff = $A4_NOTEOFF
ElseIf $Signal = 62 Then
$PitchOn = $A4SHARP_NOTEON
$PitchOff = $A4SHARP_NOTEOFF
ElseIf $Signal = 63 Then
$PitchOn = $B4_NOTEON
$PitchOff = $B4_NOTEOFF
ElseIf $Signal = 64 Then
$PitchOn = $C5_NOTEON
$PitchOff = $C5_NOTEOFF
ElseIf $Signal = 65 Then
$PitchOn = $C5SHARP_NOTEON
$PitchOff = $C5SHARP_NOTEOFF
ElseIf $Signal = 66 Then
$PitchOn = $D5_NOTEON
$PitchOff = $D5_NOTEOFF
ElseIf $Signal = 67 Then
$PitchOn = $D5SHARP_NOTEON
$PitchOff = $D5SHARP_NOTEOFF
ElseIf $Signal = 68 Then
$PitchOn = $E5_NOTEON
$PitchOff = $E5_NOTEOFF
ElseIf $Signal = 69 Then
$PitchOn = $F5_NOTEON
$PitchOff = $F5_NOTEOFF
ElseIf $Signal = 70 Then
$PitchOn = $F5SHARP_NOTEON
$PitchOff = $F5SHARP_NOTEOFF
ElseIf $Signal = 71 Then
$PitchOn = $G5_NOTEON
$PitchOff = $G5_NOTEOFF
ElseIf $Signal = 72 Then
$PitchOn = $G5SHARP_NOTEON
$PitchOff = $G5SHARP_NOTEOFF
ElseIf $Signal = 73 Then
$PitchOn = $A5_NOTEON
$PitchOff = $A5_NOTEOFF
ElseIf $Signal = 74 Then
$PitchOn = $A5SHARP_NOTEON
$PitchOff = $A5SHARP_NOTEOFF
ElseIf $Signal = 75 Then
$PitchOn = $B5_NOTEON
$PitchOff = $B5_NOTEOFF
ElseIf $Signal = 76 Then
$PitchOn = $C6_NOTEON
$PitchOff = $C6_NOTEOFF
ElseIf $Signal = 77 Then
$PitchOn = $C6SHARP_NOTEON
$PitchOff = $C6SHARP_NOTEOFF
ElseIf $Signal = 78 Then
$PitchOn = $D6_NOTEON
$PitchOff = $D6_NOTEOFF
ElseIf $Signal = 79 Then
$PitchOn = $D6SHARP_NOTEON
$PitchOff = $D6SHARP_NOTEOFF
ElseIf $Signal = 80 Then
$PitchOn = $E6_NOTEON
$PitchOff = $E6_NOTEOFF
ElseIf $Signal = 81 Then
$PitchOn = $F6_NOTEON
$PitchOff = $F6_NOTEOFF
ElseIf $Signal = 82 Then
$PitchOn = $F6SHARP_NOTEON
$PitchOff = $F6SHARP_NOTEOFF
ElseIf $Signal = 83 Then
$PitchOn = $G6_NOTEON
$PitchOff = $G6_NOTEOFF
ElseIf $Signal = 84 Then
$PitchOn = $G6SHARP_NOTEON
$PitchOff = $G6SHARP_NOTEOFF
ElseIf $Signal = 85 Then
$PitchOn = $A6_NOTEON
$PitchOff = $A6_NOTEOFF
ElseIf $Signal = 86 Then
$PitchOn = $A6SHARP_NOTEON
$PitchOff = $A6SHARP_NOTEOFF
ElseIf $Signal = 87 Then
$PitchOn = $B6_NOTEON
$PitchOff = $B6_NOTEOFF
ElseIf $Signal = 88 Then
$PitchOn = $C7_NOTEON
$PitchOff = $C7_NOTEOFF
ElseIf $Signal = 89 Then
$PitchOn = $C7SHARP_NOTEON
$PitchOff = $C7SHARP_NOTEOFF
ElseIf $Signal = 90 Then
$PitchOn = $D7_NOTEON
$PitchOff = $D7_NOTEOFF
ElseIf $Signal = 91 Then
$PitchOn = $D7SHARP_NOTEON
$PitchOff = $D7SHARP_NOTEOFF
ElseIf $Signal = 92 Then
$PitchOn = $E7_NOTEON
$PitchOff = $E7_NOTEOFF
ElseIf $Signal = 93 Then
$PitchOn = $F7_NOTEON
$PitchOff = $F7_NOTEOFF
ElseIf $Signal = 94 Then
$PitchOn = $F7SHARP_NOTEON
$PitchOff = $F7SHARP_NOTEOFF
ElseIf $Signal = 95 Then
$PitchOn = $G7_NOTEON
$PitchOff = $G7_NOTEOFF
ElseIf $Signal = 96 Then
$PitchOn = $G7SHARP_NOTEON
$PitchOff = $G7SHARP_NOTEOFF
ElseIf $Signal = 97 Then
$PitchOn = $A7_NOTEON
$PitchOff = $A7_NOTEOFF
ElseIf $Signal = 98 Then
$PitchOn = $A7SHARP_NOTEON
$PitchOff = $A7SHARP_NOTEOFF
ElseIf $Signal = 99 Then
$PitchOn = $B7_NOTEON
$PitchOff = $B7_NOTEOFF
ElseIf $Signal = 100 Then
$PitchOn = $C8_NOTEON
$PitchOff = $C8_NOTEOFF
EndIf
If $PitchOn <> '' And $PitchOff <> '' Then
$open = _MidiOutOpen ()
_MidiOutShortMsg ($open, 256 * $Instrument + 192) ;Select Instrument
_MidiOutShortMsg ($open, $PitchOn);Start playing Instrument
Sleep($Sleeptime)
_MidiOutShortMsg ($open, $PitchOff);Stop playing Instrument
_MidiOutClose ($open)
EndIf
EndFunc
- ACalcutt
- Vistumbler / TechIdiots Admin
- Posts: 1302
- Joined: Sun Oct 21, 2007 6:50 pm
- Location: Rutland, MA
- Contact:
Re: Interfaces, audible tones, and forced updates
-Added option to play MIDI for all active APs (Options --> Play MIDI sounds for all active APs). Right now this uses the same instrument/playtime as set in Speak Signal.
-Fixed it saying the last signal strength when it goes to 0%
http://downloads.sourceforge.net/vistum ... eta2.4.zip
-Fixed it saying the last signal strength when it goes to 0%
http://downloads.sourceforge.net/vistum ... eta2.4.zip