QuartzBuilder 1.1 and sound

muqeem's picture

Hi, Just bought QuartzBuilder 1.1 and made few applications. It is just great. Let me ask you a question, please. How do I include a sound file? I cannot get the sound working with QuartzBuilder 1.1. I also dropped the sound file in the same folder where I am running the application, still not working. Do I have to do something for the sound file, which is included in my QC composition? Any help is highly appreciated, I am running 10.5.8. thanks a lot

cwright's picture
Re: QuartzBuilder 1.1 and sound

Make sure the path is composition-relative (not starting with / or ~). Generally, I find it easiest to have the composition in the same location as the sound file, and then just use the file name (no other path stuff). With that, QB should be able to find the resource automatically.

Absolute paths, and ~-relative paths cannot work since they're accessing a fixed location (the QB environment runner can't recreate that, only composition-relative stuff).

muqeem's picture
Re: QuartzBuilder 1.1 and sound

Thank you, I did this, but then I think I have another problem, may be it is related to QC, as I am just using two patches, "Kineme Audio File Info" and "Kineme Audio File Player"

and when I connect file loaded parameter to patch parameter I get the error (attached), please take a loon into this attached file. Since you cannot see the full text on the error, I am copying it here;

++++++++++++++ 0x94d180d5: -[QCContext renderPatch:time:arguments:] 0x94d17eaa: -[QCGraphicsContext renderPatch:time:arguments:] 0x94d16daf: -[QCOpenGLContext renderPatch:time:arguments:] 0x94d16c4e: -[QCPatch(Runtime) render:arguments:] 0x0000e352 0x94d9dd83: -[QCView render:arguments:] 0x94d9e35a: -[QCView _renderGLContext] 0x92614bf8: -[NSView _drawRect:clip:] 0x926136ef: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x92613a86: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] 0x92612045: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x92612e9f: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x92612e9f: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x92611987: -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] 0x9260e4ab: -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] 0x9254ee7b: -[NSView displayIfNeeded] 0x9254ea29: -[NSWindow displayIfNeeded] 0x9254e84c: _handleWindowNeedsDisplay 0x938e6772: __CFRunLoopDoObservers 0x938e7acc: CFRunLoopRunSpecific 0x938e8aa8: CFRunLoopRunInMode 0x96c5f2ac: RunCurrentEventLoopInMode 0x96c5effe: ReceiveNextEventCommon 0x96c5ef39: BlockUntilNextEventMatchingListInMode 0x9254c6d5: _DPSNextEvent 0x9254bf88: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] 0x92544f9f: -[NSApplication run]

+++++++++++++++++++++++++++++ any idea, I think I have to solve this problem first and then use QB later. I also restart my computer with (command+alter+p+R selected) I thought to erase D-Ram and run it, but problem is still there. Should install audio patches again or something

thanks

PreviewAttachmentSize
Picture 13.png
Picture 13.png58.43 KB

cwright's picture
Re: QuartzBuilder 1.1 and sound

Are you using kinemecore? if so, please remove it. Are you running QC in 64bit mode, or 32bit mode?

can you send a composition that reproduces the problem, with steps to reproduce it (i.e. save it before triggering the problem, and send it to us with instructions on how to cause the problem ourselves)?

muqeem's picture
Re: QuartzBuilder 1.1 and sound

Please find the patch (attached). How do I know that I am running 64 or 32 bit, please?

Let me remove kinemecore and test it again

thanks

PreviewAttachmentSize
ForKineme.zip309.87 KB

muqeem's picture
Re: QuartzBuilder 1.1 and sound

I also removed the kinemecore plugin from the directory and problem still exist. Let me know how do I see if I am running 64 or 32.

thanks a lot

muqeem's picture
Re: QuartzBuilder 1.1 and sound

This how the error window comes up;

I placed these two patches in my editor (Kineme Audio File Info) and (Kineme Audio File Player) and connect file loaded parameter from (Kineme Audio File Info) to path parameter on (Kineme Audio File Player). At this stage nothing happen but right after when I put the name of audio file (vcu.wav) inside the path field and enter, then the error message comes up.

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

The problem is that you have a type mismatch going on.

"File loaded" is going to put out a boolean value (true/false).That should be connected to the enable of the audio file player (or not at all, as it's very likely to a-ok without it).

What you're doing now is filling the file path with a true value, instead of an actual path.

Checkout the attachment to see what I mean.

I went ahead and added an insert splitter to the file path scenario as well.

PreviewAttachmentSize
ForMuqeem.zip311.09 KB

muqeem's picture
Re: QuartzBuilder 1.1 and sound

Thank you so much for your help, it is working now. Let me also check this in my other compositions tomorrow and I will also use QB soon with it.

cybero's picture
Re: QuartzBuilder 1.1 and sound

GT, that works really nicely if one triggers the audio file to play, but using the File Loaded 'True / False' statefulness output to Trigger and for badness' sake •~ the Loop input too on the File Player patch, _remember to add one's requisite assets in QB / Resources / Add Resource [ Command + R] and Bob's Your Uncle, Muqeem, :-)

I actually find that relying alone upon attaching to the File Player's Enable input port can have an underwhelming and un-triggering effect - Trigger does the job though.

Please find attached an example that uses the very useful in their turn, Kineme's own audio-fileinput example given a bit of pre QB tailoring & note , not one iota of QB protocol in QC editing / purposing.

Outputs AOK for me from QB, I wonder, will that turn out to be true for you, Muqeem, do let us know.

PreviewAttachmentSize
ForMuqeem(Reprise).zip1.08 MB

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

Wait... does that not enable for you? (as I posted?) I didn't actually test it earlier, but it seems to work fine as I'm checking it with a file now.

edit- Oh, I see what you mean; I didn't enable the trigger because I just wanted to change the part that was making it go awry. I thought the trigger part was understood because of the description on the port. I was confused for a second and thought that something was wrong with the file!

muqeem's picture
Re: QuartzBuilder 1.1 and sound

Thanks for the attachment, really interesting. I will use it once I will sort out this QB situation. The QB file that you made is working on my machine but when I made myself an application from QB, it is not working at all, only a blank screen. Then I also did a test which I wanted to achieve for my composition. Please find the attachment. This is working fine on QC but not able to build from QB, I wonder why it is happening on my machine. Should I install QB again? Am I using some other bit rate?

it is come to this level that I know things are fine with my QC and audio files, but apps from QB with audio from my machine gave me the problem. I am still testing it.

thanks a lot and waiting for your reply, please find the file attached.

PreviewAttachmentSize
ForKineme_Oct_11_v2.zip775.1 KB

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

In the qtz posted, the actual consumer patch doesn't have the filepath in it when it's first opened.

It's kind of a QC bug that if an insert splitter is connected like this, the filepath in the consumer patch is stored as "", even when you've manually typed it in, moved patches around, and saved. If you've connected to an insert splitter, the filepath "gets" to the Audio Player as soon as you turn on the Viewer in Quartz Composer, so this usually isn't noticed.

However, if the file path isn't actually "in" the loader patch/Audio Player when the qtz is saved, Quartz Builder won't pull it as a resource. If you manually place your resources using the Resource Inspector option on the Quartz builder interface ( I just drag and drop), it will be "ok". Also, If you manually type the resource in a loader, and forego the insert splitter setup it gets automatically pulled tested this...because the qtz actually saves correctly.

This is a QC problem when it comes to the fact that the file path isn't saving correctly when insert splitters are attached, as it can be replicated with any built in QC patch when an insert splitter is involved. Maybe this was the one of the functional reasons for the preview in QB.... I do remember this having come up in the past.

This isn't usually a problem in most cases, because QuartzBuilder makes a visual preview which also pulls the filepaths from insert splitters when you drop your qtz files in the Quartz Builder interface. This is a rare case where that isn't applicable because your qtz doesn't render a visual (so nothing happens to make the insert splitter filepaths get pulled before the app compiles).

You can always double check to make sure your resources "made it" into Quartz Builder by taking a look at the Resource Inspector and just dragging the media onto it.

Your filepath setup was fine theoretically; this is just an odd circumstance. As a matter of fact, this is your app, with the wav file placed in the resource folder inside of it. It loads fine when you start it up as long as the audio's actually there :)

PreviewAttachmentSize
AudioTest_v3.app_.zip763.96 KB

muqeem's picture
Re: QuartzBuilder 1.1 and sound

That was it, i just drag the sound file into the resource inspector window and the QB application is now working. The problem has solved, THANK YOU so much for this help.

cybero's picture
Re: QuartzBuilder 1.1 and sound

Oh boy, that http://kineme.net/files/AudioTest_v3.app_.zip doesn't work at all, unfortunately GT - zero audio resulting.

Slips 'twixt cup and lip methinks.

George & Muqeem, just as matter of interest, does the QB example that I posted http://kineme.net/Discussion/General/QuartzBuilder1.1andsound#comment-10197 happen to work for you straight out of the box?

Does the QC file it derives from produce a workable example from QB if one incorporates the audio asset required in QB?

Finally does this example attached AudioTest_v1LoopedandTriggered.zip work AOK? It does not give a screen, just an anonymous window bar :-), but it does work [& also audio looped - BTW what's with the vcu phrase Muqeem?]

PreviewAttachmentSize
AudioTest_v1LoopedandTriggered.zip1.3 MB

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

It works for me as long as I do the up arrow key thing like Muqeem set it up to do. Are you doing that when you test it?

Both of those which you've linked to work "automatically". Let me know if the up down arrow thing doesn't get the audio playing for you. I didn't change that aspect of Muqeem's setup because he may need to be able to trigger it. (Also, because I wanted to see if there was a problem with QB getting key events... it's receiving them ok for me).

It works in Leopard or Snow Leopard in the built app, whether it's the actual one Muqeem compiled but that I also manually added the resource to (as in, before upload), or the one I'm re-downloading from the site to make sure I didn't grab the wrong file (yep, audio is working on this, for me, as well in Leopard or Snow Leopard, as long as I do trigger it with the keyboard.... and uploading isn't changing anything, for me at least)...or "re-tests" I've built in either OS. Other versions that I built when testing the media import part worked fine too.

Please let me know if that arrow up doesn't trigger the audio, or clarify if that's being done... I'm a little miffed :)

cybero's picture
Re: QuartzBuilder 1.1 and sound

GT, The up arrow control works just fine.

Only just picked up on your post later this same day as I was around at some friends for a while.

I wonder now about embedding a little GUI clue on that windowbar for the unwitting recipient without such or any clue :-).

Just hadn't seen an example QC comp on the thread concerning the use of arrow keys, so didn't even investigate that to be honest. Works nicely though.

Presumably Keyboard patch employed in the QC ?

smokris's picture
Re: QuartzBuilder 1.1 and sound

gtoledo3 wrote:
Maybe this was the one of the functional reasons for the preview in QB.

No, the still-frame-preview in QuartzBuilder is totally disconnected from the resource loading process.

QuartzBuilder scans all of the composition's static input ports for relative-path-specified files that actually exist, and adds them to the app's resources.

In this case, the Input Splitter's resource isn't getting loaded because the Input Splitter stores its input port value dynamically (rather than the typical ivarInputPortStates dictionary), since the Input Splitter's input port type can be changed dynamically.

IMO this is a bug in QuartzBuilder --- it should be picking up resources specified as strings in customInputPortStates, too.

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

I do now note that the preview doesn't make the resource load anyway, after setting up a test with the movie loader with an insert splitter on the file path, connected to a sprite, so that there would be a visual preview :) Flawed logic/testing on my part.

Also, thanks for the detailed breakdown on that, it was very informative and enlightening!

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

Well that's good! I was thinking something had gone seriously awry for a minute :)

muqeem's picture
Re: QuartzBuilder 1.1 and sound

Hi Peter,

The file you send is also working, but with dragging the (.wav) file directly into the resource inspector’s bottom window. I tested and your file is also working fine. The only situation someone may face is the file size, as with this method, the QB application file size is bigger because the (.wav) file size is included in the application. The advantage is there, as now you do not need to send the (.wav) file with the application. Application will run without having the (.wav) file in the same folder. But if you have really long songs or sound layer, then the QB application could huge.

My apologies for replying you late, as I had to prepare for my classes that I teach at VCUQatar. Virginia Commonwealth University in Qatar. I only teach classes related to design and 3D animation here. But only introductory, not like the graphics I did for Final Fantasy and Armageddon back in my old days. So that is the answer of your question of what is VCU Qatar.

Peter, I also looked at your file that you send with (LFO) controlling the audio file, really fun to see that and I am going to learn a lot form it, as I am not a coder and need to learn from all of you, Toledo and other gurus out there. I wish I could have more time to learn this new stuff, as QC and Kineme have change my vision of computer graphics and interaction design. I am so happy to be a student of these new tools and gadgets.

Toledo, thanks for testing the file as I sent it. I wanted to have that type of effect from a key or from Apple Remote for my composition that I am working on. Upper arrow key in QB app. is also working fine for me and hope I could achieve something out of it. But I have so little time for me to learn so many great things in QC.

Thank you all and I may not bother you for a little while, as I have to do so much junk (not QC related stuff). On of these days I wanted to create ragas and talas on my Indian drum, without using a drum it is still an ambitious plan, but with you folks out there, I may achieve it. May be with my body gestures or something.

Thank you again

cybero's picture
Re: QuartzBuilder 1.1 and sound

Well thanks for that informative explanation of the current state of difficulties with input of file pathstrings retaining pertinent statefulness within QB 1.1 smokris.

cybero's picture
Re: QuartzBuilder 1.1 and sound

Quote:

On of these days I wanted to create ragas and talas on my Indian drum, without using a drum it is still an ambitious plan, but with you folks out there, I may achieve it. May be with my body gestures or something.

Sounds a little like a variation of the type of idea I saw recently at a touring expo, although that was mostly electronica and Max/ MSP /Jitter based. There's was infrared laser pointer graffiti "spraycan" based.

Interesting idea. Glad to hear you found the submitted responses very useful to you. Hope you got those educational desk jockey's riding towards their finishing line and having fun at VCU [now understood the .wav reference].

cybero's picture
Re: QuartzBuilder 1.1 and sound

I normally think that if it works local yokel and after I've downloaded a second delivery, then it's good to go - not absolutely always true - differing environments and plugins can make for some serious amendments to the resulting rendering composition or QB application.

Also the pbck syndrome so often found in the world of IT [Problem Between Chair & Keyboard] :-)

cwright's picture
Re: QuartzBuilder 1.1 and sound

ooh, clever find -- I'll address that in 1.2 as well (man, can't believe that was overlooked...)

thanks for the notes.

gtoledo3's picture
Re: QuartzBuilder 1.1 and sound

Also, after more consideration... the fact that the qtz's open up with the "" makes good sense to me. Smaller file size, more efficient. I was off base to be thinking of that as buggy.