I love the documentation page for this "A long time ago, all PC computers shared a common 8254 programmable interval timer chip for the generation of primitive sounds. The Beep function was written specifically to emit a beep on that piece of hardware. ... Eventually because of the lack of hardware to communicate with, support for Beep was dropped in Windows Vista and Windows XP 64-Bit Edition. In Windows 7, Beep was rewritten to pass the beep to the default sound device for the session."
I made an interactive keyboard in Go and when you said you researched the basics of music theory i started chuckling cause i had to do the exact same thing and write out the formula for tones or whatever while knowing nothing about it like you said
should make a piano start with an enum of octaves input melody as vector of strings map or cast strings to octave enum write the switch statement profit
as a newbie programmer (learning java, but willing to pick up C/C++) can someone give me some ideas about what i can do building upon this to create a simple polyphonic instrument? I would like to create let's say a set of 8 beep generators, build a key-set for multiple octaves, then make the generators play depending upon key-presses using some multi-threading (maybe?), add some basic low-pass filter functionality. any help at all is welcome
Given that you're learning java, maybe have a look at what javax.sound.sampled can do for you. It's already part of Java, so it won't introduce any new dependencies. You can manually generate signals there. For keypresses use KeyListener or AWT, and for playing multiple sounds simultaneously, have a look at ExecutorService. You should also be able to manually code a low pass filter to apply to your signal. Lowpass is as simple as a moving average over your samples.
I do agree that beep is a good function , However it has a downside of pausing when called until it stops , So combining sounds would be difficult with this function.
I think it's just intended for short warning signals. I remember my antivirus beeped (using the motherboard's beeper) when it discovered a virus, around 15 years ago.
Beep is only defined in the Windows API, If you want to play any sound (Be it a Beep or an ever more complex sound) then you gotta interact with the Kernel or some library like OpenAL.
A library is an API. Many people think "API" is limited to webservices, which is plain wrong, just in case you mean that. It's the Window OS library (windows.h). API is any interface you code against
API is basically a contract, you describe what your request will be, and what the expected response is. in this case, the contact is with the windows kernel as @HirschDaniel said, it is an interface that describes what you can do with it
I love the documentation page for this "A long time ago, all PC computers shared a common 8254 programmable interval timer chip for the generation of primitive sounds. The Beep function was written specifically to emit a beep on that piece of hardware.
...
Eventually because of the lack of hardware to communicate with, support for Beep was dropped in Windows Vista and Windows XP 64-Bit Edition.
In Windows 7, Beep was rewritten to pass the beep to the default sound device for the session."
Ninjago type ahh intro
I remember when computers had a built in speaker in the mainboard and I loved to generate all kinds of beep sounds by code, it was in dos back then
Thats pretty cool! Thanks for sharing! Didn't even know that, now i can include it in my c++ programs if i ever want to
I made an interactive keyboard in Go and when you said you researched the basics of music theory i started chuckling cause i had to do the exact same thing and write out the formula for tones or whatever while knowing nothing about it like you said
beep is a interesting function. i remember a dude wrote smallest exe ever possible with beep function.
I'm really happy to learn something new
simple yet impressive stuff
that is such a great tutorial you i would love to see more audio programming, im a mysician and i love this tyoe of yutorial
should make a piano
start with an enum of octaves
input melody as vector of strings
map or cast strings to octave enum
write the switch statement
profit
as a newbie programmer (learning java, but willing to pick up C/C++) can someone give me some ideas about what i can do building upon this to create a simple polyphonic instrument?
I would like to create let's say a set of 8 beep generators, build a key-set for multiple octaves, then make the generators play depending upon key-presses using some multi-threading (maybe?), add some basic low-pass filter functionality.
any help at all is welcome
Given that you're learning java, maybe have a look at what javax.sound.sampled can do for you. It's already part of Java, so it won't introduce any new dependencies. You can manually generate signals there. For keypresses use KeyListener or AWT, and for playing multiple sounds simultaneously, have a look at ExecutorService. You should also be able to manually code a low pass filter to apply to your signal. Lowpass is as simple as a moving average over your samples.
This is awesome, thanks for the video! :)
Good to learn soemthing new!
cool-- what color scheme do you use in your vim?
that's the default one vim comes as with.
Hey, what the font do you use in your Vim?
Hi, it's Cascadia Mono
I do agree that beep is a good function , However it has a downside of pausing when called until it stops , So combining sounds would be difficult with this function.
I think it's just intended for short warning signals. I remember my antivirus beeped (using the motherboard's beeper) when it discovered a virus, around 15 years ago.
@HirschDaniel yea its pretty useful for signaling.
Is this available for Linux as well???
the `Beep` function is only for windows
Beep is only defined in the Windows API, If you want to play any sound (Be it a Beep or an ever more complex sound) then you gotta interact with the Kernel or some library like OpenAL.
What compiler you use for C ?
Mingw GCC
And a Delphi version of this: th-cam.com/video/JC1Tg9GozdA/w-d-xo.html
Which headphone and keyboard you use?
what do you mean with windows api? it's a library no ?
A library is an API. Many people think "API" is limited to webservices, which is plain wrong, just in case you mean that. It's the Window OS library (windows.h). API is any interface you code against
API is basically a contract, you describe what your request will be, and what the expected response is.
in this case, the contact is with the windows kernel
as @HirschDaniel said, it is an interface that describes what you can do with it
that is coooool
Nice