Message.getTimestamp(); values?
-
Hi guys, what are the Message.getTimestamp(); displayed in? ms? seconds? hotdogs? I got something between 0 and 255 I think. Any light on this?
-
Samples.
-
@Christoph-Hart thanks Christoph! Having a hard time trying to get a mono glide script (hoping to useTimestamp to create an if statement). All examples on the forum are buggy or not working. This is the one you did some time ago, but can get the logic yet.
Content.setWidth(200); reg on = 0; reg lastId = 0; reg lastNote = 0; const var GlideTime = Content.addKnob("GlideTime", 0, 0); // [JSON GlideTime] Content.setPropertiesFromJSON("GlideTime", { "min": 10, "max": 100, "mode": "Time", "stepSize": 1, "suffix": " ms" }); // [/JSON GlideTime]function onNoteOn() { // This is necessary because the volume fade kills the note // (= adds a artificial note off after the fade) Message.makeArtificial(); Console.print("lastNote " + lastNote); Console.print("lastId " + lastId); if(lastId != 0) { local delta = lastNote - Message.getNoteNumber(); Console.print("delta " + delta); Synth.addPitchFade(lastId, GlideTime.getValue(), -delta, 0); Synth.addVolumeFade(lastId, GlideTime.getValue(), -100); Message.setCoarseDetune(delta); Message.setGain(-99); // -100 kills it :) Synth.addPitchFade(Message.getEventId(), GlideTime.getValue(), 0, 0); Synth.addVolumeFade(Message.getEventId(), GlideTime.getValue(), 0); } lastNote = Message.getNoteNumber(); lastId = Message.getEventId(); } function onNoteOff() { Message.makeArtificial(); if(Synth.getNumPressedKeys() == 0) { lastId = 0; } }function onController() { } function onTimer() { } function onControl(number, value) { }
-
@Christoph-Hart not going anywhere. I'm not David :(
Any chance you can fix this old script you did?
-
@hisefilo what happens when you use the script posted above?
-
@dustbro glide starts but it has just a few milliseconds of life. And can't figure out how to fix it
-
@hisefilo looks like it's set to max out at 100ms. Can you change this property ?
Content.setPropertiesFromJSON("GlideTime", { "min": 10, "max": 100, "mode": "Time", "stepSize": 1, "suffix": " ms"
-
@dustbro tried that earlier. Is not. I guess something related to noteIds cos sometimes I got also messages like
onNoteOn() - Line 16, column 22: NoteOn with ID6505 wasn't found
-
@hisefilo I don't have my computer in front of me at the moment. Im trying to look for something silly. I see the onNoteOn function line is commented out
'''
// [/JSON GlideTime]function onNoteOn()
'''
Is the script sitting properly in the onNoteOn callback? -
@dustbro yes, this is just a copy-paste error here on forum. is properly placed on Hise