The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

The Soundboard Template - Try It!

  • When adding a sound that is only 1 second long its just not working.

    Comment actions Permalink
  • Hi Julien,

    Can you please verify what you mean by "not working?" Is the sound not playing when you press a button? As a test, have you tried creating a new Audio Component on a Scene Object and adding the imported sound to it? Does it play then?

    Let me know, and we can continue troubleshooting from there.

    Thanks,

    Peter

    Comment actions Permalink
  • Hey Peter,

    I want to make a drum soundboard with different sample sounds from drums. All of those sounds are like 0 seconds or 1 second long. I tried to use the template and import those sounds and when I click on the one of the buttons, its 1. Not playing the sound at all + the cat animation is really fast. 2. Its playing but not the whole sound.


    I also have a problem with the new 1.5 update, any way I can go back to 1.0 because the Audio.Component API has been changed and my script I used, is not fully working anymore. My main script I used is this:

    // -----JS CODE-----
    // @input SceneObject[] sceneObjects
    // @input Component.AudioComponent[] audioComponents

    var audioComponent = null;
    var currIndex = -1;

    function onTurnOn( eventData )
    {
    global.touchSystem.touchBlocking = true;
    global.touchSystem.enableTouchBlockingException("TouchTypeDoubleTap", true);
    global.touchSystem.enableTouchBlockingException("TouchTypeSwipe", true);

    for( var i = 0; i < script.sceneObjects.length; i++ ) {
    script.sceneObjects[i].enabled = false;
    }
    }
    var turnOn = script.createEvent("TurnOnEvent");
    turnOn.bind(onTurnOn);

    function onTap( eventData )
    {
    for( var i = 0; i < script.sceneObjects.length; i++ ) {
    script.sceneObjects[i].enabled = false;
    }

    for( var i = 0; i < script.audioComponents.length; i++ ) {
    script.audioComponents[i].stop(false);
    }

    currIndex++;
    if( currIndex >= script.sceneObjects.length ) {
    currIndex = 0;
    }

    // Show scene object
    if( script.sceneObjects[currIndex] )
    {
    script.sceneObjects[currIndex].enabled = true;
    }

    // Play sound
    if( currIndex < script.audioComponents.length && script.audioComponents[currIndex] )
    {
    script.audioComponents[currIndex].play( 1 );
    }
    }
    var tap = script.createEvent("TapEvent");
    tap.bind(onTap);

    When I try to add a sound or music to the script, I can't even select it. I'm 100% sure I have imported the account. Is there anyway to fix the script?

    Thank you for the help!

    Comment actions Permalink
  • Hi Julien,

    Thanks for the info. Regarding the playback duration, did you try the test I mentioned in my last message?

    You could try padding the duration of the mp3 file you imported with some dead time at the end of the sound. Sometimes mp3 compression will clip very short sounds.

    The reason the cat animation is playing quickly is because by default the sprite will only stay on screen for the duration of the audio clip. You can override this behavior by checking the "Use Custom Hold" checkbox on the SoundboardKey script component in the Inspector.

    As for your script, I brought it into a project and was able to assign both Scene Objects and Audio Components to the two array properties you defined. What change in the AudioComponent is giving you trouble, exactly?

     

    Thanks,
    Peter

    Comment actions Permalink
  • Hey Peter,

    I'll try your solution for the audio tomorrow and will message you back about how it went.

    I'm trying to select an Audio file from my imported files but my sound is not there, there is nothing I can select, not a sound not even a normal file. This problem happend in the newest 1.5 version and not in the 1.0 old version. Where did you put the script to? Maybe I chose the wrong object. The SceneObjects are working and I can select them but I can't select or even find and add Audio to the array. I saw in your script from the soundboard template that you used Asset.AudioTrackAsset? I could be wrong because I can't check it now. Did something changed about it in 1.5 because the whole script was perfectly working in 1.0.

    Thank you!

    Comment actions Permalink
  • Yes, the Soundboard Template is set up to use AudioTrackAssets as inputs. The AudioComponents are created dynamically in the script, and the AudioTrackAssets are assigned to them at runtime.

    Let me know if that clears things up!

    Comment actions Permalink
  • Thank you for the help, I'll try again tomorrow and see why it's not working for me. Is there any way to install the 1.0 version?

    Comment actions Permalink
  • Hi Julien,

    There shouldn't be any functional changes in Lens Studio 1.5 that would affect what you're trying to do. We recommend that you continue to use 1.5, as it introduces a number important fixes. As I mentioned in my previous reply, the reason why you are unable to select any AudioComponents using your script is because (in the Soundboard Template, at least) there are no AudioComponents included in the scene. You can verify this by manually creating an AudioComponent in your scene, then assigning it as a property in your script.

     

    Best,

    Peter

    Comment actions Permalink
  • Hey Peter,

    I'm 100% sure I imported the audio in my project, what do you exactly mean with "there are no AudioComponents included in the scene"? My audio file is in the project when I try to select the audio in the script, nothing shows up, no audio, no other files.

    Thanks

    Comment actions Permalink
  • An imported audio file is referred to in script as an AudioTrackAsset.

    The Lens Studio component used to play AudioTrackAssets is referred to in script as an AudioComponent. You create an AudioComponent by selecting Add Component > Audio in the Inspector

    The script you shared defines an array of AudioComponents. If your scene doesn't have any AudioComponents, you won't see any in the selection window that pops up when you edit the property in the Inspector.

    Comment actions Permalink
  • Is there a way to have the buttons show up while recording but then not have them in the video after you finish recording?

    Working on one right now and when I uncheck the option to show in recording, they also disappear while recording, which seems like it might be confusing for users lol.

    Comment actions Permalink
  • Hi Rhonda,

    Unfortunately, there's currently no way to have a Lens' visual elements be shown during recording, but hidden in the recorded video. While I agree, it can be confusing for some users, we included the option to hide buttons as something of a compromise for users who don't want to see the buttons in the final video.

    Thanks for asking!

    Peter

    Comment actions Permalink
  • great experience really I tried it several time and this is just amazing you can see some shots here with this lens.

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!