WinXound Help


WinXound is a free and open-source Front-End GUI Editor for CSound 5, CSoundAV and CSoundAC, with Python and Lua support, developed by Stefano Bonetti.
It runs on Microsoft Windows (Xp or major), Mac OsX (10.5 or major) and Linux and it is optimized to work with the new CSound 5 compiler (older versions may be incompatible).


Main features:
- Edit CSound, Python and Lua files (csd, orc, sco, py, lua) with Syntax Highlight and Rectangular Selection;
- Run CSound, CSoundAV, CSoundAC, Python and Lua compilers;
- Run external language tools (QuteCsound, Idle or other GUI Editors);
- CSound analysis user friendly GUI;
- Integrated CSound manual help;
- Possibilities to set personal colors for the syntax highlighter;
- Convert orc/sco to csd or csd to orc/sco;
- Split the code in two windows horizontally or vertically;
- CSound csd explorer (File structure for Tags and Instruments)
- Line numbers;
- Bookmarks;
- Code repository to store your preferred code;
- CSound Opcodes Autocompletion;
And much more ...
Note: Starting from version 3.0.0, Orc and Sco documents are automatically converted into the CSD format.

The main web site of WinXound is: [winxound.codeplex.com]
Please visit it to download newer versions.


Installation - Settings - Menu - Editor View - Compiler Window - Help Window - Code Repository - CSound Opcodes Repository - Usage - Autocompletion - Tips


1. INSTALLATION

Installation:
Starting from version 3.0.0 there is no need to install WinXound; only decompress the downloaded zipped file and double-click on the "WinXound_Net" executable.
Note: WinXound folder must be located in a path where you have full read and write permission (for example in your user personal folder).

If you want to associate csd, orc and sco files to WinXound or to create a WinXound link to your desktop go to "Menu File > Settings > File associations" tab.


Back to top


2. SETTINGS

WinXound Settings (Menu File > Settings):
All settings are saved inside the WinXound 'Settings' folder (WinXoundSettings.txt): so for example you can create also multiple WinXound.Net folders with different settings.
Note: In order to work correctly, the first time you launch WinXound, it will ask you to fill some required fields into the Settings Window.
(You could change this settings when you want by simply clicking on Menu File > Settings).

2.1 - General:
Here you can set the default Startup action: Nothing (do nothing) or New Csound, Python or Lua Document (create a new document based on the relative language template) or Last Session files.
Inside the Document Templates you can write the code for every new created files.

2.2 - Directories:
If you have already installed CSound 5 (and/or Python and Lua), you can press the "Auto Search Paths" button to retrieve automatically the correct paths of csound executables. Otherwise you must select all paths manually with the "Browse" buttons.
CSound 5 executable: Click on browse and set your "csound.exe" (CSound5) path. This field is required in order to compile your csound files.
CSound 5 Help: Click on browse and specify the path of "index.html" of CSound 5 Html Manual. This field is required to visualize the CSound manual inside WinXound.
CSound 5 GUI: Click on browse and specify the path of Csound Gui Editor (for example QuteCSound).
CSoundAV: Click on browse and specify the path of "CsoundAV_Win.exe".
CSoundAV Help: Click on browse and specify the path of index.html of CSoundAV Html Help.
Wave Editor executable: Specify the executable of your preferred wave editor (for example Audacity).
Working Directory: Set here the path of your preferred directory for csd, orc, sco file. When you click on "Restore Home Directory" icon on the WinXound main toolbar and after click on Open, you will be redirected to your preferred folder.
Python Compiler: Click on browse and specify your “python.exe” path.
Python External GUI: Click on browse and specify your Python Gui path.
Lua Compiler: Click on browse and specify your “LuaJit.exe” or “lua5.x.x.exe” path.
Lua External GUI: Click on browse and specify your Lua Gui path.

2.3 - Environment Variables:
Click on the various Browse buttons to set CSound Environment Variables paths.
“SFDIR” checkbox behaviour:
when you compile for example -otest.wav you will find it in three ways:
- 1.If you haven't specified the SFDIR in your WinXound settings, it will be in your *.csd path;
- 2.If you have specified the SFDIR you will find it in your SFDIR path;
- 3.If you have specified SFDIR but you have unchecked the checkbox on the left side of SFDIR field (in your WinXound settings) you will find it in your .csd path (the checkbox enable or disable SFDIR output)

2.4 - Compiler settings:
Set the preferred Csound, Python and Lua compilers options or click "Default" to restore the original WinXound settings.
Set the default font name and size of the compiler output window.

2.5 - Text and Syntax:
Set the default font name, size and tab indent, syntax highlight colors and other properties of the text editor.
For Python syntax you can also choose between Mixed mode (inside the triple quoted strings ''' WinXound will use the CSound syntax highlighter) and Pure Mode (Python only).

2.6 - Explorer:
Here you can choose which elements of the code should be displayed in the explorer view (Options, Macros, Opcodes, Instruments, Functions and Sections) and also the default Font size (Small, Medium or Large).

2.7 - Toolbar:
Set the buttons that you want to display on the main WinXound toolbar.

2.8 - Files Association:
Here you can associate csd, orc and sco files with WinXound (so when you click on a csd, orc or sco file WinXound will start and open it automatically) or create a Desktop Shortcut for WinXound.

2.9 - Exporting and Importing WinXound settings:
Click on Export to save your preferred WinXound settings to a file.
Click on Import to load your preferred Settings from a previously saved file.


Back to top


3. MENU

3.1 - File:
New - Create a New Document with empty CSD Tags.
Open - Open a csound file (when you open an orc or sco files they will be automatically converted in a NEW UNTITLED CSD document).
Save - Save the document (csd format).
Save As - Save the document with a new name ...
Save All - Save all opened documents.
Close - Close current document.
Close All - Close all documents.
Import->Orc: Import a .orc file into the <CsInstruments> section.
Import->Sco: Import a .sco file into the <CsScore> section.
Export->Orc/Sco: Export csd file to two separate .orc and .sco files (with the same name).
Export->Orc: Export only the <CsInstruments> section to a .orc file.
Export->Sco: Export only the <CsScore> section to a .sco file.
Page setup - Settings for the printed page format.
Print preview - make a preview before to print.
Print - print the text of the file.
Settings - WinXound Settings.
Recent files - last recent files used.
Exit - exit the program.

------------------------------------------------------------------------------------------
3.2 - Edit:
Undo - Undo text modifications.
Redo - Redo text modifications.
Cut - Cut a part of text.
Copy - Copy text.
Paste - Paste text.
Delete - Delete text.
Select All - Select all document.
Find and Replace - Find some text or/and Replace text.
Find Line number - Find a line number in the text.
Comments - Comment or remove a line or a selection of text (with ";" for Csound, "#" for Python and "--" for Lua).
Bookmarks - Insert or remove bookmarks (they are signalled by a light blue line). Go to next or previous Bookmark.
Code formatting - Format the code (organize the code visually). Format code options to set the code elements to organize.
Code Repository - “Show Window” calls the repository code window (for your User Defined Opcodes or for other personal code).
To store some text from your code, select it and press Ctrl+Shift+I.
Autocompletion - “CSound Opcodes Repository” calls the opcodes repository window (with a treeview list of all CSound opcodes).
"List Opcodes" popup an autocompletion list of csound opcodes.
Line Endings - Convert the line ends of the text (CrLf, Cr, Lf).

------------------------------------------------------------------------------------------
3.3 - View:
Line numbers - Hide or Show the line numbers in the text.
Explorer - Hide or Show the left panel (Structure, Bookmarks and User Code).
Online Opcodes Help - Hide or Show the bottom real time help window.
Toolbar - Hide or Show the toolbar of WinXound.
Show all tools - Show all (Lines, Explorer, Help and Toolbar).
Hide all tools - Hide all (Lines, Explorer, Help and Toolbar).
Full Code - Show the full code view.
Split Horizontal - Split the text window into two horizontal windows.
Split Horizontal (Orc/Sco) -Split the text window into two horizontal windows and show in the first window the <CsInstruments> section and in the second the <CsScore> section.
Split Vertical - Split the text window into two vertical windows.
Split Vertical (Orc/Sco) - Split the text window into two vertical windows and position they into the <CsInstruments> and <CsScore> sections.
Show Code - Show the code window.
Show Compiler - Show the compiler output window.
Show Help - Show the CSound help window.
Show/Hide White Spaces - Show or Hide the white spaces on the text editor.
Show/Hide End Of Line Markers - Show or Hide the line end markers (CR, LF, CR+LF).
Navigate Nackward/Forward - Move the caret to the previous or next mouse click position (F3/F4).
Set Caret on Primary/Secondary View - Move the cursor on primary/secondary view when you have splitted view (F11/F12).
WinXound screen position - Put the WinXound window on the upside, downside, left side or right side of your desktop screen.

------------------------------------------------------------------------------------------
3.4 - Font:
Size: Select your preferred size.
Note: ZOOM-IN, ZOOM-OUT -> Use "CTRL + mouse wheel" to zoom-in or out the size of the font.
Reset to Default: Reset the text to the default font size.

------------------------------------------------------------------------------------------
3.5 - Tools
(remember to specify the executable paths in File > Settings):

Compile (F5): Run CSound, Python or Lua compiler (depends from the file extension).
Compile (External cmd - CTRL + F5): Run CSound,Python or Lua compiler in an external terminal window.
Use WinXound flags:
when checked WinXound will use the CSound default compiler settings (see Menu File > Settings > Compiler Settings) plus the flags present inside <CsOptions> tags;
when unchecked WinXound will only use the flags present inside the <CsOptions> tags.
Run External Gui (F6): Call an External GUI interface and pass your document to it (ready to compile).
Run CSoundAV (F7): Call CSoundAV compiler.
CSound Analysis (F8): Csound utilities window.
OS Media Player: Run Operating System preferred media player.
External Wave Player: Run your preferred wave editor.
Calculator: Run the OS calculator.
Command Line: Open the command line window.
WinXound Opcode Utilities: Open the WinXound Opcode Utilities to create a new opcodes database for WinXound. Please refer to the dedicated section below.

------------------------------------------------------------------------------------------
3.6 - Insert:
Orchestra Header - Open a window where you can define the settings for the orchestra header and insert it into your document.
CSD tags - Insert the chosen csd tag into your document.

------------------------------------------------------------------------------------------
3.7 - Info:
WinXound Help - Open this manual.
Opcode Help (F1) - Open the reference manual for the opcode under the caret.
CSound Help (F2) - Open the CSound Html Manual.
CSound Opcodes Help - Open the CSound Opcodes manual.
CSound Flags Help - Open the CSound Command line flags manual.
CSoundAV Help - Open the CSoundAV Html Manual.
CSound Tutorials (at csounds.com) - Open the CSound Tutorials page at csounds.com with your default internet browser
CSound Manual (at Flossmanuals.net) - Open the CSound Manual page at flossmanual.net with your default internet browser
About - Show info about WinXound author and version.


Back to top


4. EDITOR VIEW

4.1 - LEFT PANEL
Explorer - Here you will find the global "csd" structure with the tags and instruments found in your document. If you click on it you will be redirected automatically to the corresponding line position of the text.
Bookmarks - Here you will find your selected bookmarks. Click on it and you will be redirected to the corresponding line.

4.2 - TEXT EDITOR
- Write your opcode and see the real time help on the bottom window of WinXound.
You can also press F1 so you will be redirected directly to the CSound Manual reference for that opcode.
- Starting from 3.0.0 version, thanks to Scintilla Editor, you can do a rectangular selection of the text using the ALT key.
- When you close the "Find and Replace" window, WinXound memorizes your last searched word so you can research it by clicking "CTRL-" (search previous) or "CTRL+" (search next).
- If you click on the text window with the right mouse button it will appear a popup menu with some useful tools:
- Cut, Copy and Paste;
- Insert Bookmarks and Comments;
- Go to a definition of a variable;
- Go to reference of a variable;
- Call the html help for an opcode (keyboard shortcut: F1);
- Drag your file directly on the text window to open it.
- Use CTRL+D to duplicate a line.
- Use CTRL+L to cut a line.


Back to top


5. COMPILER OUTPUT WINDOW

This is the window where the CSound Compiler outputs all the compiling informations and errors.
Click on "Stop" button (or press Esc key) to stop the compiler.
Click on "Pause" button to pause or resume the compiler.
Click on "Save output as ..." to save the output text to a specified file.

Notes:
Menu > Tools > Use WinXound flags
- when checked WinXound will use the Default compiler settings for CSound (see Menu File > Settings > Compiler Settings) plus the flags present inside <CsOptions> tags; 
- when unchecked WinXound will only use the flags present inside the <CsOptions> tags.


Back to top


6. HELP WINDOW

This window show CSound and WinXound on-line help (html format help).


Back to top


7. UDO & USER CODE REPOSITORY WINDOW

- To save personal code (or new User Defined Opcodes) drag and drop any selected text onto the TreeView area (on the left side of the UDO text area).
- To insert the entire UDO code into the editor left-click on the UDO name inside the TreeView area and drag and drop it onto the editor area (the cursor will indicate you the insert position).
- To insert partial code into the Text Editor select it on the UDO Text Area and drag and drop it to the editor area.
You can also manually edit or insert new files in your "WinXound\CodeRepository\" path (WinXound will automatically refresh the list during startup).


Back to top


8. CSOUND OPCODES REPOSITORY

To insert an opcode drag and drop it into the text editor.
To insert the opcode synopsis drag and drop it while pressing the CTRL key.


Back to top

9. WINXOUND USAGE

In order to use this program correctly, it's very important that you fill all the compiler paths fields (please refer to Menu File > Settings).
Write or load your csound file (csd, orc, sco, py, pyw, lua) and compile it with Csound, Python or Lua (F5 or CTRL-F5 for external cmd window), QuteCSound (F6) or CSoundAV (F7).
To test WinXound, please click on "Tools > WinXound Test": a simple "oscili.csd" example file will be loaded ...
press F5 to compile it and hear (if all goes right) the sound.


Back to top

10. AUTOCOMPLETION

By pressing "Ctrl+Enter" or "AltGr+Enter" keys WinXound will popup an autocompletion list of csound opcodes...

Keys and behaviour:
- Enter: insert the opcode name.
- Ctrl+Enter (or AltGr+Enter): insert the opcode synopsis.
- Space: insert the opcode name with a final space.
- Tab: insert the opcode name with a final tab.
If you are at the start of a word, Autocompletion will insert the opcode.
If you are inside or at the end of a word, Autocompletion will substitute the entire word.


Back to top

11. TIPS

- Drag'n Drop:
--If you drag a file using the left mouse button, WinXound will open the file in a new tab.
--If you drag a file using the right mouse button, WinXound will insert in your text the complete path surrounded by double quotes.

- Ctrl+Click inside strings:
-- WinXound will try to open the path included inside your string.
- Ctrl+Alt+Click inside strings:
-- WinXound will select the entire string (including also the ' or " chars).


Back to top