Jump to content

Another beep song UPDATED!


Paulie
 Share

Recommended Posts

If you know how to play the piano, this is an easy beep player that has functions based on the numbers of the keys

See lastest post For GUI V. 2!!!

heres old code:

CODE

#cs

§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§

Beep Songs

by Paulie

Parameters:

_*Key*($duration)

*Key* - # of keyboard key

Duration - How long to hold it

§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§

#ce

Global $list[100]

$list = StringSplit("4186.01|3951.07|"& _

"3729.31|3520.00|3322.44|"& _

"3135.96|2959.96|2793.83|"& _

"2637.02|2489.02|2349.32|"& _

"2217.46|2093.00|1975.53|"& _

"1864.66|1760.00|1661.22|"& _

"1567.98|1479.98|1396.91|"& _

"1318.51|1244.51|1174.66|"& _

"1108.73|1046.50|987.767|"& _

"932.328|880.000|830.609|"& _

"783.991|739.989|698.456|"& _

"659.255|622.254|587.330|"& _

"554.365|523.251|493.883|"& _

"466.164|440.000|415.305|"& _

"391.995|369.994|349.228|"& _

"329.628|311.127|293.665|"& _

"277.183|261.626|246.942|"& _

"233.082|220.000|207.652|"& _

"195.998|184.997|174.614|"& _

"164.814|155.563|146.832|"& _

"138.591|130.813|123.471|"& _

"116.541|110.000|103.826|"& _

"97.9989|92.4986|87.3071|"& _

"82.4069|77.7817|73.4162|"& _

"69.2957|65.4064|61.7354|"& _

"58.2705|55.0000|51.9130|"& _

"48.9995|46.2493|43.6536|"& _

"41.2035|38.8909|36.7081|"& _

"34.6479|32.7032|30.8677|"& _

"29.1353|27.5000|", "|")

;Notes Go Here

;Format - Number of key on the piano (1 lowest-88 highest), Duration to hold

;-------------------

Func _R($dura)

Sleep($dura)

EndFunc

Func _88($dura)

Beep($list[1], $dura)

EndFunc

Func _87($dura)

Beep($list[2],$dura)

EndFunc

Func _86($dura)

Beep($list[3],$dura)

EndFunc

Func _85($dura)

Beep($list[4],$dura)

EndFunc

Func _84($dura)

Beep($list[5],$dura)

EndFunc

Func _83($dura)

Beep($list[6],$dura)

EndFunc

Func _82($dura)

Beep($list[7],$dura)

EndFunc

Func _81($dura)

Beep($list[8],$dura)

EndFunc

Func _80($dura)

Beep($list[9],$dura)

EndFunc

Func _79($dura)

Beep($list[10],$dura)

EndFunc

Func _78($dura)

Beep($list[11],$dura)

EndFunc

Func _77($dura)

Beep($list[12],$dura)

EndFunc

Func _76($dura)

Beep($list[13],$dura)

EndFunc

Func _75($dura)

Beep($list[14],$dura)

EndFunc

Func _74($dura)

Beep($list[15],$dura)

EndFunc

Func _73($dura)

Beep($list[16],$dura)

EndFunc

Func _72($dura)

Beep($list[17],$dura)

EndFunc

Func _71($dura)

Beep($list[18],$dura)

EndFunc

Func _70($dura)

Beep($list[19],$dura)

EndFunc

Func _69($dura)

Beep($list[20],$dura)

EndFunc

Func _68($dura)

Beep($list[21],$dura)

EndFunc

Func _67($dura)

Beep($list[22],$dura)

EndFunc

Func _66($dura)

Beep($list[23],$dura)

EndFunc

Func _65($dura)

Beep($list[24],$dura)

EndFunc

Func _64($dura)

Beep($list[25],$dura)

EndFunc

Func _63($dura)

Beep($list[26],$dura)

EndFunc

Func _62($dura)

Beep($list[27],$dura)

EndFunc

Func _61($dura)

Beep($list[28],$dura)

EndFunc

Func _60($dura)

Beep($list[29],$dura)

EndFunc

Func _59($dura)

Beep($list[30],$dura)

EndFunc

Func _58($dura)

Beep($list[31],$dura)

EndFunc

Func _57($dura)

Beep($list[32],$dura)

EndFunc

Func _56($dura)

Beep($list[33],$dura)

EndFunc

Func _55($dura)

Beep($list[34],$dura)

EndFunc

Func _54($dura)

Beep($list[35],$dura)

EndFunc

Func _53($dura)

Beep($list[36],$dura)

EndFunc

Func _52($dura)

Beep($list[37],$dura)

EndFunc

Func _51($dura)

Beep($list[38],$dura)

EndFunc

Func _50($dura)

Beep($list[39],$dura)

EndFunc

Func _49($dura)

Beep($list[40],$dura)

EndFunc

Func _48($dura)

Beep($list[41],$dura)

EndFunc

Func _47($dura)

Beep($list[42],$dura)

EndFunc

Func _46($dura)

Beep($list[43],$dura)

EndFunc

Func _45($dura)

Beep($list[44],$dura)

EndFunc

Func _44($dura)

Beep($list[45],$dura)

EndFunc

Func _43($dura)

Beep($list[46],$dura)

EndFunc

Func _42($dura)

Beep($list[47],$dura)

EndFunc

Func _41($dura)

Beep($list[48],$dura)

EndFunc

Func _40($dura)

Beep($list[49],$dura)

EndFunc

Func _39($dura)

Beep($list[50],$dura)

EndFunc

Func _38($dura)

Beep($list[51],$dura)

EndFunc

Func _37($dura)

Beep($list[52],$dura)

EndFunc

Func _36($dura)

Beep($list[53],$dura)

EndFunc

Func _35($dura)

Beep($list[54],$dura)

EndFunc

Func _34($dura)

Beep($list[55],$dura)

EndFunc

Func _33($dura)

Beep($list[56],$dura)

EndFunc

Func _32($dura)

Beep($list[57],$dura)

EndFunc

Func _31($dura)

Beep($list[58],$dura)

EndFunc

Func _30($dura)

Beep($list[59],$dura)

EndFunc

Func _29($dura)

Beep($list[60],$dura)

EndFunc

Func _28($dura)

Beep($list[61],$dura)

EndFunc

Func _27($dura)

Beep($list[62],$dura)

EndFunc

Func _26($dura)

Beep($list[63],$dura)

EndFunc

Func _25($dura)

Beep($list[64],$dura)

EndFunc

Func _24($dura)

Beep($list[65],$dura)

EndFunc

Func _23($dura)

Beep($list[66],$dura)

EndFunc

Func _22($dura)

Beep($list[67],$dura)

EndFunc

Func _21($dura)

Beep($list[68],$dura)

EndFunc

Func _20($dura)

Beep($list[69],$dura)

EndFunc

Func _19($dura)

Beep($list[70],$dura)

EndFunc

Func _18($dura)

Beep($list[71],$dura)

EndFunc

Func _17($dura)

Beep($list[72],$dura)

EndFunc

Func _16($dura)

Beep($list[73],$dura)

EndFunc

Func _15($dura)

Beep($list[74],$dura)

EndFunc

Func _14($dura)

Beep($list[75],$dura)

EndFunc

Func _13($dura)

Beep($list[76],$dura)

EndFunc

Func _12($dura)

Beep($list[77],$dura)

EndFunc

Func _11($dura)

Beep($list[78],$dura)

EndFunc

Func _10($dura)

Beep($list[79],$dura)

EndFunc

Func _9($dura)

Beep($list[80],$dura)

EndFunc

Func _8($dura)

Beep($list[81],$dura)

EndFunc

Func _7($dura)

Beep($list[82],$dura)

EndFunc

Func _6($dura)

Beep($list[83],$dura)

EndFunc

Func _5($dura)

Beep($list[84],$dura)

EndFunc

Func _4($dura)

Beep($list[85],$dura)

EndFunc

Func _3($dura)

Beep($list[86],$dura)

EndFunc

Func _2($dura)

Beep($list[87],$dura)

EndFunc

Func _1($dura)

Beep($list[88],$dura)

EndFunc

Edited by Paulie
Link to comment
Share on other sites

No opinions :whistle::)

For real?!

:):lmao:

Paulie,

I don't think anyone knows what to do with the three scripts you posted. I know I sure don't. ;)

Maybe you can explain.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

@CodeMyster- that was pretty much the point :)

Paulie,

I don't think anyone knows what to do with the three scripts you posted. I know I sure don't. :whistle:

Maybe you can explain.

taurus905

Lol, probably should have... :">

Ok here it goes

If you were to look at the layout of a full Piano, and count the keys, you'd find 88 in all

You call each note like you would the beep function, except there is only one parameter (duration) for me this makes beep song writing easier.

So look at your nifty piano layout and find Middle C is key 40 to play Middle C for 2 seconds, you would do this

_40(2000)

say you wanted to write a song using the basic 5 keys (middle C and 4 white keys after it)

_40(200)
_42(200)
_44(200)
_45(200)
_47(200)

Note: the easiest formating is if you put the actual script in the include file, then you can make scripts with just the calls

So to use my sample

Put code into the include folder

include it in one of my sample scripts

the Beta Run

I know its a pointless script, but it beats my musical keyboard script for songs by like 1000000x

and you don't actually need to know the note names to do it

if you have any more questions i'll try to explain more if you ask

Edited by Paulie
Link to comment
Share on other sites

Paulie,

I don't think anyone knows what to do with the three scripts you posted. I know I sure don't. :whistle:

Maybe you can explain.

taurus905

haha ... not hard #include his beep songs function then play the song quite fun :) id like to think im his insperation for creating this he made some crazy beep for his mouse box game witch he added more after i put some in :)

but im prolly not

and i dont care about spell check...

Edited by (^_^)

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Link to comment
Share on other sites

)" data-cid="214823" data-date="Jul 30 2006, 10:40 PM">

haha ... not hard #include his beep songs function then play the song quite fun :whistle: id like to think im his insperation for creating this he made some crazy beep for his mouse box game witch he added more after i put some in :)

but im prolly not

and i dont care about spell check...

Lol, I was always into the beep function, and when you put the beeps in the game i'm like

Duh!, why didn't I think of that?

and i've always wanted to write beep songs and this script lets me do it easier than trying to get the note names and whatever

So i hope you like it, and I think i'm working on 'Fur Elise' Next, but i suck at that on the actual piano so its harder to do in code

Link to comment
Share on other sites

Lol, I was always into the beep function, and when you put the beeps in the game i'm like

Duh!, why didn't I think of that?

hahaha

anyways nice function quite fun

Edited by (^_^)

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Link to comment
Share on other sites

Paulie,

Thanks for the explaination. I didn't realize at first that you had to paste the sample into the middle of the code to get it to work.

This is something I would have been interested in a few years ago. Maybe I will become interested again. I have an HP-41CX that I wrote some songs for. I wanted to write "This Bud's for you." :whistle:

I generally like to be able to download a script and run it. If it does something I like, then I try to strip the parts that contain the funtionality I want.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

Paulie,

Thanks for the explaination. I didn't realize at first that you had to paste the sample into the middle of the code...

taurus905

Ya i probably should have been more clear the first time,

Nvm not a midi orented song huh

Beep songs are awesome :whistle::)

Edited by Paulie
Link to comment
Share on other sites

Paulie,

I never learned how to play the piano, but maybe it's not too late. How hard would it be to adapt your script to turn your keyboard into a piano?

I think that would be really cool. :whistle:

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

cool

is there any way to change the volume of the internal speaker?

where did u find out what notes are what frequencies?

why use Global $list[100] when there are only 89 elements?

where can i find names of all the notes and what number they go to?

:whistle::)

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Paulie,

I never learned how to play the piano, but maybe it's not too late. How hard would it be to adapt your script to turn your keyboard into a piano?

I think that would be really cool. :whistle:

taurus905

I could do that REALLY easy now

Just hotkeyset/_ispressed the functions in this script to keys you want

Problem is that there is only around 40-50 useable keys on a computer keyboard(with numpad), but 88 on a piano so laying it out is hard

Link to comment
Share on other sites

cool

is there any way to change the volume of the internal speaker?

where did u find out what notes are what frequencies?

why use Global $list[100] when there are only 89 elements?

where can i find names of all the notes and what number they go to?

:) :)

I used this wikki

http://en.wikipedia.org/wiki/Piano_key_frequencies

give all not names and frequencies

But i discovered an error in the script

the lowest 6 frequencies aren't played by the computer

so i guess we have to make do without the lowest half of the first octave

Edit:

I didn't double post :whistle:

100 is a nice round number

they have a Low- med- high but i don't know how to change it

Edited by Paulie
Link to comment
Share on other sites

I could do that REALLY easy now

Just hotkeyset/_ispressed the functions in this script to keys you want

Problem is that there is only around 40-50 useable keys on a computer keyboard(with numpad), but 88 on a piano so laying it out is hard

i found 100. assuming esc, F1-F12, PrtSc, Pause/break, backspace, tab, enter, both shift keys, the numpad, and that little key with a picture of a dropdown menu on it all count as useable keys...

edit: oops you double posted :whistle:

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

i found 100. assuming esc, F1-F12, PrtSc, Pause/break, backspace, tab, enter, both shift keys, the numpad, and that little key with a picture of a dropdown menu on it all count as useable keys...

edit: oops you double posted :whistle:

But you cant hotkeyset JUST the mod keys like shift and ctrl or whatever

so i got 26 letters

4 arrow keys

20 numbers with numpad and ones above letters

11 other keys like brakets or whatever

then the 6 keys like insert/delete/pgup

F# keys are too far from the rest of the keys to be functional as a piano plus like 5 are taken by Windows

But even if we count them

and even though prtscreen and whatever are so far in the corner that if they were needed in a song you'd never be able to find them i'll count them in

26

04

20

11

06

07

03

---

87

thats still not enough

you also gotta consider the fact that you need to quickly be able to find each key like on a piano to play them so having to go from Pause/Break to the "squigley thing ~" is really impractical

Edited by Paulie
Link to comment
Share on other sites

you're right of course.

oh well :whistle:

anyway, what about exporting in midi format? is that possible in AutoIt?

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

anyway, what about exporting in midi format? is that possible in AutoIt?

I'm sure it's possible, but to do it would probably involve figuring out how midi data is coded so it can be read by players

which is FAR beyond me(well far to much work for my lazy ass self :whistle: )

If anyone ever finds a way, I'd be happy to do whatever i can to help if needed

Or just wait patiently until someone comes out with it then use it for myself

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...