Talk:Nyquist Audio Programming

From Audacity Wiki
Revision as of 08:19, 12 February 2008 by Galeandrews (talk | contribs) (Comments about the Audacity SF page, and problem with linking to Nyquist home page)
Jump to: navigation, search

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?

Also what about our main site: 

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?



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

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


What I meant is: if you look at the code example in my drafts, e.g.:

you will see that I use the comments to explain the source code. Therefore 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 <comment>...</comment> tags by the user. This then still would guarantee a "unified" look of the whole Wiki.

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 {{comment|...}} that just makes another text colour, rather than do it with <font color=""> , or by creating a span in the CSS (so that the user writes <span class="comment"> 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 <pre> tags with <font color=""> 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 <pre> 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):

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

To clarify what I said last time, you could actually type it out and use carriage returns - the background will  be retained if   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:

{{code|1= (if (arrayp s) &nbsp; &nbsp; &nbsp; &nbsp; <font color="#FF7B00">; IF s is an array [= stereo]</font>}}

produces this (note you have to use the non-breaking space code (&nbsp;) to produce extra spaces):

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

Maybe also important to know: 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:

0.33*RED + 0.57*GREEN + 0.11*BLUE

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

I tried this produced by the current "Code" template

(if (arrayp s)         ; 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.