English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Blitz Basic (https://eab.abime.net/forumdisplay.php?f=126)
-   -   Possible to trigger samples from the keyboard? (https://eab.abime.net/showthread.php?t=98205)

ElectroBlaster 24 July 2019 11:31

Possible to trigger samples from the keyboard?
 
I have hardly any clue what I am doing with all this but I really want to
load in a bunch of samples, nothing spectacular, just bog standard 8bit iff's.

Then press a key so they playback! thats it.

So I would like to have F1 to F10 and each key triggers its own sample, ontop of that a bog standard dpaint drawn screen telling the user what to do!

I was sifting through years of accumulated stuff and stumbled upon something a friend wanted to make and it just never happend. The idea was to use the Amiga in a radio show thing he had been asked to do back in 1995. I think we never did find a program that could do the basic thing we wanted. I drew the screen for it, we created the samples. But that was it.

If anything exists, even just a code example I should be able to knuckle down and learn how to make this program (I hope lol).

Daedalus 24 July 2019 12:10

What about something as simple as the FKey commodity in conjunction with a play command? It wouldn't need any programming at all...

If you really wanted to do it in Blitz, the system-friendly way to do it is to open a window, wait for keyboard events and then check the resulting event code to get the key that was pressed. You can load samples in advance using LoadSound and play them using Sound. If you're less worried about being system-friendly, just loop and use the Rawstatus command to check each key you're interested in, again using Sound to play a pre-loaded sample.

Nightshft 26 May 2020 21:14

If you still want this ElectroBlaster PM me.
When you deliver the picture and samples I could code it for you. :)


All times are GMT +2. The time now is 16:40.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06569 seconds with 11 queries