Audacity is using 32-bit float format. +480 to -300 is 'only' about +50 dB, which 32-bit float format can handle with ease.Sprinterdriver wrote: the largest values is like -300 and +480 - and I doubt that those data are accepded for sample input.
[SOLVED] Importing raw data - or from text list
Forum rules
This forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".
Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Re: Importing raw data - or from text list
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Sprinterdriver
- Posts: 47
- Joined: Tue Jan 19, 2010 9:59 pm
- Operating System: Please select
Re: Importing raw data - or from text list
Here is a Autohotkey script that add a Open file dialog box to the Sample Data Import (SDI for short) dialog box:
Here is how the script must be used:
* If the menus in Audacity is in different languages than english, there may be wrong menu opened, because the script sends the keystrokes Alt+G to open the dialog box.
Here is how the script must be used:
- Must run at the same time as Audacity.
- User would have to open the SDI by pressing Alt+N while main window is active.
- When SDI dialog box is active, user may press Ctrl+O to browse for a file. The file path will be inserted into the text field.
- May not activate correct menu item after pressing Alt+N if SDI is not the last item on list, or if language* of Audacity interface is not english.
- Inside SDI dialog box, the buttons must NOT be activated (e.g. using tab inside) before Ctrl+O is pressed. Cursor MUST be placed in text input field.
- If SDI dialog box is opened manually (using mouse) - the tooltip will not appear. The Ctrl+O will however still function.
- Any future updates of SDI may change window title, or what control inside SDI gui that is active by default, may cause the script to not function properly.
* If the menus in Audacity is in different languages than english, there may be wrong menu opened, because the script sends the keystrokes Alt+G to open the dialog box.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Posted by Sprinterdriver on Audacityforum - 02.06.2016.
; http://forum.audacityteam.org/viewtopic.php?f=46&t=91581
#Singleinstance Force
#persistent
IfWinExist, Sample Data Import...
SetTimer, sampleDataImport_timer, 50
; Audacity main window
#IfWinActive, ahk_class wxWindowClassNR
; Alt+N --> Open "Generate / Sample data import"
; Important note - It need to be at bottom of the list in order to be able to select.
!n::
KeyWait, n
KeyWait, Alt
Send {Alt down}g
Send {Alt up}
Send {Up}{Enter} ; If the "Sample data import" is second last item, change to {up 2} - and so on.
SetTimer, sampleDataImport_timer, 50
Return
; Keep tooltip in place and close whenever the window close or loose focus.
sampleDataImport_timer:
IfWinActive, Sample Data Import...
ToolTip, Press Ctrl+O to browse the file to open, 105, 60
Else {
ToolTip
IfWinNotExist, Sample Data Import...
SetTimer, sampleDataImport_timer, Off
}
Return
#IfWinActive, Sample Data Import...
; Ctrl+O
; User still need to manually click OK to actually start the process..
^o::
FileSelectFile, filePath, 1, %A_MyDocuments%, Open a list of samples file, Plain text files (*.txt; *.csv)
If errorlevel ; Canceled by user
Return
SendInput, %filePath%
ReturnRe: Importing raw data - or from text list
Thanks Sprinterdriver. As I wrote earlier, I can't try it myself as I'm not on Windows, but it may well be useful for others.
If you're interested in 'signal processing' in any form, you should have a look at Nyquist. I think you'd enjoy it
If you'd like a chat about Nyquist scripts and what they can do, drop in a post on the Nyquist part of the board (http://forum.audacityteam.org/viewforum.php?f=39) and I'd be happy to chat with you about it.
Are you happy with the outcome of this forum thread? If so I'll close it.
Steve
If you're interested in 'signal processing' in any form, you should have a look at Nyquist. I think you'd enjoy it
Are you happy with the outcome of this forum thread? If so I'll close it.
Steve
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing raw data - or from text list
What version of Windows are you on and which version of Sample Data Import are you using?
On Windows 10 using http://forum.audacityteam.org/download/file.php?id=7264 (space added at the end of line 13) and latest AutoHotKey, ALT + N and CTRL + O do nothing. Yes, the script is running and other AHK scripts work.
Gale
On Windows 10 using http://forum.audacityteam.org/download/file.php?id=7264 (space added at the end of line 13) and latest AutoHotKey, ALT + N and CTRL + O do nothing. Yes, the script is running and other AHK scripts work.
Gale
Sprinterdriver wrote:Here is a Autohotkey script that add a Open file dialog box to the Sample Data Import (SDI for short) dialog box:
Here is how the script must be used:Things that may not work
- Must run at the same time as Audacity.
- User would have to open the SDI by pressing Alt+N while main window is active.
- When SDI dialog box is active, user may press Ctrl+O to browse for a file. The file path will be inserted into the text field.
- May not activate correct menu item after pressing Alt+N if SDI is not the last item on list, or if language* of Audacity interface is not english.
- Inside SDI dialog box, the buttons must NOT be activated (e.g. using tab inside) before Ctrl+O is pressed. Cursor MUST be placed in text input field.
- If SDI dialog box is opened manually (using mouse) - the tooltip will not appear. The Ctrl+O will however still function.
- Any future updates of SDI may change window title, or what control inside SDI gui that is active by default, may cause the script to not function properly.
* If the menus in Audacity is in different languages than english, there may be wrong menu opened, because the script sends the keystrokes Alt+G to open the dialog box.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ; Posted by Sprinterdriver on Audacityforum - 02.06.2016. ; http://forum.audacityteam.org/viewtopic.php?f=46&t=91581 #Singleinstance Force #persistent IfWinExist, Sample Data Import... SetTimer, sampleDataImport_timer, 50 ; Audacity main window #IfWinActive, ahk_class wxWindowClassNR ; Alt+N --> Open "Generate / Sample data import" ; Important note - It need to be at bottom of the list in order to be able to select. !n:: KeyWait, n KeyWait, Alt Send {Alt down}g Send {Alt up} Send {Up}{Enter} ; If the "Sample data import" is second last item, change to {up 2} - and so on. SetTimer, sampleDataImport_timer, 50 Return ; Keep tooltip in place and close whenever the window close or loose focus. sampleDataImport_timer: IfWinActive, Sample Data Import... ToolTip, Press Ctrl+O to browse the file to open, 105, 60 Else { ToolTip IfWinNotExist, Sample Data Import... SetTimer, sampleDataImport_timer, Off } Return #IfWinActive, Sample Data Import... ; Ctrl+O ; User still need to manually click OK to actually start the process.. ^o:: FileSelectFile, filePath, 1, %A_MyDocuments%, Open a list of samples file, Plain text files (*.txt; *.csv) If errorlevel ; Canceled by user Return SendInput, %filePath% Return
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Importing raw data - or from text list
OK, so following a PM from Sprinterdriver (who is on Windows XP) I had to open WIndow Spy from the running script's context menu to see what AHK expects for the window title. Accordingly I changed the line in the script after "; Audacity main window" toGale Andrews wrote:What version of Windows are you on and which version of Sample Data Import are you using?
On Windows 10 using http://forum.audacityteam.org/download/file.php?id=7264 (space added at the end of line 13) and latest AutoHotKey, ALT + N and CTRL + O do nothing. Yes, the script is running and other AHK scripts work.
Code: Select all
#IfWinActive, ahk_exe audacity.exeCode: Select all
Sample Data ImportThanks for the script.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: [SOLVED] Importing raw data - or from text list
Also another consideration on Windows 8/8.1 and 10 at least is that if Audacity is running with Administrative privileges the AHK script must be run with Administrative privileges too, or it will appear to do nothing.
Gale
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
-
Sprinterdriver
- Posts: 47
- Joined: Tue Jan 19, 2010 9:59 pm
- Operating System: Please select
Re: [SOLVED] Importing raw data - or from text list
UPDATE - I've figured out a method for supressing growth of integral of samples over time in Libre Office Calc. The method is simply to substract the average of a range* before and after each integrated samples.
* For this specific collection of sample data, I choose a range of 200 samples before and 200 samples prior - and less when closing in to start and end of data serie.
The .ods file is too big to upload, a brief description of the formula I used:
Data serie (integral) is in coloumn E. So in Cell F10000, the formula would be (range of average in this formula is +-50):
Resulting sound
Pretty interesting - I noticed that the auditible sound from the integrated data series is almost the same as for the original data serie, exepf it sounds like a high pass filter is applied - due to the formula used to suppress growing of samples, having similar effect on the sound as a high pass filter.
* For this specific collection of sample data, I choose a range of 200 samples before and 200 samples prior - and less when closing in to start and end of data serie.
The .ods file is too big to upload, a brief description of the formula I used:
Data serie (integral) is in coloumn E. So in Cell F10000, the formula would be (range of average in this formula is +-50):
Code: Select all
=E10000-AVERAGE(E9950:E10050)Pretty interesting - I noticed that the auditible sound from the integrated data series is almost the same as for the original data serie, exepf it sounds like a high pass filter is applied - due to the formula used to suppress growing of samples, having similar effect on the sound as a high pass filter.