File tree Expand file tree Collapse file tree 4 files changed +34
-1
lines changed
src/objects/firedSlotStartOrStop Expand file tree Collapse file tree 4 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ useful for MIDI controllers.
9494When this JS object receives a bang, it calculates the musical time in beats that
9595a clip that has been fired will start playing.
9696
97+ ### firedSlotStartOrStop
98+
99+ When this JS object receives an integer value as returned by the slot property
100+ * fired_slot_index* , it determines if that value means a clip will start playing
101+ or the track will stop playing, and issues a bang to outlet 1 or 2, accordingly.
102+
97103## Developing your own js objects
98104
99105If you want to develop your own js objects, you probably want the build to
Original file line number Diff line number Diff line change 11{
22 "name" : " max-for-live-lib" ,
3- "version" : " 1.2 .0" ,
3+ "version" : " 1.3 .0" ,
44 "description" : " Library of useful Max for Live objects" ,
55 "private" : true ,
66 "dependencies" : {
Original file line number Diff line number Diff line change 1+ import { getNumberProperty , getLiveTrackIndex } from "../../util" ;
2+
3+ autowatch = 1 ;
4+ inlets = 1 ;
5+ outlets = 3 ;
6+ setinletassist ( 0 , "Integer: fired slot index" ) ;
7+ setoutletassist ( 0 , "Bang: fired slot will start clip" ) ;
8+ setoutletassist ( 1 , "Bang: no slot has been fired" ) ;
9+ setoutletassist ( 2 , "Bang: fired slot will stop track" ) ;
10+
11+ export function msg_int ( value : number ) {
12+ if ( value === - 1 ) {
13+ outlet ( 1 , "bang" ) ;
14+ return ;
15+ }
16+ if ( value !== - 2 ) {
17+ const hasClip = getNumberProperty (
18+ `live_set tracks ${ getLiveTrackIndex ( ) } clip_slots ${ value } has_clip`
19+ ) ;
20+ if ( hasClip ) {
21+ outlet ( 0 , "bang" ) ;
22+ return ;
23+ }
24+ }
25+ outlet ( 2 , "bang" ) ;
26+ }
Original file line number Diff line number Diff line change 1+ export * from "./firedSlotStartOrStop" ;
You can’t perform that action at this time.
0 commit comments