@@ -353,9 +353,13 @@ def predict(self,
353353
354354 Args:
355355 pitch: int. MIDI number of current note.
356- time: float. elapsed time since previous note.
356+ time: float. elapsed time in seconds since previous note.
357357 vel: float. (possibly dequantized) MIDI velocity from 0-127 inclusive.
358- fix_*: same as above, but to fix a value for the predicted note
358+ fix_*: same as above, but to fix a value for the predicted note.
359+ sampled values will always condition on fixed values, so passing
360+ `fix_time=0`, for example, will make a probabilistically-sound
361+ prediction of a chord tone: "what is the next note given that it
362+ happens immediately after the last one?"
359363 pitch_topk: Optional[int]. if not None, instead of sampling pitch, stack
360364 the top k most likely pitches along the batch dimension
361365 index_pitch: Optional[int]. if not None, deterministically take the nth
@@ -365,12 +369,21 @@ def predict(self,
365369 sweep_time: if True, instead of sampling time, choose a diverse set of
366370 times and stack along the batch dimension
367371 min_time, max_time: if not None, truncate the time distribution
372+ bias_time: add this delay to the time
373+ (after applying min/max but before clamping to 0).
374+ may be useful for latency correction.
368375 time_temp: if not None, apply pseudo-temperature to the time distribution.
376+ i.e., scale the temperature of each mixture component.
377+ this is not technically the same as changing the temperature of the whole
378+ time distribution, but it can be useful if we assume each component
379+ corresponds to a different rhythmic interval. then passing `time_temp=0`
380+ would lead to more rhythmically steady, less random playing.
369381
370382 Returns: dict of
371383 'pitch': int. predicted MIDI number of next note.
372384 'time': float. predicted time to next note.
373385 'velocity': float. unquantized predicted velocity of next note.
386+ '*_params': tensor. distrubution parameters for visualization purposes.
374387 """
375388 with torch .no_grad ():
376389 pitch = torch .LongTensor ([[pitch ]]) # 1x1 (batch, time)
0 commit comments