< Back to IRCAM Forum

secs to onsets in chord-seq

Hi all,
I’m looking for a function that allows to convert seconds values into a series of onsets values to be used in a chord-seq. Maybe it exists already in OM, and so, would you be so kind to show me where it is? If it’s not present, then a lisp code or a patch that achieves this task is welcome.
Best,
Francesco Vitale

Hi Francesco,

dx->x is maybe what you are looking for, have a look at the chord-seq turorial:

http://recherche.ircam.fr/equipes/repmus/OpenMusic/user-doc/DocFiles/Tutorial/tut022/Index.html

/phil

Hi Phil,
thanks for your reply. As far as I know, dx->x allows to get onsets from durations, while I’d need to convert a list of onsets expressed in seconds (as a list of real numbers) into a list of onsets values suitable for a chord-seq…
Best,
Francesco

Hi Francesco,

Time in OM chord-seq is already expressed in milliseconds (integers). So if you send your list of values in the onset input it will work right away.
If you want to convert a list of numbers in seconds just multiply by 1000 then, if needed, OM-round to get integers.
If the numbers are not in ascending order you need to perform sort. to get an ascending list of onsets, which is requested in OM.

Have a good day.

… or use sec->ms == (om-round (x 1000 …))