Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 264.line breakpoint function module #17

Merged
merged 33 commits into from
Mar 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0536770
Create 264.line breakpoint function module
delucis Jan 29, 2019
9ba6b98
Add 264.line to README
delucis Jan 30, 2019
8a586ff
Add 264.line to unreleased changes in CHANGELOG
delucis Jan 30, 2019
380a590
Start line playback from scrub position and follow scrub during playback
delucis Jan 30, 2019
9ac63d5
Remove default @loop 0 in 264.line
delucis Jan 30, 2019
f41ac7b
Add more detail to 264.line help file
delucis Jan 30, 2019
8613c1d
Set linecolor attribute for function used to display cursor
delucis Jan 30, 2019
21b7716
Add 2px space between copy and paste buttons in function editor
delucis Jan 30, 2019
03406fa
Merge branch 'master' into feat/6
delucis Jan 31, 2019
85f076c
Merge branch 'master' into feat/6
delucis Jan 31, 2019
14c9bcb
Merge branch 'master' into feat/6
delucis Jan 31, 2019
d67c79a
Add auto-sizing to 264.line
delucis Mar 11, 2019
514fe93
Allow programmatic generation of random lines
delucis Mar 11, 2019
bda8ce5
Add “reverse” method to 264.line
delucis Mar 12, 2019
ff83410
Allow lines to be cleared programmatically
delucis Mar 12, 2019
a326ec7
Add undo/redo functionality to 264.line editor
delucis Mar 12, 2019
62c67f1
Fix line input for 264.line
delucis Mar 12, 2019
ddc9cbd
Update messages tab of 264.line help patcher to include new features
delucis Mar 12, 2019
e083f4d
Add 264.line to the Module Finder extra
delucis Mar 12, 2019
6cfb231
Scale randomly generated lines to full x-axis range (0–127)
delucis Mar 15, 2019
7780a7f
Add “move mode” to 264.line function editor
delucis Mar 15, 2019
d321869
Show editor line in yellow when in “move mode”
delucis Mar 15, 2019
9f764f6
Display hand/grab cursor when over function editor in “move mode”
delucis Mar 15, 2019
39313dd
Add shortcut to close function editor with escape key
delucis Mar 15, 2019
4d2ab1e
Refactor 264.line to make function editor more maintainable
delucis Mar 23, 2019
11d4bdc
Add a draw/pencil mode to the 264.line editor
delucis Mar 24, 2019
fed7730
Document 264.line messages in reference file
delucis Mar 24, 2019
e8c0770
Update parameter catalogue
delucis Mar 24, 2019
ba12d82
Add 264.line to init & interfaces
delucis Mar 24, 2019
df62d50
Add tab to 264.line help file explaining use with presets
delucis Mar 24, 2019
15e6075
Tweak 264.line GUI layout and function editor window style
delucis Mar 24, 2019
2f6e723
Update README screenshot to include 264.line
delucis Mar 24, 2019
769fcbc
Improve hint that clicking on small function in 264.line opens editor
delucis Mar 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
extends: 'eslint:recommended',
globals: {
arrayfromargs: false,
autowatch: true,
Dict: false,
error: false,
Expand All @@ -10,6 +11,7 @@ module.exports = {
post: false,
postprops: false,
max: false,
messagename: false,
mgraphics: false,
outlet: false,
outlets: true,
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

* :new: Add `264.line` breakpoint function module ([#17](https://github.com/mus264/264-tools/pull/17), closes [#6](https://github.com/mus264/264-tools/issues/6))

## Released

### v0.14.0
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The toolkit currently includes the following modules, which should be loaded in

* `264.key-learn` — a utility permitting quick linking of keyboard shortcuts
* `264.midi-learn` — a utility permitting quick linking of inputs with a MIDI controller
* `264.line` — a breakpoint function module for line playback
* `264.tog` — a MIDI-ready toggle switch
* `264.go!` — a MIDI-ready button
* `264.midi-presets` — manage mapping presets for your `264.key-learn` and `264.midi-learn` objects
Expand Down Expand Up @@ -98,6 +99,8 @@ The `264.reverb~` core is heavily based on [Randy Jones](http://madronalabs.com/

`264.loop~` is built around [Rodrigo Constanzo](http://www.rodrigoconstanzo.com/karma) & raja’s amazing [`karma~`](https://github.com/rconstanzo/karma), which is Copyright © 2015, Rodrigo Constanzo All rights reserved. Please see the module for detailed redistribution information.

`264.line` relies on an adapted version of [`simplify-js`](https://github.com/mourner/simplify-js/), which is Copyright © 2017, Vladimir Agafonkin All rights reserved and distributed under a BSD 2-Clause license.

## License

This software is free to use, modify, and redistribute under a [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0.txt).
263 changes: 263 additions & 0 deletions docs/refpages/264-ref/264.line.maxref.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<c74object name="264.line" module="264 Tools" kind="patcher">

<digest>
Draw and play back two-dimensional lines
</digest>

<description>
Graphically edit a two-dimensional line and play it back with varying
durations.
</description>

<!--METADATA-->
<metadatalist>
<metadata name="author">Chris Swithinbank</metadata>
<metadata name="tag">264 Tools</metadata>
<metadata name="tag">264 Tools abstractions</metadata>
</metadatalist>

<!--INLETS-->
<inletlist>
<inlet id="0" type="message">
<digest>
Playback control messages
</digest>
<description>
<m>0</m> stops playback;
<m>1</m> starts playback;
<m>bang</m> reverses current state (i.e. if playing, stops it; if stopped, starts playing);
<m>loop 1/0</m> turns playback looping on/off.
</description>
</inlet>
<inlet id="1" type="message">
<digest>
Scrub position
</digest>
<description>
<m>0–127</m> outputs the line’s Y-value for the positions you input.
</description>
</inlet>
<inlet id="2" type="message">
<digest>
Line duration
</digest>
<description>
<m>40.–240000.</m> sets line duration in milliseconds;
<m>0–127</m> is mapped exponentially to 40.–240000.
</description>
</inlet>
<inlet id="3" type="int/float">
<digest>
Line messages
</digest>
<description>
<m>list</m> sets the line to play back. The list should be made up of pairs of X and Y values, e.g. <m>0 0 20 80 127 50</m>;
<m>getline</m> outputs the current line out of the right-hand outlet;
<m>clear</m> deletes the current line;
<m>random 1–128</m> generates a new line consisting of random points, e.g. <m>random 10</m> generates a line containing 10 random points;
<m>reverse</m> flips the current line along the X-axis.
</description>
</inlet>
</inletlist>

<!--OUTLETS-->
<outletlist>
<outlet id="0" type="message">
<digest>
Line output (int)
</digest>
<description>
<m>0–127</m> integer output
</description>
</outlet>
<outlet id="1" type="message">
<digest>
Line output (float)
</digest>
<description>
<m>0.–1.</m> float output
</description>
</outlet>
<outlet id="2" type="message">
<digest>
Line data
</digest>
<description>
<m>bang</m> when the playback mechanism completes one loop;
<m>line list</m> representing the current line when you send a <m>getline</m> message.
</description>
</outlet>
</outletlist>

<!--ARGUMENTS-->
<objarglist>
<objarg name="unique id" optional="0" type="symbol">
<digest>
Unique identifier
</digest>
<description>
A unique name allows the module to communicate with the 264 Tools preset mechanisms.
</description>
</objarg>
</objarglist>

<!--MESSAGES-->
<methodlist>
<method name="bang">
<arglist/>
<digest>
In leftmost inlet: Toggles playback.
</digest>
<description>
In leftmost inlet: Toggles playback.
</description>
</method>
<method name="int">
<arglist>
<arg name="input" optional="0" type="int"></arg>
</arglist>
<digest>
In leftmost inlet: Non-zero starts playback, zero stops playback.
</digest>
<description>
In leftmost inlet: Non-zero starts playback, zero stops playback.
</description>
</method>
<method name="int2">
<arglist>
<arg name="input" optional="0" type="int"></arg>
</arglist>
<digest>
In second inlet: Trigger output of Y value for scrub position (0–127)
</digest>
<description>
In second inlet: Trigger output of Y value for scrub position (0–127)
</description>
</method>
<method name="int3">
<arglist>
<arg name="input" optional="0" type="int"></arg>
</arglist>
<digest>
In third inlet: Set playback duration in MIDI range (0–127)
</digest>
<description>
In third inlet: Set playback duration in MIDI range (0–127)
</description>
</method>
<method name="float3">
<arglist>
<arg name="input" optional="0" type="float"></arg>
</arglist>
<digest>
In third inlet: Set playback duration in milliseconds (40.–240000.)
</digest>
<description>
In third inlet: Set playback duration in milliseconds (40.–240000.)
</description>
</method>
<method name="loop">
<arglist>
<arg name="loop-enable" optional="0" type="int"></arg>
</arglist>
<digest>
In first inlet: Enable/disable playback looping
</digest>
<description>
In first inlet: Enable/disable playback looping
</description>
</method>
<method name="list4">
<arglist>
<arg name="input" optional="0" type="list"></arg>
</arglist>
<digest>
In fourth inlet: Set the line with a list of points. The list should be in the form <m>X0 Y0 X1 Y1 … Xn Yn</m>, e.g. <m>0 60 100 20 127 0</m>.
</digest>
<description>
In fourth inlet: Set the line with a list of points. The list should be in the form <m>X0 Y0 X1 Y1 … Xn Yn</m>, e.g. <m>0 60 100 20 127 0</m>.
</description>
</method>
<method name="getline">
<arglist/>
<digest>
In fourth inlet: Outputs the current line from the third outlet
</digest>
<description>
In fourth inlet: Outputs the current line from the third outlet
</description>
</method>
<method name="clear">
<arglist/>
<digest>
In fourth inlet: Clears the current line, deleting all points
</digest>
<description>
In fourth inlet: Clears the current line, deleting all points
</description>
</method>
<method name="random">
<arglist>
<arg name="number-of-points" optional="0" type="int"></arg>
</arglist>
<digest>
In fourth inlet: Generate a random line with n points (0–127)
</digest>
<description>
In fourth inlet: Generate a random line with n points (0–127)
</description>
</method>
<method name="reverse">
<arglist/>
<digest>
In fourth inlet: Reverses the current line
</digest>
<description>
In fourth inlet: Reverses the current line
</description>
</method>
</methodlist>

<!--ATTRIBUTES-->
<attributelist>
<attribute name="loop" get="1" set="1" type="int" size="1">
<digest>
Enable Looping
</digest>
<description>
Enable playback looping. When loop mode is enabled <o>264.line</o> will continue playback from the beginning when the end of the line is reached.
</description>
<attributelist>
<attribute name="category" get="1" set="1" type="atom" size="1" value="Parameter" />
<attribute name="label" get="1" set="1" type="symbol" size="1" value="Enable Looping" />
<attribute name="order" get="1" set="1" type="int" size="1" value="1" />
<attribute name="save" get="1" set="1" type="int" size="1" value="1" />
<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
</attributelist>
</attribute>
</attributelist>

<!--EXAMPLE-->

<!--DISCUSSION-->
<discussion>
Used in a <o>bpatcher</o>, <o>264.line</o> provides a graphical interface
to edit a <o>function</o> and play it back, controlling its duration.
Connect to your MIDI controller by clicking on the <o>264.midi-learn</o>
arrows.
</discussion>

<!--SEEALSO-->
<seealsolist>
<seealso name="264.envelope~" />
<seealso name="264.pitchtrack~" />
<seealso name="264.trigger~" />
<seealso name="line" />
<seealso name="line~" />
<seealso name="function" />
</seealsolist>

</c74object>
8 changes: 4 additions & 4 deletions extras/264 Tools/Module Finder.maxpat
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@
]
}
,
"patching_rect" : [ 15.0, 550.0, 118.0, 20.0 ],
"patching_rect" : [ 15.0, 570.0, 118.0, 20.0 ],
"saved_object_attributes" : {
"default_fontface" : 0,
"default_fontname" : "Arial",
Expand Down Expand Up @@ -2224,7 +2224,7 @@
]
}
,
"patching_rect" : [ 15.0, 575.0, 101.0, 20.0 ],
"patching_rect" : [ 180.0, 575.0, 101.0, 20.0 ],
"saved_object_attributes" : {
"default_fontface" : 0,
"default_fontname" : "Arial",
Expand Down Expand Up @@ -3191,8 +3191,8 @@
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 15.0, 490.0, 135.0, 50.0 ],
"tabs" : [ "264.tog", "264.go!" ],
"patching_rect" : [ 15.0, 490.0, 135.0, 75.0 ],
"tabs" : [ "264.line", "264.tog", "264.go!" ],
"textcolor" : [ 0.2, 0.286275, 0.298039, 1.0 ]
}

Expand Down
Loading