Added wav files

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Added wav files

Postby Battwell » Sun Nov 10, 2024 2:11 pm

As standard uccnc only has one sound - reset.
After reading through some code posted on this forum I finally found out how to add extra sounds as wav files
Will add instructions as a reply to this post .
The wav file was made by converting from mp3 using vlc media player .

https://youtube.com/shorts/e24msgoznYw? ... vQzR-SyGkf
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Added wav files

Postby Battwell » Sun Nov 10, 2024 5:00 pm

Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Added wav files

Postby Battwell » Sun Nov 10, 2024 5:22 pm

drop your chosen. wav file in your uccnc installed folder
uccnc/flashscreen/sound.

use the following line in your macro header:
System.Media.SoundPlayer errorSound = new System.Media.SoundPlayer(Application.StartupPath + @"\Flashscreen\SOUND\cartoon-trombone-sound-effect-241387.wav");
(change the name to whatever your wav file was saved as! )

start the sound in your macro using:
errorSound.Play();

convert mp3 files to.wav using vlc media player or similar. (vlc is free)
trim longer files or create your own using something like https://www.audacityteam.org/ (very powerful and free)
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk


Return to Macros

Who is online

Users browsing this forum: Bing [Bot] and 4 guests