Use an expression to trigger a sound file?

I have a comp with many layers. At the beginning of each layer, I want to play an AIFF file (the same one for every layer).
Rather than adding the AIFF asset to the project over and over, is there a way to add the sound file to the comp once, and then add an expression to each layer to play that sound at the layer's in point?

Try enabling Time Remapping on the audio layer and apply the following expression:
> firstLayer = thisComp.layer("Medium Yellow Solid 2");
lastLayer = thisComp.layer("Medium Yellow Solid 3");
recentLayer = firstLayer;
for(i = firstLayer.index; i <= lastLayer.index; i++){
currentLayer = thisComp.layer(i);
timeDiff = time - currentLayer.inPoint;
if(timeDiff >= 0 && currentLayer.inPoint > recentLayer.inPoint) recentLayer = currentLayer;
time - recentLayer.inPoint
Substitute the names of the first and last layers you want to trigger the sound in the first two lines.
It might be necessary to put a similar expression on the audio levels to eliminate artifacts at the beginning and end of each instance of playback, though.

Similar Messages

  • Button trigger a sound file?

    I know about controller files, but I just am trying to get an audio file to play from a button instance in InDesign DPS. The audio won't play or it pulls up the Adobe Viewer panel in the app onClick. Do I need to somehow embed the file? How does iPad recognize onClick vs onRelease thanks.

    You cannot trigger sound with a button. Create the artwork and place the sound file with no poster above it.
    Bob

  • Using Signal Express VI for DAQmx, timing & file size issues

    I am using a Signal Express VI with my DAQmx. Long story short, my DAQmx VI's don't work in LV 8.6 (possibly IT installation error). I have a few issues (I'm a beginner so be easy).
    First, I'm confused on how to get the timing correct. I am trying to read a 100 samples (2 channels) average them and repeat this at 30Hz and record this data.
    Second, everytime I open the Signal Express VI (in my block diagram) and change sampling for example, click OK, then save my VI before running my program. I noticed the file on disk increased in size by the megabytes! All I changed were the sampling settings.
    I appreciate any input, thanks in advance!
    -Michal
    Attachments:
    Philtec_09-22-09.vi ‏2589 KB

    To your first concern, it sounds like DAQmx was installed before LabVIEW.  Just reinstall DAQmx and it will work fine in LabVIEW.
    For you second concern.  To get 100 Samples at 30 Hz, you will need to change your channel setup in signal express.  You will need Continuous Aquisition, with 100 Samples to Read at 3000 Hz.  Then you code should work as expected.
    Chris Bakker
    National Instruments
    Applications Engineer
    Check out LabVIEW 2009 and the New X-series DAQ!

  • How can I extract data from a sound file in carbon

    hello,
    I am a student and I start recently learning carbon. I have to do a application which can read and extract data from a sound file and use that data to do some kind of visual representation of the file. I would like to know if someone can give some directions, tutorial,some code sample etc.
    thank you for your help
    chenita7

    hello orangekay
    My idea is to create an application that can read a sound file( AIFF, MP3 or other) in order to extract some kind of data ( numbers or any values) and use that data to represent the sound file visually.
    I dont know which kind of data can be extract from a sound file, and in which way i can manipulate that data to became a visual representation of the sound file. this is what I want to do as my second assignment for a subject at school, introduction to programming. has to be done based in carbon.
    regards
    chenita7

  • Sound file problem

    Hello,
    I am using sound control in oracle forms 6i. So when I play the file Sound file it is not being played more than 3 min.

    Hi Tintin_99,
    It is hard to tell what may be causing the error simply from the crash report error. Would it be possible to show us your code which you are using to open and read the sound file?
    Also, how big is this sound file?
    Kind Regards,
    Laurence C.
    Senior Test Development Engineer
    Dyson Ltd

  • Problem with Write To Measurement File Express VI not writing to file if file was deleted after the first call (7.1)

    I'm using the Express Write to LabVIEW Measurement File in LV7.1.
    I have it set to "Save to one file"  and have tried both "Overwrite file" and "Using next available file name" for the "If a file already exists" conditions.
    The path/filename is passed into the function.
    It works fine the first time around.  If the file is deleted before the function is called again, an error occurs since LV is unable to find the file.
    I have had to stop and re-run my program in order to write to use the function again.
    Since I am able to delete the file I assume it was closed but it seems like LV expects it to be there, even though the function was supposed to create/open/close the file...  Is there any way to reset this without stopping/restarting the program?
    Since my application creates several files (only one using the Express VI) I am checking for the filenames and requiring that they be deleted (or a new filename be used) before acquiring data.  Everything has worked great, except for the Express VI.
    Thank you,
    David

    Ok, I've edited the VI you posted to reproduce my error (this time with 8.0). 
    I added a "master stop" and "start log" button.  To demonstrate my problem:
    1.  Run the VI
    2.  Click "START LOGGING" - c:\test.txt is created
    3.  Click "STOP" - c:\test.txt is closed
    4.  Delete the file c:\test.txt with Windows shell or explorer
    5.  Click "START LGGING" - a new c:\test.txt file should be created but instead an error is raised in the Write LabVIEW Measurement File function.
    Any ideas?
    Thanks,
    Dave
    Attachments:
    Write LV Meas File 2.vi ‏96 KB

  • Oracle Express Edition And Windows Encrypted File System (EFS)

    Hello,
    I want to use oracle express edition with windows encrypted file system. I tried some possibilities like encrypting xe folder. But connection can not be established when efs is used. Is there a compatibility problem between oracle xe and windows efs? On Oracle's page, it is declared that oracle database is compatible with Windows EFS.
    Thank you for help.

    Pl identify which version of Win 7 - 32-bit or 64-bit ? Home version or something else ?
    The 11g XE install is only available for 32-bit version of Win 7 Professional or higher - http://docs.oracle.com/cd/E17781_01/install.112/e18803/toc.htm#BABHICJH. If you are installing on 64-bit version or Home version of Windows, then you are on your own. What is the reason for enabling EFS on this database ?
    HTH
    Srini

  • Tiny sound file could not be played.

    Hi.
    Why could not play the tiny sound file? (such as mp3 or wav files of 500ms duration)
    It worked fine with iPhone SDK 2.1, but not with iPhone SDK 2.2
    Of course, normal sound file(i.e, about 3 seconds ) works normally.
    And all codes have not any errors, just voice is not heard.
    I am using Audio Queue Services to play sound file.
    Isn' it a buf of iPhone SDK 2.2?

    Thank you for you reply - much appreciated.
    I am a bit confused - if I do not have a player installed, how come that everything is OK when I use Google Chrome as a browser?
    Many thanks,
    Jimmy

  • Xperia T2 Music/Sound file player pause randomly

    I had posted about this problem a couple of weeks ago and thought it was fixed by factory reset. But the problem came back within a few days. The issue I am having is that sound files played throught the headphones would pause randomly then restart within a few seconds (regardless of which app I am using to play the music/podcast sound file).  The problem began after updating to Lollipop, never had problem with KitKat. I have wiped the SD card, factory reset the phone and use the repair option on PC Companion multiple times, same problem.

    I've been having the same problem here, except it's worse. Never had any trouble before with KitKat / Walkman player. After updating to Lollipop / Music, music started to randomly pause, then resume after about 3 seconds. This pause is not shown as pause/play by the player, it seems as it never stopped playing, only the progress bar stops moving. Also even worse than this, I've been experiencing sound distortion, like if my music was extremely low quality, sound stuttering and all. It happens randomly, and gets better and worse over time. Normally it stops for a while when I reset the device. I've tried Sony Music player and also a 3rd party Neutron player, which offers a lot of features to improve playback. Sure enough, it improves sound quality noticeably, but unfortunately after a while the same problem appears. I may be mistaken, but when using the Neutron player, it seems sound quality degrades continuously up to a point where playback stops, then when it resumes, sound quality seems back to normal. This problem seemed to happen only with earphones plugged, but lately I've been noticing distortion of ringtones to, could be just my imagination, though. I've also done a factory reset last week, through the Sony PC Companion on my PC, but it didn't solve the issue. I haven't yet tried to format my SD card, maybe I'll try that as a last resort. The earphones are the same from before Lollipop, a pair of decent shure monitors. All media being played is stored in the exact same location and exact same SD card, which is a sandisk ultra 32 GB class 10 / HC1. All of this seem to point at some kind of software problem related to Lollipop...

  • Raed sound file problem

    Hi when I use Sound File Read Simple function to read a wav file I get the following message and it carshes LabVIEW :
    Exception: Access violation (0xC0000005) at EIP=0x74AD464C 
    I can playback the file without any problem in Media player
    Could you please let help me on this . 
    Thanks

    Hi Tintin_99,
    It is hard to tell what may be causing the error simply from the crash report error. Would it be possible to show us your code which you are using to open and read the sound file?
    Also, how big is this sound file?
    Kind Regards,
    Laurence C.
    Senior Test Development Engineer
    Dyson Ltd

  • How do i use my apple express speakers as the sound from apple tv?

    how do i use my apple express speakers as the sound from apple tv?

    Welcome to the Apple Community.
    You can't with the Apple TV 2 or 3, with the Apple TV 1, you can choose them from the Airtunes option in the settings menu.

  • How can I use a sound file on one slide, which fades to another sound file on the next?

    I am trying to make a slide show that begins with a certain sound file, which then I hope to fade out to the second slide which uses a different sound file, I've followed Apple's online tutorials, but what happens is I get two sound files playing simultaneously. Also, I'd like to add sounds files to different individual slides throughout the presentation, which I want to play independently from the entire slide show's sound track. I have programmed the slides to change automatically. Is there any way I can have multiple sound files on multiple slides all playing independently, without playing over the top of the previous sound file? I imagine this is a simply task, so my apologies if this is the case. Thanks in advance for any help!
    kind regards,

    Getting sound to work right in Keynote requires a basic understanding that:
    1. Sound played during slide transitions (from one slide to the next) must be placed in the Document Inspector > Audio > Soundtrack Well - there can only be one audio file and it plays across all slides
    2. Additional sounds files can be placed on individual slides as sound objects - each object can have build-in and build-out assignments, but sound files need at least a Build-In > Start Audio (done in the Build Inspector) - each object, wether a shape, image, sound or movie can have discrete start timing such that the start of one sound object can be delayed X seconds after the previous event. This can be used to avoid overlapping starts or playing. If you know the length of each sound file object, you can adjust the start to occur after the end of a previous sound using the Build Inspector. Click on the More Options Button to display the event build-order list and click on the event to reveal how the build starts and add any delays to start there.
    3. Keynote does not have a Fade Feature - any fade-in or fade-out (sound up/sound down) of audio files must be done to the sound file using third party applications and then brought into Keynote. If you'd like to join the crowd wishing Apple might add this feature in the future, you can provide feedback to Apple here:
    http://www.apple.com/feedback/
    4. If you need an audio file to play across a few slides and another audio file to play across another few slides, break the presentation into seperate documents, place the audio in the soundtrack well for each document and then add a hyperlink object to connect to the next Keynote document in the series. Note: all files must be "opened" in the background and ready to play or else the next file will attempt to start but stall just when you don't need it to.
    Hope this helps.

  • Display PDF file in the Apex query report using HTML Expression

    Hi Folks,
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    <img src="#OWNER#.proc_display_document?p_id=#file_id#"/>
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) as
    s_mime_type varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as" 
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');      
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

    Hi Dimitri,
    I hope you can see HTML Expression code now. Thank You for responding.
    I have PDFs stored in BLOB columns along with FILE_ID column in the database.
    I want to display these to the APEX user on the page at runtime.
    I have created a SQL Query report page to display FILE_ID column.
    I am using HTML Expression property of the FILE_ID column to pull the image from the table using PROC_DISPLAY_DOCUMENT procedure.
    I typed folowing code int the HTML Expression text area of the FILE_ID column of the report page :
    [!--  img src="#OWNER#.proc_display_document?p_id=#file_id#" ]
    I am using following Procedure code:
    create or replace procedure "PROC_DISPLAY_DOCUMENT"(p_id number) **
    mimetype varchar2(48);
    n_length number;
    s_filename varchar2(400);
    lob_image blob;
    Begin
    select MIME_TYPE,dbms_lob.getlength(blob_content),file_name,blob_content
    into s_mime_type,n_length,s_filename,lob_image
    from tbl_upload_file
    where file_id = p_id;
    owa_util.mime_header(nvl(s_mime_type, 'application/octet' ),false);
    --set the size so the browser knows how much it will be downloading
    htp.p( 'content-length: '|| n_length );
    --The file name will be used by the browser if the users does a "save as"
    htp.p( 'content-Disposition: filename="' || s_filename ||'"');
    owa_util.http_header_close;
    --Download the BLOB
    wpg_docload.download_file( lob_image );
    exception
    WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-202121,'Record matching screenfield filename not found, PROC_DISPLAY_DOCUMENT.');
    end;
    --This is very Important
    --grant execute on PROC_DISPLAY_DOCUMENT to public;
    This code does not work and report does not display PDF image.
    Any help to troubleshoot this code will be appreciated.
    Thank you in advance.
    Jaya

  • How to play sound file in Forms 9i  using  PJC.

    Hi ,
    I want to play a sound file in Forms 9i over the web using "Pluggable Java Component". Any pointers / help in this regard will be highly appreciated.
    Thanks in Advance,
    Vinod.

    Vinod,
    just do a search on the Internet for a Java Bean and add this to Forms. However, if you don't necessarily require the sound to be played from within Forms, you could use web.show_document() to call it in a URL displayed in a hidden frame on the Forms HTML page. This way it would be the browser playing the sound (assuming a proper Plugin)
    web.show_document('http://server:port/myDir/mysound.wav','myHidden_frame')
    Frank

  • Can you record sound using a USB 6211 and convert the data to a .wav (or other sound) file?

    Hello,
    I am trying to build a system that will use a USB 6211 to record sounds from multiple electret microphones and then save the data as a .wav file or other sound file.  I have already built my mics and hooked the mics up to the USB 6211; the DAQ device seems to do an adequate job recording the signal - I've recorded from 3 mics at a time at 11,025 Hz, although I don't know how good the signals are since I can't save them for playback after the fact, and they aren't going through my sound card. Ultimately, I would like to save the data as a multichannel audio file which I could then open in a program such as Audacity for further editing and analysis. Since Audacity can import a variety of sound files, my file format doesn't need to be .wav if another format would work better.
    Any advice would be appreciated.
    Thanks, Eric

    If you are sampling all three simultaneously, your highest frequency recordable will be (11,025/2)/3, so about 1800Hz and that will pretty coarse (traditionally digital sound recording is at 44Ks/s at the low end). As to converting to a .wav, there are functions on the "Graphics and Sound" palette for saving waveforms to a .wav file.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

Maybe you are looking for

  • IPhoto 8 and Raw

    Hi everyone, I recently took 600+ Raw photos (Nikon D70...roughly 3.85 gig of pictures)and imported them into iPhoto 8 as RAW photos. I understand that it (iPhoto 8) automatically converts them into jpegs and leaves the raw photos untouched, but it i

  • Potential problem when using a template

    Hi, I am fairly new to dreamweaver and I have created a template for my website, I am now using that template to produce a number of other pages. When I come to save it I save it as a new file,it is saving as a HTM file rather than a HTML file, is th

  • Help,BI Content install failed

    Client 000, DDIC, SPAM,  load package. SPAM status is red. and OCS locked by transaction SAINT. What should I do now? Thanks.

  • New to EJBs  exception in client code

    Hi i am new to EJBs when i execute the client code it is giving the following exceptions can any one tell me the steps to execute a simple EJB session bean. what class paths and what config and what xml files are required?? i followed so many tutoria

  • How to export/import apex user ?

    Hi All, I am using APEX 3.1. How to export apex users and import into different workspace. Basically I am trying export APEX users from dev workspace into Prod. Is it possible to include as part of application export? Anyone's help is much appreciate