Closed alienbeatpoet closed 3 years ago
Hi,
Volume is the proper musical term, whereas velocity is MIDI jargon (since it was developed with keyboard in mind). Setting the volume keyword will affect the MIDI velocity, as you thought.
The volume keyword seems to be working here, on a Mac. I heard some people having problems on Windows.
Could you, please, try to run the following code and see if it works? It will generate one note with the velocity of 68:
#!/usr/bin/env python
from pyknon.genmidi import Midi
from pyknon.music import Note
notes1 = [Note(value=0, octave=3, volume=68)]
midi = Midi(1, tempo=90)
midi.seq_notes(notes1, track=0)
midi.write("demo.mid")
As you can see, it works here:
Maybe Logic doesn't like the Midi file pyknon generates?
i’m trying to affect each particular note’s velocity. i thought maybe you were using ‘volume’ where you meant ‘velocity’, but that appears to not be the case.
i have a loop that is generating new Note() instances, but i can’t seem to affect the velocity or volume. the result is basically the following:
however, when the midi file is written out (see attached) and opened in Logic Pro X all the notes are correct, however they all have a velocity of 120 and no indication of change in volume anywhere.
where is the velocity being set to a value of 120? and where is the volume value being used?
tracks.mid.zip