# HG changeset patch # User mas01mj # Date 1271951006 0 # Node ID 02756c5ca15a3fd73c77e7bcd775f7120f5b9a6f # Parent 203181f7d8041de4d7475d93c4963019e41a3831 * Added interface elements for query start selection * Added logic for sec/vector conversion. diff -r 203181f7d804 -r 02756c5ca15a examples/iAudioDB/AppController.h --- a/examples/iAudioDB/AppController.h Fri Mar 12 14:46:22 2010 +0000 +++ b/examples/iAudioDB/AppController.h Thu Apr 22 15:43:26 2010 +0000 @@ -9,9 +9,8 @@ #import #include - @interface AppController : NSObject { - adb_t *db; + adb_ptr db; NSModalSession session; NSString* dbName; @@ -21,47 +20,28 @@ NSString* selectedFilename; IBOutlet NSTextField *statusField; - IBOutlet NSTableView* tracksView; + IBOutlet NSTableView *tracksView; IBOutlet id mainWindow; - // Query Customizing + // Querying + IBOutlet NSTextField* queryKey; + IBOutlet NSButton* playBothButton; + IBOutlet NSButton* playResultButton; + IBOutlet NSButton* stopButton; + IBOutlet NSButton* chooseButton; - IBOutlet NSButton* multipleCheckBox; - IBOutlet NSButton* resetButton; - IBOutlet NSTextField* queryLengthVectors; - IBOutlet NSTextField* queryLengthSeconds; - IBOutlet NSTextField* queryPath; - IBOutlet NSButton* queryButton; - - // Main window buttons/fields. - - IBOutlet NSToolbarItem* importAudioButton; - IBOutlet NSToolbarItem* performQueryButton; - IBOutlet NSToolbarItem* playBothButton; - IBOutlet NSToolbarItem* playResultButton; - IBOutlet NSToolbarItem* stopButton; - IBOutlet NSTextField* queryKey; - - NSSound* queryTrack; - NSSound* resultTrack; - - // Creating - IBOutlet id createSheet; - IBOutlet id querySheet; - - IBOutlet NSMatrix* extractorOptions; - IBOutlet NSTextField* windowSizeField; - IBOutlet NSTextField* hopSizeField; - IBOutlet NSTextField* maxTracksField; - IBOutlet NSTextField* maxLengthField; + NSMutableArray* results; + NSDictionary* trackMap; // Extracting IBOutlet id importSheet; + IBOutlet NSBox* extractingBox; + IBOutlet NSMatrix* extractorOptions; IBOutlet NSProgressIndicator* indicator; - NSMutableArray* results; - NSDictionary* trackMap; - NSDictionary* dbState; + // Playback + NSSound* queryTrack; + NSSound* resultTrack; // Query param fields @@ -72,26 +52,17 @@ IBOutlet NSTextField* queryLengthField; IBOutlet NSTextField* queryRadiusField; IBOutlet NSButtonCell* exhaustiveField;*/ + } // Menus -(IBAction)newDatabase:(id)sender; -(IBAction)openDatabase:(id)sender; +-(IBAction)selectFiles:(id)sender; // Import -(IBAction)importAudio:(id)sender; -// -(IBAction)cancelImport:(id)sender; - -// Create --(IBAction)cancelCreate:(id)sender; --(IBAction)createDatabase:(id)sender; - -// Query --(IBAction)pathAction:(id)sender; --(IBAction)cancelQuery:(id)sender; --(IBAction)performQuery:(id)sender; --(IBAction)selectQueryFile:(id)sender; --(IBAction)resetLengths:(id)sender; +-(IBAction)cancelImport:(id)sender; // Buttons -(IBAction)playBoth:(id)sender; @@ -99,9 +70,9 @@ -(IBAction)stopPlay:(id)sender; -(IBAction)chooseQuery:(id)sender; -(IBAction)selectedChanged:(id)sender; --(IBAction)tableDoubleClick:(id)sender; --(void)reset; + +-(void)performQuery; -(void)updateStatus; - (BOOL)validateUserInterfaceItem:(id )anItem; - (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)playbackSuccessful; diff -r 203181f7d804 -r 02756c5ca15a examples/iAudioDB/AppController.m --- a/examples/iAudioDB/AppController.m Fri Mar 12 14:46:22 2010 +0000 +++ b/examples/iAudioDB/AppController.m Thu Apr 22 15:43:26 2010 +0000 @@ -5,10 +5,10 @@ // Created by Mike Jewell on 27/01/2010. // Copyright 2010 __MyCompanyName__. All rights reserved. // + #import "AppController.h" - @implementation AppController -(id)init @@ -18,149 +18,57 @@ // A max of 100 results. results = [[NSMutableArray alloc] initWithCapacity: 100]; + return self; } -- (void)awakeFromNib { - [tracksView setTarget:self]; - [tracksView setDoubleAction:@selector(tableDoubleClick:)]; - [self updateStatus]; -} - - -- (IBAction)tableDoubleClick:(id)sender -{ - [self playResult:Nil]; -// NSLog(@"Table double clicked"); -} - /** * Create a new database, given the selected filename. */ -(IBAction)newDatabase:(id)sender { - - [NSApp beginSheet:createSheet modalForWindow:mainWindow modalDelegate:self didEndSelector:NULL contextInfo:nil]; - session = [NSApp beginModalSessionForWindow:createSheet]; - [NSApp runModalSession:session]; -} - -/** - * Cancel the db creation (at configuration time). - */ --(IBAction)cancelCreate:(id)sender -{ - [NSApp endModalSession:session]; - [createSheet orderOut:nil]; - [NSApp endSheet:createSheet]; -} - --(IBAction)createDatabase:(id)sender -{ - [self cancelCreate:self]; - NSSavePanel* panel = [NSSavePanel savePanel]; NSInteger response = [panel runModalForDirectory:NSHomeDirectory() file:@""]; - + [results removeAllObjects]; [tracksView reloadData]; - + if(response == NSFileHandlingPanelOKButton) { - // Work out which extractor to use - NSString* extractor = @"adb_chroma"; - // TODO: This should be stored with the n3. - int dim; - switch([extractorOptions selectedTag]) + // TODO: Refactor this into a 'tidy' method. + // Tidy any existing references up. + if(db) { - case 0: - extractor = @"adb_chroma"; - dim = 12; - break; - case 1: - extractor = @"adb_cq"; - dim = 48; - break; - case 2: - extractor = @"qm_chroma"; - dim = 12; - break; - case 3: - extractor = @"qm_mfcc"; - dim = 12; - break; + audiodb_close(db); } - // Calculate the max DB size - int vectors = ceil(([maxLengthField doubleValue] * 60) / ([hopSizeField doubleValue] / 44100)); - int numtracks = [maxTracksField intValue]; - int datasize = ceil((numtracks * vectors * dim * 8) / 1024 / 1024); // In MB + if(dbFilename) + { + [dbFilename release]; + [dbName release]; + [plistFilename release]; + } - [self reset]; - // Create new db, and set flags. - db = audiodb_create([[panel filename] cStringUsingEncoding:NSUTF8StringEncoding], datasize, numtracks, dim); + db = audiodb_create([[panel filename] cStringUsingEncoding:NSUTF8StringEncoding], 0, 0, 0); audiodb_l2norm(db); - + audiodb_power(db); + // Store useful paths. dbName = [[[panel URL] relativePath] retain]; dbFilename = [[panel filename] retain]; plistFilename = [[NSString stringWithFormat:@"%@.plist", [dbFilename stringByDeletingPathExtension]] retain]; - + // Create the plist file (contains mapping from filename to key). - dbState = [[NSMutableDictionary alloc] init]; trackMap = [[NSMutableDictionary alloc] init]; - [dbState setValue:trackMap forKey:@"tracks"]; - [dbState setValue:extractor forKey:@"extractor"]; - [dbState setValue:[hopSizeField stringValue] forKey:@"hopsize"]; - [dbState setValue:[windowSizeField stringValue] forKey:@"windowsize"]; - [dbState writeToFile:plistFilename atomically:YES]; - + [trackMap writeToFile:plistFilename atomically:YES]; + [queryKey setStringValue:@"None Selected"]; [self updateStatus]; } } --(void)reset -{ - // Tidy any existing references up. - if(db) - { - NSLog(@"Close db"); - audiodb_close(db); - } - - if(dbFilename) - { - NSLog(@"Tidy up filenames"); - [dbFilename release]; - [dbName release]; - [plistFilename release]; - [trackMap release]; - [dbState release]; - } - - if(selectedKey) - { - NSLog(@"Released selected key: %@", selectedKey); - [selectedKey release]; - selectedKey = Nil; - NSLog(@"Is now %@", selectedKey); - } - - if(selectedKey) - { - NSLog(@"Still evals"); - } - - // Reset query flags - [queryPath setStringValue: @"No file selected"]; - [queryLengthSeconds setDoubleValue:0]; - [queryLengthVectors setDoubleValue:0]; - [multipleCheckBox setState:NSOnState]; -} - /** * Open an existing adb (which must have a plist) */ @@ -171,11 +79,21 @@ NSInteger response = [panel runModalForDirectory:NSHomeDirectory() file:@"" types:fileTypes]; if(response == NSFileHandlingPanelOKButton) { - [self reset]; + // Tidy any existing references up. + if(db) + { + audiodb_close(db); + } + + if(dbFilename) + { + [dbFilename release]; + [dbName release]; + [plistFilename release]; + } // Store useful paths. - NSLog(@"Open"); - db = audiodb_open([[panel filename] cStringUsingEncoding:NSUTF8StringEncoding], O_RDONLY); + db = audiodb_open([[panel filename] cStringUsingEncoding:NSUTF8StringEncoding], O_RDWR); dbName = [[[panel URL] relativePath] retain]; dbFilename = [[panel filename] retain]; @@ -187,6 +105,7 @@ [tracksView reloadData]; [queryKey setStringValue:@"None Selected"]; + [self updateStatus]; adb_liszt_results_t* liszt_results = audiodb_liszt(db); @@ -197,58 +116,57 @@ } audiodb_liszt_free_results(db, liszt_results); - dbState = [[[NSMutableDictionary alloc] initWithContentsOfFile:plistFilename] retain]; - trackMap = [[dbState objectForKey:@"tracks"] retain]; - - [self updateStatus]; - + trackMap = [[[NSMutableDictionary alloc] initWithContentsOfFile:plistFilename] retain]; NSLog(@"Size: %d", [trackMap count]); } } --(IBAction)pathAction:(id)sender -{ - NSLog(@"Path action"); -} - /** * Update button states and status field based on current state. */ -(void)updateStatus { - NSLog(@"Update status"); if(db) { - NSLog(@"Got a db"); - adb_status_t *status = (adb_status_t *)malloc(sizeof(adb_status_t)); + adb_status_ptr status = (adb_status_ptr)malloc(sizeof(struct adbstatus)); int flags; flags = audiodb_status(db, status); - [statusField setStringValue: [NSString stringWithFormat:@"%@ Dim: %d Files: %d Hop: %@ Win: %@ Ext: %@", - dbName, - status->dim, - status->numFiles, - [dbState objectForKey:@"hopsize"], - [dbState objectForKey:@"windowsize"], - [dbState objectForKey:@"extractor"]]]; - [performQueryButton setEnabled:YES]; - [importAudioButton setEnabled:YES]; + [statusField setStringValue: [NSString stringWithFormat:@"Database: %@ Dimensions: %d Files: %d", dbName, status->dim, status->numFiles]]; + [chooseButton setEnabled:YES]; } else { - NSLog(@"No db"); - [performQueryButton setEnabled:NO]; - [importAudioButton setEnabled:NO]; - [playBothButton setEnabled:NO]; - [playResultButton setEnabled:NO]; - [stopButton setEnabled:NO]; + [chooseButton setEnabled:NO]; + [playBothButton setEnabled:FALSE]; + [playResultButton setEnabled:FALSE]; } } /** + * Get user's import choices. + */ +-(IBAction)importAudio:(id)sender +{ + [NSApp beginSheet:importSheet modalForWindow:mainWindow modalDelegate:self didEndSelector:NULL contextInfo:nil]; + session = [NSApp beginModalSessionForWindow: importSheet]; + [NSApp runModalSession:session]; +} + +/** + * Cancel the import (at configuration time). + */ +-(IBAction)cancelImport:(id)sender; +{ + [NSApp endModalSession:session]; + [importSheet orderOut:nil]; + [NSApp endSheet:importSheet]; +} + +/** * Choose the file(s) to be imported. * TODO: Currently handles the import process too - split this off. */ --(IBAction)importAudio:(id)sender +-(IBAction)selectFiles:(id)sender { [tracksView reloadData]; @@ -258,75 +176,121 @@ NSInteger response = [panel runModalForDirectory:NSHomeDirectory() file:@"" types:fileTypes]; if(response == NSFileHandlingPanelOKButton) { + NSRect newFrame; + + [extractingBox setHidden:FALSE]; + newFrame.origin.x = [importSheet frame].origin.x; + newFrame.origin.y = [importSheet frame].origin.y - [extractingBox frame].size.height; + newFrame.size.width = [importSheet frame].size.width; + newFrame.size.height = [importSheet frame].size.height + [extractingBox frame].size.height; + [indicator startAnimation:self]; - - [NSApp beginSheet:importSheet modalForWindow:mainWindow modalDelegate:self didEndSelector:NULL contextInfo:nil]; - session = [NSApp beginModalSessionForWindow: importSheet]; - [NSApp runModalSession:session]; + [importSheet setFrame:newFrame display:YES animate:YES]; NSArray *filesToOpen = [panel filenames]; - NSString* extractor = [dbState objectForKey:@"extractor"]; - NSString* extractorPath = [NSString stringWithFormat:@"/Applications/iAudioDB.app/rdf/%@.n3", extractor]; + NSLog(@"Begin import"); - // TODO Shift this process into a separate function. - // Create the customized extractor config - NSString* extractorContent = [NSString stringWithContentsOfFile:extractorPath]; - NSString* hopStr = [dbState objectForKey:@"hopsize"]; - NSString* winStr = [dbState objectForKey:@"windowsize"]; - NSString* newContent = [[extractorContent stringByReplacingOccurrencesOfString:@"HOP_SIZE" withString:hopStr] - stringByReplacingOccurrencesOfString:@"WINDOW_SIZE" withString:winStr]; - NSString* n3FileName = [NSTemporaryDirectory() stringByAppendingPathComponent:@"extractor_config.n3"]; - - NSError* error; - [newContent writeToFile:n3FileName atomically:YES encoding:NSASCIIStringEncoding error:&error]; + // Work out which extractor to use + NSString* extractor = @"chromagram"; + switch([extractorOptions selectedTag]) + { + case 0: + extractor = @"mfcc"; + break; + case 1: + extractor = @"chromagram"; + break; + } for(int i=0; i<[filesToOpen count]; i++) - { - audiodb_close(db); - NSString* tempFileTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent:@"features.XXXXXX"]; - const char* tempFileTemplateCString = [tempFileTemplate fileSystemRepresentation]; - char* tempFileNameCString = (char *)malloc(strlen(tempFileTemplateCString) + 1); + { + // First extract powers + + NSString *tempFileTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent:@"powers.XXXXXX"]; + const char *tempFileTemplateCString = [tempFileTemplate fileSystemRepresentation]; + char *tempFileNameCString = (char *)malloc(strlen(tempFileTemplateCString) + 1); + strcpy(tempFileNameCString, tempFileTemplateCString); + mktemp(tempFileNameCString); + + NSString* powersFileName = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:tempFileNameCString length:strlen(tempFileNameCString)]; + free(tempFileNameCString); + + NSTask *task = [[NSTask alloc] init]; + [task setLaunchPath:@"/usr/local/bin/fftExtract"]; + NSArray *args = [NSArray arrayWithObjects:@"-P", @"-s", @"250", [filesToOpen objectAtIndex:i], powersFileName, nil]; + [task setArguments:args]; + [task launch]; + [task waitUntilExit]; + [task release]; + + // Then features + + tempFileTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent:@"features.XXXXXX"]; + tempFileTemplateCString = [tempFileTemplate fileSystemRepresentation]; + tempFileNameCString = (char *)malloc(strlen(tempFileTemplateCString) + 1); strcpy(tempFileNameCString, tempFileTemplateCString); mktemp(tempFileNameCString); NSString* featuresFileName = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:tempFileNameCString length:strlen(tempFileNameCString)]; free(tempFileNameCString); - NSTask* task = [[NSTask alloc] init]; + task = [[NSTask alloc] init]; - [task setLaunchPath:@"/usr/local/bin/sonic-annotator"]; - NSArray* args; - args = [NSArray arrayWithObjects:@"-t", n3FileName, @"-w", @"rdf", @"-r", @"--rdf-network", @"--rdf-one-file", featuresFileName, @"--rdf-force", [filesToOpen objectAtIndex:i], nil]; - [task setArguments:args]; + [task setLaunchPath:@"/usr/local/bin/fftExtract"]; + + NSArray *args2; + + // Choose the args (TODO: This should use sonic annotator eventually) + if([extractor isEqualToString:@"chromagram"]) + { + args2 = [NSArray arrayWithObjects:@"-p",@"/Users/mikej/planfile",@"-c", @"12", @"-s", @"250", [filesToOpen objectAtIndex:i], featuresFileName, nil]; + } + else + { + args2 = [NSArray arrayWithObjects:@"-p",@"/Users/mikej/planfile",@"-m", @"13", @"-s", @"250", [filesToOpen objectAtIndex:i], featuresFileName, nil]; + } + [task setArguments:args2]; [task launch]; [task waitUntilExit]; [task release]; - NSTask* importTask = [[NSTask alloc] init]; - [importTask setLaunchPath:@"/usr/local/bin/populate"]; - args = [NSArray arrayWithObjects:featuresFileName, dbFilename, nil]; - [importTask setArguments:args]; - [importTask launch]; - [importTask waitUntilExit]; - [importTask release]; - NSString* val = [[filesToOpen objectAtIndex:i] retain]; NSString* key = [[[filesToOpen objectAtIndex:i] lastPathComponent] retain]; - + + adb_insert_t insert; + insert.features = [featuresFileName cStringUsingEncoding:NSUTF8StringEncoding]; + insert.power = [powersFileName cStringUsingEncoding:NSUTF8StringEncoding]; + insert.times = NULL; + insert.key = [key cStringUsingEncoding:NSUTF8StringEncoding]; + + // Insert into db. + if(audiodb_insert(db, &insert)) + { + // TODO: Show an error message. + NSLog(@"Weep: %@ %@ %@", featuresFileName, powersFileName, key); + continue; + } + // Update the plist store. [trackMap setValue:val forKey:key]; - [dbState writeToFile:plistFilename atomically: YES]; + [trackMap writeToFile:plistFilename atomically: YES]; - - db = audiodb_open([dbFilename cStringUsingEncoding:NSUTF8StringEncoding], O_RDONLY); [self updateStatus]; } + newFrame.origin.x = [importSheet frame].origin.x; + newFrame.origin.y = [importSheet frame].origin.y + [extractingBox frame].size.height; + newFrame.size.width = [importSheet frame].size.width; + newFrame.size.height = [importSheet frame].size.height - [extractingBox frame].size.height; + + [importSheet setFrame:newFrame display:YES animate:YES]; + [NSApp endModalSession:session]; [importSheet orderOut:nil]; [NSApp endSheet:importSheet]; [indicator stopAnimation:self]; + [extractingBox setHidden:TRUE]; } } @@ -346,7 +310,6 @@ id result = [results objectAtIndex:row]; id value = [result objectForKey:[tc identifier]]; - NSLog(@"Result: %s", [tc identifier]); if([[tc identifier] isEqualToString:@"meter"]) { NSLevelIndicatorCell *distance = [[NSLevelIndicatorCell alloc] initWithLevelIndicatorStyle:NSRelevancyLevelIndicatorStyle]; @@ -391,13 +354,13 @@ { if([tracksView numberOfSelectedRows] == 0) { - [playBothButton setEnabled:NO]; - [playResultButton setEnabled:NO]; + [playBothButton setEnabled:FALSE]; + [playResultButton setEnabled:FALSE]; } else { - [playBothButton setEnabled:YES]; - [playResultButton setEnabled:YES]; + [playBothButton setEnabled:TRUE]; + [playResultButton setEnabled:TRUE]; } } @@ -407,11 +370,6 @@ -(IBAction)playResult:(id)sender { - if([tracksView selectedRow] == -1) - { - return; - } - NSDictionary* selectedRow = [results objectAtIndex:[tracksView selectedRow]]; NSString* value = [selectedRow objectForKey:@"key"]; float ipos = [[selectedRow objectForKey:@"ipos"] floatValue]; @@ -455,6 +413,7 @@ NSDictionary* selectedRow = [results objectAtIndex:[tracksView selectedRow]]; NSString* value = [selectedRow objectForKey:@"key"]; float ipos = [[selectedRow objectForKey:@"ipos"] floatValue]; + float qpos = [[selectedRow objectForKey:@"qpos"] floatValue]; NSString* filename = [trackMap objectForKey:value]; NSLog(@"Key: %@ Value: %@", value, filename); @@ -480,6 +439,7 @@ // Get query track and shift to start point queryTrack = [[[NSSound alloc] initWithContentsOfFile:selectedFilename byReference:YES] retain]; + [queryTrack setCurrentTime:qpos]; [queryTrack setDelegate:self]; [queryTrack play]; @@ -528,25 +488,16 @@ */ -(IBAction)chooseQuery:(id)sender { - [queryButton setEnabled:(selectedKey ? YES : NO)]; - [NSApp beginSheet:querySheet modalForWindow:mainWindow modalDelegate:self didEndSelector:NULL contextInfo:nil]; - session = [NSApp beginModalSessionForWindow:querySheet]; - [NSApp runModalSession:session]; -} - - --(IBAction)selectQueryFile:(id)sender -{ NSArray* fileTypes = [NSArray arrayWithObject:@"wav"]; NSOpenPanel* panel = [NSOpenPanel openPanel]; NSInteger response = [panel runModalForDirectory:NSHomeDirectory() file:@"" types:fileTypes]; if(response == NSFileHandlingPanelOKButton) { + NSLog(@"%@", [panel filename]); + // Grab key NSArray* opts = [trackMap allKeysForObject:[panel filename]]; if([opts count] != 1) { - // TODO : Needs fixing! - NSAlert *alert = [[[NSAlert alloc] init] autorelease]; [alert addButtonWithTitle:@"OK"]; [alert setMessageText:@"Track not found"]; @@ -558,124 +509,34 @@ { selectedKey = [opts objectAtIndex:0]; [queryKey setStringValue:selectedKey]; - [queryPath setStringValue:selectedKey]; selectedFilename = [[panel filename] retain]; - [queryButton setEnabled:YES]; - - [self resetLengths:self]; + [self performQuery]; } } } --(IBAction)resetLengths:(id)sender -{ - queryTrack = [[NSSound alloc] initWithContentsOfFile:selectedFilename byReference:YES]; - NSLog(@"%f", [queryTrack duration]); - double samples = ([queryTrack duration]*44100); - double hopSize = [[dbState objectForKey:@"hopsize"] doubleValue]; - double winSize = [[dbState objectForKey:@"windowsize"] doubleValue]; - - [queryLengthSeconds setDoubleValue:ceil([queryTrack duration])]; - [queryLengthVectors setDoubleValue:ceil((samples-winSize)/hopSize)]; - -} - -- (void)controlTextDidChange:(NSNotification *)nd -{ - NSTextField *ed = [nd object]; - - double hopSize = [[dbState objectForKey:@"hopsize"] doubleValue]; - double winSize = [[dbState objectForKey:@"windowsize"] doubleValue]; - - if(!queryTrack) - { - queryTrack = [[NSSound alloc] initWithContentsOfFile:selectedFilename byReference:YES]; - } - - double totalDuration = [queryTrack duration]; - double samples = totalDuration * 44100; - double totalVectors = ((samples-winSize)/hopSize); - - if (ed == queryLengthSeconds) - { - double secs = [queryLengthSeconds doubleValue]; - if(secs > totalDuration) - { - [queryButton setEnabled:NO]; - } - else if(![queryButton isEnabled]) - { - [queryButton setEnabled:YES]; - } - - if(secs > 0) - { - // (samples - windowSize) / hopSize - - [queryLengthVectors setDoubleValue:ceil(((secs*44100)-winSize)/hopSize)]; - } - } - if (ed == queryLengthVectors) - { - double vectors = [queryLengthVectors doubleValue]; - - if(vectors > totalVectors) - { - [queryButton setEnabled:NO]; - } - else if(![queryButton isEnabled]) - { - [queryButton setEnabled:YES]; - } - - if(vectors > 0) - { - [queryLengthSeconds setDoubleValue:ceil(((hopSize*vectors)+winSize)/44100)]; - } - } -}; - --(IBAction)cancelQuery:(id)sender -{ - [NSApp endModalSession:session]; - [querySheet orderOut:nil]; - [NSApp endSheet:querySheet]; -} - /** * Actually perform the query. TODO: Monolithic. */ --(IBAction)performQuery:(id)sender +-(void)performQuery { - [NSApp endModalSession:session]; - [querySheet orderOut:nil]; - [NSApp endSheet:querySheet]; - NSLog(@"Perform query! %@, %@", selectedKey, selectedFilename); adb_query_spec_t *spec = (adb_query_spec_t *)malloc(sizeof(adb_query_spec_t)); spec->qid.datum = (adb_datum_t *)malloc(sizeof(adb_datum_t)); - spec->qid.sequence_length = [queryLengthVectors doubleValue]; + spec->qid.sequence_length = 20; spec->qid.sequence_start = 0; - spec->qid.flags = 0; + spec->qid.flags = 0; + // spec->qid.flags = spec->qid.flags | ADB_QID_FLAG_EXHAUSTIVE; - spec->params.accumulation = ADB_ACCUMULATION_PER_TRACK; - - if([multipleCheckBox state] == NSOnState) - { - spec->params.npoints = 10; - } - else - { - spec->params.npoints = 1; - } - spec->params.distance = ADB_DISTANCE_EUCLIDEAN_NORMED; + spec->params.npoints = 1; spec->params.ntracks = 100; - //spec->refine.radius = 5.0; + spec->refine.radius = 5.0; + spec->refine.hopsize = 1; // spec->refine.absolute_threshold = -6; // spec->refine.relative_threshold = 10; // spec->refine.duration_ratio = 0; @@ -683,8 +544,8 @@ spec->refine.flags = 0; // spec->refine.flags |= ADB_REFINE_ABSOLUTE_THRESHOLD; // spec->refine.flags |= ADB_REFINE_RELATIVE_THRESHOLD; -// spec->refine.flags |= ADB_REFINE_HOP_SIZE; - //spec->refine.flags |= ADB_REFINE_RADIUS; + spec->refine.flags |= ADB_REFINE_HOP_SIZE; + spec->refine.flags |= ADB_REFINE_RADIUS; adb_query_results_t *result = (adb_query_results_t *)malloc(sizeof(adb_query_results_t)); spec->qid.datum->data = NULL; @@ -705,16 +566,15 @@ } else { - NSLog(@"Populate table: %d", result->nresults); - float divisor = (44100/2048); for(int i=0; inresults; i++) { - NSMutableDictionary* dict = [[NSMutableDictionary alloc] initWithCapacity:4]; - [dict setValue:[NSString stringWithFormat:@"%s", result->results[i].ikey] forKey:@"key"]; + [dict setValue:[NSString stringWithFormat:@"%s", result->results[i].key] forKey:@"key"]; [dict setValue:[NSNumber numberWithFloat:result->results[i].dist] forKey:@"distance"]; [dict setValue:[NSNumber numberWithFloat:result->results[i].dist] forKey:@"meter"]; - [dict setValue:[NSNumber numberWithFloat:result->results[i].ipos/divisor] forKey:@"ipos"]; + [dict setValue:[NSNumber numberWithFloat:result->results[i].qpos/4] forKey:@"qpos"]; + [dict setValue:[NSNumber numberWithFloat:result->results[i].ipos/4] forKey:@"ipos"]; + NSLog(@"%s qpos %d ipos %d", result->results[i].key, result->results[i].qpos/4, result->results[i].ipos/4); [results addObject: dict]; } } diff -r 203181f7d804 -r 02756c5ca15a examples/iAudioDB/English.lproj/MainMenu.xib --- a/examples/iAudioDB/English.lproj/MainMenu.xib Fri Mar 12 14:46:22 2010 +0000 +++ b/examples/iAudioDB/English.lproj/MainMenu.xib Thu Apr 22 15:43:26 2010 +0000 @@ -8,11 +8,9 @@ 353.00 YES - - - + YES @@ -386,193 +384,13 @@ _NSMainMenu - 4111 + 7 2 {{335, 273}, {606, 477}} 1946157056 iAudioDB NSWindow - - - 0F013AFF-76CE-47B1-B051-A4C0663AC2E3 - - - YES - YES - NO - NO - 1 - 1 - - YES - - YES - 105D45A0-54C1-4F79-A213-7BD763B75FB9 - 8D8AC8A3-26FC-4B20-84A4-175BA2973EC2 - 9E9F684B-AC2D-4C64-BD36-9881ADEAABEC - A3831457-05C2-46D8-A720-CF818BD69A16 - DB64CA1A-034C-4947-8BD1-A909E2B69D79 - NSToolbarFlexibleSpaceItem - - - YES - - - 105D45A0-54C1-4F79-A213-7BD763B75FB9 - - Play Both - Play Both - - - - NSImage - Play - - - - {0, 0} - {0, 0} - YES - NO - -1 - YES - 3 - - - - 8D8AC8A3-26FC-4B20-84A4-175BA2973EC2 - - Play Result - Play Result - - - - - - {0, 0} - {0, 0} - YES - NO - -1 - YES - 2 - - - - 9E9F684B-AC2D-4C64-BD36-9881ADEAABEC - - Add - Add - - - - NSImage - Add - - - - {0, 0} - {0, 0} - YES - NO - -1 - YES - 0 - - - - A3831457-05C2-46D8-A720-CF818BD69A16 - - Query - Query - - - - NSImage - Spotlight - - - - {0, 0} - {0, 0} - YES - NO - -1 - YES - 1 - - - - DB64CA1A-034C-4947-8BD1-A909E2B69D79 - - Stop - Stop - - - - NSImage - Stop - - - - {0, 0} - {0, 0} - YES - NO - -1 - YES - 4 - - - NSToolbarFlexibleSpaceItem - - Flexible Space - - - - - - {1, 5} - {20000, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - YES - - - - - - - - - YES - - - - - - - - YES - - + {3.40282e+38, 3.40282e+38} @@ -601,7 +419,7 @@ 1044 - + 6 System textBackgroundColor @@ -610,7 +428,7 @@ MQA - + 6 System textColor @@ -621,265 +439,448 @@ - + - 274 + 282 YES - - - 2304 + + + 301 YES - - + + 256 - {586, 418} - + {{5, 39}, {70, 17}} + YES - - - 256 - {586, 17} - - + + 68288064 + 272630784 + Track Key: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + - - - 256 - {{587, 0}, {16, 17}} - + + + + 256 + {{404, 3}, {98, 32}} + + YES + + 604110336 + 134217728 + Play Both + + + -2033303297 + 129 + + + 200 + 25 - + + + + 256 + {{200, 3}, {96, 32}} + + YES + + 604110336 + 134217728 + Browse + + + -2038284033 + 129 + + + 200 + 25 + + + + + 256 + {{502, 3}, {96, 32}} + + YES + + 604110336 + 134217728 + Stop + + + -2033303297 + 129 + + + 200 + 25 + + + + + 268 + {{5, 13}, {212, 17}} + + YES + + 68288064 + 272630784 + None Selected + + + + 1 + MCAwIDAAA + + + + + + + 256 + {{296, 3}, {108, 32}} + + YES + + 604110336 + 134217728 + Play Result + + + -2033303297 + 129 + + + 200 + 25 + + + + {603, 63} + + NSView + + + + 274 + + YES + + + 2304 + YES - - meter - 6.400000e+01 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - - - LucidaGrande - 1.100000e+01 - 3100 + + + 256 + {586, 337} + + YES + + + 256 + {586, 17} + + + + + + 256 + {{587, 0}, {16, 17}} + + + + YES + + meter + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + LucidaGrande + 1.100000e+01 + 3100 + + + 6 + System + headerColor + + + + 6 + System + headerTextColor + + + + + -2080244224 + 131072 + + + 3.000000e+00 + 1.000000e+01 + 3.000000e+00 + 3.000000e+00 + 5 + 1 + + 3 + YES + YES + + + meter + NO + compare: + - - 6 - System - headerColor - + + key + 2.080000e+02 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + Key + + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + + key + YES + compare: + - - 6 - System - headerTextColor - + + qpos + 6.800000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + QPos + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + qpos + YES + compare: + + + + ipos + 6.300000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + IPos + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + ipos + YES + compare: + + + + distance + 1.680000e+02 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + Distance + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + distance + YES + compare: + - - -2080244224 - 131072 - - - 3.000000e+00 - 1.000000e+01 - 3.000000e+00 - 3.000000e+00 - 5 - 1 - - 3 - YES - - - meter - NO - compare: - - - - key - 2.080000e+02 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - Key - - - - - - 337772096 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2OQA - - - - 6 - System - controlTextColor - + 3.000000e+00 + 2.000000e+00 + + + 6 + System + gridColor + + 3 + MC41AA - 3 - YES - - - key - YES - compare: + 1.700000e+01 + -692060160 + 1 + + YES + + ipos + NO + compare: + - - - ipos - 6.300000e+01 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - IPos - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - ipos - YES - compare: - - - - distance - 2.390000e+02 - 1.000000e+01 - 3.402823e+38 - - 75628032 - 0 - Distance - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - - - distance - YES - compare: - + 4 + 15 + 0 + YES - 3.000000e+00 - 2.000000e+00 - - - 6 - System - gridColor - - 3 - MC41AA - + {{1, 17}, {586, 337}} + + + + + 4 + + + + 256 + {{587, 17}, {15, 337}} + + + _doScroller: + 9.970149e-01 + + + + 256 + {{1, 354}, {586, 15}} + + 1 + + _doScroller: + 9.982964e-01 + + + + 2304 + + YES + - 1.700000e+01 - -692060160 - 1 - 4 - 15 - 0 - YES + {{1, 0}, {586, 17}} + + + + + 4 + - {{1, 17}, {586, 418}} - - - - - 4 + {{0, 72}, {603, 370}} + + + 50 + + + + + + QSAAAEEgAABBmAAAQZgAAA - - - 256 - {{587, 17}, {15, 418}} - - - _doScroller: - 9.970149e-01 - - - - 256 - {{1, 435}, {586, 15}} - - 1 - - _doScroller: - 9.982964e-01 - - - - 2304 - - YES - - - {{1, 0}, {586, 17}} - - - - - 4 - - - {{0, 27}, {603, 451}} + {{3, 35}, {603, 442}} - - 50 - - - - - - QSAAAEEgAABBmAAAQZgAAA {606, 477} @@ -900,9 +901,9 @@ 17 2 - {{196, 229}, {305, 281}} + {{196, 412}, {530, 98}} -1543503872 - Create + Window NSPanel {3.40282e+38, 3.40282e+38} @@ -914,18 +915,19 @@ 268 - {{20, 155}, {176, 86}} + {{20, 20}, {132, 38}} YES - 4 + 2 1 YES -2080244224 0 - AudioDB Chromagram + Chromagram + 1 1211912703 128 @@ -940,9 +942,8 @@ 67239424 0 - AudioDB Constant-Q + MFCCs - 1 1211912703 128 @@ -1046,91 +1047,8 @@ 400 75 - - 67239424 - 0 - QM Chromagram - - 2 - - 1211912703 - 128 - - 549453824 - {18, 18} - - YES - - YES - - - - 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 -AAAAAGR4AAA80AAACw9YWVogAAAAAAAAZ50AAKYHAAAQ5VhZWiAAAAAAAAAqwQAAHT8AALcxWFlaIAAA -AAAAAPPYAAEAAAABFghzZjMyAAAAAAABC7cAAAWW///zVwAABykAAP3X///7t////aYAAAPaAADA9mN1 -cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAY3VydgAAAAAAAAABAc0AAHZjZ3QAAAAAAAAAAQAA -0XQAAAAAAAEAAAAA0XQAAAAAAAEAAAAA0XQAAAAAAAEAAG5kaW4AAAAAAAAAMAAAkMAAAFkAAABXwAAA -lcAAACh3AAAZWwAAUEAAAFRAAAIzMwACMzMAAjMzZGVzYwAAAAAAAAAIRGlzcGxheQAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAG1sdWMAAAAAAAAAAwAAAAxlblVTAAAADgAAADRmckZSAAAAMAAAAEJpdElUAAAADgAA -AHIARABpAHMAcABsAGEAeQBNAG8AbgBpAHQAZQB1AHIAIABkAGUAIAB0AHkAcABlACAAaQBuAGMAbwBu -AG4AdQBNAG8AbgBpAHQAbwBybW1vZAAAAAAAAA2vAAAQBAAAAADF1MaAAAAAAAAAAAAAAAAAAAAAAHRl -eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDEwAA - - - - - - - - 400 - 75 - - - 67239424 - 0 - QM MFCCs - - 3 - - 1211912703 - 128 - - - 400 - 75 - - {176, 20} + {132, 18} {4, 2} 1151868928 NSActionCell @@ -1187,41 +1105,97 @@ 75 - - 6 - System - controlColor - - + 268 - {{17, 249}, {123, 17}} + {{17, 66}, {123, 17}} YES 68288064 272630784 - Feature Type: + Available Features: + + + -2147483636 + + YES + + + 256 + + YES + + + 1292 + + {{5, 26}, {481, 20}} + + 16394 + 2.000000e+01 + 1.000000e+02 + + + + 268 + {{178, 54}, {136, 17}} + + YES + + 68288064 + 272630784 + Extracting features... + + + + + + + + {496, 71} + + + + {{11, -59}, {496, 71}} + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxAA + + + + 0 + 0 + 0 + NO + 268 - {{99, 12}, {96, 32}} + {{324, 11}, {96, 32}} YES - -2080244224 + 67239424 134217728 - Create + Extract -2038284033 @@ -1235,7 +1209,7 @@ 268 - {{195, 12}, {96, 32}} + {{420, 11}, {96, 32}} YES @@ -1252,457 +1226,8 @@ 25 - - - 268 - {{198, 249}, {117, 17}} - - YES - - 68288064 - 272630784 - Max Tracks: - - - - - - - - - 268 - {{201, 219}, {84, 22}} - - YES - - -1804468671 - 272630784 - 10 - - - YES - - - - - - - 268 - {{198, 194}, {182, 17}} - - YES - - 68288064 - 272630784 - Max Length: - - - - - - - - - 268 - {{201, 164}, {84, 22}} - - YES - - -1804468671 - 272630784 - 5 - - - YES - - - - - - - 268 - {{198, 139}, {182, 17}} - - YES - - 68288064 - 272630784 - Hop Size: - - - - - - - - - 268 - {{201, 109}, {84, 22}} - - YES - - -1804468671 - 272630784 - 2048 - - - YES - - - - - - - 268 - {{198, 84}, {182, 17}} - - YES - - 68288064 - 272630784 - Window Size: - - - - - - - - - 268 - {{201, 54}, {84, 22}} - - YES - - -1804468671 - 272630784 - 16384 - - - YES - - - - - {305, 281} - - - {{0, 0}, {1280, 1002}} - {3.40282e+38, 3.40282e+38} - - - 17 - 2 - {{196, 454}, {528, 56}} - -1543503872 - Import - NSPanel - - {3.40282e+38, 3.40282e+38} - - - 256 - - YES - - - 1292 - - {{18, 16}, {492, 20}} - - 16394 - 2.000000e+01 - 1.000000e+02 - - - {528, 56} - - - {{0, 0}, {1280, 1002}} - {3.40282e+38, 3.40282e+38} - - - 17 - 2 - {{196, 259}, {293, 251}} - -1543503872 - Query - NSPanel - - {3.40282e+38, 3.40282e+38} - - - 256 - - YES - - - 268 - {{12, 116}, {77, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 268 - {{97, 116}, {79, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 268 - {{10, 58}, {247, 18}} - - YES - - -2080244224 - 0 - Find multiple matches within tracks - - - 1211912703 - 130 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 268 - {{9, 218}, {72, 17}} - - YES - - 68288064 - 272630784 - Query File: - - - - - - - - - 268 - {{9, 146}, {94, 17}} - - YES - - 68288064 - 272630784 - Query Length - - - - - - - - - 268 - {{18, 91}, {65, 17}} - - YES - - 68288064 - 138413056 - (Vectors) - - - - - - - - - 12 - {{12, 169}, {261, 5}} - - {0, 0} - - 67239424 - 0 - Box - - - - 3 - MCAwLjgwMDAwMDAxAA - - - 3 - 2 - 0 - NO - - - - 268 - {{102, 91}, {69, 17}} - - YES - - 68288064 - 138413056 - (Seconds) - - - - - - - - - 12 - {{12, 80}, {261, 5}} - - {0, 0} - - 67239424 - 0 - Box - - - - 3 - MCAwLjgwMDAwMDAxAA - - - 3 - 2 - 0 - NO - - - - 268 - {{183, 110}, {96, 32}} - - YES - - 67239424 - 134217728 - Reset - - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{85, 12}, {96, 32}} - - YES - - 67239424 - 134217728 - Query - - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{181, 12}, {96, 32}} - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 129 - - - 200 - 25 - - - - - 268 - {{9, 193}, {169, 17}} - - YES - - 68288064 - 272630784 - No file selected - - - - - - - - - 268 - {{177, 184}, {103, 32}} - - YES - - 67239424 - 134217728 - Select File - - - -2038284033 - 129 - - - 200 - 25 - - - - {293, 251} + {530, 98} {{0, 0}, {1280, 1002}} @@ -1810,6 +1335,14 @@ + importSheet + + + + 569 + + + mainWindow @@ -1825,6 +1358,22 @@ 631 + + selectFiles: + + + + 632 + + + + extractingBox + + + + 633 + + extractorOptions @@ -1833,6 +1382,46 @@ 664 + + dataSource + + + + 671 + + + + tracksView + + + + 673 + + + + delegate + + + + 675 + + + + cancelImport: + + + + 695 + + + + selectedChanged: + + + + 702 + + paste: @@ -1881,284 +1470,76 @@ 737 - - maxTracksField + + chooseQuery: - + - 772 + 740 - maxLengthField + chooseButton - + - 773 + 741 + + + + stopPlay: + + + + 744 - hopSizeField + stopButton - + - 774 + 745 - indicator + queryKey - + - 782 + 748 - createSheet + playBothButton - + - 783 + 751 + + + + playBoth: + + + + 752 - importSheet + playResultButton - + - 784 - - - - createDatabase: - - - - 785 - - - - cancelCreate: - - - - 786 - - - - windowSizeField - - - - 791 - - - - querySheet - - - - 820 - - - - queryLengthSeconds - - - - 823 - - - - multipleCheckBox - - - - 824 - - - - resetButton - - - - 825 - - - - performQuery: - - - - 826 - - - - cancelQuery: - - - - 827 - - - - selectQueryFile: - - - - 839 - - - - queryPath - - - - 840 - - - - resetLengths: - - - - 841 - - - - queryLengthVectors - - - - 843 - - - - delegate - - - - 844 - - - - delegate - - - - 845 - - - - queryButton - - - - 846 - - - - importAudio: - - - - 865 + 753 playResult: - + - 866 - - - - chooseQuery: - - - - 867 - - - - stopPlay: - - - - 868 - - - - playResultButton - - - - 882 - - - - performQueryButton - - - - 883 - - - - stopButton - - - - 884 - - - - importAudioButton - - - - 885 - - - - tracksView - - - - 886 - - - - delegate - - - - 887 - - - - dataSource - - - - 888 - - - - playBoth: - - - - 890 - - - - playBothButton - - - - 891 + 754 @@ -2401,7 +1782,6 @@ YES - @@ -2411,8 +1791,8 @@ YES + - @@ -2456,6 +1836,16 @@ + 524 + + + YES + + + + + + 564 @@ -2471,14 +1861,7 @@ YES - - - - - - - - + @@ -2492,8 +1875,6 @@ - - @@ -2527,6 +1908,35 @@ + 623 + + + YES + + + + + + + 624 + + + + + 625 + + + YES + + + + + + 626 + + + + 627 @@ -2541,6 +1951,172 @@ + 527 + + + YES + + + + + + + + + 530 + + + + + 529 + + + + + 528 + + + YES + + + + + + + + + + 555 + + + YES + + + + + + 556 + + + + + 552 + + + YES + + + + + + 553 + + + + + 525 + + + YES + + + + + + + + + + + 665 + + + YES + + + + + + 666 + + + + + 674 + + + + + 686 + + + YES + + + + + + 687 + + + + + 688 + + + YES + + + + + + 689 + + + + + 690 + + + YES + + + + + + 691 + + + + + 693 + + + YES + + + + + + 694 + + + + + 699 + + + YES + + + + + + 700 + + + + 704 @@ -2600,511 +2176,60 @@ - 755 - - + 738 + + + YES + + + - 756 - - + 739 + + - 693 - + 742 + YES - + - + - 694 - - + 743 + + - 757 - + 746 + YES - + - + - 758 - - + 747 + + - 759 - + 749 + YES - + - + - 760 - - - - - 763 - - - YES - - - - - - 764 - - - - - 765 - - - YES - - - - - - 766 - - - - - 767 - - - YES - - - - - - 768 - - - YES - - - - - - 769 - - - - - 770 - - - - - 778 - - - YES - - - - - - 779 - - - YES - - - - - - 780 - - - - - 787 - - - YES - - - - - - 788 - - - YES - - - - - - 789 - - - - - 790 - - - - - 792 - - - YES - - - - - - 793 - - - YES - - - - - - - - - - - - - - - - - - - 796 - - - YES - - - - - - 797 - - - - - 798 - - - YES - - - - - - 799 - - - - - 800 - - - YES - - - - - - 801 - - - - - 802 - - - YES - - - - - - 803 - - - - - 804 - - - YES - - - - - - 805 - - - - - 806 - - - YES - - - - - - 807 - - - - - 810 - - - - - 811 - - - YES - - - - - - 812 - - - - - 813 - - - - - 814 - - - YES - - - - - - 815 - - - - - 816 - - - YES - - - - - - 817 - - - - - 818 - - - YES - - - - - - 819 - - - - - 834 - - - YES - - - - - - 835 - - - - - 836 - - - YES - - - - - - 837 - - - - - 850 - - - YES - - - - - - - - - - - 856 - - - - - 862 - - - - - 863 - - - - - 864 - - - - - 869 - - - YES - - - - - - - - - 870 - - - - - 871 - - - YES - - - - - - - - - 872 - - - - - 873 - - - - - 874 - - - YES - - - - - - 875 - - - YES - - - - - - 876 - - - YES - - - - - - 877 - - - YES - - - - - - 878 - - - - - 879 - - - - - 880 - - - - - 881 - - - - - 861 - - - - - 889 - - + 750 + + @@ -3177,6 +2302,16 @@ 5.IBPluginDependency 5.ImportedFromIB2 522.IBPluginDependency + 524.IBPluginDependency + 525.IBPluginDependency + 527.IBPluginDependency + 528.IBPluginDependency + 529.IBPluginDependency + 530.IBPluginDependency + 552.IBPluginDependency + 553.IBPluginDependency + 555.IBPluginDependency + 556.IBPluginDependency 56.IBPluginDependency 56.ImportedFromIB2 564.IBEditorWindowLastContentRect @@ -3195,10 +2330,25 @@ 620.IBPluginDependency 621.IBPluginDependency 622.IBPluginDependency + 623.IBPluginDependency + 624.IBPluginDependency + 625.IBPluginDependency + 626.IBPluginDependency 627.IBPluginDependency 628.IBPluginDependency + 665.IBPluginDependency + 666.IBPluginDependency + 674.IBPluginDependency + 686.IBPluginDependency + 687.IBPluginDependency + 688.IBPluginDependency + 689.IBPluginDependency + 690.IBPluginDependency + 691.IBPluginDependency 693.IBPluginDependency 694.IBPluginDependency + 699.IBPluginDependency + 700.IBPluginDependency 704.IBPluginDependency 705.IBEditorWindowLastContentRect 705.IBPluginDependency @@ -3211,83 +2361,22 @@ 714.IBPluginDependency 72.IBPluginDependency 72.ImportedFromIB2 - 755.IBPluginDependency - 756.IBPluginDependency - 757.IBPluginDependency - 758.IBPluginDependency - 759.IBPluginDependency - 760.IBPluginDependency - 763.IBPluginDependency - 764.IBPluginDependency - 765.IBPluginDependency - 766.IBPluginDependency - 767.IBPluginDependency - 768.IBPluginDependency - 769.IBPluginDependency - 770.IBPluginDependency - 778.IBEditorWindowLastContentRect - 778.IBWindowTemplateEditedContentRect - 778.NSWindowTemplate.visibleAtLaunch - 779.IBPluginDependency - 780.IBPluginDependency - 787.IBPluginDependency - 788.IBPluginDependency - 789.IBPluginDependency - 790.IBPluginDependency - 792.IBEditorWindowLastContentRect - 792.IBWindowTemplateEditedContentRect - 792.NSWindowTemplate.visibleAtLaunch - 793.IBPluginDependency - 796.IBPluginDependency - 797.IBPluginDependency - 798.IBPluginDependency - 799.IBPluginDependency - 800.IBPluginDependency - 801.IBPluginDependency - 802.IBPluginDependency - 803.IBPluginDependency - 804.IBPluginDependency - 805.IBPluginDependency - 806.IBPluginDependency - 807.IBPluginDependency + 738.IBPluginDependency + 739.IBPluginDependency + 742.IBPluginDependency + 743.IBPluginDependency + 746.IBPluginDependency + 747.IBPluginDependency + 749.IBPluginDependency + 750.IBPluginDependency 81.IBEditorWindowLastContentRect 81.IBPluginDependency 81.ImportedFromIB2 81.editorWindowContentRectSynchronizationRect - 810.IBPluginDependency - 811.IBPluginDependency - 812.IBPluginDependency - 813.IBPluginDependency - 814.IBPluginDependency - 815.IBPluginDependency - 816.IBPluginDependency - 817.IBPluginDependency - 818.IBPluginDependency - 819.IBPluginDependency 82.IBPluginDependency 82.ImportedFromIB2 83.IBPluginDependency 83.ImportedFromIB2 - 834.IBPluginDependency - 835.IBPluginDependency - 836.IBPluginDependency - 837.IBPluginDependency - 850.IBEditorWindowLastContentRect - 850.IBPluginDependency - 856.IBPluginDependency - 869.IBPluginDependency - 870.IBPluginDependency - 871.IBPluginDependency - 872.IBPluginDependency - 873.IBPluginDependency - 874.IBPluginDependency - 875.IBPluginDependency - 876.IBPluginDependency - 877.IBPluginDependency - 878.IBPluginDependency - 879.IBPluginDependency - 880.IBPluginDependency - 881.IBPluginDependency 92.IBPluginDependency 92.ImportedFromIB2 @@ -3338,13 +2427,13 @@ com.apple.InterfaceBuilder.CocoaPlugin {{525, 802}, {197, 73}} - {{71, 285}, {315, 20}} + {{639, 285}, {315, 20}} com.apple.InterfaceBuilder.CocoaPlugin {74, 862} {{6, 978}, {478, 20}} - {{117, -39}, {606, 477}} - {{117, -39}, {606, 477}} + {{133, 278}, {606, 477}} + {{133, 278}, {606, 477}} {{33, 99}, {480, 360}} {3.40282e+38, 3.40282e+38} @@ -3359,12 +2448,22 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - {{169, 281}, {305, 281}} - {{169, 281}, {305, 281}} - + {{82, 388}, {530, 98}} + {{82, 388}, {530, 98}} + com.apple.InterfaceBuilder.CocoaPlugin - {{83, 102}, {201, 183}} + {{651, 102}, {201, 183}} com.apple.InterfaceBuilder.CocoaPlugin {{23, 794}, {245, 183}} @@ -3381,6 +2480,21 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{778, 152}, {154, 133}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3400,76 +2514,15 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{76, 497}, {528, 56}} - {{76, 497}, {528, 56}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{392, 71}, {293, 251}} - {{392, 71}, {293, 251}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{736, 222}, {169, 63}} com.apple.InterfaceBuilder.CocoaPlugin {{145, 474}, {199, 203}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{112, 438}, {616, 0}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin @@ -3493,7 +2546,7 @@ - 891 + 754 @@ -3505,22 +2558,16 @@ YES YES - cancelCreate: - cancelQuery: + cancelImport: chooseQuery: - createDatabase: importAudio: newDatabase: openDatabase: - pathAction: - performQuery: playBoth: playResult: - resetLengths: - selectQueryFile: + selectFiles: selectedChanged: stopPlay: - tableDoubleClick: YES @@ -3534,69 +2581,39 @@ id id id - id - id - id - id - id - id YES YES - createSheet + chooseButton + extractingBox extractorOptions - hopSizeField - importAudioButton importSheet indicator mainWindow - maxLengthField - maxTracksField - multipleCheckBox - performQueryButton playBothButton playResultButton - queryButton queryKey - queryLengthSeconds - queryLengthVectors - queryPath - querySheet - resetButton statusField stopButton tracksView - windowSizeField YES - id + NSButton + NSBox NSMatrix - NSTextField - NSToolbarItem id NSProgressIndicator id + NSButton + NSButton NSTextField NSTextField NSButton - NSToolbarItem - NSToolbarItem - NSToolbarItem - NSButton - NSTextField - NSTextField - NSTextField - NSTextField - id - NSButton - NSTextField - NSToolbarItem NSTableView - NSTextField