Reading from a USB device.

classic Classic list List threaded Threaded
11 messages Options
Noel Noel
Reply | Threaded
Open this post in threaded view
|

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-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
[hidden email]

--
To unsubscribe e-mail to: [hidden email]
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
anne-ology anne-ology
Reply | Threaded
Open this post in threaded view
|

Re: 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 <[hidden email]>
Date: Sun, Aug 27, 2017 at 8:47 AM
Subject: [libreoffice-users] Reading from a USB device.
To: "[hidden email]" <[hidden email]>


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
[hidden email]

--
To unsubscribe e-mail to: [hidden email]
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
Noel Noel
Reply | Threaded
Open this post in threaded view
|

Re: 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
[hidden email]

On 28 August 2017 at 08:25, anne-ology <[hidden email]> 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 <[hidden email]>
> Date: Sun, Aug 27, 2017 at 8:47 AM
> Subject: [libreoffice-users] Reading from a USB device.
> To: "[hidden email]" <[hidden email]>
>
>
>
> 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
> [hidden email]
>
>

--
To unsubscribe e-mail to: [hidden email]
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
Cley Faye Cley Faye
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Noel
2017-08-27 15:47 GMT+02:00 Marion & Noel Lodge <[hidden email]>:

> 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.
>


​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: [hidden email]
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
Philip Jackson Philip Jackson
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Noel
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: [hidden email]
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
Paul D. Mirowsky Paul D. Mirowsky
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Noel
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
> [hidden email]
>


--
To unsubscribe e-mail to: [hidden email]
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
Mike Scott-2 Mike Scott-2
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Cley Faye
On 28/08/17 10:24, Cley Faye wrote:
> 2017-08-27 15:47 GMT+02:00 Marion & Noel Lodge <[hidden email]>:
>
>> 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 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
"The only way is Brexit" -- anon.

--
To unsubscribe e-mail to: [hidden email]
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
Paul D. Mirowsky Paul D. Mirowsky
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device. Additional Realterm Info

In reply to this post by Paul D. Mirowsky
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
>> [hidden email]
>>
>
>


--
To unsubscribe e-mail to: [hidden email]
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
fudmer rieley fudmer rieley
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Cley Faye
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 <[hidden email]>:
>
>> 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-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 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: [hidden email]
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
Stefan Gruber-3 Stefan Gruber-3
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

In reply to this post by Noel
Hi,

Marion & Noel Lodge schrieb am Montag, 28. August 2017 07:43:

> 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.

Seems to me like reinventing the wheel...
Did you consider to use or even look into source code of existing free b3
emulators??
There are at least bristol, setbfree, beatrix...

Stefan
--
system: opensuse Leap 42.2


--
To unsubscribe e-mail to: [hidden email]
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

Noel Noel
Reply | Threaded
Open this post in threaded view
|

Re: Reading from a USB device.

Wow!
Thanks to all who have responded to my queries - I've had a preliminary
look at nearly all of your suggestions and you have certainly given me
plenty of leads.

Cley - you raised a point about not being related to LO.  I have done a lot
of H2 database development in LO, and I was planning to use a database to
store the current state of the keyboard keys and sliders, plus the sine
wave files, one for each note.  And probably harmonics info for each note.
I hope to use LO Basic macros for the actual program. Python macros might
be another possibility, but I currently know nothing about them.

Mike - your comment about the hammer is probably relevant in my case!  My
hammer is databases which is where I've had all my experience.  Over the
years I've developed quite a library of routines that I use all the time,
so that is where I turn for each new project.

Philip and Paul  - I've had a look at Midiox and Realterm.  Either could
well be the answer for reading MIDI data.

Stefan - I quite like trying to reinvent the wheel!  Often the wheels that
are available do only 80% of what I want.  If I write something myself, I
can make sure it does all I want it to, or if it doesn't, I can often
modify it so that it does.  Pretty time consuming I know, but I'm retired
now, and the Organ is something I've been thinking of doing for years, but
have till now, never had the time to attempt it.  Maybe I'll succeed, maybe
I won't, but either way I'll probably learn things along the way.

Thanks again to you all for your comments and suggestions - much
appreciated.

Noel
--
Noel Lodge
[hidden email]

On 29 August 2017 at 05:00, Stefan Gruber <[hidden email]> wrote:

> Hi,
>
> Marion & Noel Lodge schrieb am Montag, 28. August 2017 07:43:
> > 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.
>
> Seems to me like reinventing the wheel...
> Did you consider to use or even look into source code of existing free b3
> emulators??
> There are at least bristol, setbfree, beatrix...
>
> Stefan
> --
> system: opensuse Leap 42.2
>
>
> --
> To unsubscribe e-mail to: [hidden email]
> 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
>
>

--
To unsubscribe e-mail to: [hidden email]
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