|
 |
|
09-13-2006, 07:28 PM
|
#181
|
|
Newbie
Join Date: Jan 2006
Location: Northern Virginia
Posts: 43
|
Ok, I'll do what I can to help. I'm a ****ty editor but I can do reseach. I'll see what I can find out about gesture input.
Let us know if you need anything else(beside time).
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
09-13-2006, 07:56 PM
|
#182
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 263
|
I've tried to send as much as info as I could on GPS, I personally think OBD II would be great, but realistically I think XM and GPS should be a priority, but hey maybe that's just me...
|
|
|
09-14-2006, 03:04 AM
|
#185
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
Quote: Originally Posted by LightningMac 
This is CoreAudio framework, which is pretty low-level and you cannot use it easily (if at all) with NSMovieView, that is used in AMP (BTW: It might not be a bad idea to replace it with QTMovie view - more functions and quite a few issues fixed).
By far the easiest way of implementing an equalizer is to use iTunes for playback and control its equalizer via AppleScript.
|
|
|
09-14-2006, 11:32 AM
|
#186
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Quote: Originally Posted by Jirka Jirout 
This is CoreAudio framework, which is pretty low-level and you cannot use it easily (if at all) with NSMovieView, that is used in AMP (BTW: It might not be a bad idea to replace it with QTMovie view - more functions and quite a few issues fixed).
By far the easiest way of implementing an equalizer is to use iTunes for playback and control its equalizer via AppleScript.
Jirka, is it possible to get/set the current play position (time, like you are at minute 2:03 of a 4:00 minute song) via iTunes & AppleScript interfacing?
__________________
-
|
|
|
09-14-2006, 11:48 AM
|
#187
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
Quote: Originally Posted by aychamo 
Jirka, is it possible to get/set the current play position (time, like you are at minute 2:03 of a 4:00 minute song) via iTunes & AppleScript interfacing?
Yes. I use this to store the position when the app goes down and then resume the playback the next time it is started.
here is how to store the position (moduleSetup is NSMutableDictionary):
Code:
- (void) readCurrentPosition{
NSAppleScript *asExecutor;
NSAppleEventDescriptor *asResult;
asExecutor = [[[NSAppleScript alloc] initWithSource: @"tell app \"iTunes\" to get {player position, index of current track, index of current playlist}"] autorelease];
asResult = [asExecutor executeAndReturnError:nil];
[moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:1]int32Value]] forKey:@"CURR_TIME"];
[moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:2]int32Value]] forKey:@"CURR_TRACK"];
[moduleSetup setObject: [NSNumber numberWithInt:[[asResult descriptorAtIndex:3]int32Value]] forKey:@"CURR_PLIST"];
}
and here how to resume from the stored position:
Code:
- (void)doPlay{
NSString *asCommand = [NSString stringWithFormat:@"tell application \"iTunes\"\r play track %i of playlist %i of source \"%@\"\r set player position to %i\r end tell",
[[moduleSetup objectForKey:@"CURR_TRACK"] intValue], [[moduleSetup objectForKey:@"CURR_PLIST"] intValue], [moduleSetup objectForKey:@"CURR_SRC"],
[[moduleSetup objectForKey:@"CURR_TIME"] intValue]];
//NSLog(asCommand); //DEBUG
[[[[NSAppleScript alloc] initWithSource:asCommand] autorelease] executeAndReturnError:nil];
}
|
|
|
09-14-2006, 11:54 AM
|
#188
|
|
FLAC
Join Date: Aug 2004
Location: Floreeda
Posts: 1,011
|
All I know of Mac OBDII is the python script thing that deals with it.
Youd need a serial to USB converter, and basically a way to read the info off the USB signal and interpret it into graphical or numerical data with labels etc.
Scantool has their own software for doing that, but its Windoze
__________________
(----) 0.0%
No more loot for the carpute.
Trying to fit my 20" iMac into the dash... RF 600.5 amp, two 10" JLW0, 8 Infinity Components
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
09-14-2006, 12:51 PM
|
#190
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
Quote: Originally Posted by sdashiki 
Youd need a serial to USB converter, and basically a way to read the info off the USB signal and interpret it into graphical or numerical data with labels etc.
If you use a serial to USB converter, its driver creates a device file in /dev/ and you can read/write data exactly the same way you read data from a file (using NSFileHandle). Reading the data is a piece of cake. What is (a little) more difficult is to parse the data you read, but since there is so much documentation and examples out there, it is not that difficult either.
|
|
|
09-14-2006, 10:11 PM
|
#191
|
|
Newbie
Join Date: Sep 2006
Posts: 14
|
|
|
|
09-14-2006, 10:26 PM
|
#192
|
|
Newbie
Join Date: Sep 2006
Posts: 14
|
|
|
|
09-15-2006, 01:58 AM
|
#193
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 263
|
I think he's set on XM because BugByte is SUPPOSE to be helping him since he has the code from his project... should be simple to implement... cough cough... right?
|
|
|
09-15-2006, 03:29 AM
|
#194
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
If the protocol description in the file submitted by Catronro is correct and complete, then the whole implementation is a task for one afternoon and maybe evening. I can try to write the controller class, but since we do not have XM here and I have no hardware to test it, I would need some help from someone who does have access to the box, proper cables etc.
|
|
|
09-15-2006, 09:33 AM
|
#195
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
We're happy to help out. Eugene wrote a functioning XM app in Java with all of the proper implementations. Works fine over a serial-USB FTDI controller.
We just haven't switched over to Cocoa, but if someone wants to take a look at the Java source, it probably isn't too hard to translate. Getting the box up and running and changing channels is easy. Getting info on what's playing is a little more challenging, but not hard.
The most difficult thing has been to start the box up and be sure it is running. But I'm sure it can be overcome.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:04 AM.
| |