Re: [libreoffice-users] Reading from a USB device.
seems to me is you were using linux this should be almost automatic /dev/device..< 18.1 Device Files UNIX has a beautifully consistent method of allowing programs to access hardware. Under UNIX, every piece of hardware is a file. To demonstrate this novelty, try viewing the file /dev/hda (you will have to be root to run this command): || |less -f /dev/hda| /dev/hda is not really a file at all. When you read from it, you are actually reading directly from the first physical hard disk of your machine. /dev/hda is known as a device file, and all of them are stored under the /dev directory. Device files allow access to hardware. If you have a sound card installed and configured, you can try: || |cat /dev/dsp > my_recording| Say something into your microphone and then type: || |cat my_recording > /dev/dsp| The system will play out the sound through your speakers (note that this d\n always work, since the recording volume or the recording speed may not be set correctly.) If no programs are currently using your mouse, you can also try: || |cat /dev/mouse| If you now move the mouse, the mouse protocol commands will be written directly to your screen (it will look like garbage). This is an easy way to see if your mouse is working, and is especially useful for testing serial port. Occasionally this test doesn't work because some command has previously configured the serial port in some odd way. In that case, also try: || |cu -s 1200 -l /dev/mouse| At a lower level, programs that access device files do so in two basic ways: * They read and write to the device to send and retrieve bulk data (much like less and cat above). * They use the *C* ioctl (/IO Control/) function to configure the device. (In the case of the sound card, this might set mono versus stereo, recording speed or other parameters.) Because every kind of device that one can think of (except for network cards) can be twisted to fit these two modes of operation, UNIX's scheme has endured since its inception and is the universal method of accessing hardware. I think the interest to use Libre Office maybe to get the port data to be captured into a spreadsheet.. ? On 08/28/2017 04:24 AM, Cley Faye wrote: 2017-08-27 15:47 GMT+02:00 Marion & Noel Lodge: I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use ahttps://www.hhdsoftware.com/device-monitoring-studio Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) I installed a trial version of Device Monitoring Studio, see https://www.hhdsoftware.com/device-monitoring-studiowhich enables me to trap the raw data from the keyboard, and I'm able to identify which keys are pressed or released, and also the keyboard sliders' movements and slider positions. For my purposes, that is all I need to extract from the MIDI stream. I then went on the Web to see if I could find examples of Macro code that would enable my program to emulate what I had been able to do with Device Monitoring Studio. It turns out that USB coding is very complex and the only examples I could find were in C, C++ or Visual Basic, none of which I have, or have ever worked with. I then had a look at LibreOffice 5.3 SDK API. I believe that is the API that Base uses, and over several years I have developed a number of databases using macros that make calls to the API. One API service I foundUsing Python with libusb could work, if you're looking for something quick to implement and don't want to dwelve in compiled languages. was, com.sun.star.io.pipe, which looks as though it might be what I need, but I don't know if it would work with a USB port, and I could not find any macro code examples that might point me in the right direction. So my questions are - 1. Does anyone know if it is possible to read from a USB port using a LibreOffice macro utilising the API? If so can you point me to some example code (preferably in Basic)? 2. Failing that, is there a simple application on the market that can read a USB MIDI stream into a buffer or file? I think Device Monitoring Studio can do that, but it is expensive and has far more features than I'll ever need. Maybe I misunderstood something, but I don't see how this is related to LibreOffice in any way. While it is true that it is possible to write applications with LibreOffice to some extent, what you're describing would be better done using anything else. Using Python with libusb could work, if you're looking for something quick to implement and don't want to dwelve in compiled languages. -- To unsubscribe e-mail to:
Re: [libreoffice-users] Reading from a USB device. Additional Realterm Info
The article below will probably help quite a bit setting up. https://nerdclub-uk.blogspot.com/2017/04/messing-about-with-midi-and-realterm-vs.html The parts on Realterm and MIDI starts about half way down the article. On 8/28/2017 11:38 AM, Paul D. Mirowsky wrote: You may want to take a look at Realterm Realterm is an engineers terminal program specially designed for capturing, controlling and debugging binary and other difficult data streams. It is the best tool for debugging comms. Post-Processing capture file is just one of many things it can do. https://realterm.sourceforge.io/ I have not used it to analyze MIDI, but if there's data, it will see it. Hope this helps. Paul On 8/27/2017 9:47 AM, Marion & Noel Lodge wrote: I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use a Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) I installed a trial version of Device Monitoring Studio, see https://www.hhdsoftware.com/device-monitoring-studio which enables me to trap the raw data from the keyboard, and I'm able to identify which keys are pressed or released, and also the keyboard sliders' movements and slider positions. For my purposes, that is all I need to extract from the MIDI stream. I then went on the Web to see if I could find examples of Macro code that would enable my program to emulate what I had been able to do with Device Monitoring Studio. It turns out that USB coding is very complex and the only examples I could find were in C, C++ or Visual Basic, none of which I have, or have ever worked with. I then had a look at LibreOffice 5.3 SDK API. I believe that is the API that Base uses, and over several years I have developed a number of databases using macros that make calls to the API. One API service I found was, com.sun.star.io.pipe, which looks as though it might be what I need, but I don't know if it would work with a USB port, and I could not find any macro code examples that might point me in the right direction. So my questions are - 1. Does anyone know if it is possible to read from a USB port using a LibreOffice macro utilising the API? If so can you point me to some example code (preferably in Basic)? 2. Failing that, is there a simple application on the market that can read a USB MIDI stream into a buffer or file? I think Device Monitoring Studio can do that, but it is expensive and has far more features than I'll ever need. Any help in this regard would be much appreciated Thanks, Noel -- Noel Lodge lodg...@gmail.com -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
On 28/08/17 10:24, Cley Faye wrote: 2017-08-27 15:47 GMT+02:00 Marion & Noel Lodge: I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use a Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) ... Maybe I misunderstood something, but I don't see how this is related to LibreOffice in any way. While it is true that it is possible to write If all you have is a hammer, everything looks like a nail :-} I think the OP sounds muddled. Recording midi signals isn't going to help (much) with a wish to "programmatically mix sine waves" -- chalk and cheese, I think. Which thinking is amplified by the bit about "modify the sound before it goes to the speaker". I doubt (nay, hope) LO will ever offer a full-blown synth!! I /think/ the OP is looking at a midi synthesiser plus a mixer. A doddle on linux to sling something together -- I'd be looking at qsynth, jack and jack_mixer as a start point. Maybe they'll run on windows. I'd not know. I'd most certainly /not/ be looking to do any usb-level programming; that bit's already been done. Or maybe I've totally mis-understood. -- Mike Scott (unet2 [deletethis] scottsonline.org.uk) Harlow Essex England "The only way is Brexit" -- anon. -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
You may want to take a look at Realterm Realterm is an engineers terminal program specially designed for capturing, controlling and debugging binary and other difficult data streams. It is the best tool for debugging comms. Post-Processing capture file is just one of many things it can do. https://realterm.sourceforge.io/ I have not used it to analyze MIDI, but if there's data, it will see it. Hope this helps. Paul On 8/27/2017 9:47 AM, Marion & Noel Lodge wrote: I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use a Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) I installed a trial version of Device Monitoring Studio, see https://www.hhdsoftware.com/device-monitoring-studiowhich enables me to trap the raw data from the keyboard, and I'm able to identify which keys are pressed or released, and also the keyboard sliders' movements and slider positions. For my purposes, that is all I need to extract from the MIDI stream. I then went on the Web to see if I could find examples of Macro code that would enable my program to emulate what I had been able to do with Device Monitoring Studio. It turns out that USB coding is very complex and the only examples I could find were in C, C++ or Visual Basic, none of which I have, or have ever worked with. I then had a look at LibreOffice 5.3 SDK API. I believe that is the API that Base uses, and over several years I have developed a number of databases using macros that make calls to the API. One API service I found was, com.sun.star.io.pipe, which looks as though it might be what I need, but I don't know if it would work with a USB port, and I could not find any macro code examples that might point me in the right direction. So my questions are - 1. Does anyone know if it is possible to read from a USB port using a LibreOffice macro utilising the API? If so can you point me to some example code (preferably in Basic)? 2. Failing that, is there a simple application on the market that can read a USB MIDI stream into a buffer or file? I think Device Monitoring Studio can do that, but it is expensive and has far more features than I'll ever need. Any help in this regard would be much appreciated Thanks, Noel -- Noel Lodge lodg...@gmail.com -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
On 27/08/17 15:47, Marion & Noel Lodge wrote: > 2. Failing that, is there a simple application on the market that can read > a USB MIDI stream into a buffer or file? I think Device Monitoring Studio > can do that, but it is expensive and has far more features than I'll ever > need. I seem to remember from years' ago that there was a free utility called MidiOx for Windows that could read incoming midi streams. The website still exists but it looks as though it might not have been further developed recently : http://www.midiox.com/ Philip -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
2017-08-27 15:47 GMT+02:00 Marion & Noel Lodge: > I have a Studio Logic MIDI music keyboard which I have plugged into my PC > via a USB cable. Windows has automatically installed the appropriate > driver/s. I am attempting to read the MIDI input from the keyboard as I > want to see if I can use a Macro to modify the sound before it goes to the > speaker. (Actually I want to try to programmatically mix sine waves like > a Hammond Organ does - it may not be possible, but I'd like to give it a > try!) > > I installed a trial version of Device Monitoring Studio, see > https://www.hhdsoftware.com/device-monitoring-studiowhich enables me > to > trap the raw data from the keyboard, and I'm able to identify which keys > are pressed or released, and also the keyboard sliders' movements and > slider positions. For my purposes, that is all I need to extract from the > MIDI stream. > > I then went on the Web to see if I could find examples of Macro code that > would enable my program to emulate what I had been able to do with Device > Monitoring Studio. It turns out that USB coding is very complex and the > only examples I could find were in C, C++ or Visual Basic, none of which I > have, or have ever worked with. > > I then had a look at LibreOffice 5.3 SDK API. I believe that is the API > that Base uses, and over several years I have developed a number of > databases using macros that make calls to the API. One API service I found > was, com.sun.star.io.pipe, which looks as though it might be what I need, > but I don't know if it would work with a USB port, and I could not find any > macro code examples that might point me in the right direction. > > So my questions are - > 1. Does anyone know if it is possible to read from a USB port using a > LibreOffice macro utilising the API? If so can you point me to some > example code (preferably in Basic)? > 2. Failing that, is there a simple application on the market that can read > a USB MIDI stream into a buffer or file? I think Device Monitoring Studio > can do that, but it is expensive and has far more features than I'll ever > need. > Maybe I misunderstood something, but I don't see how this is related to LibreOffice in any way. While it is true that it is possible to write applications with LibreOffice to some extent, what you're describing would be better done using anything else. Using Python with libusb could work, if you're looking for something quick to implement and don't want to dwelve in compiled languages. -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
Hi anne-ology, I think my subject line was misleading. My USB device is a musical keyboard rather than an external HD. I inherited the keyboard from my step son. It happened to be a MIDI keyboard. This turned out to be just what I needed, as it tells me exactly the note number that has been pressed, (or released), plus any movement in the nine sliders. I have set up the sliders to correspond to the draw bars on a Hammond Organ. (The draw bars determine which harmonics are used to modify the sound produced. A very large number of variations are possible.) So armed with the MIDI information, I hope to write a program that can simulate a Hammond Organ. Possibly a pipe dream, but time will tell. But to get started I need to be able to read the MIDI stream, which at the moment is coming through a USB port. Hence my request for any info on code that might help help me to do that. Thanks for your reply, Noel -- Noel Lodge lodg...@gmail.com On 28 August 2017 at 08:25, anne-ology <lagin...@gmail.com> wrote: >If your external HD has LO, then there shouldn't be a problem. > >Question: is there some reason you're using .midi rather than > another sound application?; > .midi programs are outdated, since they supposedly don't have > the actual sound, rather merely text. > >Hoping this helps, and you're able to accomplish whatever you're > planning, > > > > > From: Marion & Noel Lodge <lodg...@gmail.com> > Date: Sun, Aug 27, 2017 at 8:47 AM > Subject: [libreoffice-users] Reading from a USB device. > To: "users@global.libreoffice.org" <users@global.libreoffice.org> > > > > I have a Studio Logic MIDI music keyboard which I have plugged into my PC > via a USB cable. Windows has automatically installed the appropriate > driver/s. I am attempting to read the MIDI input from the keyboard as I > want to see if I can use a Macro to modify the sound before it goes to the > speaker. (Actually I want to try to programmatically mix sine waves like > a Hammond Organ does - it may not be possible, but I'd like to give it a > try!) > > I installed a trial version of Device Monitoring Studio, see > https://www.hhdsoftware.com/device-monitoring-studiowhich enables me > to > trap the raw data from the keyboard, and I'm able to identify which keys > are pressed or released, and also the keyboard sliders' movements and > slider positions. For my purposes, that is all I need to extract from the > MIDI stream. > > I then went on the Web to see if I could find examples of Macro code that > would enable my program to emulate what I had been able to do with Device > Monitoring Studio. It turns out that USB coding is very complex and the > only examples I could find were in C, C++ or Visual Basic, none of which I > have, or have ever worked with. > > I then had a look at LibreOffice 5.3 SDK API. I believe that is the API > that Base uses, and over several years I have developed a number of > databases using macros that make calls to the API. One API service I found > was, com.sun.star.io.pipe, which looks as though it might be what I need, > but I don't know if it would work with a USB port, and I could not find any > macro code examples that might point me in the right direction. > > So my questions are - > 1. Does anyone know if it is possible to read from a USB port using a > LibreOffice macro utilising the API? If so can you point me to some > example code (preferably in Basic)? > 2. Failing that, is there a simple application on the market that can read > a USB MIDI stream into a buffer or file? I think Device Monitoring Studio > can do that, but it is expensive and has far more features than I'll ever > need. > > Any help in this regard would be much appreciated > > Thanks, > > Noel > -- > Noel Lodge > lodg...@gmail.com > > -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Reading from a USB device.
If your external HD has LO, then there shouldn't be a problem. Question: is there some reason you're using .midi rather than another sound application?; .midi programs are outdated, since they supposedly don't have the actual sound, rather merely text. Hoping this helps, and you're able to accomplish whatever you're planning, From: Marion & Noel Lodge <lodg...@gmail.com> Date: Sun, Aug 27, 2017 at 8:47 AM Subject: [libreoffice-users] Reading from a USB device. To: "users@global.libreoffice.org" <users@global.libreoffice.org> I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use a Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) I installed a trial version of Device Monitoring Studio, see https://www.hhdsoftware.com/device-monitoring-studiowhich enables me to trap the raw data from the keyboard, and I'm able to identify which keys are pressed or released, and also the keyboard sliders' movements and slider positions. For my purposes, that is all I need to extract from the MIDI stream. I then went on the Web to see if I could find examples of Macro code that would enable my program to emulate what I had been able to do with Device Monitoring Studio. It turns out that USB coding is very complex and the only examples I could find were in C, C++ or Visual Basic, none of which I have, or have ever worked with. I then had a look at LibreOffice 5.3 SDK API. I believe that is the API that Base uses, and over several years I have developed a number of databases using macros that make calls to the API. One API service I found was, com.sun.star.io.pipe, which looks as though it might be what I need, but I don't know if it would work with a USB port, and I could not find any macro code examples that might point me in the right direction. So my questions are - 1. Does anyone know if it is possible to read from a USB port using a LibreOffice macro utilising the API? If so can you point me to some example code (preferably in Basic)? 2. Failing that, is there a simple application on the market that can read a USB MIDI stream into a buffer or file? I think Device Monitoring Studio can do that, but it is expensive and has far more features than I'll ever need. Any help in this regard would be much appreciated Thanks, Noel -- Noel Lodge lodg...@gmail.com -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
[libreoffice-users] Reading from a USB device.
I have a Studio Logic MIDI music keyboard which I have plugged into my PC via a USB cable. Windows has automatically installed the appropriate driver/s. I am attempting to read the MIDI input from the keyboard as I want to see if I can use a Macro to modify the sound before it goes to the speaker. (Actually I want to try to programmatically mix sine waves like a Hammond Organ does - it may not be possible, but I'd like to give it a try!) I installed a trial version of Device Monitoring Studio, see https://www.hhdsoftware.com/device-monitoring-studiowhich enables me to trap the raw data from the keyboard, and I'm able to identify which keys are pressed or released, and also the keyboard sliders' movements and slider positions. For my purposes, that is all I need to extract from the MIDI stream. I then went on the Web to see if I could find examples of Macro code that would enable my program to emulate what I had been able to do with Device Monitoring Studio. It turns out that USB coding is very complex and the only examples I could find were in C, C++ or Visual Basic, none of which I have, or have ever worked with. I then had a look at LibreOffice 5.3 SDK API. I believe that is the API that Base uses, and over several years I have developed a number of databases using macros that make calls to the API. One API service I found was, com.sun.star.io.pipe, which looks as though it might be what I need, but I don't know if it would work with a USB port, and I could not find any macro code examples that might point me in the right direction. So my questions are - 1. Does anyone know if it is possible to read from a USB port using a LibreOffice macro utilising the API? If so can you point me to some example code (preferably in Basic)? 2. Failing that, is there a simple application on the market that can read a USB MIDI stream into a buffer or file? I think Device Monitoring Studio can do that, but it is expensive and has far more features than I'll ever need. Any help in this regard would be much appreciated Thanks, Noel -- Noel Lodge lodg...@gmail.com -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted