Scriptnode example



  • I'm just getting started with scriptnode (again). Does anyone have a simple example that shows me how to get MIDI notes in, trigger something that makes a noise, and get sound out?



  • @d-healey Here's a very basic snippet
    The FM node automatically handle the MIDI input
    You can also do it with a simple oscillator, but in this case, you'll need to connect it to a core.midi node to handle the MIDI part...
    The core.hise_mod node take the modulator "Extra1" from the Scriptnode Syntesiser1 module, and pass it the gain node.

    HiseSnippet 1563.3oc6Y0raaaDDdoj1DKkeahKPNJj1CNnoFVJNIsn.0JwRtvnRwBV1IMnGR2PtRZgI4xRtx1p+bpW5sdt8ReE50dn.9AHAn.4on27aP5rboDWJQqnnXmj9COHvcVNK+1YluYlkpoO2jFDv8QF42puGEYbVbq9thtq1kvbQqWEYbdbCRff5WTI5t88HAATKjgQ1OSJvHeNT30gqbWhMw0jFKBgtOmYRqybXhXoMq74La60HVzsXNZO8xUV2j6tJ2l2CvSV7RHOh4NjNz6QjOVFLx3T0rXBteKAQPCPF4tK2peqt78bUO+8YArGaSkCJgZAKjR7ZbaKIhk2iVsKy1p4f8c.BYfaFaExprByiavrXCkGaMtX3DEi0P2dXjYRvqjN7VJU3UJE3gzPWNE5.Pvs5YSDIQlzcDMAimzSstqf5FvD80cWuQg66faxDlcSGuYRAufi5jFuQN+ygq0tM0TDC1b309hWud57CfRKSelmHjSFBkqDIwkaQKJESCXAT+RSfX9mSKwzapIlJLfL1.WysCyktnoOErDUC7tGUrG2emEtpS+rUa07pW6SNWg18bMkt3hxEwU3ysWvsmyio9Wu3tD6dzqU3aKjuv2Wn3XDb7QaW0I3Ii70RHjfEqsNojE3T+eVfP3lc5faJVPiwieuHtEywylVycWpMGjHw3kvUosI8rECjlL3sA2k60k6xL0iW2jJ7Yc5P80wdpan6HDPYiXIyWYSpMkDnEP+9UpCAsDevNQmQaQoo2VLI+0UvJ3VTx3J9uir2Y+Oe16IY5lCWaegOozwpG9knaG8HyyqvIFWesMhRe.2UbHpmBPtlO8q6QcMGH7fm7DPHTBY83JPU9oJOfrKsM22Q8Bi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YPSOCipzcYlzni+iqRC1Qv8d8bDFGhoO+Qlpu7rL5ZtPIPLpa3erTdbC43hkP6pLDX7RKtDxgYwdjoorz7GBG+JccJOC5biYPmkmAct4LnyslAct8LnyGMQcjec86zSvcTeaQPPyZpORiQbG2YQ+cnscW+
    


  • @ustk Thank you!



  • @ustk said in Scriptnode example:

    You can also do it with a simple oscillator, but in this case, you'll need to connect it to a core.midi node to handle the MIDI part...

    Or just enable its UseMidi property (which is deactivated by default because unlike the FM node the oscillator is not just useful as "synthesiser").



  • BTW, an hour long script node video from you would be invaluable, so that's my vote for Dezember (for November it's a bit late) 🙂



  • @d-healey - yeah my vote too.....



  • Well once I get the hang of scriptnode I shall do such a video 🙂



  • There will be lots of questions 🙂

    What do ms_encode and ms_decode do? The docs are empty.

    Why does the STK guitar only trigger on release when used in a script node synth?

    HiseSnippet 1208.3oc6X8zaaaCEmLNrHNMcqqqCnGM5oVftf3rr0ALfE0D6LDr3Lunjr1SELTL1DVhTShJId+A6vtra671k8UXW2gAzu.AX.8SwtsuAcOJJaKGq3D30lTrFcR7Q9n989yu2iTMiTLdbrJBgKuc2PNBOGwsqT2d01TgDsdMD9sHMnwZdTEqnU5FRii4dHLtzmYDfKOMJ84eVdEpOUx3CDgP6pDL9Fh.gdfzlNetv2eMpGeaQPtUujy5LkbUkuJAvSIxBnPJqCsEeSpYYSQP3qU2SnUQtZplGivSuhxqqaa0gR652UDK1ymaFTE4BajU7ZJeOChMuiVssv2qYO6NFgvjlC7BkrdgaSZH7D8kOvabyzIpLPi79C7TiCdUyCuEJDdUK.dnbnaZK5.Pn7R7o5gQlIbjMgPMbjZcolKiE5t4CWWpv8cHMEZV6hw6TEfWHP8pFuYA+aPpu+9bld.Xmlr1iuXizybJrw4HqpjZXDOp5KCtX34lKhKcE26Jt2aBbux8fhKKRDpSYfoP4NYRjJOdEiXdrHd7Dw+5kOQzhAD9KI0ksfBAyyh3fmnVb3lb8gpnN26td8e+t2+S1OQxLA4JlsQpiT92SlDrGO5AUNf5mvu+re6rkm86msxHsWImtmMOEe3b+bkDFhGmaeJnNv0tpNPJbKc9b4E3AwilAeShqHHzmWWd.2WARLX7VjZ78oI95dRGN8sgRpBaqjBV9L1s35HQqV7n7XuPC5QZMbnsARtsyVbeNMdPJsyO3rAj1Ri.+D+UuuXbwq6PrvshgyU4+G0uK8Fe86w45lgT+HcDs5q4Q3LXt3kEL2RknExVMn.s+HnQvlIAtPCHFGfnTx8MMGvSgLplNdAyXCfb4RuzAu.dxlrpYLNaxp8lDYZFwkZPdVupTla16va1i6NnUlYxzJFyrFkAVb2lTnuLPFX8NQ77r9NvajSwpH.9mD3anXcFRLtjY260n0ZMqpBBLPzb2yr2+Jgm4qRvO.VgM5rEMHzT.oQb91118yXSkxfsMv1JQnoQngrg4Hw5NymMykCXGTLYaZTKtNMYkFA27Ft6uwJlp+HPw0gdGQ5rNFB4tlyQje+ZPOZXY+zyc1PcHO5Dm5YImcBCOoTXstZdnq3aR0+W+EyyerraG9gVulQ5we2e+veL33kMN0qSVKh+0IbIqKp+m0p1W3fN+3FgFA2.CqHbiPEfaXsmMt627DvcYRudii.DSgB3CnElLHjMAprMwN.5Pun4OxvUCmEcKfIDwmO+7WF4RCUq+LyqNUC8ZjVFx7PV30sVX5DulZZ4rFfxXGAErKYqlsEOlqsA6QB4MS1y2bpKbIzIz6sI6DyOupNgb1m7rQy8MdzQy8exyJJ2Gptel49eJ6OOt0u+dN1va5EkJHw++Bc04mcN2zUXsmMjeQ2eq46V64YkYbCTJcanwHZjJdiIodm0qQ0TSysrVd4lEiqwO.tMn8r.kgylG2QqBuX5.eQ7MBnrH0SY1KdZxImIUBjYKS+qtkIMLiqTEcf0kRHKL+Bn.3FdOkwLGe78gSnTrNKNA57ASfNKMA57gSfNezDnyCm.c93wpi4x0OJQqBrWs.DzrdZBLFWWRgyRlRGQ+KTjEmUA
    


  • @d-healey

    • encode => L-R becomes M-S (just a way of saying of course)
    • Perform M treatment
    • Perform S treatment
    • decode => M-S back to L-R


  • Yup, Greg is right, and you'll usually slap a core.multi node between those to separate the mid and side processing:

    73dffeb9-77af-40ac-9877-1154e2dd45ad-image.png

    HiseSnippet 1433.3oc6X07aSbDEeV6r.N7Q+.nhiVHNDjnQwogRkpTiIw1HqFCV1g.bBMY2I1ixtyrc1wIXPU8Ru2ysW54dopW6gpxsdpRUp+Cz9e.+GPeucVmcW6kDikfTP3CV67l2aleuumYZqjNrvPohXUZygALh0Yr6NTn6udeJWPZViXcN6VzPMSU1PZsgAzvPlKwxp3sPBVkliD86YqtF0iJbXIjHjsjbG1FbetNgZ6peI2yqA0ksI2OE2qTsoiTrtzSN.vSQ6kHATmco8X2lhrUvlXch5tbsT0US0rPh0bqIcG1subegg+s3g7s8X3fJjtvBYH2P54hHF+lrdetma6Q5cHgXY2NwJTzXEtfcKtK+.5IVi2OZhxIRj1dXU3vfWkzvaobgWkbfGIE5lyfN.DR2AdTcVjgti3I3xrdplBMSDx0CS6tNVg6GX2lqc5mOdKjCdAG0qZ7F67Oqc8c1g4nS.6b1Mt+r5oeIBDslz1MucWGEOPC6OBjyDOrbi6WICfLjIV+jccQOtfsnihAPqVXvsY58kpcW3xtgAW9pk+7yN+NCDNnEubfhEPUrMks8nCWHj5G3w5.Rcsxa6Ic1sK+wrqN+Sluz7e87kSITDFWC4XAm9Tgf4ENIaXhrPqjdKHF3uMScsx6Q8FjrdSjKexoyDJEMEb8cBXwrkQGFQFpbjBkITO.TIjxIhnibflK50hpU7GAkGt8.+tPIIG15wZKPyp.AEMZ7R3XL.sKS3FM34vu3IqfishmrxnIIHNXBMPO1+D4+i+F9Bc111fKCoJcwpjMnNf4ZXaptOl9.kJ0P7ISsnyAwom.knBA.73PcCvNjgrUQbYGUr0f+0k99HnvRsweeOtKtc1VWC3vDv0AhSvB2sBSW5F8bsoJnRMzq.W+Blc.0qhFM3THDOsse3CYBGjRFM571JicewDFNNTDqhI0j1jp5wzQUIRTsnRFALkliJGwnamD0sSZ6OvSyIuPOkY5WUZUhAuPJCdIriUTm5Lv5z.rTrE6gSLFfrNFMyorrVEhGAMAJZJ90gExzag0QHl+S0cn8fs83NHPIiI26Ye2P1zJZJ+L.fQi.taJ1CVSS01VbwXKxCdZK5ilXg2PtOSM1oedvSuaPvDTg5CZV.VwEo8CeO96WWs6tr8MdMj5W37a+Yue4hUMY5QtzC1wu49+wUtzEuzSISOjIjIfb0uqZdPlPxAx.uGMje9ver84q82qZx765Kk59PJ93tfUpFmFUBYD54wcY++KjcT2an8+6BdeWvapf2ip6PRmOW1Qz4Klg2D57kIbyJku6DllglMdp7cvsQR6OdxE94a8uO9aGyeLhywD8eV0xBNNkfEcvynP+jgPhGZjZ5lorxAXEoGGMBxDEvoPO08X5a5KG.Fx6DbvAwGkBdrmLYe8EWY4kW9Fj5OBN9aXXjdBNbRt5cxA.NR0tlZ3ahpclnx61rFUSwHx3yXmZVKqZr83NLitUxtFKbWsLHyk.OmYRHgGNxVzagDcz5OJZb46Q2iU9VL3vb30YqbHOGxeM4yg7reOumCIXpeNj63ngseSEUDFHCyXn6x74aJErvLE9BYMTrupClQml95RpJ2od1pM.kLWY5R0CTQkFhiPRew7hyzsgy9dEo3OmqFO26dilH3Vb5f6Q73BkFgwtb7N+0gLaOHIIBieHjUrCEtnxHpYCxaIExf9RAdjijHfNL3tx85wxTmNWE5lZM0Y2DJWnZGlGilNZ9JU2.hBopVliDNK1hJSus3v7WWx1.2xXlY42NdashuE81ZuDP40wi575XO7oNJ4CcLOiEFKepHJfdKhdkbnaONtbExdllw11Ks3RDenh3CcbPy8GC1m7kY4YPlOYFjYkYPlqOCx7oyfL2XFj4yNTYvlQ2bfV5aREABsqGcDEKq5BJDIGE0S9Ofl28hH
    


  • Scriptnode is coming along nicely! @Christoph-Hart , how stable is it running these days? Would it be safe to ship an instrument using this feature within the next month or two?



  • Hard to say. There are a few things in scriptnode which are as stable as the rest of the HISE codebase (I am using it for C++ generated monophonic DSP algorithms in a product which will be released in a few weeks), but other things (everything with polyphony or changing the DSP network dynamically with the scripting API is nothing that I have tested extensively and might be subject to breaking changes).

    What is the scope of your project like (considering scriptnode)?



  • Any idea about why the stk only sounds on note off? I also found the scriptnode synth to be a bit prone to crashing HISE when I was playing around with the other stk nodes.



  • @Christoph-Hart one of our main mics for sampling is with our holy grail mic, which is a Josephson C700s ( https://www.frontendaudio.com/josephson-c700s-stereo-microphone/), it has 3 capsules which allow you to output multiple mic patterns and formats depending on how you mix and EQ the signals ( http://www.josephson.com/pdf/srs7.pdf).

    So far we've been bouncing down to a set pattern but I see that this could dynamically be done using scriptnode, which would give a lot of creative flexibility from the same signal on the fly 🙂


Log in to reply
 

9
Online

552
Users

2.1k
Topics

16.2k
Posts