| fname stamp results | "Ask for a file in the destination folder and save its pathname in fname." fname := (HostDriverInterface putFileWithPrompt: 'Choose a new folder where the results should be saved:' initially: (HostDriverInterface defaultFilenameOfType: HostDriverInterface textFileType) fileTypes: HostDriverInterface sampleFileTypes ifCancel: [^ self]) displayHead. fname := fname, Date today year printString, '-'. stamp := Date today monthIndex. (stamp < 10) ifTrue: [fname := fname, '0']. fname := fname, stamp printString, '-'. stamp := Date today dayOfMonth. (stamp < 10) ifTrue: [fname := fname, '0']. fname := fname, stamp printString, ' '. stamp := Time now hours. (stamp < 10) ifTrue: [fname := fname, '0']. fname := fname, stamp printString, '-'. stamp := Time now minutes. (stamp < 10) ifTrue: [fname := fname, '0']. fname := fname, stamp printString, '.csv'. results := fname asFilename writeStream. results cr. results nextPutAll: 'Time:,'. results logTime. "Write date and time to file" results cr. results nextPutAll: 'Loudness5:, loudness4 w/ microphone trigger. '. results cr.