Sound Loader.js - v7+ only

tg_jp

Active member
#1
Sound Loader.js - v7+ only

Hello,

It's a polygon script to load sound data as f-curve parameters. it's available for Cheetah3D v7+.

http://tres-graficos.jp/blog/files/article.php?id=119

you can load various sound format ( "aac", "ac3", "aif", "aiff", "aifc", "caf", "mp3", "mp4", "m4a", "wav", "mov" ).

resolution: resolution count in 1 sec.
sound left: left sound
sound right: right sound ( if it's mono, it will be 0 )
sound wave: custom f-curve value for control

[UPDATE] 20170401: sound file path escape bug fixed.

Best

tg_jp, Hiroto
 

Attachments

Last edited:
#3
Hiroto,
The "Sound Loader Helper" Unix executable isn't completing the import of any sound file I've attempted in C3D 7.b21...
Here's my Terminal Log below:

Last login: Sun Mar 19 11:09:31 on console
You have new mail.
/Users/CpH/Library/Application\ Support/Cheetah3D/Scripts/Polygonobj/Sound\ Loader/Sound\ Loader\ Helper ; exit;
CpH-MacBookPro:~ CpH$ /Users/CpH/Library/Application\ Support/Cheetah3D/Scripts/Polygonobj/Sound\ Loader/Sound\ Loader\ Helper ; exit;
2017-03-25 09:38:29.366 Sound Loader Helper[20836:4907641] resolution: 30, sound: /Users/tg/Desktop/soundFiles/dog.mp3, data: /tmp/soundLoader.data
2017-03-25 09:38:29.375 Sound Loader Helper[20836:4907650] failed
2017-03-25 09:38:29.375 Sound Loader Helper[20836:4907641] analyze finished.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...13 completed.
_______________________________________________________________
Activity Monitor shows it running at upwards of 100% CPU but it never finished importing any audio files in none of its supported formats. Always have to Force Quit.
SND_Loader Helper.png
 

tg_jp

Active member
#4
Hi,

Thank you for your testing.

Which OS version of your Mac? ( this script works 10.7+ )

Can you show me console log when you use it from Cheetah3D?

Best.

tg_jp, Hiroto
 
#5
Hi,

Thank you for your testing.

Which OS version of your Mac? ( this script works 10.7+ )

Can you show me console log when you use it from Cheetah3D?

Best.

tg_jp, Hiroto
Hi, I'm on macOS 10.12.3

Short Console Log shows: Responsible: systemsoundserverd [290]
Thread 0x523 Thread name "SystemSoundServer" 18 samples (1-18) priority 61 (base 61)
Process: Sound Loader Helper [6912]
Path: /Users/USER/Library/Application Support/Cheetah3D/*/Sound Loader Helper
1 main + 779 (Sound Loader Helper + 11883) [0x102a1fe6b] (running) 2
1 main + 779 (Sound Loader Helper + 11883) [0x102a1fe6b] (running) 4
1 main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 5
1 -[TGSoundHelper isFinished] + 4 (Sound Loader Helper + 10564) [0x102a1f944] (running) 5
1 main + 768 (Sound Loader Helper + 11872) [0x102a1fe60] (running) 6
1 main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 7
1 -[TGSoundHelper isFinished] + 4 (Sound Loader Helper + 10564) [0x102a1f944] (running) 7
1 main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 17
1 -[TGSoundHelper isFinished] + 12 (Sound Loader Helper + 10572) [0x102a1f94c] (running) 17
0x102a1d000 - 0x102a22fff Sound Loader Helper (0) <D97E7DA8-05AF-3BBA-AE72-124355820671> /Users/USER/Library/Application Support/Cheetah3D/*/Sound Loader Helper
Process: systemsoundserverd [290]
Path: /usr/sbin/systemsoundserverd
0x10c481000 - 0x10c4a2fff systemsoundserverd (892.2.13) <9FC7A6A1-8E18-3CFA-9845-FAA5A3B8AD84> /usr/sbin/systemsoundserverd​
Full report is available via this download link...
HTML:
https://www.dropbox.com/s/u1i1ezkv6ygt1ho/Cheetah3D_2017-03-28-193535_CpH-MacBookPro.hang.txt?dl=0
 

tg_jp

Active member
#6
Hi,

thank you for reporting.

1. please try to run helper binary (Sound Helper Loader) with double clicking.
2. after clicking, Terminal.app will be opened, and show some messages, then quit.

Code:
2017-03-29 16:50:35.081 Sound Loader Helper[12572:1490091] resolution: 4, sound: /Users/tg/Desktop/test.mp3, data: /tmp/soundLoader.data
2017-03-29 16:50:35.099 Sound Loader Helper[12572:1490100] failed
2017-03-29 16:50:35.099 Sound Loader Helper[12572:1490100] duration: 0.000000
2017-03-29 16:50:35.099 Sound Loader Helper[12572:1490100] tracks: (
)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...18 completed.
if you see different messages, it doesn't work correctly. maybe some permission missing on 10.12.x.

ADD: https://www.tekrevue.com/tip/gatekeeper-macos-sierra/
on macOS Sierra, required adding gatekeeper permission at first time.

Best

tg_jp, Hiroto
 
Last edited:
#7
Hi Hiroto,

Attempted correcting launch permissions via Gatekeeper, Firewall(added Sound Loader Helper & C3D to Advanced settings "allow all incoming connections"), added to the Sound Loader Helper executable Get info owners to run as system admin but still fail to import any audio into C3D.

I've noticed when launching into Terminal there is a directory listed that's not available on my MBP, that reads:

"sound: /Users/tg/Desktop/soundFiles/dog.mp3, data: /tmp/soundLoader.data"

It appears to be a directory from your workstation that's looking for a dog.mp3 & temp data from the drives hidden tmp folder called soundLoader.data...
Last effort I attempted to fool the sound loader by renaming an mp3 as "dog.mp3" in hopes that it would self correct it's internal cache but no win there either.

So how do I correct it on my end so the Sound Loader Helper unix executable can open without looking for those files without disabling Gatekeeper?
 

tg_jp

Active member
#8
Hi,

thank you for reporting.

dog.mp3 is not required, that file will be loaded just in case standalone mode ( directly clicking Sound Loader Helper excecutables ).

How about logs on Console.log app when script loads sound file on Cheetah3D?

Best

tg_jp, Hiroto
 
#9
Hello, here's a copy of the Console Log (Only yields spinning rainbow in C3D Open File Window after selecting a sound file to import. It never reads-in any audio sound files after clicking import button & the C3D file window stays open without ever receiving a response from the Sound Loader):

Code:
Process:         Sound Loader Helper [6912]
Path:            /Users/USER/Library/Application Support/Cheetah3D/*/Sound Loader Helper
Architecture:    x86_64
Parent:          Cheetah3D [6835]
Responsible:     Cheetah3D [6835]
UID:             501
Task size:       11 MB
CPU Time:        1.693

  Thread 0x39db2            DispatchQueue 1           18 samples (1-18)         priority 31 (base 31)     cpu time 1.693
  <thread QoS default (requested user interactive), process unclamped, IO tier 0>
  18  start + 1 (libdyld.dylib + 21077) [0x7fff94472255] 1-18
    1   objc_msgSend + 46 (libobjc.A.dylib + 27502) [0x7fff93b82b6e] (running) 1
    1   main + 779 (Sound Loader Helper + 11883) [0x102a1fe6b] (running) 2
    1   objc_msgSend + 46 (libobjc.A.dylib + 27502) [0x7fff93b82b6e] (running) 3
    1   main + 779 (Sound Loader Helper + 11883) [0x102a1fe6b] (running) 4
    1   main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 5
      1   -[TGSoundHelper isFinished] + 4 (Sound Loader Helper + 10564) [0x102a1f944] (running) 5
    1   main + 768 (Sound Loader Helper + 11872) [0x102a1fe60] (running) 6
    1   main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 7
      1   -[TGSoundHelper isFinished] + 4 (Sound Loader Helper + 10564) [0x102a1f944] (running) 7
    1   objc_msgSend + 46 (libobjc.A.dylib + 27502) [0x7fff93b82b6e] (running) 8
    1   objc_msgSend + 33 (libobjc.A.dylib + 27489) [0x7fff93b82b61] (running) 9
    6   objc_msgSend + 46 (libobjc.A.dylib + 27502) [0x7fff93b82b6e] (running) 10-15
    1   objc_msgSend + 26 (libobjc.A.dylib + 27482) [0x7fff93b82b5a] (running) 16
    1   main + 776 (Sound Loader Helper + 11880) [0x102a1fe68] 17
      1   -[TGSoundHelper isFinished] + 12 (Sound Loader Helper + 10572) [0x102a1f94c] (running) 17
    1   objc_msgSend + 46 (libobjc.A.dylib + 27502) [0x7fff93b82b6e] (running) 18

  Binary Images:
           0x102a1d000 -        0x102a22fff  Sound Loader Helper (0) <D97E7DA8-05AF-3BBA-AE72-124355820671>  /Users/USER/Library/Application Support/Cheetah3D/*/Sound Loader Helper
        0x7fff93b7c000 -     0x7fff93f51fff  libobjc.A.dylib (706)   <47104A1B-13E8-369F-BC36-27FF465809FD>  /usr/lib/libobjc.A.dylib
        0x7fff9446d000 -     0x7fff94472fff  libdyld.dylib (421.2)   <6F506653-FFF6-3DB8-84F1-109AE3C52F32>  /usr/lib/system/libdyld.dylib

Sampling process 6912 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Sound Loader Helper (pid 6912) every 1 millisecond
Process:         Sound Loader Helper [6912]
Path:            /Users/CpH/Library/Application Support/Cheetah3D/Scripts/Polygonobj/Sound Loader/Sound Loader Helper
Load Address:    0x102a1d000
Identifier:      Sound Loader Helper
Version:         0
Code Type:       X86-64
Parent Process:  ??? [1]

Date/Time:       2017-03-28 19:36:26.279 -1000
Launch Time:     2017-03-28 19:29:08.505 -1000
OS Version:      Mac OS X 10.12.3 (16D32)
Report Version:  7
Analysis Tool:   /usr/bin/sample
----

Call graph:
    2771 Thread_236978   DispatchQueue_1: com.apple.main-thread  (serial)
      2771 start  (in libdyld.dylib) + 1  [0x7fff94472255]
        2280 main  (in Sound Loader Helper) + 776  [0x102a1fe68]
        + 1758 objc_msgSend  (in libobjc.A.dylib) + 46,0,...  [0x7fff93b82b6e,0x7fff93b82b40,...]
        + 522 -[TGSoundHelper isFinished]  (in Sound Loader Helper) + 23,4,...  [0x102a1f957,0x102a1f944,...]
        489 main  (in Sound Loader Helper) + 779,768,...  [0x102a1fe6b,0x102a1fe60,...]
        2 DYLD-STUB$$objc_msgSend  (in Sound Loader Helper) + 0  [0x102a21fb6]

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        objc_msgSend  (in libobjc.A.dylib)        1758
        -[TGSoundHelper isFinished]  (in Sound Loader Helper)        522
        main  (in Sound Loader Helper)        489

Binary Images:
       0x102a1d000 -        0x102a22fff +Sound Loader Helper (0) <D97E7DA8-05AF-3BBA-AE72-124355820671> /Users/CpH/Library/Application Support/Cheetah3D/Scripts/Polygonobj/Sound Loader/Sound Loader Helper
 

tg_jp

Active member
#11
Hi,

thank you for reporting, I found a bug when sound file path contains * character. I have updated it. please replace it the latest version.

Best

tg_jp, Hiroto.
 
#12
Sound Loader updated version 20170401 fixed the import issues I've been experiencing.

Thanks for all your support, this is outstanding!:)
 

frank beckmann

Well-known member
#14
Pretty sure you put the script in the wrong place.
I believe it still works as it loads sound files - but as soon as I enable the f-Curve-controller tag script Cheetah3d crashes instantly every time.
So maybe Hiroto might want to have a look into it.
Soundloader.jpg

Cheers
Frank
 
Last edited:

frank beckmann

Well-known member
#16
It´s a polygon-script with an accompanying "Sound Loader Helper" file put in HD/users/User/Library/Application Support/Cheetah3d/Scripts/Polygonobj

Cheers
Frank
 

frank beckmann

Well-known member
#18
It seems you might have not the latest version as I can load .mp3 files - see screenshot.
And I found an old file which still works. Should not crash though of course. ;)
Soundloader.gif

Sorry for the lousy GIF quality.

Cheers
Frank
 
Last edited:

frank beckmann

Well-known member
#20
Not sure how I can help any further as I got it running after updating to that latest version. If you´re on Mojave already it´s maybe about the "permission thing" Hiroto mentioned in his reply N°6.

Cheers
Frank
 
Top