cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Default beep sound preloaded in Flexsim

Default beep sound preloaded in Flexsim

it would be nice if there was a preloaded typical beep sound preloaded that we could run just by writing beep; in code.

It would be of a typical beep with typical length and volume and no options to specify. Just beep;

Useful to know when your run is done for example or when specific events occur.

9 Comments
jing_chen
Not applicable

I agree with Patrick!

When I use msg(), it is silent and just appeared which made weaker warning effect than I expected.

jing_chen
Not applicable

I found a series of commands about sound like: soundload(), soundstop(), soundplay, soundchange() ...

But I try to use them but failed, Can anyone give me a tip or an example about how to use these commands?

I suggest that we public here the code for a user command and the tree file to import the function into Flexsim. It is a good example to start writing source code, too.

rodrigo_lamas
Not applicable

I would like to know how to use these commands too. For example, start a song during model execution. Regards!

Ben_WilsonADSK
Community Manager

As @jing.chen has mentioned, FlexSim includes commands for playing sounds. However, upon testing we have found that FlexSim's sound commands are currently broken. This is a bug that has been added to the dev list.

If more people up-vote Patrick's idea above, the dev team will be more likely to prioritize the fix. Right now playing sounds is fairly low priority compared to the other tasks they have. But if the community let's us know this is an important feature, it can be moved up the list. Up-vote Patrick's main idea above, and make any relevant comments if necessary, to let your voice be heard.

This is the way all ideas work on Answers. If you have a good idea, post it on https://answers.flexsim.com/ as an Idea. The more up-votes it receives, the more likely it will be to get the attention of our dev team.

jing_chen
Not applicable

You can see the comment by Ben.

jing_chen
Not applicable

Hi, @Ben Wilson.

I had noticed that "Fixed bugs in the sound commands" in 2017.2.2 release note. Is that mean these command works?

I try to use them to play sound but failed. Could you please provide a demo model for it?

Ben_WilsonADSK
Community Manager

@jing.chen,

I just tested in 17.2.2 and the sound commands worked for me. Perhaps the examples below will be helpful.

My installation of Windows 10 includes the following default sound file:

C:\Windows\Media\Windows Notify System Generic.wav

Using this file, I can execute the following to play a sound directly from file:

soundplayfile(first(node("VIEW:/active")),"C:\\Windows\\Media\\Windows Notify System Generic.wav",1,1,1,0.5);

I can also load a sound into my model for use in many different places via a soundIndex:

soundload("C:\\Windows\\Media\\Windows Notify System Generic.wav");
int soundIndex = getsoundindex("C:\\Windows\\Media\\Windows Notify System Generic.wav");
soundplay(first(node("VIEW:/active")), soundIndex, 1, 1, 1, 0.5);

Both these examples will repeat the sound indefinitely. The following command will stop the sound:

soundstop(first(node("VIEW:/active")), 1);
jing_chen
Not applicable

It works well! Thanks a lot! I love this function!

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea