Re: [libreoffice-users] Reading from a USB device.

2017-08-27 Thread Marion & Noel Lodge
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  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 
> Date: Sun, Aug 27, 2017 at 8:47 AM
> Subject: [libreoffice-users] Reading from a USB device.
> To: "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] convert xlsx to CSV

2017-08-27 Thread James Knott
On 08/27/2017 08:59 PM, A wrote:
> I'm trying to convert a file from .xlsx to CSV.  After googling until
> my eyes were bleeding, the below is the best I could come up with. 
> I've tried various incarnations of the below this is just the latest. 
> Any ideas what's wrong here?  The input file clearly exists.  ubuntu
> 16.04 LibreOffice 5.1.6.2 10m0(Build:2)
>
> Thank you in advance!
>
> ~
>
> apb@yellow:/usr/local/src/greetonix/src$
> /usr/lib/libreoffice/program/soffice.bin
> -env:UserInstallation=file:///tmp/libreoffice-1 --headless
> --nolockcheck --convert-to csv:Text \(encoded\):UTF8 --infilter=MS
> Excel 97:44,34,76,1,,1033,true,true,false,false KGI_Discontinued.xlsx
> Error: source file could not be loaded
> Error: source file could not be loaded
> Error: source file could not be loaded
> convert /usr/local/src/greetonix/src/KGI_Discontinued.xlsx ->
> /usr/local/src/greetonix/src/KGI_Discontinued.csv using filter : Text
> Error: Please verify input parameters... (SfxBaseModel::impl_store
>  failed: 0xc10)
> apb@yellow:/usr/local/src/greetonix/src$
>
> apb@yellow:/usr/local/src/greetonix/src$ ll KGI_Discontinued.xlsx
>
> -rw-rw-r-- 2 apb apb 88334 Aug 18 16:00 KGI_Discontinued.xlsx
>
> apb@yellow:/usr/local/src/greetonix/src$

What happens if you just open the file in LibreOffice?




-- 
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] convert xlsx to CSV

2017-08-27 Thread A
I'm trying to convert a file from .xlsx to CSV.  After googling until my 
eyes were bleeding, the below is the best I could come up with.  I've 
tried various incarnations of the below this is just the latest.  Any 
ideas what's wrong here?  The input file clearly exists.  ubuntu 16.04 
LibreOffice 5.1.6.2 10m0(Build:2)


Thank you in advance!

~

apb@yellow:/usr/local/src/greetonix/src$ 
/usr/lib/libreoffice/program/soffice.bin 
-env:UserInstallation=file:///tmp/libreoffice-1 --headless --nolockcheck 
--convert-to csv:Text \(encoded\):UTF8 --infilter=MS Excel 
97:44,34,76,1,,1033,true,true,false,false KGI_Discontinued.xlsx

Error: source file could not be loaded
Error: source file could not be loaded
Error: source file could not be loaded
convert /usr/local/src/greetonix/src/KGI_Discontinued.xlsx -> 
/usr/local/src/greetonix/src/KGI_Discontinued.csv using filter : Text
Error: Please verify input parameters... (SfxBaseModel::impl_store 
 failed: 0xc10)

apb@yellow:/usr/local/src/greetonix/src$

apb@yellow:/usr/local/src/greetonix/src$ ll KGI_Discontinued.xlsx

-rw-rw-r-- 2 apb apb 88334 Aug 18 16:00 KGI_Discontinued.xlsx

apb@yellow:/usr/local/src/greetonix/src$





--
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 Thread anne-ology
   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 
Date: Sun, Aug 27, 2017 at 8:47 AM
Subject: [libreoffice-users] Reading from a USB device.
To: "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] left adjusted last lines in 'd justified paragraphs?

2017-08-27 Thread Brian Barker

At 00:59 25/08/2017 +0200, Dennis Heuer wrote:
I don't come clear with LibreOffice. No matter what I try, I end in 
a paragraph - as paragraphs are kind of swiss-knives in LibreOffice.


Swiss Army knives have many uses: are you just saying that paragraphs 
have wide application?!



For example, I inserted a line-break into a list entry.


You mean here a proper bulleted or numbered list?

The text was justified. The rule was that the last line stays 
left-adjusted. However, the line-break is only visually shifting 
text. In result, the visual text block below the line-break is 
left-adjusted at the last line but the text block atop the 
line-break is stretched. What can I do?


Your problem here is that the items in a list are normally separate, 
single paragraphs. But you want one list item to have multiple 
paragraphs. You know that if you press Enter to create a paragraph 
break you will start a new list item, which you don't want. So you 
are trying a line break (Shift+Enter) instead. That - quite 
understandably, I'd suggest - creates the problem you describe: 
that's what you'd want to happen if you really did want a line break.


Instead, you really must create the paragraph break by pressing Enter 
in the normal way. Now your problem is just how to tell LibreOffice 
that you don't want this to signal a new list item. There is an easy 
way to do this: just press Backspace immediately after Enter. The 
bullet or number is removed, along with the tab character, and your 
new paragraph becomes part of the existing list item instead. 
Subsequent numbered items are renumbered.


You don't need to do this immediately: you can achieve this effect at 
any time just by pressing Backspace, providing you have the cursor at 
the beginning of your new paragraph.


I trust this helps.

Brian Barker


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

2017-08-27 Thread 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.

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] Page Numbers in TOC

2017-08-27 Thread Ian Whitfield

Sorry - My mistake. Thanks Piet!!


On 08/26/2017 09:27 AM, Piet van Oostrum wrote:

Ian Whitfield  writes:


Hi All

I have been watching this thread and hoping a problem I have with this
might be mentioned!!

I produce a monthly "Journal" and also make use of the TOC to list the
contents. It works fairly well (with a bit of editing) but the one
problem I have is as follows.

The first two pages of the SLA document are the Front Cover and the
Inside of the Front Cover so my actual content starts on the third Page.
However Scribus' TOC works on the actual Page Count so all the listed
pages are two pages out and I need to edit each line of the TOC to
correct this. Is there any way for the TOC to be set to do this
automatically?


Are you talking about Scribus or LibreOffice (LO)? This list is about
LO. If you mean LO, then you should use a different page style for the
first two pages and reset the page count on the third one.



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