Jump to content

Roxio Community

Mounting .sd2f Files From Unix Command Line


  • Please log in to reply
11 replies to this topic

#1 jizen

jizen

    Rookie

  • Members
  • PipPip
  • 13 posts

Posted 07 April 2006 - 11:27 PM

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

#2 tsantee

tsantee

    Digital Guru

  • Members
  • PipPipPipPipPipPip
  • 11,031 posts

Posted 08 April 2006 - 06:52 AM

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.
I'm just a fellow Toast-user so please don't blame Roxio for any misguidance I may provide. And do let me know if your issue gets solved. Cheers from Eugene, Oregon!

#3 jizen

jizen

    Rookie

  • Members
  • PipPip
  • 13 posts

Posted 02 May 2006 - 12:46 PM

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

#4 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 02 May 2006 - 02:57 PM

View Postjizen, on May 2 2006, 01:46 PM, said:

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)?

#5 jizen

jizen

    Rookie

  • Members
  • PipPip
  • 13 posts

Posted 02 May 2006 - 06:00 PM

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

#6 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 02 May 2006 - 09:48 PM

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.

#7 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 02 May 2006 - 10:11 PM

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.

#8 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 02 May 2006 - 11:04 PM

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.

Edited by debit72, 03 May 2006 - 07:05 AM.


#9 jizen

jizen

    Rookie

  • Members
  • PipPip
  • 13 posts

Posted 14 May 2006 - 05:37 PM

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

View Postdebit72, on May 2 2006, 11:04 PM, said:

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.


#10 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 14 May 2006 - 06:13 PM

View Postjizen, on May 14 2006, 06:37 PM, said:

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.

#11 jizen

jizen

    Rookie

  • Members
  • PipPip
  • 13 posts

Posted 02 June 2006 - 07:00 AM

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

#12 debit72

debit72

    Rookie

  • Members
  • PipPip
  • 44 posts

Posted 14 June 2006 - 12:39 PM

View Postjizen, on Jun 2 2006, 08:00 AM, said:

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 ...  :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users