Coder Social home page Coder Social logo

hydrogen-music / documentation Goto Github PK

View Code? Open in Web Editor NEW
10.0 13.0 10.0 60.58 MB

Manual and Tutorial for the Hydrogen drum machine

License: GNU General Public License v2.0

Makefile 0.05% HTML 66.35% CMake 0.05% CSS 0.71% Shell 0.03% JavaScript 0.09% XSLT 32.73%

documentation's Introduction

Hydrogen Documentation


!!! Deprecation warning !!!

The Docbook-based toolchain will be used for the 1.2.X releases of Hydrogen and will be ported to a Markdown-based one starting with 1.3.0. In addition, the manual won't be bundled and shipped with Hydrogen anymore starting from version 1.3.0.


Contents:

  1. Overview
  2. Installation and Usage
  3. Translators
  4. Documentors
  5. Developers
  6. XML and Validation
  7. Additional DocBook Authoring Restrictions

1. Overview

Hydrogen documentation is maintained in DocBook 4.5 (XML) and translated to HTML before release. Different translations are managed through GNU gettext PO files. When the documentation is generated, the PO files and the master documentation are merged to create the doc for that specific language.

This document is split up into the three types of people who may want to contribute to Hydrogen documentation: Translators, Documentors, and Developers. A section is devoted to each one, individually.

This document assumes that you don't know much, and tries to give you pointers to the stuff you need to know.

2. Installation and Usage

The following tools you must install in order to maintain and process the documentation (on Debian-based systems).

sudo apt install itstool gettext xmlto libxml2-utils make

To update the resulting HTML files after changing a master document (manual.docbook and tutorial.docbook) or a translation (*.po), you just have to enter

make

2.1. Detailed description

The toolchain consists of the following programs:

  • itstool - Uses the rules of the W3C Internationalization Tag Set (ITS) to create the translation templates (*.pot) based on the original DocBook source and merges the compiled *.mo files with the original to produce the translated DocBook files.

  • msgmerge, msginit, msgfmt - Are part of the gettext internationalization framework and used to update, initialize, and compile the *.po translation files.

  • xmlto - Converts DocBook files to HTML. (Note that xmlto is part of libxml2 and can convert DocBook to much more than just HTML.)

  • xmllint - Used to validate the DocBook files against the DocBook DTD.

  • make - GNU's make utility.

3. Translators

To translate documentation for Hydrogen you will need:

  • A PO-file editor. (Note that a text editor works fine, but a translation assistant like poedit is better.)
  • To be able to read and understand English.

If you don't have all the tools listed in Section 2 or do not know how to install them on your particular system, that's OK. Ask the Hydrogen Developer list and someone there can process files for you.

To make a new translation of the Hydrogen manual or tutorial, you should use the following command

msginit -l LL -i manual.pot -o manual_LL.po

Note that the _LL is added to the translation template, and LL is the IANA abbreviation code for that language. (E.g. 'ja' is for 'Japanese.') The registry for the codes is located here:

http://www.iana.org/assignments/language-subtag-registry

All translation files (.po) will be updated and converted to .html files as soon as one of the master documents - manual.docbook or tutorial.docbook - is touched and the make command is executed.

You can either see the changes using the commandline tool diff, the graphical program meld, or your favorite translation editor.

NOTICE: Before creating the HTML file, the document will be validated. If the document does not validate, you will have to alter your translation file so that the output is a valid DocBook document. For more information on Validation, see Section 6.

RULES AND GUIDELINES FOR TRANSLATING:

  • No new content. New content must be first added to the master (English) manual, and then translated to all the other manuals.

  • All content enclosed by angle brackets must not be translated. E.g.

    <title>Hydrogen Tutorial</title>

    will be translated to

    <title>Tutoriel de Hydrogen</title>
  • Maintain the DocBook XML structure as closely as possible. Do not add sections, divide paragraphs, or alter the markup significantly.

  • The English translation uses a little humor to try to keep the reading interesting. When this happens, the language and idioms being used are very cultural. Please do NOT translate the words literally. Instead, please translate the ideas to your culture as you see fit. We've asked the Documentors to mark when this is happening so that you don't miss the joke. This should show up in the PO file.

  • If your culture doesn't like American-style informal writing, please feel free to make a humor-less translation.

  • Submit translations to the Hydrogen Developers list ([email protected])

4. Documentors

The master documents - manual.docbook and tutorial.docbook - are in English. All new content and major revisions shall be done there first. In order to work on the documentation, you will need:

  • To know and understand DocBook well.

  • To know and understand Hydrogen well enough to ask questions.

  • An XML editor (note: any text editor will do).

  • A way to create images. (e.g. Inkscape, GIMP, PhotoShop)

What you write is pretty much your own style. Please do keep the text interesting to read by using wit and a more familiar conversational style. If you are using an English pun or expression that is intended to convey humor, please mark it so that the translator gets the joke:

<!-- TRANSLATORS: "Have your squash and eat it, too." This
combines a well-known cliche ("Have your cake and eat it, too.")
and a pun on the word "squash."  In English, "squash" is a
vegetable (and not a very popular one) and "squash" is also a verb
meaning "to flatten in a destructive way."  For example: "I
squashed the bug to kill it." -->

(Ahem, don't ask me how I came up with that one.....)

Before submitting (or committing) your changes, please make sure that your documents validate (see Section 6 below). Some guidelines:

  • Use double-quotes for all attributes.

    • Good:
      <foo id="bar"/>
    • Bad:
      <foo id='bar'/>
  • Please do not indent any elements that go into the <screen> tag or at least do so with care. All white spaces will show up in the resulting HTML file as well.

  • Please make good use of <link> and <xref> tags for internal links within the document.

  • Since we're using <link> and <xref>'s -- if you change an id=".." attribute, make sure that you change all its references, too. If you create a broken link, the document won't validate.

  • Do not make reference to specific section numbers, figure numbers, or titles (e.g. "See section 2.1.3 The Menu Bar"). Instead, use <xref> tags so that this text will be generated for you.

  • For italics, you do not need to set the role="italic" attribute, since that is the default. To get boldface, you must use role="bold".

    • Example:
      <emphasis role="bold">really</emphasis>
    • Bad:
      <emphasis rold="italic">might</emphasis>
  • For web links, don't write the URL twice. The processor will do that for you, and it makes it more readable.

    • Good:
      <ulink url="http://www.google.com"/>
    • Bad:
      <ulink url="http://www.google.com">http://www.google.com</ulink>
  • Don't worry about typesetting in the DocBook documents. That's what XSL and CSS stylesheets are for. Get the content done, and then worry about formatting. Don't get distracted by stuff like section indents or relative font sizes.

  • However, do worry about typesetting on pre-formatted tags like <screen> and <code> and <literallayout>. Extra spaces and indents in the source document will carry through all the way to the final document.

5. Developers


Since we don't want to add xmlto, itstool, xmllint, msgmerge, msgfmt, and the DocBook DTD's to our normal build requirements: All HTML files need to be generated and committed before releasing. After the release, the generated HTML files can (and should) be deleted. Do not commit the generated DocBook documents.

If you are preparing a Hydrogen release, you must have all the tools listed above so that you can process the documents. You may also need to understand DocBook enough to help a translator with validation issues. (See Section 6 below.)

The reason for doing it this way is that the tools are not very portable across Linux, Mac, and Windows. Nor or they even very portable across different Linux distributions. However, the tools are fairly stable on Debian/Ubuntu -- which most of the current developers are using.

6. XML and Validation


DocBook is a specific flavor of XML and in case you already have read or written HTML code in recent years - since its port to XHTML - you can get started with DocBook in no time. To read more about XML, check out the Wikipedia article:

http://en.wikipedia.org/wiki/XML

Some basics:

  • The tags are case sensitive. <IMG> and <img> are not the same.

  • Closing tags are not optional.

  • Empty tags are like this: <br/>

If a document follows all the rules of XML, it is called "Well-Formed." For example, the following is a well-formed XML document:

<?xml version='1.0' encoding='UTF-8'?>
<ijustmadethistagup>
   <because>It's</because><ok/> to <make it="up">as</make>
   you go</ijustmadethistagup>

But the following is NOT a well-formed XML document:

<?xml version='1.0' encoding='UTF-8'?>
<ijustmadethistagup>
   <because>It's <ok/> to <make it=up>as</make>
   you go</ijustmadethistagup>

(Can you find the errors? If you get stumped, feed it to a validator.)

While it's imperative that documents be well-formed, many documents (such as DocBook) have a specific structure that must be maintained. For example, in HTML you should only have paragraphs inside of the body:

<body>
   <p>I am the very model of a modern
    major general.</p>
</body>

But, if I do this, it will still be well-formed XML:

<p>
   <body>I am the <happy>very</happy> model of a modern
    major general.</body>
</p>

It is not, however, a Valid HTML document. The W3C published a DTD (Document Type Definition) for HTML that clearly specifies that the former is OK and the latter is degenerate.

When a document is checked against the DTD, it is said to be "Valid" or "Validated" if it passes all the requirements of the DTD.

Validation is important, because our DocBook source files are going to be processed by several automatic tools. These tools know the structure of DocBook, and are able to generate output based on that. However, if we feed them an invalid document, the tools may process the data -- but they probably won't process it right.

7. Additional DocBook Authoring Restrictions


It has been found that the toolchain is assuming some things about the document structure that are not specified in any DTD. Thus, in order to get our files to work with poxml, we have to add the following restrictions:

  • <para> may not contain an <itemizedlist>

  • The 'msgid' string inside the .po file may not contain an empty element. So, if you have some text that includes

    <ulink url="http://www.foo.bar"/>

    you will need to convert it to

     <ulink url="http://www.foo.bar">http://www.foo.bar</ulink>
  • You must use double quotes " for attributes, not single ', even though BOTH are OK in XML.

  • The manual may not contain >, it must always be &gt;.

  • Avoid embedding a lot of structured markup inside a paragraph. For example:

    <para>Install hydrogen like this:
      <screen>
        <prompt>$</prompt> <command>apt-get hydrogen</command>
      </screen>
    </para>

    This makes things a little funky in the PO files. Also, it doesn't really make sense to embed a <screen> (like HTML <pre>) inside of a <para>. Instead, do it like this:

     <para>Install hydrogen like this:</para>
     <screen>
       <prompt>$</prompt> <command>apt-get hydrogen</command>
     </screen>

    However, if you really need to, go ahead and try it. Just be sure to test that it will match the strings for translation.

  • If you change indentation... in tags... be careful how that affects the .po files. For example, if you had:

     <foo><bar>bat</bar><baz>zap</baz></foo>

    But change it to:

    <foo>
      <bar>bat</bar>
      <baz>zap</baz>
    </foo>

    You will need to add spaces in the .po files like this:

    • Before:
      <foo><bar>bat</bar><baz>zap</baz></foo>
    • After:
      <foo> <bar>bat</bar> <baz>zap</baz> </foo>

documentation's People

Contributors

cme avatar cominu avatar jeremyz avatar luzpaz avatar mauser avatar oddtime avatar rwhogg avatar snan avatar thegreatwhiteshark avatar thijz avatar trebmuh avatar wolkstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documentation's Issues

NSM doc

add a dedicated section about the peculiaries of the NSM support/usage.

Please document copyright holder[s] and license

Please document copyright holders in this git repository. It is also necessary to document the license for these files to be redistributed. Next, a full-text copy of that license will most likely need to be included in the repository (depends on the license).

Finally, it would be nice to see a beta1 tag!

Kind regards,
Nicholas

Which documentation is still current and should be installed?

Hello,

I've finally found some time to work on the Debian package as well as to add the new documentation. What I've found is that "manual_en.html tutorial_en.html tutorial_fr.html tutorial_it.html" are new, but nothing else appears to be built from the source of this repository.

Should tutorial_*.html still be installed to /usr/share/hydrogen/data/new_tutorial ?
Should manual_en.html still be installed to /usr/share/hydrogen/data/doc ?
Should the other html files that aren't built from localised source just be ignored and/or removed at this time?

Finally, is there any reason why the clean target doesn't remove the generated html files?

Thank again!
Nicholas

Note property setting for a given note in a chord

screenshot-0576f7b3

Is there a way of changing the velocity of the green note?
I am able to change only the velocity of the red one.
A solution is to select and move the green note in a temporary different position, change velocity and then moving to the initial position, but it's a bit long.
If one could select the desired note and then change its velocity in the bottom panel...

tagging documentation "releases" in sync with the main project

i assume that the documentation is moving in sync with the releases of hydrogen itself.

so: would it be possible to create a tag in the documentation repository, whenever you tag a release in the main repo as well (ideally: using the same name)?

this is related to: hydrogen-music/hydrogen#926

distributions like Debian really enforce using source code of everything (obviously binaries; but also documentation if it is generated from some abstract representation like docbook) during the packaging process.
while i appreciate your efforts in creating a separate tarball in the main repository (apart from the github-autogenerated one) that also contains the documentation.
however, as @trebmuh pointed out, it lacks the sources for the documentation.

so: in order to comply with a Debian packaging rules, we (the Debian packagers) need a way to get the source of everything to build a complete package from scratch. (you might think that this is anal; but really it's just the prize we pay for creating a free (as in speech) distribution)

i think that if you created matching tags here in the documentation repository, we would be able to come up with something that pulls in the sources for all artifacts (binary and docs) while importing a new upstream release. in an automated way ;-)

Updating translations

I just realize we do not support updating translation files *.po yet. There is only the manual.pot file generated from the current manual.docbook and the README.md states this should be copied to a manual_*.po and translated afterwards. But there is no way to update the latter.

The xml2pot package provides a program called split2po with which one could write a custom script. But the gettext system is so old there are full fledged solution in the official repos for sure. I'll have a look.

Translations of the manual

Right now, http://hydrogen-music.org/doc/ lists a couple of translations of the manual that are desperately out of sync. By scrolling through them it seems none of them reaches 30% translated content.

With the reworked version of the manual this percentage will decrease drastically. So, I think we have no choice but to drop them. But we should to still point out that translations of the manuals are both supported and highly welcome.

Update the manual for hihat group

Hihat pressure groups enable users using v-drums to have different instruments depending on the pressure on the hihat pedal.

The hihat groups itself is for v-drum with different trigger for the hihat (edge, rim, etc.) so that a completely different group of different instruments can be setup per hihat trigger.

The manual needs to be updated to reflect all these functionalities.

1.2.3 Updates

  • add note about behavior of custom note lengths in the presence of tempo changes
  • update image showing stop note
  • review stop note parts of the doc -> maybe start Pattern Editor section with introduction of all different types of notes that can be used (regular, custom length, stop note)
  • in section for custom note length -> info that Instrument Editor > Release controls the length of the fade out
  • better ADSR coverage. (Release only applied on custom note lengths, maybe a figure highlighting changes in the
    sample)
  • Add Changelog
  • Add pictures of tutorial to shotlist -> 1.3.0
  • Rework tutorial -> 1.3.0
  • Update CMake setup to allow creating artifacts within build pipelines
  • Add new workflow to README.md

Restructure OSC command section

We already have quite a number of commands/endpoints (and I intend to add even more). Right now they are just presented as a bulk with no structure at all. How about grouping them into different topics?

In addition, most of the commands require an argument of a specific type. I would suggest to put the commands into tables with the rows: command itself | expected type | short explanantion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.