Hi everyone.
I have written a program that manages the timetable for my Model railway. I would like to add a button to play a diesel loco horn sound. Does anyone have any code to do that please? -- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout.
David
Totally Objects Doing Smalltalk since 1989 |
Hi Dave,
-- Make sure you have WindowsPlatformFramework loaded. In it you will find Platform Functions PlaySound and WaveOutSetVolume. Use code something like this:
to set the volume and play the sound. You may want to fork this code with a background priority to keep other things running. Good luck and have fun. Lou On Wednesday, June 13, 2018 at 7:25:26 AM UTC-4, Totally Objects wrote: Hi everyone. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Long Haired David
Thanks Lou. I will give it a try. No need to fork. Nothing can happen until the loco hits the horn and then departs!
-- Here is what it looks like. I just cycle through the timetable and it tells me which train to run next. Hardly rocket science but... I then run the turnouts via a Java package called JMRI which can control them through my DCC controller. I can also set up routes so that a set of turnouts are set as required. What is nice is that when I talk about it all the old buffers on the newsgroups complain about it being over their heads, and I am older than them! Big grin. David On Wednesday, June 13, 2018 at 12:25:26 PM UTC+1, Totally Objects wrote: Hi everyone. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout.
David
Totally Objects Doing Smalltalk since 1989 |
In reply to this post by Long Haired David
Lou. Being a bit stupid in my old age, where will I find it?
-- On Wednesday, June 13, 2018 at 12:25:26 PM UTC+1, Totally Objects wrote: Hi everyone. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout.
David
Totally Objects Doing Smalltalk since 1989 |
Hi Dave,
-- Don't feel bad, I sense that coming on too. It is in WindowsPlatformFramework which is in PlatformFramework which can be loaded with the ENVY/Image Base configuration map. You should also look at OSCall>playSound:hmod:fdwSound: and OSHwaveout>waveOutSetVolume: that make the platform calls. You may need to play with the volume get it where you like it. Lou On Thursday, June 14, 2018 at 5:23:26 AM UTC-4, Totally Objects wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Lou, I am on the 64 bit and I can't find any of this in the Envy/Image Base or even elsewhere. Can you give me a few more pointers? On Thu, Jun 14, 2018 at 3:05 PM, Louis LaBrunda <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Dave,
-- Maybe it isn't in the 64 bit version? Maybe someone at Instantiations can tell us for sure.. But in 32 bit v8.6.3 OSCall in PlatformInterface app, WindowsPlatformFunctions sub-app has #playSound:hmod:fdwSound: and OSHwaveout has #waveOutSetVolume:. Lou On Friday, June 29, 2018 at 3:40:06 PM UTC-4, Totally Objects wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hello, OSCall>>playSound:hmod:fdwSound: Just do a browse implementors with playSound* -- Seth On Friday, June 29, 2018 at 4:03:42 PM UTC-4, Louis LaBrunda wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Long Haired David
OSHwaveout new waveOutSetVolume: 1000. OSCall new playSound: '2tone.wav' asPSZ hmod: nil fdwSound: nil That works fine. Many thanks Lou (plus Matt Sims and Seth) for the help. In spite of me using VAST since V3, I don't often get down and dirty like that! David On Wednesday, June 13, 2018 at 12:25:26 PM UTC+1, Totally Objects wrote: Hi everyone. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout.
David
Totally Objects Doing Smalltalk since 1989 |
Hi Dave,
-- Now you need to post a video (with sound) of the choo-choo:) Lou On Thursday, July 5, 2018 at 10:37:10 AM UTC-4, Totally Objects wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |