Scriptnode Envelope as Global Mod
-
So I created a Script Time Variant modulator in the Global Modulator container and very quickly put an Envelope node into a mod chain and hoped it would give me some level needed to use it as a Global Modulator... however no level comes out - do I need another node to make this happen? I tried it outside the mod container but still no level....
HiseSnippet 1275.3oc4X8raaTDFeVaOIwooPqfSHPZOvgToPjMDJHwg3X6jVKpcshCVbqZxtiiG4YmY0LiShAwcdE5MdM3Vk3D23Q.wSPeCfuY20dW+m3lZ4jK3JUsy2e1uee+e1zVI8nZsTgbJd1nPJxYGbmQBS+Z8ILApQcjyGfaRzFpxMlT0QgDsl5ibbx+LKAmhEPQ+d6gUIbhvilRBg5JYdzWvBXlTpsq78LN+DhO8LVPFoOnRCOonljKGB3IOtDJj3MfbAsEwJVNLxYii8YFopigXnZjSgpR+Qc5KuRDKeWllcNmZOTF0AdQwjOQx8sH19LpVeF2u8X+ViPN31oQg7wQgOF2j4ylPOMZ7nHFtoZjMd3jaZ3keJ3U9lf2BfjSFHUHFROF2wSwBMobr34A3FBH4zi.g8rPIVVjyav0jf.By9AjAzSTvgIJr6SKUZOW3+dx20anvyvjBWonkzPeoX2mr8Oucws+kscmkUudKjm0LJImSUKjsMSqVlh6JFFbNUsm6kD9P5DAA2e5X5F2tXpWrWmQPongfYdYHM4bZQQ4EjAPIgM3oenQchgXSJIz.4BoJCyBGm5zKgJ73TTQbcpdfQFB03yk+fJGo+PNwLc4jsGJgADOlJGZSTBMyLJaO1r0XEt43QoE1BrPu8VB2GiayLd8WLdys.7BQs6Z7lzw9P7w85Q8Lofs.9jebosmqcnrULT9D7y3xyI7z.HT2.nhF2x9YIrcmv2ch.kWx70+51NeM7VOe0I+5ZfUg6pYn2q02ezboF8Zsi78XoT1M.aDC4OMYCfMq1knXDgYBNifuah.tVIbSDI0WJ+t8kprPImnxtA4evoSqCUzPhhdlrMmLZWMIHjSOE758bieV2lppxkdClePeXr6Dwc2yGB8ppabEyZe6y6ZGCdM0FjYqQKp4JoZPTpL4YHQZyR6fqqCGSpKUosyQc1DWZe3eni3b4U0jAgrjIrPpHhVaIeTXeof4YIEKAEJcEBJ+n.4PvpNXmbfoeNQeFgwsijcx0R5C.GeBwCbvQsIl91w3diG3ru2jh+ovUZkh0SsujwyMvNnHGMHv5nQ2JKukermFaM6qaSLouuVglxxOBSEWR4v9y8i4lsh7cXEbl8tw8G1SP4aNq49PbqgAsIJ3phv0aznt1T73HBpyU18VmQTWPMVsykkPxpcAMpbQOi3yy0F64zqGeqf5LcHzNTMplVOGEK9D9zqsX4egeGCkf9Pmej5VGCkA0Pu3jSP4RSlHwORm32jb8zz90+nRGCMrC6mFS62d8q+8C6LfdUbrOgZkVM+yCsgpsvGYLvMqQy7t+7Jn2aiCyLlw3Q+ly3QRZM9CSL9KnPc.ZtWF5t282.+bXz6rl9fJ2CldS3BhdjQyX62ntOB7EwcFpsM8y54+88QPuH9TJmRzz0QbekK5pMTcIcc3+KDAu8vaFAO.7eihcwEfMl60eOX+MfOzvPWfoSuK+joiSMPBszot6fan6Z45QlzLCSbqJkCBHQa+tS+7ok98H4++42ibpbngItnIAJ2rKcf0hcfUpdiuqfd7RwjykFursCU3WZ7VpDlksmcRXVdLy6EaDP7TxW4EeyMas2VQT.+VD8mCpHto8raYzkIq5s2fBE.eZwq77rg6u.hOKVmubEz4qVAcNXEz4qWAcd5Jny2rB57sKUG6W0czPiLHtUDHz933a43brf.UxQU8n+ShkXFa
-
@DanH just add a
math.add
node before the envelope and set it to 1. -
@Christoph-Hart sorted, thank you!
I also rather miss the ability to use the velocity modulator as a Global Mod - Is there a way to recreate this in scriptnode too?
-
@DanH a midi node is available which outputs midi values (velocity, gate, etc...). Remember that it must be put in a midi container.
-
@Matt_SF Awesome! Will check it out now
Ah yes, that's exactly what I want :)
-
You can use a velocity modulator as global mod (and with the newest update on the mod_matrix branch, you can even use envelopes if you add a uniform voice handler on the root level that ensures that the voices of every sound generator are allocated synchronously.
-
@Christoph-Hart hmmmm.... the VoiceStart menu is always greyed out when I try and link to the Velocity Modulator as a GM
-
@DanH Not available at the container level for some reason...
-
@d-healey ah right... I'll try the scriptnode version...
-
@Matt_SF Right, the midi is working fine but need to get the level out of it somehow
HiseSnippet 1114.3oc2W0saiTCE1NIt6lvxJVAbCBjlKyJUpRVVVPhKXaRZVhflNZSHh6V4NiSiU7XOxim1MBw6FOB7LvS.uAvwimjYRaZZHZ6JDoRMiO+L9672mc70p.VRhRiv0GuHlgvOhLZgzLq6LJWhFzCgeL4TZhgo8bh5rHlljvBQXb0WYEfqWCk84u99NTAUFvJDgPST7.1Owi3lBo9u7G4BQeZHaLOpj0O+kCBTxtJgJEvSURKTLMXN8B1Pp0rJDD9fSB4FkdjgZXIHbsNpvEilotR5reBOgetfYWzFMBdQNw8UhPKhsRQcmwEg9Ki6DDBS7KxBUcYgOgbJOjuRdQ13ixT3U3Q47Atx5vq5ZvqcY30pD71.jvkfTMGjdBYTflGaJzXwyGPFHghyTJj1KCEmsH7uS5p.CjlihnyY80vhUNz7EsZcnG7um9cSSkAFtR5ojCUF1YxlOswu1ndieqg20UMc5F0Y2FsRHX5Mp1Vo0aywlxznyY5C8tjJRYqLDB+0yojaOmVtjG3h5RFpjCjbyYwL4s0HfxSUvS+7fdTC0VHxkA1EyzFtEB3drKgtZWYoNoGKYtQEC802nlAcKpvTA0rdKjctIWAjCVqtYKNxDtYQ44p2Y8U6JDeBwmaBlsYLVYCXDxT2GXLeZ7CImLcJKvT.vZj9+x8ynW4s+gts+yHuRnNmJJRTPOAfDlaD7KxU6sRu2JCZuE9x+XW4Ki2Y9Rb0swO1dO4Gq8eN9wcsO9iuQoI483z1Zr3G3f4mmyhaqjSnZNUZVgsLH6kafm0BubSJve66F+c3wJAUW9Tf+jTv3FqYwTMarxWPWzLgFEKXuFhzC8bOm3yzcDpf42jrN1ENYZaddJLSpu0iIdmeBxccNAYmqZs2duUwo.CYlqT54Ykx7mQ3GXqROhzKIdonILchkiD+.Rqif+PGKDpq5phh44rmPoHSluRrHdlRxCrhbVvf1UojINNRkB6Jlfq.a8OPSFS4BKc6nzD3Pqvyji.iynKrSRCUgvSj9z.HnW3SMyrz1AKIdNJX0PvZXsn6wF81WxR9CBFkE7QQ1fO61VUs5cQua2b23HBlvcu9018OsztWXR4106Z6JcHqa3wtB5sq3BiAISrZCnBzDaw2lbPaBhGjAw0Q2iyPGz.kgs+Mvp1Zvpx0fUcRWA7lFDtDSfKnqYyAVtI1RCZPlvfIH6TKp3D1wT8ELiq+yNF917KfPFSg1Vq7QBdHS6CWI1t53zPtpO2oB9FtSm8od7jXXttS1vYFSIUC2d1bmK1iTeGkZdDMa93d8BSa81HU++8sQdsJ0vkWbJ0n4uE5FFlFMBZTCVxZjrjvHecqksvi.JirE+M7IWYa6Zbtx1KU9dYOhnAZ0axGAs8XOLSBD2xrebWc3WYBq8Zitz0eQrboH6r5aBBro3uDtaxl84Y6gOe0d3yy2Ce958vmWrG97M6gOe6V8wdOtiSMpH2HGHv+jrYbL9DokSJqSG8OHuWeMB
-
@DanH Ah I see, yes the root FX container has no concept of voices so it doesn't make sense to give them the voice start modulators.
The last puzzle piece in your snippet is pretty easy, you're almost there:
-
Oh hang on, that's wrong. What you need to do is this:
Now the difference is subtle but you'll need to make sure that both the modulation source and target are in the midichain container. The reason is that the midichain container will chop incoming audio buffers whenever a MIDI message is received so it can apply sample accurate modulation. By putting the add node out of the midi chain you will loose the sample accurate mod value and just apply the value of the last incoming MIDI message to the entire buffer.
-
@Christoph-Hart brilliant, thank you!
-
@Christoph-Hart is the external display buffer meant to work with Envelopes? I can't get it to display on the interface...
HiseSnippet 1504.3oc4X8zaaTDEeV6LI0tszVAboBjrh3PpTHxtTJH3PRbhSqUqcrxFLbqZxtiiG4c2Y0tiShopRbDI9Dza70faUhSbiOBH9DzO.HEduc1065+jPhkiufqTim2al4868+23VARKdXnLfXT3vA9bhwcnlC7Tc2oKS3QpuKw3CnMXgJdPIMopC7YggbahgQ9mgDLJrDI5y62rJyg4YwSIQHskBK9KEtBUJ0Va8BgiydLa9gB2L69IaU2R5sizQ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nebFfltkEEDykAhqPYcsCCFEd2mx8Ng6.24FZtWCjQuTjcOJjj1hE.OMPgInwfSGDPLOE6JeHK3XtJBnYIDOJmGOJSHbzkwJUcazcyrsICkARZEpVNjK89P8.R7OKYtwwpkLNETivonRrB0f7QanRndHLvTPxnmPEqgqfogaH7h07zNfMXmMJse922xTw8ME+XBse8su821zrG+Ts2Jl5VMa7GahF2aQ2Vof2dQF6t+rsHWagCUVGS3QelP3Q6DE9ciE9K4PjCYhKibyq9KSeNzJZbQ+jsV.hdE3IDVrAiI62ErHL7EnPESrVx3Z9esHL5EnGvc3rP97vtOyAc6zO3D97P+mJBd+lWLBtMn+p.wwGCxXhqeAH+kgGdo3SQzousYX8TRl595pjiT0uH0E96FH8qQ89bYq2OZIOiLp+J2LA.IU1m3p2tuRBpi9Aci.qQWTUJ64xhFtYl9IClKu3L++Oew4Ax93OeRCFj.gsQgQCLgvLqjQDCSFLHdc4j.PSX9vnEmCehYVY3v9.yJILWHxvkYEHekkdvbLv+VQT.81K5m.s.sAttTExIwi6fSwRvA+dkkEZt+bv9L8y73Y3LewLblmLCm4Kmgy7zY3Le0Lblu9ROC9t83JDXpHPnUM8baF07XPjbTTO4eAfOgH1B
-
@Christoph-Hart said in Scriptnode Envelope as Global Mod:
with the newest update on the mod_matrix branch, you can even use envelopes if you add a uniform voice handler on the root level that ensures that the voices of every sound generator are allocated synchronously.
Would you be willing to provide an example of this, and is the mod_matrix branch up to date?
-
@DanH check the ModMatrix project in the tutorials repo.
the mod_matrix branch is merged into develop already so you donβt need to use it explicitely.
-
@Christoph-Hart will do, thanks :)
-
@Christoph-Hart Mod Matrix proj is very interesting! I can't figure out how to actually add the UVH to the root container though, can you point me in the right direction please?
-
Synth.setUseUniformVoiceHandler("Master Chain", true);
Obviously you need to change the ID when you rename the patch, but it doesn't get easier than that :)
-
@Christoph-Hart Doh! wasn't looking at the script Thank you!