Skip to content

Commit 15a3936

Browse files
committed
add time() method to README
1 parent fe6b52f commit 15a3936

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The variable `bars` represents how many loops have occurred since the time the s
107107

108108
#### time signature
109109

110-
The variables `time_num` and `time_denom` represent the current time signature of the Facet transport. These variables will update when you modify either the `time signature numerator` or `time signature denominator` number inputs in the user interface.
110+
The variables `time_num` and `time_denom` represent the current time signature of the Facet transport. These variables will update when you modify either the `time signature numerator` or `time signature denominator` number inputs in the user interface, or if the `time()` method is dynamically updating the time signature.
111111

112112
## Sample rate
113113

@@ -314,12 +314,24 @@ You need to connect the MIDI device you want to use before starting Facet.
314314
- `$('example').silence(2500).iter(8,()=>{this.tri2d(ri(0,49),ri(0,49),ri(0,49),ri(0,49),ri(0,49),ri(0,49),1,0)}).savemidi2d(ts(), 64, 16).once(); // 8 randomly sized triangles in 2d space, all at velocity 64, 16th note durations`
315315
- `$('example').silence(2500).iter(10,()=>{this.circle2d(ri(10,40), ri(10,40), 10, 1, 0)}).savemidi2d(ts(), 64, 64).once(); // 10 randomly sized circles in 2d space, all at velocity 64, 64th note durations`
316316

317-
### Methods for controlling transport BPM
318-
- **bpm** ( )
319-
- stores the FacetPattern data in the transport as BPM values to be cycled through over each loop.
317+
### Methods for controlling time
318+
- **bpm** ( _bpm_pattern_ ) )
319+
- stores the data of `bpm_pattern` in the transport as BPM values to be cycled through over each loop.
320320
- the minimum BPM value is 1, and the maximum BPM value is 10000.
321+
- using the `over()` method on the `bpm_pattern` will cycle through the BPM pattern over multiple loops.
321322
- example:
322323
- `$('example').bpm(_.from([20,40,80,160,320]).shuffle()); // each loop will be all 5 of these BPM, randomly ordered`
324+
- `$('example').bpm(_.ramp(20,200,64).over(4)); // ramps from 20BPM to 200BPM over 4 loops`
325+
---
326+
- **time** ( _time_signature_numerator_pattern_ = 4, _time_signature_denominator_pattern_ = 4 )
327+
- sets the time signature for the transport.
328+
- if `time_signature_numerator_pattern` or `time_signature_denominator_pattern` has more than one value, those values will be cycled through over each loop.
329+
- using the `over()` method on `time_signature_numerator_pattern` or `time_signature_denominator_pattern` will cycle through the time signature pattern over multiple loops.
330+
- the minimum `_time_signature_numerator_pattern_` value is 1, and the maximum is 32.
331+
- the minimum `_time_signature_denominator_pattern_` value is 1, and the maximum is 16.
332+
- example:
333+
- `$('example').time(4,4); // set time to 4/4`
334+
- `$('example').time(_.ramp(8,1,8).over(8),2); // ramps from 8/2 to 1/2 time over 8 loops`
323335

324336
### Methods for controlling pattern regeneration
325337
- **whenmod** ( _modulo_operand_, _equals_value_ = 0 )

0 commit comments

Comments
 (0)