Re: [Jprogramming] PNG output quality

2020-03-30 Thread bill lam
PNG should be a lossless format, it got compression level, but still lossless anyways, do the quality must already bad before saving as png files. cairo built-in text font was a toy only, not sure if it got improvement or not. plot has several output formats, you may try pdf which works on jconsol

Re: [Jprogramming] stock data programming how-to #3

2020-03-30 Thread Devon McCormick
Something like this? C=. <;._1&>',',&.><;._2 ] LF (] , [ #~ [ ~: [: {: ]) CR-.~0 : 0 1990-03-01,0.00,0.31,0.29,0.29,428800 1990-03-02,0.00,0.29,0.29,0.29,313600 1990-03-05,0.00,0.31,0.29,0.29,1395200 1990-03-06,0.00,0.31,0.29,0.29,1152000 1990-03-07,0.00,0.31,0.29,0.31,854400 1990-03-08,0.00,0.3

Re: [Jprogramming] PNG output quality

2020-03-30 Thread Devon McCormick
Hi - I don't know how well this works on non-Win systems, but I use these: load 'ide/qt/qtlib' NB. At least since v. 8.07 read_image=: readimg_jqtide_ write_image=: writeimg_jqtide_ These verbs are smart enough to figure out the file format from the suffix of the name to which you write

Re: [Jprogramming] stock data programming how-to #4

2020-03-30 Thread Devon McCormick
You should probably take a look at what Jd has to ingest delimited files like this into a database. On Tue, Mar 31, 2020 at 12:58 AM HH PackRat wrote: > Finishing up with function #4.. > > I have a very large file consisting of multiple sets of historical > stock prices that I would like to

[Jprogramming] PNG output quality

2020-03-30 Thread Dimitri Georganas
Hi, I'm modeling IC bed impact due to COVID-19 and I need to output a large number of bitmaps, so png seems a good choice. However, PNG (cairo) output results in quality loss (compared to the default option) and I was wondering if I am missing any libraries (libcairo is installed). It's a linux sy

Re: [Jprogramming] stock data programming how-to #1

2020-03-30 Thread Devon McCormick
For what you want to do, the "toJulian" from the J datetime library, its inverse, and a number of other goodies there will save you re-inventing the wheel. load '~addons/types/datetime/datetime.ijs' names_rgsdatetime_ 0 DATECODES J0Date Linux0DateTime MONTHS MS0Date TIMEC

[Jprogramming] stock data programming how-to #4

2020-03-30 Thread HH PackRat
Finishing up with function #4.. I have a very large file consisting of multiple sets of historical stock prices that I would like to split into individual files for each stock. (I'll probably first have to write out all the files to a USB flash drive [I have limited hard drive space, but it m

Re: [Jprogramming] stock data programming how-to #1

2020-03-30 Thread Raul Miller
Well... let's try working through this. If it goes well, we can tackle the others. For this problem, we might want to use several J libraries: https://code.jsoftware.com/wiki/Addons/tables/csv https://code.jsoftware.com/wiki/Addons/types/datetime https://code.jsoftware.com/wiki/Vocabulary/Printf

[Jprogramming] stock data programming how-to #3

2020-03-30 Thread HH PackRat
Continuing on to function #3. Stock data normally consists of 6 pieces of data: date, open, high, low, close, volume. Occasionally, early data for some stocks has no data for the opening price of the day. One technique that some data vendors use (in order to guarantee non-zero prices, which

[Jprogramming] stock data programming how-to #2

2020-03-30 Thread HH PackRat
On to function #2 that I need (see how-to #1 for background) Given data set B below, moving from first to last, if the CLOSE value (column 4) is zero, replace the zeros in columns 1 to 5 with the preceding day's data (columns 1 to 5). Note that multiple zero rows will therefore have the same

[Jprogramming] stock data programming how-to #1

2020-03-30 Thread HH PackRat
I need your help, please! I also hope to learn more about using J in other contexts from your responses. I'm writing some software to manipulate my extensive stock market data in different ways, and I need *explicit* code (NOT tacit code) for several functions, which I'm splitting between multipl

[Jprogramming] ylog option in plot

2020-03-30 Thread Rudolf Sykora
Dear list, using load 'plot' 'ylog 1' plot 1 0 3 leads to an error within the gettplog function in jzplot.ijs, namely on its line pos=.min+step*i.>:>.(max-min)%step As I understand, max-min is _ , step also _ , hence the problem. Of course, it would be nicer to issue a nicer message

Re: [Jprogramming] how to debug

2020-03-30 Thread Rudolf Sykora
Dear Devon, Devon McCormick writes: > |NaN error: gettplog > | pos=.min+step*i.>:>.(max-min)%step > |gettplog[:11] > ... > > So, I am properly stopped at this point but I can't figure why my initial > stops don't have an effect. At least the above will provide a work-around. although t

Re: [Jprogramming] how to debug

2020-03-30 Thread Rudolf Sykora
Dear Bill, bill lam writes: > You can first isolate problem be related to pop up box by setting > wdinfo_z_=: echo > so there won't be any pop-up info box. > > If crash gone away then it is a jqt issue. with wdinfo_z_ =: echo the crash is gone. I get 'ylog 1' plot 1 2 0 3 ++

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Thomas McGuire
For those of you interested in using J as an adjunct to lilypond or other such program: Making a few changes to the lilypond statements that get prepended and appended to the notes generated (in my previous email on the subject). You can get lilypond to generate a midi file of the score: lilyp

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Skip Cave
Here are the frequencies of the 8 notes in the A major scale A (440Hz) to octave A (880 Hz). We can compare just tuning to equal-tempered tuning, with the frequency differences all in Hz : N=.'A';'B';'C#';'D';'E';'F#';'G#';'A' NB. A-major scale notes ju=._1 x:440 *1 9r8 5r4 4r3 3r2 5r3 15r8 2r1

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Skip Cave
One of the advantages of computer generated music, is that one can generate intervals using just interval tuning (rational ratios), rather than the equal temperament approximations used on most keyboard instruments today. Rational ratio or just intervals are the most pleasing to the ear. Equal tem

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread 'Kenneth Lettow' via Programming
AbeBooks has some copies from $18.53 - $57. https://www.abebooks.com/servlet/SearchResults?sts=t&cm_sp=SearchF-_-home-_-Results&kn=&an=&tn=Cybernetic+Music On Mon, Mar 30, 2020 at 12:42 PM Devon McCormick wrote: > I just bought a $32 hardback edition and now the lowest price on Amazon is > $31.

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Thomas McGuire
I have the jaxitron book and have slowly been adapting the APL code to J. Here’s what I have so far. It’s such an old book and you would need to read the book to use the code the way it was intended. NB. routines for cybernetic music. This is a direct translation NB. from APL. It should be rew

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Devon McCormick
I just bought a $32 hardback edition and now the lowest price on Amazon is $31.12 for the paperback. Sorry if anyone else wanted one for cheap. On Mon, Mar 30, 2020 at 11:56 AM Raul Miller wrote: > I wish I did... but I was on a different page (where the price has now > dropped to $814): > > ht

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Raul Miller
I wish I did... but I was on a different page (where the price has now dropped to $814): https://www.amazon.com/Cybernetic-Music-Jaxitron/dp/0830608567 FYI, -- Raul On Mon, Mar 30, 2020 at 10:45 AM Mike Powell wrote: > > > > > On Mar 30, 2020, at 07:04, Raul Miller wrote: > > > > Hmm... > >

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Mike Powell
> On Mar 30, 2020, at 07:04, Raul Miller wrote: > > Hmm... > > Currently only $854 for a paperback copy of Cybernetic Music from > Amazon ($34 for hardcover, though (and $14 for a paperback copy from > Albris -- plus $4.80 for tax and shipping...)). I think you meant $8.45 for the Amazon pap

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread Raul Miller
Hmm... Currently only $854 for a paperback copy of Cybernetic Music from Amazon ($34 for hardcover, though (and $14 for a paperback copy from Albris -- plus $4.80 for tax and shipping...)). Maybe I'll try my hand at translation, or something... (Meanwhile, Lisp can be translated to J fairly easi

Re: [Jprogramming] Generating "music" in J (or otherwise)

2020-03-30 Thread HH PackRat
On 3/28/20, Devon McCormick wrote: > has anyone done work with generating music or musical phrases in J? I'm > helping someone develop a music training game that starts by generating > sounds with a particular key, tempo, and phrase length. ... > I've told my collaborator that I think the generat