Difference between revisions of "Talk:Nyquist Audio Programming"

From Audacity Wiki
Jump to: navigation, search
(Comments about the Audacity SF page, and problem with linking to Nyquist home page)
m (Text replace - "http://audacity.sourceforge.net" to "http://web.audacityteam.org")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<font color="green"> Edgar: Actually, the link I removed (thinking you had forgotten to do so) is *identical* to the one you removed yourself  - "Please do NOT link to the Nyquist manual on the CMU homepage!"  It's up to you but I'd think the link is better removed, as it is right at the top of the page, and your warning on that page about the Nyquist 3 manual being incompatible with Audacity is some way down. I see little on the Nyquist homepage page that is useful, OTOH it is only one scroll down on that page to the v3 manual you don't want people to see. If the homepage had some nice history of Nyquist or something, maybe?
+
__TOC__
  
Also what about our main site:
+
== What pages do we need about Nyquist? ==
{{external|http://audacity.sourceforge.net/help/nyquist}}
 
  
There we link to the Nyquist homepage and invite people to download Nyquist i.e. v3, and link to the v3 Manual. Do you want to change both those things? What do you want to say?
+
* '''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  
+
* '''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?     
  
</font>
 
  
'''ALSO SEE LATEST COMMENTS BELOW ABOUT WRITING YOUR COLOURED CODE COMMENTS'''
+
== Nyquist notation: LISP or SAL? ==
  
'''Edgar wrote:''' 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 necessarily be a "free" choice by the user but could also be a second text color 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.
 
 
<font color="green">I'm not sure if you can write a template that itself has another template inside it, but the user can himself employ, say, the code template then nest another existing template inside it (like the case when the Intro template is used and the external template is used inside that to make an italicised link without the arrow). So we could have a "comment" template <nowiki> {{comment|...}}</nowiki> that just makes another text colour, rather than do it with <nowiki> <font color=""> </nowiki>, or by creating a span in the CSS (so that the user writes <nowiki><span class="comment"></nowiki> to produce the desired colour.)
 
 
I still don't really like blue or red even though it "may" be obvious it should not be a link.
 
Without looking, I don't know if any of the extensions I was thinking of will produce another colour if the string starts with ";" this is specific to the code language concerned.   
 
 
    
 
    
Using <nowiki><pre> </nowiki> tags with <nowiki> <font color=""> </nowiki> tags won't of course work as the font declaration will be printed out. To save typing it all out, if you merely copy and paste the source code of each pre class from your page, strip out the <nowiki> <pre> </nowiki> tags and indent the first character, you'll get what you want, and I don't mind if the lines are short and if you don't use blue or red (just change the color code to something else, as below):  </font>
+
'''Edgar:''' <font color="red">I'm sorry but I can't read neither the pink nor the orange text of the below</font>
 
 
(if (arrayp s)        <font color="#FF7B00">; IF s is an array [= stereo]</font>
 
    (stereo-function)  <font color="#0000CC">; THEN use the stereo function</font>
 
  (mono-function))    <font color="#0000CC">; ELSE use the mono function</font>
 
 
 
<font color="green"> To clarify what I said last time, you could actually type it out and use carriage returns - the background <i>will</i> &nbsp;be retained <i>if </i>&nbsp; you indent the first character after the return. My objection would be if there were long lines (and personally I do not like the dotted border). But you can also use the code template if we make a text colour you like, and if you use "1=" after the pipe so that it does not interpret the code. Typing this:</font>
 
 
 
<nowiki>{{code|1= (if (arrayp s) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <font color="#FF7B00">; IF s is an array [= stereo]</font>}} </nowiki>
 
 
 
<font color="green">produces this (note you have to use the non-breaking space code (&amp;nbsp;) to produce extra spaces):    </font>
 
  
 
{{code|1= (if (arrayp s)  &nbsp; &nbsp; &nbsp; &nbsp; <font color="#FF7B00">; IF s is an array [= stereo]</font>}}  
 
{{code|1= (if (arrayp s)  &nbsp; &nbsp; &nbsp; &nbsp; <font color="#FF7B00">; IF s is an array [= stereo]</font>}}  
  
 +
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...
  
'''Maybe also important to know:'''
+
<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>
In the human eye and the related "visual" brain processing there exist three
 
contrast values: red/green, blue/yellow, and black/white.
 
  
The grayscale of a color image computes as:
+
(if (arrayp s)        <font color="#6A2323">; IF s is an array [= stereo]</font>
 
+
    (stereo-function) <font color="#600099">; THEN use the stereo function</font>
<pre>0.33*RED + 0.57*GREEN + 0.11*BLUE</pre>
+
  (mono-function))     <font color="#0000CC">; ELSE use the mono function</font>
 
 
(I know: equals to 101 percent, what is based on the rounding of the missing digits).
 
 
 
Wether a color-blind person can read your wiki you can test just simple:
 
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).
 
 
 
 
 
<font color="green">I tried this produced by the current "Code" template 
 
 
 
{{code|1= (if (arrayp s)  &nbsp; &nbsp; &nbsp; &nbsp; ; IF s is an array [= stereo]}}
 
  
and could read the text perfectly in greyscale. So I think you have to suggest a text and background colour for Code template that suits your monitor.
+
<font color="green"> Otherwise I think you must stay with black and change the comments to italic: </font>
  
Thanks
+
(if (arrayp s)          ;<I> IF s is an array [= stereo]</I>
 +
    (stereo-function)  ;<I> THEN use the stereo function</I>
  
Gale
 
  
</font>
+
<font color="green">
 +
Gale</font>

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