Jump to content
  • Who's Online   0 Members, 0 Anonymous, 8 Guests (See full list)

    • There are no registered users currently online
  • 0

Mounting .sd2f Files From Unix Command Line


jizen

Question

Is there a a way to use Toast Titanium 7 to mount a .Sd2f file from the unix command line? Even better, is there a way to use a wildcard to mount every .Sd2f file in a directory?

 

I am hoping to use my machine as a music server based around Toast .Sd2f images of my CD's. I want to preserve the timing between tracks and the integrety of the albums without any loss. I do not want to important tracks into iTunes. Rather, I want to mount all my .Sd2f images when my music server boots. Is there a limit to the number of .Sd2f files that OSX/Darwin will allow to be mounted?

 

Thanks,

Joe

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

All my .S2df files are being located in the first step. I would like to mount my entire collection of images of my CDs, i.e. hundreds of images. Would you or anyone else have a clue as to what is breaking? Is there a system-wide limit to the number of processes that can exist? Can that be changed by a Darwin/Unix command? It is concievable that I'd run out of memory, but that shouldn't be a factor with the number of mount processes I'm seeing at this point. Could there be a limit to the number of mounts built into Toast7 itself?

 

Sorry, this is out of my league ... :)

Link to comment
Share on other sites

Dear debit72,

Thanks for the explicit instructions. I was able to follow them successfully, however I am finding that Toast fails to mount all the .Sd2f files it locates. It appears that a process is created for each mounted file:

 

% ps -aux

USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND

<snip>

joe 1241 0.0 -0.0 31516 896 ?? Ss 5:29AM 0:00.01 /Applications/Toast 7 Titanium/Toast Titanium.app/Contents/MacOS/ToastImageMounter /Volumes/m2_2/A51-100/CD_

joe 1255 0.0 -0.0 31516 324 ?? Ss 5:30AM 0:00.01 /Applications/Toast 7 Titanium/Toast Titanium.app/Contents/MacOS/ToastImageMounter /Volumes/m2_2/A51-100/CD_

joe 1268 0.0 -0.0 31516 328 ?? Ss 5:31AM 0:00.01 /Applications/Toast 7 Titanium/Toast Titanium.app/Contents/MacOS/ToastImageMounter /Volumes/m2_2/A51-100/CD_

joe 1283 0.0 -0.0 31516 328 ?? Ss 5:32AM 0:00.01 /Applications/Toast 7 Titanium/Toast Titanium.app/Contents/MacOS/ToastImageMounter /Volumes/m2_2/A51-100/LP_

joe 1304 0.0 -0.0 31516 332 ?? Ss 7:14AM 0:00.01 /Applications/Toast 7 Titanium/Toast Titanium.app/Contents/MacOS/ToastImageMounter /Volumes/m3/rationalized/

 

(the names of my .Sd2f files have been clipped by the right side of the window)

 

All my .S2df files are being located in the first step. I would like to mount my entire collection of images of my CDs, i.e. hundreds of images. Would you or anyone else have a clue as to what is breaking? Is there a system-wide limit to the number of processes that can exist? Can that be changed by a Darwin/Unix command? It is concievable that I'd run out of memory, but that shouldn't be a factor with the number of mount processes I'm seeing at this point. Could there be a limit to the number of mounts built into Toast7 itself?

 

Thanks,

-Joe

Link to comment
Share on other sites

Thanks for pointing out the contextual item suggestion. My goal was to automate the mounting of a long list of .S2df files. So far the best (only) way I've found is to select them all in the finder and then use the control click method to mount them all in one command. Since there doesn't appear to be a unix shell-invocalbe command, would it be possible to implement in an Apple script? I 've tried experimenting, but haven't had much sucess.

 

Thanks,

-Joe

Link to comment
Share on other sites

Thanks for pointing out the contextual item suggestion. My goal was to automate the mounting of a long list of .S2df files. So far the best (only) way I've found is to select them all in the finder and then use the control click method to mount them all in one command. Since there doesn't appear to be a unix shell-invocalbe command, would it be possible to implement in an Apple script? I 've tried experimenting, but haven't had much sucess.

 

Thanks,

-Joe

 

Have you investigated using the Automator (part of Tiger)?

Link to comment
Share on other sites

Dear debit72,

Thanks for the suggestion. I've never used Automator before, but perhaps it can fit the bill. I'm finding the documentation a bit confusing. Would I need to compile my own action for control-clicking on an object and then using the Toast "Mount It" command? How would I feed all .Sd2f files in a particularly folder to this action. Would I use a unix shell script that did an "ls -1 " in my folder of choice?

 

Thanks, -Joe

Link to comment
Share on other sites

Dear Debit72,

Thanks for your helpful post. I think you may have solved my poblem, however I am stumbling because of my own experience with Applescripting. I have copied your code verbatim into a new script using Script Editor, compiled it, and saved it to a file call ToastMount.scpt that I see in my applescript pulldown menu on the top bar.

 

I am worried about the verbatim copy. Was I supposed to substitute something for the input, parameters or myPath fields? If so, if you show me a specific example that is working on your files, i'll be able to emulate the syntax.

 

When I pull down the script menu and execute, nothing happens. I have both .toast and .S2df filesin a folder. I'm not sure I understand how Toast is supposed to find this folder with my stored files.

 

How does Applescript differentiate between Toast Titanium 7 and previous versions which I still have in my Applications folder?

 

Many thanks,

Joe

 

I played around and came up with the following Applescript. It will loop through a set of results (multiple files) and mount them in Toast*. I was using .toast files because I don't have any .sd2f files, but hopefully it should work in a similar manner.

 

on run {input, parameters}

 

repeat with i in input

 

set myPath to i

 

tell application "Finder"

open myPath

end tell

 

tell application "Toast Titanium"

mount image {myPath}

end tell

 

end repeat

 

return input

 

end run

 

* I should say, mount them using Toast ... since toast will only display one image at a time in the Copy window. However, all of the images appear mounted on the Desktop.

Link to comment
Share on other sites

I don't know the answer to your questions. However, this might help: you can use the Mount It contextual item to mount multiple selected .sd2f files at once. I don't know what the OS X limit is for mounted volumes. Also, you can play .sd2f files without mounting them with various audio players, although you won't have any track information that way. And you can drag an .sd2f file (without mounting) to the Toast Audio window and the tracks will be listed with the proper gaps. You can play the tracks in Toast. This way you could have tracks from multiple .sd2f files and arrange them any way you want for playback. Saving the Toast window will retain that listing as long as you don't move the .sd2f files later. I don't know if there is a limit to the number of tracks that Toast will list in its window.

 

I'm pointing this out in hope it will help your investigation into a solution that works for you.

Link to comment
Share on other sites

I am worried about the verbatim copy. Was I supposed to substitute something for the input, parameters or myPath fields? If so, if you show me a specific example that is working on your files, i'll be able to emulate the syntax.

Here's the whole deal. I created a new workflow in Automator. The first step was "Ask for Finder Items." I chose "Files" and "Allow Multiple Selection." However, you may want to use something like "Get Specified Finder Items" since you know exactly where your images are. Or you could use "Find Finder Items" and select the location and use Extension is sd2f. In any case, you want the output of that first action to be a list of the images you want to mount.

 

To test this part, add "View Results" as the second action in the workflow. Then run this a couple of times to verify that you're getting a list of files that looks something like this:

 

{alias "Ginkou:Disk Images:Lowbrow In Concert.img", alias "Ginkou:Disk Images:Magical Mystery Tour.toast"}

This is what I see in the View Results pane after I selected two images.

 

Once you're sure that you are getting output in the correct format, add another action "Run Applescript." Then copy and paste the applescript verbatim into the window.

 

Once you have that you should be good to go.

Link to comment
Share on other sites

Hmm, I'm not an Automator expert, so I don't know how much I can help you, and I'm not entirely sure what is is you want to do. But I think in the first step of the workflow you can use something like "Find Finder Items" with criteria "Extension is equal to .sd2f" to get your files ... but then I'm stumped on how to do the mounting piece. It appears that Toast doesn't have any automator actions available.

Link to comment
Share on other sites

Aha, but Toast is scriptable. Open your Script editor and use the Dictionary to look at the Toast actions. There is one there that looks promising ... "mount image". Maybe you can figure out a way to take the results of the "find finder items" search and pipe them to "mount image".

 

Try asking for help in the Apple Discussions. I've found people on there are good about questions.

Link to comment
Share on other sites

I played around and came up with the following Applescript. It will loop through a set of results (multiple files) and mount them in Toast*. I was using .toast files because I don't have any .sd2f files, but hopefully it should work in a similar manner.

 

on run {input, parameters}

 

repeat with i in input

 

set myPath to i

 

tell application "Finder"

open myPath

end tell

 

tell application "Toast Titanium"

mount image {myPath}

end tell

 

end repeat

 

return input

 

end run

 

* I should say, mount them using Toast ... since toast will only display one image at a time in the Copy window. However, all of the images appear mounted on the Desktop.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...