Thank you all for sharing your experience/knowledge.
I had already tested all the "examples" (using the F1 key), but I always got a separate window.
It's not that I'm too lazy to search myself! I'm blind in my right eye, which I can't see anything through, but... it's light-sensitive and starts to hurt after searching the screen for too long. (Which was the case yesterday, hence my question on the forum).
I tested the routines from Neil and Pete, and they both work perfect on my Linux PC
@Pete: Indeed, I use a separate map to store all my sound and messages for my beer brewing software.
So its a good Idee to use a separate path and name variable, thanks!
@ahenry:
The goal is to display spoken prompts in my brewing software.
A simple but typical example:
During the beer-boiling proces (approximately 1 hour), you can add hops at different times.
If you add hops at the beginning, you get the bitter flavors.
If you add hops 5 or 10 minutes before the end, for example, you get the aromatic compounds of certain hop varieties in your beer. (Example: Citra hops literally add "citrus"-like aromas to the beer.)
Back to QB64:
During the boiling process, I'll display a message on the screen at the set time, but simultaneously play the corresponding sound file.
For example: "Now add the Citra hops," and repeat this until the user presses the spacebar (or another key). I've already tested the two examples from Neil and Pete, and they work perfectly, thanks for that.
I'll definitely try out Ahenry's links today.
Also a possible tip for the Raspberry Pi (I use Model 4B with 4 or 8GB of RAM):
Because it was impossible to get QB64PE working, I installed the old QB64 version, and it works perfectly (so far),
both under Linux 64-bit (I always Install via the
RaspberryPI Imager because this gives good working environments).
I've already tested a few simple timer routines there, and they work identically on both versions (it's not always easy, though...).
So now I can program on my regular PC with a large screen and then transfer it to the Raspberry Pi.
Sorry for the long reply, but I wanted to clarify. Just so you don't think "I'm a lazy programmer."
Thanks!
Rudy M
Code: (Select All)
'Partly me Freebasic routine who is present in a big cookingroutine
'(Translated from Dutch to Englisch via Google Translate)
'Should hops be added?
'All hops are present in an array
'Variables are partly globas, partly declared in the cookingroutine
FOR Hop = 1 TO 8
IF AddHop(Hop) = true THEN
HopCookTimeSec = (HopCookTime(Hop) * 60) 'min. to sec'
IF RemainingSeconds <= HopCookTimeSec THEN
PlayMusic("AddHopsAndHerbs.wav")
print
Print " Add to brew kettle: "; HopName(Hop)
Print " Weight: "; HopWeight(Hop); "kg"
print " Note: weight is expressed in kg (0.005 kg = 5 grams!)" 'See remark (*)
print " Press any key to continue."
Key = getkey
AddHop(Hop) = false
cls
PrintCookData
end if
end if
next Hop
print
'(*)
'For weights and volumes I use alwas the format "yyy.xxx"
'where yyy is the kg or liter part and xxx the gram of milli-literpart
'so an amateurbrewer (pe 50 liter beer),
' but also a microbrewer (pe 600 liter beer) can use the listing