The Audio widget plays an HTML5 audio file, and can control the play/pause state, the volume, and the playback speed of the sound. It also has options to loop the sound forever, and to play continuously regardless of the play/pause input value.
1 Set Audio File
In the more tab, set the file name (.wav or .mp3) that’sÂ local on your device. TheÂ files are located in theÂ NTK application directory:
App: NTK.app>Contents>app>dist>assets>audio>song_part1.wav (on Mac, open app with right/control-click, ShowÂ Package Contents)
Command Line: NTKserver>assets>audio>song_part1.wav
Place your ownÂ files in this directory,Â and put the filename in the widget
Connect one or more input widgets to control:
- Play – If the value is less than 500, the audio will be paused, if 500 or more the audio will play.
- Volume – Accepts a range from 0 – 100, where 0 is silent, and 100 is maximum volume.
- Speed – 100 is normal speed and zero is stopped. The values accepted depend in the browser – negative values may allow reverse audio in some cases.Â Numbers higher than 100 play the audioÂ faster than normal.
- Loop – If you check the loop checkbox, the audio will loop forever when the widgetÂ is in Play mode.
- Continuous – If you check the continuous checkbox, the audio will always play, regardless of the input value sent to the play/pause input at the top left. This is useful if you want the audio file to play all the time, but control if it is heard by adjusting only the volume.
- Audio File – You can replace the default audio file by putting the location of your .mp3 file in this box. For example, if your on your hard drive, place it in the NTK folder, in dist>assets>audio. If theÂ .mp3 is on a website, use the full address for the file – e.g. http://netlabtoolkit.org/MySong6.wav