Debian Codegraph @

Tools/Score template.iannix

raw
1 /*
2 * IanniX Score File
3 */
4
5
6 /*
7 * This method is called first.
8 * It is the good section for asking user for script global variables (parameters).
9 *
10 * This section is never overwritten by IanniX when saving.
11 */
12 function askUserForParameters() {
13 //title("The title of the parameter box");
14 //ask("Group name of the parameter (only for display purposes)", "Parameter label", "myGlobalVar", "theDefaultValue");
15 }
16
17
18 /*
19 * This method stores all the operations made through IanniX scripts.
20 * You can add some commands here to make your own scripts!
21 * Scripts are written in Javascript but even with a limited knowledge of Javascript, many types of useful scripts can be created.
22 *
23 * Beyond the standard javascript commands, the run() function is used to send commands to IanniX.
24 * Commands must be provided to run() as a single string.
25 * For example, run("zoom 100"); sets the display zoom to 100%.
26 *
27 * To combine numeric parameters with text commands to produce a string, use the concatenation operator.
28 * In the following example center_x and center_y are in numeric variables and must be concatenated to the command string.
29 * Example: run("setPos current " + center_x + " " + center_y + " 0");
30 *
31 * To learn IanniX commands, perform an manipulation in IanniX graphical user interface, and see the Helper window.
32 * You'll see the syntax of the command-equivalent action.
33 *
34 * And finally, remember that most of commands must target an object.
35 * Global syntax is always run("<command name> <target> <arguments>");
36 * Targets can be an ID (number) or a Group ID (string name of group) (please see "Info" tab in Inspector panel).
37 * Special targets are "current" (last used ID), "all" (all the objects) and "lastCurve" (last used curve).
38 *
39 * This section is never overwritten by IanniX when saving.
40 */
41 function makeWithScript() {
42 //Clears the score
43 run("clear");
44 //Resets rotation
45 run("rotate 0 0 0");
46 //Resets score viewport center
47 run("center 0 0");
48 //Resets score zoom
49 run("zoom 100");
50 }
51
52
53 /*
54 * When an incoming message is received, this method is called.
55 * - <protocol> tells information about the nature of message ("osc", "midi", "direct…)
56 * - <host> and <port> gives the origin of message, specially for IP protocols (for OpenSoundControl, UDP or TCP, it is the IP and port of the application that sends the message)
57 * - <destination> is the supposed destination of message (for OpenSoundControl it is the path, for MIDI it is Control Change or Note on/off…)
58 * - <values> are an array of arguments contained in the message
59 *
60 * This section is never overwritten by IanniX when saving.
61 */
62 function onIncomingMessage(protocol, host, port, destination, values) {
63 //Logs a message in the console (open "Config" tab from Inspector panel and see "Message log")
64 console("Received on '" + protocol + "' (" + host + ":" + port + ") to '" + destination + "', " + values.length + " values : ");
65
66 //Browses all the arguments and displays them in log window
67 for(var valueIndex = 0 ; valueIndex < values.length ; valueIndex++)
68 console("- arg " + valueIndex + " = " + values[valueIndex]);
69 }
70
71
72 /*
73 * This method stores all the operations made through the graphical user interface.
74 * You are not supposed to modify this section, but it can be useful to remove some stuff that you added accidentaly.
75 *
76 * Be very careful! This section is automaticaly overwritten when saving a score.
77 */
78 function madeThroughGUI() {
79 //GUI: NEVER EVER REMOVE THIS LINE
80
81 //GUI: NEVER EVER REMOVE THIS LINE
82 }
83
84
85 /*
86 * This method stores all the operations made by other softwares through one of the IanniX interfaces.
87 * You are not supposed to modify this section, but it can be useful to remove some stuff that you or a third party software added accidentaly.
88 *
89 * Be very careful! This section is automaticaly overwritten when saving a score.
90 */
91 function madeThroughInterfaces() {
92 //INTERFACES: NEVER EVER REMOVE THIS LINE
93
94 //INTERFACES: NEVER EVER REMOVE THIS LINE
95 }
96
97
98 /*
99 * This method is called last.
100 * It allows you to modify your hand-drawn score (made through graphical user interface).
101 *
102 * This section is never overwritten by IanniX when saving.
103 */
104 function alterateWithScript() {
105
106 }
107
108
109 /*
110 * //APP VERSION: NEVER EVER REMOVE THIS LINE
111 * Made with IanniX appversion: ""
112 * //APP VERSION: NEVER EVER REMOVE THIS LINE
113 */
114
115
116
117 /*
118 This file is part of IanniX, a graphical real-time open-source sequencer for digital art
119 Copyright (C) 2010-2015 — IanniX Association
120
121 Project Manager: Thierry Coduys (http://www.le-hub.org)
122 Development: Guillaume Jacquemin (https://www.buzzinglight.com)
123
124 This file was written by Guillaume Jacquemin.
125
126 IanniX is a free software: you can redistribute it and/or modify
127 it under the terms of the GNU General Public License as published by
128 the Free Software Foundation, either version 3 of the License, or
129 any later version.
130
131 This program is distributed in the hope that it will be useful,
132 but WITHOUT ANY WARRANTY; without even the implied warranty of
133 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
134 GNU General Public License for more details.
135
136 You should have received a copy of the GNU General Public License
137 along with this program. If not, see <http://www.gnu.org/licenses/>.
138 */
139