Re: [NTG-context] midi

2021-02-04 Thread juh
Am Wed, Feb 03, 2021 at 10:15:59PM -0500 schrieb Fabrice L:
> I usually do images ; if you or the list ever want to see more, the site
> https://art-aleatoire.com  is to show my work, and
> all you can see there is made by me using 100% MetaFun, with sometimes the
> help of you and the list, and all the time the help of your wonderful MetaFun
> manual. I’m often so much impressed by what could be done with a couples of
> lines of MetaFun code; life is made from DNA, art (perhaps illustrations would
> be a better world) could be made by the MetaFun « randomized » function.

I really like your work. It does not look like computer art, really cool. 

Would you mind to share some code? 


Ciao!
juh


-- 
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog:  http://www.hasecke.eu
Netzliteratur-Projekt:  http://www.generationenprojekt.de




signature.asc
Description: PGP signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Henning Hraban Ramm

> Am 04.02.2021 um 15:55 schrieb Mojca Miklavec 
> :
> 
> I kept misusing Lilypond for generating the MIDIs, and either Timidity (and 
> something else that I forgot the name of, even though I think I packaged it 
> for MacPorts)

fluidsynth, I guess.

> Lilypond was a good-enough approximation / similar user experience as what 
> ConTeXt provides for typesetting text, which is why I never requested support 
> for music in ConTeXt. A good support for
> \startlily
> c d e f
> \stoplily
> and passing the work to lilypond should be more than enough (I have an 
> impression that I've already seen some code doing exactly that).

see https://wiki.contextgarden.net/LilyPond

That’s what I’m using for my songbooklets.
I don’t create MIDI this way, even if it would be easy, because I keep pure 
LilyPond files that include MIDI setup – if I copy or compose a song, it’s much 
easier and faster to work in Frescobaldi and compile only LilyPond. If it’s 
complete, I copy the melody into a ConTeXt component – not a perfekt workflow.

> I always used full-page scores, so I didn't really need support for short 
> snippets either.

Since LilyPond can create single-system PDFs, I leave page breaking to ConTeXt.

> Anyway, reading midi is probably straightforward, but it really sounds like a 
> too limited feature unless one could use video/audio output or music 
> typesetting (which is hard enough and outside of scope of ConTeXt, I would 
> say).

It usually makes no sense to typeset music directly from a MIDI file, there’s 
too much information missing (e.g. time, measures, repeats) or subject to 
individual interpretation.
There’s midi2ly.py included with LilyPond, but it usually makes more sense to 
re-type the music.

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Making text disappear depending on mode

2021-02-04 Thread Hans Hagen

On 2/4/2021 3:59 PM, Axel Kielhorn wrote:

Hello,

I’m currently writing an article for „Die TeXnische Komödie“ and discovers that 
my code is not working.

When the mode „change“ is set, the text should appear with a red line on the 
side,
that part is working.
When the mode is not set, it should disappear,
that’s the part that is not working.

My idea was to put the text into a buffer and ignore it, that didn’t work.


% !TEX TS-program = ConTeXt (LuaTeX 1.0.9)
% !TEX encoding = UTF-8 Unicode

%\enablemode[change]

% Paragraph removed
\definestartstop[ChangePR][
   before={\doifmodeelse{change}
   {\startsidebar[rulecolor=red]}
   {}},
   after={\doifmodeelse{change}
   {\stopsidebar}
   {}},
   ]
% Paragraph removed
%\definestartstop[ChangePR][
%  before={\doifmodeelse{change}
%{\startsidebar[rulecolor=red]}
%{\startbuffer[ignore]}},
%  after={\doifmodeelse{change}
%{\stopsidebar}
%{\stopbuffer}},
%  ]
   
\starttext


Before

\startChangePR
\input knuth
\stopChangePR

After

\stoptext

\defineblock
  [ChangePR]

\defineblock
  [ChangeRP]

\setupblock
  [ChangePR]
  [before={\startsidebar[rulecolor=red]},
   after={\blank[overlay]\stopsidebar}]

\setupblock
  [ChangeRP]
  [before={\startsidebar[rulecolor=green]},
   after={\blank[overlay]\stopsidebar}]

% \hideblocks[ChangePR]
\keepblocks[ChangePR]
% \keepblocks[ChangePR,ChangeRP]

\enablemode[wipe]

\doifelsemode {wipe} {
\definebuffer[ChangePP]
} {
\definestartstop
  [ChangePP]
  [before={\startsidebar[rulecolor=red]},
   after={\blank[overlay]\stopsidebar}]
}

\starttext

Before

\beginChangePR
\input knuth
\endChangePR

Inbetween

\beginChangeRP
\input knuth
\endChangeRP

After

\startChangePP
\input knuth
\stopChangePP

Done

\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Hans Hagen

On 2/4/2021 3:55 PM, Mojca Miklavec wrote:

I got stuck (read as: never took the time to finish it) at lighting up a 
led strip (with individually addressable colours, "neopixel"-like) at 


ah .. these nice led matrices ... i occasionally wonder how that would 
work out (but a bit too expensive for just some tests because one wants 
a decent resolution) .. would make a nice progress indicator


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Making text disappear depending on mode

2021-02-04 Thread Axel Kielhorn
Hello,

I’m currently writing an article for „Die TeXnische Komödie“ and discovers that 
my code is not working.

When the mode „change“ is set, the text should appear with a red line on the 
side,
that part is working.
When the mode is not set, it should disappear,
that’s the part that is not working.

My idea was to put the text into a buffer and ignore it, that didn’t work.


% !TEX TS-program = ConTeXt (LuaTeX 1.0.9)
% !TEX encoding = UTF-8 Unicode

%\enablemode[change]

% Paragraph removed
\definestartstop[ChangePR][
  before={\doifmodeelse{change}
  {\startsidebar[rulecolor=red]}
  {}},
  after={\doifmodeelse{change}
  {\stopsidebar}
  {}},
  ]
% Paragraph removed
%\definestartstop[ChangePR][
%  before={\doifmodeelse{change}
%{\startsidebar[rulecolor=red]}
%{\startbuffer[ignore]}},
%  after={\doifmodeelse{change}
%{\stopsidebar}
%{\stopbuffer}},
%  ]
  
\starttext

Before

\startChangePR
\input knuth
\stopChangePR

After

\stoptext

Greetings Axel
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Mojca Miklavec
On Wed, 3 Feb 2021 at 19:40, Hans Hagen wrote:

> On 2/3/2021 7:09 PM, Henning Hraban Ramm wrote:
> >
> >> Am 03.02.2021 um 18:09 schrieb Hans Hagen :
> >>
> >> Hi,
> >>
> >> So, in context, we can do text, and we can do graphics, and also fonts,
> now do we also need an interface to midi?
> >
> > Are you thinking about Knuth’s ĩTeX?
>
> That is way too ambitious, maybe more like TeX (but in order to suite
> tex/mp extreme precision we would have to support microtones which is
> not in midi so that immediate abandons the project). Of course, when
> Mojca had ever push for 流TeX I'd given it a try. Too late now.
>

I kept misusing Lilypond for generating the MIDIs, and either Timidity (and
something else that I forgot the name of, even though I think I packaged it
for MacPorts) or Arduino + RPi (with some python-based synthesizer) to
play them from the toy wood-laser-cut accordion.

Lilypond was a good-enough approximation / similar user experience as what
ConTeXt provides for typesetting text, which is why I never
requested support for music in ConTeXt. A good support for
\startlily
c d e f
\stoplily
and passing the work to lilypond should be more than enough (I have an
impression that I've already seen some code doing exactly that).
I always used full-page scores, so I didn't really need support for short
snippets either.

I got stuck (read as: never took the time to finish it) at lighting up a
led strip (with individually addressable colours, "neopixel"-like) at
predefined places on a musical instrument to aid learning how to play new
songs. (Someone who knows how to play could record a midi, then the
"student" would load the midi at reduced speed and hit the keys that have
been litten up.)

I'm not saying that ConTeXt wouldn't be helpful in the process, but you
would then ideally need some new backends for producing movies: video &
audio output ;)
I could surely use a metapost-drawn image of the instrument and fill the
keys that need to be pressed in the video output ;)

Anyway, reading midi is probably straightforward, but it really sounds like
a too limited feature unless one could use video/audio output or music
typesetting (which is hard enough and outside of scope of ConTeXt, I would
say).

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Fabrice L


> Le 4 févr. 2021 à 08:31, Henning Hraban Ramm  a écrit :
> 
>> Am 04.02.2021 um 04:15 schrieb Fabrice L :
>> 
>> I usually do images ; if you or the list ever want to see more, the site 
>> https://art-aleatoire.com is to show my work,
> 
> Wow, this is great!

Thanks so much ! And also thanks to all the other very positive comments I had 
! All welcome ! ;-) 
> 
> I think I’ll come back to you about using some of your works as illustrations 
> for our (Dreiviertelhaus’) German literature magazine.

I will be happy to contribute an illustration to the magazine ! 
> 
> Anyway I’d like to fill many pages of the ConTeXt journal with them.
> 
> Hraban

Fabrice.

> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Hans Åberg

> On 3 Feb 2021, at 22:06, Henning Hraban Ramm  wrote:
> 
> 
>> Am 03.02.2021 um 19:39 schrieb Hans Hagen :
>> 
>> On 2/3/2021 7:09 PM, Henning Hraban Ramm wrote:
 Am 03.02.2021 um 18:09 schrieb Hans Hagen :
 
 Hi,
 
 So, in context, we can do text, and we can do graphics, and also fonts, 
 now do we also need an interface to midi?
>>> Are you thinking about Knuth’s ĩTeX?
>> 
>> That is way too ambitious, maybe more like TeX (but in order to suite 
>> tex/mp extreme precision we would have to support microtones which is not in 
>> midi so that immediate abandons the project).
> 
> LilyPond supports microtones in MIDI via pitch bending; it’s not supported by 
> all MIDI players.

There is also a frequency data format [1], which is not yet in LilyPond, though 
Graham Breed has written code for it.

1. https://en.wikipedia.org/wiki/MIDI_tuning_standard


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] meeting, journal etc. (was: midi)

2021-02-04 Thread Henning Hraban Ramm

> Am 04.02.2021 um 04:25 schrieb Fabrice L :
>>> Thanks ! Yes, I can do and article with pleasure. Just give me more 
>>> indications about the level (perhaps some examples) and length of the paper.
>> 
>> Well, the range of level and length of articles in our (ConTeXt group’s) 
>> journal is quite big.
> 
> OK. Maybe I could start with an article explaining the approach to do the 
> video, highlighting problems and solutions, and then we can discuss on this ?

That would be great. Just send it to my personal address hra...@fiee.net

>>> I would be delighted and honoured to present at a ConTeXt meeting, but they 
>>> are usually in Europe and I’m in Canada, so this could be really 
>>> challenging. 
>> 
>> I understand. This fall we’ll meet in Belgium again, and in 2022 in Germany.
>> Maybe we could include you remotely? Last time we had “online” talks by Taco 
>> – personally is better.
> 
> Why not ? ;-)

We had long discussions about online participation in the meeting. The regulars 
like the “intimate” atmosphere, and that doesn’t work online. We don’t want to 
stream anything publicly, but at least allow “known” members of the community 
to participate remotely.
We’ll further discuss this within the CG board, I guess.

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread Henning Hraban Ramm


> Am 04.02.2021 um 04:15 schrieb Fabrice L :
> 
> I usually do images ; if you or the list ever want to see more, the site 
> https://art-aleatoire.com is to show my work,

Wow, this is great!

I think I’ll come back to you about using some of your works as illustrations 
for our (Dreiviertelhaus’) German literature magazine.

Anyway I’d like to fill many pages of the ConTeXt journal with them.

Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] midi

2021-02-04 Thread luigi scarso
On Thu, Feb 4, 2021 at 4:16 AM Fabrice L  wrote:

>
> I usually do images ; if you or the list ever want to see more, the site
> https://art-aleatoire.com is to show my work, and all you can see there
> is made by me using 100% MetaFun, with sometimes the help of you and the
> list, and all the time the help of your wonderful MetaFun manual. I’m often
> so much impressed by what could be done with a couples of lines of MetaFun
> code; life is made from DNA, art (perhaps illustrations would be a better
> world) could be made by the MetaFun « randomized » function.
>
> « art-aleatoire »  is french, and can be translated to «  random art ». So
> the function I use the most in MetaFun is « randomized » !
>
>

https://www.contextfreeart.org/index.html
So the next challenge is implementing CFDG with lpeg...
and then post  to gigapixels
https://artsandculture.google.com/project/gigapixels

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___