Idea

Patrick Cloutier avatar image
12 Likes"
Patrick Cloutier suggested jing.c commented

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.

flexsim commandsideas
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

jing.c avatar image jing.c commented ·

I agree with Patrick!

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

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

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.

0 Likes 0 ·

2 Comments

·
Ben Wilson avatar image
3 Likes"
Ben Wilson commented

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.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

jing.c avatar image jing.c commented ·

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?

1 Like 1 ·
Ben Wilson avatar image Ben Wilson ♦♦ jing.c commented ·

@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);
3 Likes 3 ·
jing.c avatar image jing.c Ben Wilson ♦♦ commented ·

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

1 Like 1 ·
jing.c avatar image
0 Likes"
jing.c commented

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?

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Rodrigo Lamas avatar image Rodrigo Lamas commented ·

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

0 Likes 0 ·
jing.c avatar image jing.c Rodrigo Lamas commented ·

You can see the comment by Ben.

0 Likes 0 ·

Write a Comment

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.