i'm new to stack exchange so bear with me.
I'm trying to export from a csound score to a midi file using either midion or midion2. The note values i'm sending to the midi file are updated at instrument time, for example:
instr 1
inote init 18
inote = inote + 1
ktrig metro 1
knote = k(inote)
midion 1, int(knote),int(1), ktrig
endin
i1 0 1
i1 + 1
i1 + 1
i1 + 1
i1 + 1
i1 + 1
I my head the notes should export as a rising scale, quarter notes (or some equal division) of the tempo since ktrig triggers every 1 second and the instrument is triggered every second and they should each have the same duration. When I export however, the notes each have a slightly different duration, arbitrary timing and seem to not fit the timing of the tempo at all. Maybe i'm using midion wrong or triggering it wrong. I'm aware that traditional music note timing might not have any meaning within midion or midion2 as they probably deal with timing in a different way.
Is there a better way to achieve this? I simply have a changing value each time the instrument is called and want to send that to a midi file as notes that are some equal division of a whole note. I'm sure it must be possible.
Many thanks in advance!