Difference between revisions of "Talk:Nyquist Audio Programming"

From Audacity Wiki
Jump to: navigation, search
(maybe better suggestion for a alternate comment color inside the code template)
m (Text replace - "http://audacity.sourceforge.net" to "http://web.audacityteam.org")
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Edgar wrote:''' I think I just will use <nowiki><pre>...</pre> </nowiki> tags. My code lines always are as short as possible (otherwise I won't understand myself) and the wacky "unbreakable" Nyquist plugin header lines will be just simply shortened by me myself to an appropriate length.
+
__TOC__
  
<font color="green"> OK, as long as the lines are short. I'll change the colours of Code Template anyway (I have an LCD too and even if I stand away from it I can still see the text against the background). It's also odd as I have checked my monitor against a calibration image and it was not very far out....
+
== What pages do we need about Nyquist? ==
  
 +
* '''Gale''' I think this is a confusing change and I would very much rather revert it. The page is in the plug-ins category and it's very largely about plug-ins. The intro. might perhaps have misled you by explaining too much what Nyquist is (perhaps I can tweak it?). We do have more general pages for Wiki Nyquist: [[Nyquist Audio Programming]] (I'll try to duplicate the Nyquist Course announcement there) and  [[Nyquist Basics: The Audacity Nyquist Prompt]], which are in [[:Category:Digital Audio Technology]]. What did you have in mind about the move facilitating external links?
 +
* '''James''' I've been working behind the scenes to get more Lisp writers visiting Audacity and to generally pool knowledge about embedded Lisp.  We need a Nyquist Lisp page that Lisp projects like Combo can do reciprocal links to us with.  I also added quite a few links on the end of this page, after the move, and brought Nyquist links together, but then got bounced by the http-link bug :-( .  I agree that the ideal is to have both a Nyquist page and a Nyquist plug-ins page, so this page should split, but it's a mess trying to do that with the current bug.
 +
* '''Gale:''' The link saving bug should have gone, but only for now, if you see what I mean. When the Nyquist plug-ins page was written, it was the only Nyquist page, which is why it was more general, then Edgar added the two Nyquist pages above. I'd made some linking changes anyway after you raised this, which should now go live. Can we agree then to revert the [[Nyquist]] page to [[Nyquist Plug-ins]] and focus the Plug-ins page on plug-ins, and move anything else out of it? Unless someone can add some meat to the Plug-ins page, it might possibly be integrated into [[Download Nyquist Plug-ins]]?  Then the only other question is do you think we need a  [[Nyquist Lisp]] page to add your links to *as well as* [[Nyquist Audio Programming]]? My idea (Edgar having created it) was to keep that as a focus page which has links to specific aspects of Nyquist such as Plug-ins and the Prompt. Generally, I like to keep moves and redirects to an absolute minimum anyway. Thanks, James.
 +
* '''James:''' Maybe we need a category Nyquist??  Edgar's page is wrong for a landing page for Lisp programmers.  Lisp programmers tend to be very mathematical types for whom the 'very advanced topics' of that page look elementary.  These are likely to be people who write 10,000 line Lisp programs for fun.  I'm not sure we've had a Nyquist plug in with more than 100 lines.  [[Nyquist Lisp]] could be a good page title.  If you want to move the content here back to Nyquist-plug-ins and start a [[Nyquist Lisp]] page I guess that's OK.
 +
* '''Edgar:''' I only wanted to say: even if there was not much new writing on the Nyquist Programming pages (and the topics there are in deed still quite basic) I read the Wiki changes every day and will continue to extend the Nyquist Programming pages as soon as I have time to (usually during the summer months I have *lots* of time).
 +
* '''James wrote:''' <font color="green">Lisp programmers tend to be very mathematical types for whom the 'very advanced topics' of that page look elementary.</font>
 +
* '''Edgar:''' I'm not at all a good math programmer and Nyquist was designed just for the reason to save people from fighting with DSP and FFT math. I agree that even the 'very advanced topics' on the Nyquist Programming (suggestion) page are in fact more or less still 'basic' topics for everyone who really seriously works with audio in general (with or without computers doesn't matter in this case) but my experience on the Audacity Nyquist list seems to proove the opposite. Most people there (beside some rare exceptions) seem to be interested in kiddy-toy effects and have very little knowledge even about topics like 'how to change the volume with Nyquist'. Suggestions for more serious (really advanced) topics welcome, just add it to the page.
 +
* '''James wrote:''' <font color="green">Nyquist Lisp could be a good page title.</font>
 +
* '''Edgar:''' <font color="crimson">I consider Nyquist Lisp as '''NOT''' a good title</font> in so far as Nyquist 3.0 has moved away from Lisp to SAL, a Python-like notation (the same notation like it is used in Rick Taube's 'Common Music'). We are just exploring wether this could be integrated into Audacity too, but this will probably take another year because first there has to be sure wether this works right with the Roger Dannenberg Nyquist 3.01 version. For the same reason I'm not sure right now how much sense it makes to write extensive Lisp documentation.
 +
* '''Edgar summary:''' <font color="crimson">I will have no problems if the Nyquist pages will be re-organized again. Feel free to change my pages in any way you want.</font> I'm afraid there will be another month with very low writing but I definetly will continue.
 +
* ''' Gale:''' I've moved [[Nyquist]] back to [[Nyquist Plug-ins]], made it more specific to plug-ins and put it and other Nyquist pages in [[:Category:Nyquist]]. I honestly think this is best given we have VST and LADSPA plug-in pages, and given the content (however named) is in any case too primitive for the LISP mathematicians. I have not created [[Nyquist LISP]] as I think Edgar's doubts are valid - but we need to know more of James' reasoning for wanting to attract LISP programmers and how we best do it. I'm still of the view [[Nyquist Audio Programming]] should be our main Nyquist page, and contain links to other Nyquist topics.  It could be renamed [[Nyquist (LISP)]], but does that help anything?     
  
Gale </font>
 
  
 +
== Nyquist notation: LISP or SAL? ==
  
In the code template it would also be necessary to let the user specify the text foreground color, because comments must be displayable in a different color than ordinary code. I don't know how much this contradicts the meaning of a template, because if the user can change everything afterwards anyway you don't need a template...
+
Edgar: The link confusion was on these pages page was probaly started by me myself. There had been in the beginning a few more links on the "Nyquist Prompt" page, which then seemed to me as too many, so I started to reduce them to a reasonable number by probably deleting the wrong parts so everything was messed up in the end. Sorry for the confusion.
  
<font color="green">
+
'''What is really important to know:''' In Nyquist 3.0 the language notation in Nyquist has changed from Lisp, like used in Audacity, to SAL, like used in "Common Music" by Rick Taube. Also the Nyquist manual on the CMU homepage the notation of all example code has changed to SAL, so it cannot be used for Audacity any longer, at least as SAL is not integrated with Nyquist in Audacity (what probably still will need another year if not longer).
Indeed, I said that text color was a decision to make, but it's a unitary color through the whole template. The user should not change the template really because as you say it is then no longer a template. There could be an alternative template with different text and background colour, if there is some definite opinion on a good colour scheme. Yellow on blue would be high contrast but not I think very popular....:) I'll do just a black on light pink I think like the old code tags, for the main template. You can suggest an alternative if you wish where the text colour is other than black. There is not much choice though (red and blue are not recommended as they are dead and active link colours), hence another reason for the pink choice.
 
  
If you are talking about displaying a range of colours in the code box like some text editors do for different types of string, that has to be wait to install an appropriate extension that can do that (or before then the user hard codes the whole thing in a table according to the color scheme they want). 
+
'''So there are TWO DIFFERENT links:'''
  
 +
{{external|http://www.cs.cmu.edu/~music/music.software.html|http://www.cs.cmu.edu/~music/music.software.html}} - the Link to the Nyquist homepage. I think this should be left as-is because Nyquist users should be given the information, that beside Nyquist in Audacity, there also exists a Nyquist stand-alone version.
  
Gale </font>
+
{{external|http://www.cs.cmu.edu/~rbd/doc/nyquist/root.html|http://www.cs.cmu.edu/~rbd/doc/nyquist/root.html}} - the link to the Nyquist 3.0 manual with the '''incompatible''' SAL notation.<br>
 +
This link should be changed to
 +
{{external|http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/home.html|http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/home.html}}
 +
at least until the SAL question is clearified.
  
 +
<font color="green">Then I will make some appropriate change to the Audacity SF
 +
{{external|[http://web.audacityteam.org/help/nyquist Nyquist page]}}. As for this Wiki page, I still think it is a mistake to link to the Nyquist homepage without explanation, and I still think people could go there and get the v3 Manual without realising the problem. I think your first paragraph on this page should explain the difference between the Nyquist 2.36  that Audacity can use and the current v3, but that there is nothing to stop someone using the current v3 in its own environment. I would not fully understand this from your page if I did not know it already.   
  
What I meant is: if you look at the code example in my drafts, e.g.:
+
</font>
  
http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/examples/audacity-wiki/basics/change-volume.htm#3-2
 
  
you will see that I use the comments to explain the source code. Therefore
+
== Colours for programming code==
it is important that the comments (the explanations) get displayed in a
 
different color than the rest of the code.
 
  
This must not be necessarily
+
 
be a "free" choice by the user but could also be a second text color
+
'''Edgar:''' <font color="red">I'm sorry but I can't read neither the pink nor the orange text of the below</font>
predefined by the template programmer, which then can be used e.g. via
 
<nowiki><comment>...</comment></nowiki> tags by the user. This then still
 
would guarantee a "unified" look of the whole Wiki.
 
  
'''Maybe also important to know:'''
+
{{code|1= (if (arrayp s)  &nbsp; &nbsp; &nbsp; &nbsp; <font color="#FF7B00">; IF s is an array [= stereo]</font>}}
  
In the human eye and the related "visual" brain processing there exist three
+
The problem is, that there probably will be no other solution but plain white or plain black if you want to use colored text. The reason is that CRT and LCD/TFT monitors have different gamma values ('middle' grey on CRT is darker than on LCD/TFT) and the reason why I use blue comments (which, I agree, can be easily confused with hyperlinks) is that beside dark red and dark blue there is no other color that can be read with light grey background on CRT as well as LCD/TFT by all people without problems. In other words: I do not even like my own color choice (blue comments) but I don't know any other solution. Sorry, but I have no better ideas on store...
contrast values: red/green, blue/yellow, and black/white.
 
  
The grayscale of a color image computes as:
+
<font color="green">I am really not keen on a single mix of (1) black with (2) either blue or red. Maybe if it is multi-coloured code (green, red, blue, orange and black or similar) where it is obvious the blue and red cannot be links, it is OK. Also the grey background in code template does not have to be so dark - it could even be white or nearly so. Are these dark violet and dark brown colours any better:?</font>
  
<pre>0.33*red + 0.57*green + 0.11*blue</pre>
+
(if (arrayp s)        <font color="#6A2323">; IF s is an array [= stereo]</font>
 +
    (stereo-function)  <font color="#600099">; THEN use the stereo function</font>
 +
  (mono-function))    <font color="#0000CC">; ELSE use the mono function</font>
  
(I know: equals to 101 percent, what is based on the missing digits).
+
<font color="green"> Otherwise I think you must stay with black and change the comments to italic: </font>
  
Wether a color-blind person can read your wiki you can test just simple:
+
(if (arrayp s)          ;<I> IF s is an array [= stereo]</I>
 +
    (stereo-function)  ;<I> THEN use the stereo function</I>
  
Make a screenshot, load it into the Gimp (or any other graphics tool) and
 
convert it to a greyscale image. If you still can read the text, you have
 
won (it's sometimes not-so-easy to judge from a color image, I have fooled
 
myself often enough).
 
  
Thanks anyway,
+
<font color="green">
 
+
Gale</font>
- edgar
 

Latest revision as of 08:51, 15 May 2015

What pages do we need about Nyquist?

  • Gale I think this is a confusing change and I would very much rather revert it. The page is in the plug-ins category and it's very largely about plug-ins. The intro. might perhaps have misled you by explaining too much what Nyquist is (perhaps I can tweak it?). We do have more general pages for Wiki Nyquist: Nyquist Audio Programming (I'll try to duplicate the Nyquist Course announcement there) and Nyquist Basics: The Audacity Nyquist Prompt, which are in Category:Digital Audio Technology. What did you have in mind about the move facilitating external links?
  • James I've been working behind the scenes to get more Lisp writers visiting Audacity and to generally pool knowledge about embedded Lisp. We need a Nyquist Lisp page that Lisp projects like Combo can do reciprocal links to us with. I also added quite a few links on the end of this page, after the move, and brought Nyquist links together, but then got bounced by the http-link bug :-( . I agree that the ideal is to have both a Nyquist page and a Nyquist plug-ins page, so this page should split, but it's a mess trying to do that with the current bug.
  • Gale: The link saving bug should have gone, but only for now, if you see what I mean. When the Nyquist plug-ins page was written, it was the only Nyquist page, which is why it was more general, then Edgar added the two Nyquist pages above. I'd made some linking changes anyway after you raised this, which should now go live. Can we agree then to revert the Nyquist page to Nyquist Plug-ins and focus the Plug-ins page on plug-ins, and move anything else out of it? Unless someone can add some meat to the Plug-ins page, it might possibly be integrated into Download Nyquist Plug-ins? Then the only other question is do you think we need a Nyquist Lisp page to add your links to *as well as* Nyquist Audio Programming? My idea (Edgar having created it) was to keep that as a focus page which has links to specific aspects of Nyquist such as Plug-ins and the Prompt. Generally, I like to keep moves and redirects to an absolute minimum anyway. Thanks, James.
  • James: Maybe we need a category Nyquist?? Edgar's page is wrong for a landing page for Lisp programmers. Lisp programmers tend to be very mathematical types for whom the 'very advanced topics' of that page look elementary. These are likely to be people who write 10,000 line Lisp programs for fun. I'm not sure we've had a Nyquist plug in with more than 100 lines. Nyquist Lisp could be a good page title. If you want to move the content here back to Nyquist-plug-ins and start a Nyquist Lisp page I guess that's OK.
  • Edgar: I only wanted to say: even if there was not much new writing on the Nyquist Programming pages (and the topics there are in deed still quite basic) I read the Wiki changes every day and will continue to extend the Nyquist Programming pages as soon as I have time to (usually during the summer months I have *lots* of time).
  • James wrote: Lisp programmers tend to be very mathematical types for whom the 'very advanced topics' of that page look elementary.
  • Edgar: I'm not at all a good math programmer and Nyquist was designed just for the reason to save people from fighting with DSP and FFT math. I agree that even the 'very advanced topics' on the Nyquist Programming (suggestion) page are in fact more or less still 'basic' topics for everyone who really seriously works with audio in general (with or without computers doesn't matter in this case) but my experience on the Audacity Nyquist list seems to proove the opposite. Most people there (beside some rare exceptions) seem to be interested in kiddy-toy effects and have very little knowledge even about topics like 'how to change the volume with Nyquist'. Suggestions for more serious (really advanced) topics welcome, just add it to the page.
  • James wrote: Nyquist Lisp could be a good page title.
  • Edgar: I consider Nyquist Lisp as NOT a good title in so far as Nyquist 3.0 has moved away from Lisp to SAL, a Python-like notation (the same notation like it is used in Rick Taube's 'Common Music'). We are just exploring wether this could be integrated into Audacity too, but this will probably take another year because first there has to be sure wether this works right with the Roger Dannenberg Nyquist 3.01 version. For the same reason I'm not sure right now how much sense it makes to write extensive Lisp documentation.
  • Edgar summary: I will have no problems if the Nyquist pages will be re-organized again. Feel free to change my pages in any way you want. I'm afraid there will be another month with very low writing but I definetly will continue.
  • Gale: I've moved Nyquist back to Nyquist Plug-ins, made it more specific to plug-ins and put it and other Nyquist pages in Category:Nyquist. I honestly think this is best given we have VST and LADSPA plug-in pages, and given the content (however named) is in any case too primitive for the LISP mathematicians. I have not created Nyquist LISP as I think Edgar's doubts are valid - but we need to know more of James' reasoning for wanting to attract LISP programmers and how we best do it. I'm still of the view Nyquist Audio Programming should be our main Nyquist page, and contain links to other Nyquist topics. It could be renamed Nyquist (LISP), but does that help anything?


Nyquist notation: LISP or SAL?

Edgar: The link confusion was on these pages page was probaly started by me myself. There had been in the beginning a few more links on the "Nyquist Prompt" page, which then seemed to me as too many, so I started to reduce them to a reasonable number by probably deleting the wrong parts so everything was messed up in the end. Sorry for the confusion.

What is really important to know: In Nyquist 3.0 the language notation in Nyquist has changed from Lisp, like used in Audacity, to SAL, like used in "Common Music" by Rick Taube. Also the Nyquist manual on the CMU homepage the notation of all example code has changed to SAL, so it cannot be used for Audacity any longer, at least as SAL is not integrated with Nyquist in Audacity (what probably still will need another year if not longer).

So there are TWO DIFFERENT links:

http://www.cs.cmu.edu/~music/music.software.html  - the Link to the Nyquist homepage. I think this should be left as-is because Nyquist users should be given the information, that beside Nyquist in Audacity, there also exists a Nyquist stand-alone version.

http://www.cs.cmu.edu/~rbd/doc/nyquist/root.html  - the link to the Nyquist 3.0 manual with the incompatible SAL notation.
This link should be changed to http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/home.html  at least until the SAL question is clearified.

Then I will make some appropriate change to the Audacity SF Nyquist page . As for this Wiki page, I still think it is a mistake to link to the Nyquist homepage without explanation, and I still think people could go there and get the v3 Manual without realising the problem. I think your first paragraph on this page should explain the difference between the Nyquist 2.36 that Audacity can use and the current v3, but that there is nothing to stop someone using the current v3 in its own environment. I would not fully understand this from your page if I did not know it already.


Colours for programming code

Edgar: I'm sorry but I can't read neither the pink nor the orange text of the below

(if (arrayp s)         ; IF s is an array [= stereo]

The problem is, that there probably will be no other solution but plain white or plain black if you want to use colored text. The reason is that CRT and LCD/TFT monitors have different gamma values ('middle' grey on CRT is darker than on LCD/TFT) and the reason why I use blue comments (which, I agree, can be easily confused with hyperlinks) is that beside dark red and dark blue there is no other color that can be read with light grey background on CRT as well as LCD/TFT by all people without problems. In other words: I do not even like my own color choice (blue comments) but I don't know any other solution. Sorry, but I have no better ideas on store...

I am really not keen on a single mix of (1) black with (2) either blue or red. Maybe if it is multi-coloured code (green, red, blue, orange and black or similar) where it is obvious the blue and red cannot be links, it is OK. Also the grey background in code template does not have to be so dark - it could even be white or nearly so. Are these dark violet and dark brown colours any better:?

(if (arrayp s)         ; IF s is an array [= stereo]
    (stereo-function)  ; THEN use the stereo function
  (mono-function))     ; ELSE use the mono function

Otherwise I think you must stay with black and change the comments to italic:

(if (arrayp s)          ; IF s is an array [= stereo]
    (stereo-function)  ; THEN use the stereo function


Gale